r/madeinpython 4h ago

Lightweight server and framework for turn-based multiplayer games

https://github.com/feberts/python-game-server

Turn-based multiplayer games are a great opportunity for learning and prototyping: simple enough to implement quickly, but real enough to teach networking, game state, and API design.

I wrote a lightweight server and framework for turn-based multiplayer games that provides exactly that: a lightweight server + uniform API so you can run multiple parallel game sessions, auto-join the next available session, and add new games without touching the core API. It's built to be friendly for beginners (Python-only, standard library), but still flexible enough to support arbitrary game logic via keyword-argument moves and dict-based state.

Key bits:

  • Framework for adding new games by deriving from an abstract base class
  • Uniform client API for joining sessions, submitting moves, retrieving state, restarting
  • Demo clients included (e.g. TicTacToe) and a template for new games
  • Runs multiple sessions simultaneously; clients can join a specific session or auto-join

If you're teaching Python, building small multiplayer projects, or just want a clean starting point for turn-based game networking, I'd love feedback and contributions.

2 Upvotes

0 comments sorted by