SShortSingh.
Back to feed

One PHP File Can Power a Turn-Based Multiplayer Server Using Simple HTTPS Polling

0
·1 views

A developer has released a lightweight multiplayer game server, hosted at abratabia.com, that fits in a single PHP file and requires no websockets or persistent connections. The system is designed specifically for turn-based games, where low latency is unnecessary, making simple HTTPS polling every few seconds a practical and sufficient solution. It supports public matchmaking with customizable game modes and party sizes of up to ten players, as well as private lobbies using six-character join codes that work without user accounts. Gameplay is handled through just two API calls — one to submit an action and one to fetch new actions — with the server assigning sequential IDs to ensure all clients receive moves in identical order. This deterministic log approach also makes reconnection seamless, as any client can catch up by requesting actions it has not yet received.

Read the full story at DEV Community

This is an AI-generated summary. ShortSingh links to the original source for the complete article.

Discussion (0)

Log in to join the discussion and vote.

Log in

Related stories

0
ProgrammingDEV Community ·

Kalshi Trader Rejects Google's WeatherNext 2 After Finding 5.2°F Cold Bias

A data engineer building a weather forecasting system for Kalshi temperature contracts tested Google's WeatherNext 2 model against 16 settlement stations over two weeks. Despite the model beating global forecasts 97% of the time and offering a free, easy-to-integrate API, it showed a consistent 5.2°F cold bias on daily maximum temperatures — the exact metric Kalshi contracts settle on. Since Kalshi temperature contracts span only 2–3 degree ranges, such a systematic error would point to the wrong contract on nearly every trade. WeatherNext 2 is optimized for large-scale atmospheric metrics like wind fields and mean temperatures, not the localized daily highs recorded at specific airport weather stations. The engineer chose to retain existing models while keeping WeatherNext 2's uncertainty-calibration features on the roadmap for future use.

0
ProgrammingDEV Community ·

Larameili package brings Eloquent-style models to Meilisearch chunks in Laravel

A new open-source Laravel package called Larameili allows developers to interact with Meilisearch indexes using an Active Record model pattern similar to Eloquent, without requiring database storage. The package addresses a common pain point where Laravel Scout's mirroring approach is ill-suited for document chunks that exist only in a search index. Larameili supports batch importing, partial updates, filter-based deletions, and hybrid keyword-plus-vector search via configurable embedders such as OpenAI. Developers can sync index settings to Meilisearch using a single Artisan command and paginate results directly into Laravel's LengthAwarePaginator. The package also provides a BelongsToEloquent resolver to lazily or eagerly load related database models from foreign keys stored on index documents.

0
ProgrammingDEV Community ·

AI-Written Rust Code Compiles Fast But Leaves Hidden Engineering Debt, Study Warns

A Rust engineer named Erik-Jan van de Wal reported on August 5, 2026, that AI-assisted coding in Rust often reaches a successful build by relying on shortcuts like excessive cloning, unsafe trait implementations, and unchecked unwrap calls rather than sound ownership and concurrency reasoning. He found that token costs and roughly 15 additional hours of cleanup made the AI-assisted approach about twice as expensive as writing the code himself. The broader concern is that compiled, passing code is being counted as completed work while verification gaps, architectural issues, and operational risks go untracked. To address this, the author proposes an Agent Assurance Profile (AAP), a protocol that requires generated code to be backed by inspectable evidence and explicit residual judgments before it is considered review-ready. AAP does not replace senior engineering review but aims to ensure that plausible-looking agentic output is not accepted as proof of correctness.

0
ProgrammingDEV Community ·

Claude Code /context and /memory do different jobs — here is how to use both

Claude Code's /context and /memory slash commands are frequently confused, but they serve distinct purposes. Running /context mid-session shows exactly which files — including CLAUDE.md rules — actually loaded into the current context window, making it the right diagnostic tool before editing any file. The /memory command, by contrast, opens a file picker to edit what will load in future sessions, and changes made mid-session do not affect the current one. Not all CLAUDE.md files load at startup; project-root files load fully, while subdirectory files load lazily only when Claude accesses that folder. Auto-generated memory notes are stored in ~/.claude/projects/ and capped at 200 lines or 25KB, with content beyond that threshold silently excluded from sessions.

One PHP File Can Power a Turn-Based Multiplayer Server Using Simple HTTPS Polling · ShortSingh