How I Built Three Small Party Games for a Spring Dinner
说明与用途
为春季晚宴构建了三款轻量级 Node.js 互动游戏:多人舞蹈记忆游戏、单屏石头剪刀布展示和无重复抽奖。它们可在本地运行,使用手机作为控制器,适用于任何活动。
问题
Create simple, event-friendly games that can be run on a laptop and projected to a large screen, using participants’ phones as controllers or as a single-screen display.
结果
The three games run reliably on a local network, support multiple participants, and provide engaging visual feedback. They are easy to deploy, modify, and extend for future events.
工作流
- 1. Clone the desired repository from GitHub.
- 2. Run
npm installto install dependencies. - 3. Start the server with
npm start(default ports 3000/3001). - 4. Open the host URL (
/host) on the projector screen and the player URL (/) on each participant’s phone. - 5. Use the host controls to start rounds, adjust difficulty, or reset the game.
- 6. For the rock‑paper‑scissors and lottery displays, press Space or click to start a round and watch the animated result.
- 7. Optionally build an Electron desktop version for a standalone Windows build.
证据
Each repository has its own README and can be started independently with Node.js 18 or later.
The multiplayer game stores everything in one process. A server restart clears the room, and there is no authentication, HTTPS, rate limiting, or input validation.
The lottery display has a slightly different invariant: a number that has already been drawn must not be available again.
- 记录日期: 2026-09-19T01:31:18.993Z