Skip to content

shortstack/kids-game-zone

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

2 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

Kids Game Zone ๐ŸŽฎ

A little offline learning arcade for the kids (around 3rdโ€“4th grade): seven colorful single-page web games, plus one home page that links them all together. Everything runs on the home wifi from a single computer โ€” the kids just open a link on their phones.

No frameworks, no build step, no internet needed: each game is one self-contained Python file that embeds its own HTML/CSS/JS and serves it with the standard-library http.server. Zero dependencies beyond Python 3.

Game Zone launcher: a grid of seven colorful game tiles โ€” Math Stars, Story Time, Clock Stars, Math Quest, Geo Stars, Science Stars, and Fractions Factory

๐ŸŽฎ The games

Open the Game Zone launcher and pick one โ€” it links to every game:

http://<this-computer's-LAN-IP>:33275

File Game Port What it practices
home.py ๐ŸŽฎ Game Zone (launcher) 33275 One link to all the games
mathstars.py โญ Math Stars 33276 Times tables, +/โˆ’/ร—/รท flashcards
reading.py ๐Ÿ“– Story Time 33277 Reading comprehension
clockgame.py โฐ Clock Stars 33278 Telling time (set the hands / read the clock)
mathquest.py ๐Ÿง  Math Quest 33279 Add/subtract word problems (friendly numbers)
geogame.py ๐ŸŒ Geo Stars 33280 50 US states (tappable map!) & 7 continents
sciencegame.py ๐Ÿ”ฌ Science Stars 33281 166-question science quiz
fractionsgame.py ๐Ÿญ Fractions Factory 33282 Fractions with pies & bars

โœจ Shared features

  • Phone-first design โ€” rounded cards, big tap targets, playful colors & emoji.
  • "Who's playing?" picker with a per-kid ๐Ÿ† high score (saved in the browser's localStorage).
  • 3 hearts / 3 tries per question, confetti on a win, gentle hints on a miss.
  • Each game has its own theme color and is pinned to a fixed port, so the links on the kids' phones never change.
  • The launcher builds each link from the browser's current hostname, so it works from any phone on the wifi with no hardcoded IP.

๐Ÿš€ Quick start

You only need Python 3 (3.8+). No pip install, no Node, nothing else.

git clone https://github.com/shortstack/kids-game-zone.git
cd kids-game-zone
./run_all.sh

run_all.sh starts all seven games and the launcher, then prints the link to open. Press Ctrl+C to stop everything.

Want just one game? Run its file directly โ€” each one prints the LAN URL to open:

python3 mathstars.py     # Math Stars        -> :33276
python3 fractionsgame.py # Fractions Factory -> :33282

Every game binds to 0.0.0.0, so any phone/tablet on the same wifi can reach it at http://<this-computer's-ip>:<port>.

Find this computer's LAN IP:

hostname -I | awk '{print $1}'      # e.g. 192.168.1.61

Then on the kids' devices, open http://<that-ip>:33275 for the launcher.

๐Ÿ”ง Deploy as an always-on box (auto-start at boot)

For a machine that should always have the games running, install them as systemd user services โ€” no sudo, and with lingering enabled they start at boot even before anyone logs in:

./install-services.sh

That script writes one unit per game to ~/.config/systemd/user/, enables and starts them, and turns on lingering. Afterwards:

systemctl --user status  fractionsgame.service   # check a game
systemctl --user restart fractionsgame.service   # after editing a game
systemctl --user restart homepage.service        # after adding a new tile

There is one service per game (mathgame, readinggame, clockgame, mathquest, geogame, sciencegame, fractionsgame) plus homepage for the launcher.

Firewall: if the host has a firewall, allow the game ports on the LAN, e.g. with ufw:

sudo ufw allow 33275:33282/tcp

๐Ÿ“ Notes

  • The US states map in Geo Stars uses public-domain SVG path data (the classic 959ร—593 blank US map), embedded directly so the game needs no network.
  • Adding a new game: copy the pattern, use the next port (33283), give it a systemd unit (or add it to install-services.sh), and add a tile to the GAMES array in home.py.

๐Ÿ“„ License

MIT โ€” see LICENSE. Made with love for the kids. ๐Ÿ’›

About

๐ŸŽฎ An offline LAN learning arcade for kids (3rdโ€“4th grade): 7 zero-dependency single-file Python web games + a launcher โ€” math, reading, telling time, word problems, US geography with a tappable map, science, and fractions.

Topics

Resources

License

Stars

1 star

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors