Ghost Dodger
Inspiration
Ghost Dodger was born from the desire to create an immersive 3D Halloween experience that combines classic arcade gameplay with modern web technologies. The spooky season inspired us to build something that captures the thrill of dodging ghosts in a haunted graveyard while collecting candy - a digital trick-or-treat adventure!
What it does
Ghost Dodger is a fast-paced 3D arcade game where players control a pumpkin character navigating through a Halloween-themed environment. The core gameplay loop involves:
- Dodging hostile ghosts and evil pumpkins that patrol the graveyard
- Collecting candy and power-ups to boost your score
- Surviving increasingly difficult rounds with combo multipliers
- Defeating boss enemies for massive score rewards
The game features a progressive difficulty system, achievement tracking, and polished UI with spooky sound effects that enhance the haunted atmosphere.
How we built it
Technology Stack
- Three.js - WebGL rendering for 3D graphics
- Black Engine - Game logic and entity management
- Vite - Lightning-fast development and optimized builds
- Web Audio API - Immersive spooky sound effects
Development with Kiro
We used a "vibe coding" approach with Kiro AI, which dramatically accelerated development:
- Conversational Scaffolding - Described features in natural language and Kiro generated the architecture
- Iterative Refinement - Built game mechanics through back-and-forth dialogue
- Event-Driven Design - Kiro helped architect the clean separation between 3D scene logic and UI
The most impressive part was how Kiro understood the complex integration between Three.js and Black Engine, generating clean event-driven code that bridges the two frameworks seamlessly.
Challenges we ran into
1. Three.js + Black Engine Integration
Challenge: Bridging two different frameworks with different paradigms (3D scene graph vs. 2D game engine).
Solution: Created a message-passing architecture where the 3D scene emits events that the UI layer consumes, maintaining clean separation without tight coupling.
2. Collision Detection Performance
Challenge: Checking collisions between the player and multiple enemies every frame was causing performance drops.
Solution: Implemented spatial partitioning and only checked collisions for entities within a certain radius of the player. The collision check complexity went from \(O(n)\) to approximately \(O(\log n)\) using a grid-based approach.
3. Mobile Touch Controls
Challenge: Keyboard controls worked great on desktop, but mobile needed an intuitive touch interface.
Solution: Implemented pointer-based movement where the player follows touch/mouse position, with smooth interpolation for natural feel.
4. Asset Loading & Memory Management
Challenge: Loading multiple 3D models and audio files caused initial load times and potential memory leaks.
Solution:
- Implemented lazy loading for non-critical assets
- Proper cleanup and disposal of Three.js geometries and materials
- Reused materials across similar objects to reduce memory footprint
5. Game Balance
Challenge: Finding the right difficulty curve - too easy was boring, too hard was frustrating.
Solution: Implemented a rounds system with configurable enemy counts and speeds. Used the formula:
$$\text{Enemy Speed} = \text{Base Speed} \times (1 + 0.15 \times \text{Round})$$
This creates a smooth difficulty progression that feels challenging but fair.
Accomplishments that we're proud of
- Built a complete 3D game in record time using AI-assisted development
- Achieved smooth 60 FPS performance on both desktop and mobile
- Created a polished Halloween aesthetic with cohesive visuals and audio
- Implemented complex features like combo systems, boss battles, and achievements
- Maintained clean, maintainable code architecture throughout rapid development
What we learned
Technical Insights
- 3D Game Architecture - Proper separation of concerns between rendering, game logic, and UI
- Performance Optimization - Maintaining 60 FPS with efficient collision detection and asset loading
- Event Systems - Building loosely coupled components that communicate through messages
AI-Assisted Development
- How to effectively communicate requirements to an AI coding assistant
- The power of iterative development with instant feedback
- Maintaining code quality while moving fast
Game Design
- Balancing difficulty progression to keep players engaged
- The importance of visual and audio feedback for player actions
- Creating a cohesive Halloween aesthetic across all game elements
What's next for Ghost Dodger
- Multiplayer Mode - Compete with friends in real-time
- More Power-ups - Additional abilities like teleportation or ghost-freezing
- Level Variety - Different Halloween environments (haunted house, dark forest, etc.)
- Leaderboards - Global high score tracking
- Seasonal Themes - Adapt the game for other holidays (Christmas lights on trees, anyone? 🎄)
Built with ❤️ and 🎃 for the Kiroween Hackathon
Log in or sign up for Devpost to join the conversation.