Inspiration
Strategy games are amazing, but they often run out of content. We wanted to answer a simple question: Can AI be the Game Designer? Instead of hardcoding units and maps, we set out to build an "Infinite Engine" that lets the player fight a war based on anything—from "Space" to "Food"—by turning a single word into a fully playable universe.
What it does
The Conqueror is a generative Real-Time Strategy (RTS) engine.
- One-Word Setup: All you need is to type a single theme (e.g., "Computer", "Zoo", "School").
- Gemini Generates the Universe: The AI instantly creates factions, units , and stats based on your theme.
- Procedural Warfare: You play a tactical skirmish on a generated map where you recruit units, manage resources, and capture sectors.
- AI Historian: When the game ends, Gemini analyzes the battle data and writes a "History Book Entry" chronicling your specific victory or defeat.
How we built it
- Frontend: We used React 19 and TypeScript for a modern, type-safe codebase, built with Vite for blazing fast performance.
- Styling: The UI is styled with Tailwind CSS for a responsive, "sci-fi terminal" aesthetic.
- The Brain (Gemini 3): We integrated the Google Gemini API (
gemini-3-flash) to handle all creative logic. It doesn't just write text; it outputs strict JSON structures that define unit stats (HP, Attack, Speed), faction colors, lores, maps and biome mechanics. - Game Engine: We built a custom game loop using HTML5 Canvas for the star map rendering and React Hooks for real-time state management (ticks, collisions, resource accumulation).
Challenges we ran into
- Hallucination vs. Balance: Getting an LLM to generate "cool" units is easy, but getting it to generate balanced game stats was difficult. We had to use strict JSON schema validation and careful prompt engineering to ensure the AI acted as a "Game Balancer" to ensure balance between creativity and fairness.
- State Management: Syncing the AI's asynchronous creative output with the rigid, synchronous logic of a 60fps game loop required a robust state machine.
Accomplishments that we're proud of
- Building a working "Text-to-Game" loop. It feels magical to type "Zoo" and see the game revolves around the topic-related theme you want.
- The "Post-War Chronicle": We love that the game understands what happened. Reading a dramatic unique story about your specific battle makes every match feel significant.
What's next for The Conqueror
- Multiplayer: Allowing players to generate a universe and challenge a friend to conquer it.
- Educational Mode: Teachers using the engine to simulate and visualize historical battles or biological processes (e.g., "Immune System" vs "Virus") for students.
Built With
- google-gemini-api
- html5
- node.js
- react
- tailwind-css
- typescript
- vite
Log in or sign up for Devpost to join the conversation.