Civ Hex: A Night-Empire Hex-Map 4X
Found a night empire on a hex map, in one small offline HTML file: move settlers, found cities, queue builds and climb an eight-tech tree while a slowed AI expands on a staggered clock. Map, units, cities, panels and HUD are all procedural Canvas 2D — an active player wins a tech victory around turn 30–39, while turtling lets the AI out-research you.
Bring the hex map and its terrain, the cities and the tech tree, and optionally the AI pace, the win conditions, the palette and the UI text. The Skill returns a downloadable Skill (the 4X strategy project, a customize guide, headless verification) and one playable example empire.
How it works
Your coding agent copies the working game and follows the customize guide: tile movement and fog, city founding and queues, the eight-tech tree, end-turn resolution, the staggered AI clock and the synth audio.
The published example is a tuned 4X loop, not a map toy: found cities, queue builds, climb the tech tree and take the AI’s capital before turn 60 — an active player wins a tech victory around turn 30–39, while turtling lets the AI out-research you.
The game is played headlessly under the sandbox policy: menu, a seeded map, a selected settler, a move, a founded city, a queued build, a researched tech, ended and warped turns, pause and mute, the Chinese UI and a phone move.
Frequently asked questions
Does it call a model or need a key?
No. The Skill gives your agent a working game, a customize guide and verification; the game itself makes no network calls and calls no model.
Why is the demo sandboxed?
The frame has an opaque origin and no network access, so the scene can’t read anything from this page or reach the internet.
Is the game bilingual?
Yes. Both the page and the game’s own UI switch between English and Chinese.
What are the visuals and audio made of?
All of it is code: Canvas 2D draws the hex map, units, cities and HUD, and WebAudio synthesizes the cues. No image, font or audio files ship with it.
Does it work on mobile?
Yes: tap a unit, tap a tile to move, and the panel handles cities, research and end-turn. Verified under touch emulation, not on real devices.
Why is there no online generation?
Building a new scene needs a model key inside the sandbox, which the backend doesn’t support yet. Run the Skill with your own agent for now.