Asteroids Game Engine
A foundational implementation of the classic Asteroids game, focusing on object-oriented design and vector physics in Python.
PythonPygameVector Math
Asteroids Game Engine
Built as a foundational project at Boot.dev, this implementation of the classic Asteroids game served as a deep dive into object-oriented programming (OOP) and game loop architecture.
Engineering Highlights
- Vector-Based Physics: Implemented 2D vector mathematics for movement, rotation, and velocity calculations, ensuring smooth and predictable entity behavior.
- Inheritance & Polymorphism: Leveraged a clean class hierarchy for game objects (Player, Asteroid, Shot) to manage shared behavior like movement and wrap-around logic.
- Collision Logic: Developed a robust circular collision detection system to handle interactions between projectiles and asteroids of varying sizes.
- Resource Management: Optimized sprite rendering and game state management using the Pygame library, focusing on maintaining 60 FPS performance.
Core Features
- 🛸 Responsive Controls: Physics-based movement with inertia and rotational thrust.
- 🪨 Dynamic Difficulty: Recursive asteroid splitting logic (Large -> Medium -> Small).
- 🔫 Projectile System: Managed object lifetimes for shots to prevent memory inflation.
- 🔄 Wrap-Around Logic: Seamless teleportation across screen boundaries for all game entities.