
A Playable 3D Game, Built From a Single Prompt
Game development is one of the most technically demanding creative disciplines — it requires physics, rendering, AI, state management, and UI all working together in a single codebase. This workflow demonstrates that with a sufficiently detailed prompt and Gemini 3.1 Pro Preview, Eigent can spec out, write, and deliver a fully playable multi-file browser game without a single line of manual code.
Configure Gemini 3.1 Pro Preview
This workflow runs on Gemini 3.1 Pro Preview, Google's most capable model at time of recording. To configure it in Eigent, go to Settings → Models → Custom Models:
- API Host:
https://generativelanguage.googleapis.com/v1beta/openai/ - Model:
gemini-3.1-pro-preview
Eigent supports multiple custom models simultaneously — you can have Gemini, OpenAI, Anthropic, Qwen, Deepseek, MiniMax, and others all configured at once, with one set as the active default.
The Game Design Prompt
A detailed prompt produces a detailed result. This one specifies mechanics, visual style, scoring, special events, and even a specific collectible sequence:
Create a modern 3D side-scrolling platformer inspired by Mario, combined with Snow Bros mechanics. The player can move left and right and jump, shooting snow projectiles to gradually freeze monsters into snowballs. Once fully frozen, a 'Kick' button appears, allowing the snowball to roll and bounce across the stage, defeating enemies and triggering chain reactions. If all monsters are defeated using a single snowball, a 10,000-point bonus drops, or occasionally a glowing cake appears. Collecting the cake spawns four blue snow creatures; defeating them grants the letters S, N, O, and W, and collecting all four awards an extra life. Include a scoring system, lives display, scaling difficulty, and a restart function. The background should resemble a Mario-style world with rich, layered, and visually complex 3D environments, including multi-level terrain, decorative elements, and parallax depth effects, with smooth, modern, and immersive visuals.
Every mechanic named in the prompt is implemented in the output.
Eigent Plans and Executes the Build
Eigent creates a single task for the Developer Agent:
Develop a fully playable HTML5/JavaScript web game using Three.js that combines modern 3D side-scrolling platformer visuals with Snow Bros gameplay mechanics — including snow projectile shooting, enemy freezing and kicking, chain reaction bonuses, scoring, lives, scaling difficulty, and a restart function.
The Developer Agent uses Terminal & Shell tools alongside Web Deployment and Screen Capture capabilities to write all game files directly to the workspace folder.
Three Files, One Complete Game
The output is three interdependent files:
index.html— entry point and game containergame.js— all game logic: Three.js rendering pipeline, physics, enemy AI state machine, projectile system, chain reaction detection, bonus drop logic, scoring, lives tracking, and the SNOW letter collectible sequencestyle.css— canvas sizing, UI overlays, HUD styling
The Three.js renderer builds a layered 3D environment with parallax depth — snow mountains in the background, midground platforms, and foreground terrain, all with procedural canvas elements and smooth animation.
What the Finished Game Looks Like
Opening index.html in any modern browser reveals a fully playable platformer:
- HUD: Score counter, Wave counter, Lives display, and the S-N-O-W letter progress bar
- Player controls: Left/right movement, jump, snow projectile shooting
- Enemy mechanics: Progressive freeze state, kick-to-roll, chain reaction when a snowball hits multiple enemies
- Bonus system: 10,000-point bonus drop on a full-clear with a single snowball
- Visual style: 3D layered snow-mountain background, Mario-style level design, smooth parallax scrolling
Tooltip on first load: "Freeze enemies with Z. Kick fully frozen snowballs!"
Total tokens used: approximately 147,000 — lean for a multi-file game of this complexity.
What This Demonstrates About AI-Assisted Game Dev
The Snow Bros mechanic — freeze, kick, chain — requires the agent to implement interdependent game states: an enemy can be unfrozen, partially frozen, or fully frozen, and only transitions to rollable snowball in one specific state. The chain reaction logic requires collision detection between a rolling snowball and other enemies. These aren't trivial implementations.
Gemini 3.1 Pro's ability to hold the entire game specification in context and produce coherent, interdependent JavaScript across multiple files is what makes this possible. The result isn't a template — it's a custom implementation of the exact mechanics described.
What to Try Next
Add a second playable character with different projectile mechanics and a local two-player mode.
Generate a level editor that lets you place platforms and enemies on a grid and export the layout as JSON.
Add a high score leaderboard that persists in localStorage.
Build a mobile version with touch controls for the same game.
Tips for Better Results
-
Specify mechanics precisely. The freeze → kick → chain reaction mechanic worked because each state transition was described explicitly in the prompt. Vague terms like "cool enemy interactions" would produce much simpler results.
-
Name your technology choices. Specifying "Three.js" for 3D rendering and "pure HTML/CSS/JS, no libraries" for the structure gives Eigent clear implementation constraints. Without these, the agent may choose different (potentially incompatible) approaches across different tasks.
-
Review in-browser before iterating. Once Eigent delivers the files, open
index.htmlimmediately and test the core mechanic loop. It's faster to course-correct at this stage with a targeted follow-up prompt than to specify everything upfront.


