Dungeon Explorer¶
A Step-by-Step Tutorial for writing a 2D game in Python
by Dr. Kristian Rother

image created with dreamstudio.ai
Who is this tutorial for?¶
I wrote this tutorial with beginner and intermediate Python learners in mind.
As a beginner, you will probably need some guidance during this tutorial. If you would like to start learning Python by yourself, check out the material on www.academis.eu/python_basics/
With some experience you can work through the exercises on your own and come up with new, cool features. You might also discover situations where you can start trying out advanced development techniques, such as testing, refactoring and OOP patterns.
In both cases, I hope you have fun creating a complete Python game. May the source be with you.
Contents¶
- Installation
- The Prototype
- Draw the Floor
- Stop at Walls
- Exit Stairs
- Smooth Movement
- Collect Coins
- Health
- Traps (Optional)
- Code cleanup: Lookup Table
- Keys
- Unlock Doors
- Teleporters
- Switch (Optional)
- Code Cleanup: Split a Function
- Fireballs
- Healing Potion (Optional)
- Skeletons
- Multiple Levels
- More Monsters (Optional)
- Music
- Title Screen
- Explosions
- Write a Video
- Recap Exercises
License¶
© 2025 Dr. Kristian Rother
The Python code is distributed under the conditions of the MIT License. See LICENSE.TXT for details
The text can be used under the conditions of the Creative Commons Attribution Share-alike License 4.0 (CC-BY-SA 4.0). See creativecommons.org for details
The tile graphics are taken from opengameart.org/content/dungeon-crawl-32x32-tiles set under CC:0. See ART_LICENSE.TXT for a list of authors.
Contact¶
kristian.rother@posteo.de