Minimalist evasion game built with Python + Tkinter
Solo-built a minimalist evasion game in Python with Tkinter, implementing the main loop, keyboard controls, on-canvas rendering, collision checks, and clean state transitions.
Case Study
Problem
Build a complete, polished 2D game from scratch in Python with no game engine, as a term project demonstrating object-oriented design and a custom game loop.
Architecture
- Tkinter Canvas as the rendering surface with manual dirty-rect invalidation
- Custom game loop using after() scheduling for frame-rate control
- Player entity with keyboard-driven velocity and boundary clamping
- Obstacle spawner with configurable difficulty ramping over time
- Collision detection using axis-aligned bounding boxes (AABB)
- State machine managing menu, playing, paused, and game-over screens
Challenges
- Achieving smooth animation in Tkinter without a dedicated rendering engine
- Implementing progressive difficulty without making the game feel unfair
- Managing game state transitions cleanly without global mutable state
Tradeoffs
- Tkinter chosen for zero-dependency portability; traded rendering performance for simplicity
- AABB collision is less precise than pixel-perfect but sufficient at game scale
- No sound effects to keep the project scope achievable as a first solo game
Outcome
Fully playable evasion game submitted and demoed as CMU 15-112 term project, earning high marks for code quality and gameplay feel.
What I Learned
- Game loop architecture and frame timing without a framework
- Tkinter event model and canvas coordinate system
- Object-oriented design for independent, testable game entities
- The value of iterative playtesting for difficulty tuning
GitHub Repo ↗
Additional resources
Game showcase & breakdown video (LinkedIn media): https://www.youtube.com/watch?v=I-haGKxNNX0