Inspiration

The inspiration for this project came from a love for strategy and tower defense games like Clash of Clans and Bloons Tower Defense. I wanted to create an engaging experience where players could strategically deploy troops to attack enemy bases while defending their own. The goal was to combine creative gameplay mechanics with technical challenges to grow as a developer.

What it does

The game, Blue vs Red, pits players against an AI opponent in a dynamic battlefield. Players spawn troops to attack enemy towers and bases while defending their own. Key features include:

Troop targeting and pathfinding. Dynamic health management for troops and structures. Background music and sound effects for attacks, enhancing immersion. How we built it The game was built using:

Python and Pygame for core game development, handling rendering, event loops, and collision detection. AWS S3 for hosting and dynamically downloading game assets like sound effects and music via boto3. Object-Oriented Programming (OOP) to design reusable classes for troops, towers, and projectiles. AudioManager Class: Managed sound effects and music efficiently, ensuring seamless integration into gameplay.

Challenges we ran into

Audio Performance: Frequent sound downloads during gameplay caused significant lag. Solution: Cached sounds during initialization and reused them throughout the game. Collision Detection: Ensuring accurate hit detection with multiple troops and structures was computationally expensive. Solution: Simplified hitbox calculations and optimized detection loops. AWS Integration: Encountered issues with incorrect S3 keys and file permissions. Solution: Added robust debugging logs and verified bucket configurations. Accomplishments that we're proud of Smooth Gameplay: Achieved a seamless experience by optimizing troop movement, targeting, and sound playback. Dynamic Audio: Integrated background music and sound effects from S3, creating an immersive battlefield atmosphere. Efficient Architecture: Designed modular classes for easy expansion and maintenance.

What we learned

Game Development Fundamentals: Deepened my understanding of event loops, FPS management, and rendering. Audio Management: Learned how to dynamically load and play sounds while minimizing performance overhead. Debugging Skills: Strengthened my ability to troubleshoot complex issues like audio playback and asset loading. AWS S3 Integration: Gained hands-on experience in managing cloud-hosted game assets.

What's next for Blue Vs Red

Adding new troop types with unique abilities. Introducing AI difficulty levels for enhanced replayability. Expanding the game to support multiplayer battles.

Built With

Share this project:

Updates