How I Built Three Small Party Games for a Spring Dinner
Описание и применение
Автор создал три небольших Node.js‑приложения для вечеринки: многопользовательскую игру «память», однопользовательский «камень‑бумага‑ножницы» и лотерейный генератор. Каждый проект использует простую архитектуру без БД, а решения реализованы с учётом ограничений реального времени и визуальной согласованности.
Задача
Create lightweight, event‑friendly games that can run on a laptop and projector without complex infrastructure.
Результат
Three small, self‑contained games that can be deployed on a laptop and projector, demonstrating simple server‑authoritative logic, pre‑determined animation outcomes, and efficient no‑repeat number drawing.
Рабочий процесс
- 1. Implement each game as a small Node.js app with Express and plain HTML/CSS/JS.
- 2. For the multiplayer game, use Socket.IO to share a single in‑memory game state and enforce authoritative checks.
- 3. For the RPS display, pre‑select the outcome before animating to ensure visual and logical consistency.
- 4. For the lottery, maintain an array of available numbers, remove drawn numbers, and animate slot reels.
- 5. Publish each project on GitHub with README and instructions to run locally.
- 6. Share the code so others can adapt for parties, classrooms, or meetings.
Доказательства
All three are intentionally small Node.js applications. They serve static files with Express, keep the browser UI in plain HTML/CSS/JavaScript, and avoid a database.
The server owns one in‑memory game state: ...
I choose the result first: ...
The pool is built by walking the inclusive range and skipping excluded values.
I would only run the unmodified version on a trusted local network.
- Дата записи: 2026-10-01T12:41:08.775Z