One PHP File Can Power a Turn-Based Multiplayer Server Using Simple HTTPS Polling
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.
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