- W โ Jump
- Spacebar โ Duck & Speed Up
- Start with 3 lives
- Goal: run as far as you can while avoiding obstacles
- The further you run, the higher your score ๐
- Tutorial / Starting Instructions โ Intro screen to explain controls before gameplay.
- More Obstacle Types โ Add variety for increased challenge.
- Death Animation โ On game over (all lives lost), duck explodes into particles.
- Machine Learning Agent โ Train an AI to play the game automatically once core gameplay is stable.
- Implemented procedural terrain with random variation (Minecraft-style).
- Used a world offset system to simulate an endless runner.
- Managed memory by pre-loading upcoming chunks and removing off-screen ones.
- Extracted frames from a sprite sheet for characters and obstacles.
- Used
pygame.sprite.Spritegroups for easier management and collision detection. - Built smooth animations by cycling between frames.
- Timed frame updates to control walking and jumping.
- Synced sprite changes with in-game actions for responsive visuals.
- Implemented gravity to simulate falling.
- Designed jump mechanics with controlled height and responsiveness.
- Added knockback/bounce effects on collisions.
- Used bounding boxes (
rect) for efficient collision handling. - Fixed obstacle collision logic so the duck properly loses lives when hit.
- Fixed obstacle alignment, ensuring obstacles spawn correctly on terrain instead of floating.
- Built a main loop to update and render the game each frame.
- Implemented states: menu, running, and game over.
- Added UI for restarting and an interactive duck on the main menu.
- Used loops, conditionals, and functions throughout gameplay logic.
- Organized code into reusable utility functions.
- Designed classes like
Duck,TerrainBlock, andObstacle. - Encapsulated behavior in clean, maintainable objects.
- Structured the project into multiple files (
game.py,terrain.py,obstacles.py, etc.). - Learned how to build and maintain a medium-sized Python project.
- Set up version control for the project.
- Created a
.gitignoreto hide unnecessary files (e.g.,__pycache__). - Committed and pushed updates through GitHub.
- Learned how to export the game using Pygbag.
- Successfully ran the game in a browser through WebAssembly.
- Understood packaging and deployment steps for web builds.