2D Platformer Engine
Complete 2D game engine with visual level editor, physics systems, AI enemies, and particle effects built in Python/Pygame.
About the Project
A complete 2D platformer engine built in Python using Pygame. It includes a visual level editor, modular architecture, responsive physics, AI, and rendering systems. This project demonstrates solid software design and integration of multiple systems into a single cohesive game.
Gameplay Systems:
- Smooth player movement with gravity and velocity-based physics
- Separate X/Y collision handling for glitch-free responsiveness
- Enemy AI with edge detection, ranged attacks
- Projectile mechanics with trajectory calculation and impact detection
- Game state logic including victory/defeat, restart, and health systems
Level Editor & Engine Architecture:
- Visual level editor with grid snapping, layer switching, and categorized hotbar
- Multi-layer tilemap engine with collision toggles
- Automatic tile variance calculation for seamless tile connections
- JSON-based save/load system for levels and configurations
- Component-based architecture with factory patterns for entity instantiation
- Dynamic asset discovery
Visual & Rendering Systems:
- Sprite animation system with per-entity states (idle, run, jump, etc.)
- Smooth camera scrolling with easing and parallax background layers
- Particle systems with blending, physics, and mathematical distribution
- Multi-layer rendering with correct depth ordering
- Surface caching for efficient tile rendering
Technical Highlights:
- Dynamic Object Oriented design for modularity and reusability
- Grid-based spatial indexing for fast lookups and optimized collision
- State machines drive animations, game logic, and UI behavior
- JSON used across levels, assets, and animation configurations
- Organized structure across core systems: editor, gameplay, rendering, UI
Tech Stack
PythonPygameJSONObject OrientedDynamic Architecture