"A huge green fierce snake bars the way!"; or, Building a Text Adventure Game in Python
summary
A working Python text-adventure engine that separates state into rooms things players and turns commands into command-as-modular-helpers is described, with a concrete parser+logic+state design and an engine-versus-game API. Built games (a Harry Potter demo) mostly run: movement, inventory and spells work, auto-commands trigger things like a basilisk on a turn, but a concrete bug (the Sword of Gryffindor duplicating) forces ad hoc checks, motivating the framework to keep game rules out of core logic.
AI-written summary · about
chapters (6)
- 0:00Intro
- 1:08How a Text Adventure Works
- 8:56Why a Text Adventure Framework
- 14:30Framework vs Game
- 16:36Parsers
- 21:31Commands
related talks
34mTeaching Object-Oriented Programming with Python
34mProcedurally Generated Monsters! A complete example of Python game development
31mSnakes all the way down, building Worlds with Python code
59mWriting Domain Specific Languages with Python
42mColossal Cave Adventure in Python... in the browser!
31mEscape the Python - Ten years of Australia's best Escape Rooms
05mBuilding Procedural Games with Python and Godot
57mGame Programming with Python
