Civ Hex: A Night-Empire Hex-Map 4X
- Lab Skill
- v0.1.0
- Game creation
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.
Beispiel
Civ Hex 4X strategy game
Das Beispiel läuft in einem sandboxed Frame ohne Zugriff auf diese Seite.
Online ausführen
In einer SandBase-Sandbox ausführen und Ihre Ergebnisse in Lab ansehen.
In Lab öffnen ↗Was Sie erhalten
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.
So funktioniert es
- 01
Create and customize the project
node scripts/new-project.mjs --out <dir> copies the working game, with Node 22.4 or later. Read references/customize.md first: it maps each common request, such as map size and terrain mix, the tech tree, costs and pacing, the AI, the look, audio, or adding a unit or district, to the files and symbols to change. Game logic is in src/core and numbers and strings in src/config.js.
- 02
Build one file
npm ci and npm run build:single write dist-single/index.html, one file under 8 MiB that uses pure Canvas 2D with no WebAssembly or WebGL, and no fetch, storage, workers, alert, confirm or external URLs. Everything you add is bundled and listed with its licence in CREDITS.json. The Skill calls no model, and the AI rivals run in the game's own code.
- 03
Verify every check
npm run shoot writes shots/report.json and screenshots, and every step in verify.json must still reach its asserted state; the published build passed 38 checks. Keep the turn engine synchronous: it runs the AIs and then upkeep, and making it async breaks the end-turn checks. Found cities, work the land and research the eight-node tech tree.
FAQ
How do you play Civ Hex?
In Civ Hex you lead the amber empire on a hex map beside two AI rivals. Each city works the land inside its border for gears, research and culture; gears build settlers and warriors, research climbs an eight-node tech tree and culture pushes the border out. Settlers found new cities, and warriors fight adjacent units.
Does Civ Hex call a model or need a key?
No. Civ Hex is a single offline HTML game whose rivals are scripted, so playing or editing it needs no API key and no model calls. Civ Hex gives your agent a working game, a customize guide and verification. The two AI rivals are plain code in the game's turn engine, not language models, and the game makes no network calls.
Is the Civ Hex game bilingual?
Yes. In Civ Hex both the page and the game's own interface switch between English and Chinese. Canvas 2D draws the hex map, units, cities and HUD, and WebAudio synthesizes the sound cues, so no image, font or audio files ship with the game.
Can Civ Hex save games?
No. Civ Hex runs in a sandbox with no storage, so games are not saved between visits, and there is no multiplayer or server. It is a pocket 4X for one session; real-time combat and a full rule-book are out of scope.
Does Civ Hex work on phones?
Yes. In Civ Hex you tap a unit, then tap a tile to move it, and the panel handles cities, research and ending the turn. It was verified under touch emulation, not on real devices, so check it on the phones you care about before sharing it.
What does the Civ Hex AI do?
Civ Hex runs two AI rivals, ember and teal, inside its synchronous turn engine: each turn the AIs act, then upkeep runs. They found cities, build units and fight with the same rules as you. The AI is plain game code you can change in src/core, not a language model.
Weitere Skills
Alle Game creation Skills →
Seagull Swoop
Build a 3D flight-and-delivery game with light fries, heavy fish, crosswinds and optional ring routes. The gull must bring lunch home; cargo weight changes which openings it can safely reach.

Wedding Cake Wobble
Build a 3D fragile-cargo delivery game around a wobbling wedding cake. Brake before turns, avoid crossing guests and steer around tables. Lost tiers change the score, while a partial delivery can still succeed.

Hermit Tide
Build a 3D route-and-timing game where a hermit crab changes shells to cross a tidal shore. Narrow gaps favour the cap, stronger shells resist waves, and dry stones provide shelter and checkpoints.

Clover Circuit: Estate Cut
Drive a coral ride-on mower through a fenced estate garden. Steering, braking and the moving blade cut actual grass tufts; Overview reveals the genuine trail. Edit three gardens and three scene palettes offline. Coverage counts trimmed tuft centers rather than continuous ground area.

Glide Gates: Lagoon Run
Flap a golden bird through emerald pipe pairs above a turquoise lagoon. Actual fixed-step gravity, swept circle contacts and full-gate scoring power both manual flight and clearly labeled practice. Edit three courses and three scene palettes offline.

3D Interactive Garden Islands
Walk a curved garden, harvest fruit, share gifts, catch butterflies, fish, grow flowers and craft furniture. Four lighting states and one offline HTML with bilingual keyboard and touch controls.

