I have been teaching programming quite a bit lately, and I found it was useful for students to have a simple game engine template for their projects. For a little while, I was using a hacked-apart version of the Pong clone, but over the past week, I made a nice clean game template. I thought it might be useful for others out there in the world, so I have released it here under the public domain.
The zip file contains vector, sprite, game, and asset class descriptions in python. To run the game engine, use python to open main.py. If you’re running windows and you have python installed, it will automatically associate .py files with python. You’ll need to have pygame installed as well.
This features framerate independent updating, and caps the framerate at 60 FPS. While the game is running, you can toggle a slow-motion mode by hitting “o”, and you can toggle framerate printing by hitting “f”.
This project is perfect for experimentation and prototyping. You can easily add particle systems, gravity, repellers, etc. You could use this as a foundation for your next game jam. You could even port it to another language and make a commercial game.
Please let me know if you find any bugs or if you make a cool project with this. So far, I have only tested it on Ubuntu, but since it’s python, it should work fine on Mac and Windows as well.