DEV Community

Aayushi Goel
Aayushi Goel

Posted on

๐Ÿƒ๐Ÿฟโ€โ™‚๏ธ FREE AT DAWN: Survive the Shortest Night in this Gemini-Powered Juneteenth Runner

June Solstice Game Jam Submission

This is a submission for the June Solstice Game Jam

What I Built

FREE AT DAWN is a dynamically generated, historical survival-runner powered by Google's Gemini API.

Set on the night of June 18, 1865 in Texas, you play as an enslaved person who has just heard whispers that the Emancipation Proclamation was signed two years ago. The enslavers have kept it a secret, but the truth is finally spreading. Your goal is to run toward Galveston to hear General Order No. 3 read aloud at dawn (Juneteenth).

How it relates to the theme: The game uses the concept of the June Solstice (the longest day of the year) as a metaphor for freedom. The tagline is: "Survive the shortest night. Run toward the longest day." As you progress, the sky physically transitions from a terrifying midnight into the glowing sunrise of the solstice.

๐ŸŽฎ How to Play

You are constantly running forward. You must avoid obstacles while outrunning the enslaver patrols behind you.

  • Jump: Press SPACE, UP ARROW, or SWIPE UP on mobile.
  • Double Jump: Press jump again while in mid-air to clear large obstacles or fences.
  • Powerups: Collect glowing lanterns to gain a speed boost and widen the gap between you and your pursuer.
  • The Crossroads: When you reach a checkpoint, the game pauses. You will be presented with a historical dilemma generated live by Gemini AI. The path you choose will physically alter the weather, terrain, and obstacles in the next stage of your run!

Try it out: Free at Dawn

Code

How I Built It

I built this game entirely from scratch using pure HTML5 Canvas and Vanilla JavaScriptโ€”zero external game engines.

The core of the game relies on Gemini 1.5 Flash acting as an AI "Dungeon Master." At every checkpoint, the game sends your progress to Gemini, which returns a structured JSON payload containing a historical dilemma and environmental variables. My custom canvas engine then parses this JSON to physically alter the game's physics, weather, and terrain (e.g., rendering grass, water, or storms) on the fly based on the AI's decisions.

Prize Category

I am submitting this game for Best Google AI Usage.

In Free at Dawn, Gemini is not just used to generate text or pre-render assetsโ€”it is the literal core engine of the game. It controls the weather, dictates the physical terrain the player must navigate, dynamically alters the physics multipliers (e.g., mud slows you down), creates the narrative tension, and generates a personalized ending. The game logic and the AI are inextricably linked. Without Google AI, the game cannot function!

"Now it's your turn. Survive the night, make the right choices, and reach the light! ๐ŸŒ…"

Top comments (0)