finds.dev← search

// the find

asweigart/PythonStdioGames

★ 971 · Python · updated Dec 2024

A collection of text-based games written in Python 3 that only use "standard i/o".

A collection of 100+ short Python 3 text-based games by Al Sweigart ("Automate the Boring Stuff"), designed explicitly as learning material for beginners who've gotten past syntax but don't know what to build next. Every program is capped at 256 lines, uses only stdlib, and runs with print/input — no setup friction. This is a teaching tool, not a game engine.

The 256-line hard cap is a genuinely good pedagogical constraint — it forces each game to be digestible in one sitting, and if a program can't fit with decent comments, the rule says simplify the program, not the comments. Single-file, zero-dependency design means you can paste any game into a REPL and run it immediately, which matters a lot for beginners who lose momentum fighting environments. The `# (!)` comment convention that marks variables students can tweak (health, difficulty, speed) is a small but smart idea — it turns passive reading into active experimentation without requiring them to understand the whole program first. The breadth is real: Conway's Life, Langton's Ant, Rush Hour, Sokoban, Sudoku, Towers of Hanoi — these aren't toy examples, they're actual algorithms and puzzles that teach something.

The f-string ban to support Python 3.5 on 2019-era Raspberry Pis is stale reasoning in 2024 — Python 3.5 has been EOL since 2017, current Raspberry Pi OS ships 3.11, and avoiding f-strings makes the code read less like modern Python than beginners will encounter everywhere else. The repo has compiled binaries checked in (`csharp_ports/matrixscreensaver/bin/`), which has no place in a source repo and is just noise. The `inprogress/` folder contains half-finished files that have apparently sat there for years; at some point that's just clutter. Not accepting pull requests is a pragmatic call for a solo educational project, but it means the collection is frozen by one person's bandwidth — a handful of the listed programs (mazerunner3d HTML, some Pygame games) require extra downloaded files or Pygame, quietly breaking the "no dependencies" promise for those specific games.

View on GitHub →

// want more like this?

We dig through GitHub every week and send a few repos picked for what you actually care about — each with an honest take like this one.

Get finds in your inbox → Search again →