Prince Pal
Back to All Articles
Hackathons & AI Feb 2026 6 min read

Building a 2D Arcade Game in 24 Hours with Gemini AI at Google Prompt Wars (1st Runner Up)

A deep dive into our 24-hour sprint at Google Prompt Wars where we secured 1st Runner Up building a multiplayer 2D Snow Bros game powered by prompt engineering and Google Gemini API.

Prince Pal

Prince Pal

Software Engineer

Building a 2D Arcade Game in 24 Hours with Gemini AI at Google Prompt Wars (1st Runner Up)

The 24-Hour Sprint at Google Prompt Wars

Hackathons are an incredible crucible for testing your speed, architectural intuition, and teamwork. When we entered the Google Prompt Wars hackathon, the challenge was clear: leverage modern LLMs and generative prompt techniques to build a captivating, functional product in under 24 hours.

Rather than building another generic chatbot or summarizer, we decided to take a bold route: reviving the nostalgic arcade classic Snow Bros as a multiplayer 2D web game, where enemy behaviors, dynamic difficulty levels, and stage generation were guided by Google Gemini.

Architectural Breakdown

  • 1.Game Engine: Built cleanly with HTML5 Canvas and TypeScript without heavy external engine bloat, ensuring 60fps fluid rendering.
  • 2.AI Behavioral Trees: Instead of static hardcoded if-else paths, enemy decision triggers were generated through prompt-assisted logic.
  • 3.Multiplayer Mechanics: Cooperative 2-player controls on the same keyboard with separate collision maps and score counters.
  • typescript
    // Example of our collision and snowball transformation state machine
    interface EnemyState {
      x: number;
      y: number;
      snowLevel: number; // 0 to 3
      isRolling: boolean;
    }

    function applySnowballHit(enemy: EnemyState, power: number): void { enemy.snowLevel = Math.min(3, enemy.snowLevel + power); if (enemy.snowLevel === 3) { enemy.isRolling = true; } }

    What Made the Judges Say 'Yes'

  • Live Playability: The judges were able to immediately grab the keyboard and play a 2-player boss battle live.
  • Sub-50ms Frame Pacing: Smooth physics loops combined with dynamic sound synthesis via the Web Audio API.
  • Clear AI Differentiation: Demonstrating how prompt engineering assisted rapid asset composition and enemy dialogue.
  • Winning 1st Runner Up validated our philosophy: build real, delightful products that run flawlessly in front of the jury.

    Tags: #Hackathons#Gemini API#Next.js#Game Dev#AI Prototyping