Developer Builds 5-Game LAN Party Server Using Only Two In-Memory Maps
A developer built GameNight, a Node/Express/Socket.io server hosting five real-time party games — including a Mafia variant, UNO, trivia, Scribble, and Tic-Tac-Toe — designed to run locally without internet, accounts, or a database. The entire game state is managed using just two JavaScript Maps: one tracking rooms by code and another linking socket IDs to rooms. Rather than building a shared game engine abstraction, the developer opted for zero shared architecture, giving each game its own state shape and handler functions dispatched via a single switch statement. All timed phase transitions across games are managed through a consistent two-function timer pattern to prevent memory leaks when games end early. The project prioritizes simplicity and local usability, allowing players to join from their phones within seconds of the host running a single command.
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