Inspiration

You know how sometimes there's a character in a movie or a game that everyone just loves to hate? People joke about it, making memes or even punching dolls of that character. That got us thinking: what if we could channel that frustration into a fun and satisfying game? We wanted to create an arena where players could unleash their frustration on that one character, and jejich hordes, in the most epic way possible, using iconic weapons and supernatural powers.

What it does

Our project, Galactic Wars, is a 3D first-person survival game where you fight off wave after wave of enemies. You're dropped into a futuristic arena and have to survive against endless hordes of foes. To defend yourself, you get three cool weapons: a lightsaber for up-close-and-personal fights, a blaster and shotgun for long-range attacks.

A key feature is telekinesis, which lets you pick up and throw enemies or boxes around the arena to cause massive damage. For every wave you clear, your score goes up, based on how long you survive and how many waves you beat. Your score is then saved to an online leaderboard, letting you compete for the title of "Elite Commander."

How we built it

We built this project using modern web tech to create an immersive 3D experience that runs right in your browser.

Frontend & Game Engine: (1) Three.js: This was the heart of our game. We used it for all the 3D rendering, scene management, lighting, and object movement. (2) React & TypeScript: The entire user interface (UI)—like the main menu, in-game HUD, game over screen, and leaderboard—was built with React. This helped us keep the game logic separate from the display stuff, which was super helpful. (3) Vite: We used Vite as our build tool. It gave us incredibly fast hot-reloads during development, which saved a ton of time.

Backend & Services: Supabase: We used Supabase for our online leaderboard. It handles user authentication (just by entering a username) and stores all the important data like scores, survival time, and waves reached in a PostgreSQL database.

Key Features We Implemented:

  • Dual Combat System: Players can switch between a lightsaber and a blaster, each with its own unique feel.
  • Telekinesis Mechanic: You can lift enemies or ThrowableBox objects and hurl them, which makes for some really dynamic and strategic gameplay.
  • Coordinated Enemy AI: The enemies don't just mindlessly run at you. We built an AICoordinator that lets them form squads (surround, pincer, scatter), react to how dangerous the player is (playerThreatLevel), and even alert each other to your location.
  • Endless Wave System: The game automatically ramps up the difficulty by increasing the number and types of enemies in each wave, so it always stays challenging.

Challenges we ran into

  1. Mixing Game Logic with UI: Getting the Three.js game loop (which runs every single frame) to play nice with React's state management was tricky. We had to build a solid system of callbacks to keep things like player health, ammo, and score perfectly in sync.
  2. DIY Telekinesis Physics: We didn't use a physics engine, so we had to code the simple physics for throwing objects and enemies from scratch. Handling collision detection, throw force, and how objects bounce to make it feel satisfying was a complex puzzle.
  3. Performance Management: With particle effects for explosions and hits, dozens of AI-controlled enemies, and dynamic objects, keeping a stable framerate was our top priority. We had to be careful to optimize everything, from how often the AI updated its logic to cleaning up old 3D objects.

Accomplishments that we're proud of

We can say that it is 90% build by bolt and 90% neatly constructed using the first prompt.

What we learned

This project taught us just how important a clean architecture is, especially for separating the core game logic from the UI. We learned a lot about state management in complex apps and how to squeeze out performance in a real-time 3D environment. Plus, building an AI system from the ground up gave us a huge appreciation for the complexity involved in creating smart and interesting enemies.

What's next for Finding Your Perfect Ride, Every Time.

We have a ton of ideas for the future of Galactic Wars:

  • More Enemy Variety and Boss Fights: Adding new enemy types with unique attack patterns and throwing in giant boss fights at the end of certain waves.
  • More Dynamic Arenas: Introducing levels with destructible environments, traps, or even procedurally generated layouts to make every playthrough feel fresh.
  • Skill Progression System: Letting players upgrade their lightsaber or telekinesis powers as they play, giving them a deeper sense of progression.
  • Co-op Multiplayer Mode: Implementing a mode where two players can team up to survive together. This would be a huge but awesome technical challenge!

Built With

Share this project:

Updates