A living planet
Procedural worlds with forests, grasslands, deserts, tundra, polar regions, hills, and mountains. Geography and resources should make settlement locations and travel routes matter.
Valehex is a browser-based strategy game about exploring, settling, and competing on a vibrant spherical planet. The multiplayer prototype supports exploration, settlements, production, and combat. Browser-run AI and offline solo are implemented locally and being prepared for deployment.
Start from the familiar Civilization-style loop: explore, found cities, choose production, grow your territory, and defend it. Play on a globe with continuous geography, rich biomes, mountain ranges, rivers, and oceans. There is no flat map edge.
Procedural worlds with forests, grasslands, deserts, tundra, polar regions, hills, and mountains. Geography and resources should make settlement locations and travel routes matter.
Three planned races (Humans, Insects, and Aliens) each cover every role, from workers to a capital unit, and unlock stronger units by building up. A focused technology span keeps the project smaller than a journey through all of human history. See the units and buildings.
Join through a private invitation link. Play free-for-all or in teams such as 2v2v2v2, 4v4, 3v3, or 2v2v2. Optional AI players fill empty seats.
This is a low-cost proof of concept and a shared learning experience, with no current monetization target. Civilization and StarCraft are inspirations; Valehex will use its own identity and artwork.
Food, metal, and crystal pay for units and buildings. Supply caps army size, and wild creatures roam the map, so fighting and exploring cost units and players keep rebuilding. Veteran units will earn promotions later. The first costs, yields, and combat values are in the field guide; balance will come from playing.
Each player picks Humans, Insects, or Aliens (or Random) in the lobby. For now each race has its first tier: its workers, buildings, and first army. Units fight with their own armour, range, and bonus damage, against ground or air. Menus speak each race’s language (Humans train, Insects hatch, Aliens warp in), and every entry has a “?” that opens it in the tech tree.
Start with a Colonist, 2 Engineers, 20 food, and 30 metal. The Colonist founds a Command Center; later Colonists are trained there. Engineers build Habitats for supply and a Barracks for Marines.
Start with 3 Foragers, 30 food, and 30 metal. One Forager becomes the Hive, where everything hatches. A Nursery unlocks Swarmers and Queens, and Drifters raise supply. Drifters count as flyers but walk for now.
Start with 2 Shapers, 20 food, and 40 metal. A Shaper warps in the Sanctum and stays. Obelisks give supply, and a Portal warps in Vanguards. Alien units and buildings carry shields that soak up damage before their hit points and recharge 2 each turn.
Every land tile holds a little crystal. A crystal harvester yields 1 crystal on an ordinary tile, 2 on a rich deposit (about 6% of land, shown as blue shards breaking through the ground), and 4 on one of the 12 five-sided pentagon vents, plus 1 while a worker tends it. Pentagons in the ocean wait for ships: each race will get a small work boat that builds a platform on them.
Buildings and improvements take turns to finish and do nothing until then. Farms cost 4 metal, mines 6 (on hills or mountains), and crystal harvesters 10. Supply comes from your bases and your race’s supply source, up to 60.
Every unit is small, medium or large (1, 2 or 3 points), and a tile holds 3 points of ground units plus 3 of flyers. Your units can walk through a full tile of your own but cannot stop there. Small units such as Marines, Swarmers and Vanguards are drawn as squads of three; a figure falls at two-thirds health and another at one-third, and healing brings them back.
A unit that neither moves nor attacks heals at the start of your next turn: 33% of its health on your building’s tile, 20% within 2 tiles of one, 10% elsewhere, and nothing within 2 tiles of an enemy building. Rest (the moon button on the unit card) ends its turn at once and marks it with a small moon.
A hit does 1 less damage for each advantage the target has: higher ground, standing trees, or a river between. At most 2 less, never below 1, and flyers ignore it. Before you attack, each target shows its damage, such as “4 → 2”, with an icon for each advantage, and rivers are drawn on the planet.
Flying units float above the ground with a gentle bob, leaning into their turns. A soft shadow and the owner’s coloured ring on the ground under each one show which tile it is on. On a tile with ground units, a flyer hovers behind them so it never hides them. Shots and claws reach up to them, and a destroyed flyer falls out of the air.
Games started before October 14, 2026 were retired with the old rules; nothing carries over. Race abilities such as regeneration, repair, larvae, and power fields, plus tiers 2 and 3 and flying, come in later steps.
One player acts at a time. Others may prepare orders while waiting. Queued orders execute only on their owner’s turn and are checked against the current state.
A queued order pauses when the unit sees a new hostile, a hostile moves toward any friendly unit, or the unit sees an attack. Hostiles moving away, known camps, and allied activity don’t interrupt. A paused order waits for its owner and never turns into an attack.
Players vote on turn deadlines, maximum turns, and game-ending conditions. The goal is to support short sessions as well as persistent matches lasting months.
If every unit is fortified or has queued orders, the turn plays itself. By default, the AI plays a timed-out turn for a player who gave no orders. Players can switch on Away so the AI covers for them, then take their seat back; three missed turns in a row turn Away on automatically. Eight-player sequential play will need testing to make short matches practical.
Current multiplayer sends each player only permitted terrain, units, and events. Planned browser-run AI needs additional simulation data to minimize messages. The UI and AI still respect fog, but an AI executor could inspect hidden information. Read the tradeoff.
Team and global chat support coordination. A visibility-filtered event log explains what happened between turns. Later, a guided replay can move the camera between those events.
Implementation status includes local development work, not a deployment guarantee. Browser AI, offline caching, and retry recovery have local tests; they have not been deployed to live matches.
The browser renders the planet and, in the agreed AI design, chooses bot actions. AWS validates actions and stores authoritative progress. Lambda runs when work arrives, then exits. A months-long match survives in the database while phones are locked and players are away.
The multiplayer backend exists. Browser AI batches and offline mode are implemented locally; WebSockets remain optional future work.
| Service | What it does for Valehex |
|---|---|
| Static hosting | Amplify Hosting builds and serves the site on every push to main. Offline mode caches required assets locally. |
| Custom domain + TLS | Amplify Hosting manages the valehex.com certificate; DNS stays in Route 53. |
| API Gateway + Lambda | Authenticate participants, validate and replay commands, and save results. Planned AI batches avoid repeating browser strategy searches; an authorized AI execution payload is separate from ordinary player views. |
| DynamoDB | Store authoritative match state, versions, seats, orders, and bounded event history. Planned AI integration adds bot memory and batch receipts. |
| API Gateway WebSockets | Optional future notifications. The current client uses manual refresh; reconnecting clients must fetch authoritative state even if notifications were missed. |
| EventBridge scheduled rule | The existing minute worker checks due human turns. AI integration must distinguish pending bot work from human turn deadlines. |
| CloudWatch | Collect structured logs and track action failures, response times, turn processing, and backend health. |
A shared JavaScript rules module should describe tiles, legal orders, combat, and city production. The server is authoritative. Visual meshes and animations must not determine outcomes.
Ordinary multiplayer views keep the seed and hidden entities on the server. The planned AI execution payload deliberately relaxes that secrecy for casual games. Offline solo uses the same rules with the full state saved locally.
Invitation links should exchange a private token for a seat session; credentials must stay out of logs. Persist state and events before notifying clients. Missed notifications are recovered by fetching updates.
Version checks protect against stale requests and scheduled callbacks. The current minute worker provides approximate timeout recovery; commands also enforce stored deadlines. Decided: a seat link signs any new device into that seat. The device gets one compressed snapshot with explored terrain and the latest 20 chat messages, then only changes.
Cost goal: a small, usage-driven backend. Start in one region, send compact updates, cache assets, bound log retention, and monitor spending. This proposal avoids requiring a static public IP or always-on game host. It is not a promise of zero cost: storage, requests, connections, logs, and data transfer still matter. HTTP APIs bill per request in 512 KB increments, so fewer, compressed requests matter more than tiny payloads.
Let the browser choose bot actions. Let Lambda verify the consequences and save the match. Reuse the same rules and AI for fully offline solo play.
Implemented locally; deployment pending. Browser workers now support solo saves, offline asset caching, online AI batches, and retry recovery. The protocol uses at most 128 actions per batch. Reusable seat links and broader mobile testing remain future work.
After the code and required assets load, the browser runs map generation, rules, AI, and local saves without gameplay requests. Cache assets for reopening offline and provide save export/import. Cloud saves are optional separate work.
Keep Lambda and DynamoDB for validation and durable state. No host browser must stay awake, and peer consensus or blockchain is not required. Phones can disconnect; confirmed progress remains available to other devices.
Usually one AI submission covers the intervening bot turns. Oversized runs can continue through multiple acknowledged batches.
Browser simulation and Lambda replay use deterministic rules, pinned versions, and explicit random state. Graphics do not determine outcomes. Run AI in a Web Worker to keep the interface responsive.
Lambda still calculates movement, combat, production, income, and turn transitions. It skips AI strategy and pathfinding, and never trusts a submitted final state. Measure these costs separately before estimating savings.
A browser simulating discoveries without repeated server requests needs underlying world state. The simplest casual-mode design provides the authorized executor a full simulation snapshot, excluding credentials and invitation secrets.
The AI receives a fresh fog-filtered view after each action, and the UI still hides unknown areas. Someone inspecting browser data could nevertheless reveal secrets or substitute other legal AI moves. Legality checks cannot prove the intended policy ran. Strong secrecy would require extra exchanges or server-run AI.
Implementation order: share deterministic rules and AI with offline solo; add bounded online batch validation and persisted bot memory; then integrate mobile recovery, cross-device identity, and request/compute measurements.
No release dates are committed. We’ll choose a minimal victory rule before the first match and broaden the design after playtests. Species abilities, research, diplomatic systems, and detailed combat remain design work. The field guide holds the current race proposal.
You don’t have to take on the whole game. A small, finished contribution or a thoughtful playtest would help.
JavaScript game rules, a city production interface, AWS infrastructure as code, persistence, automated checks, or turn handling.
Original species concepts, resource artwork, sound, and simple 3D units and cities. Resources can use sprites or small meshes; cities and units should have 3D assets.
Explore the prototype now. Later, help test map fairness, pacing, combat clarity, resource value, and whether you want to take another turn.
If this sounds interesting, tell the person who shared this page what you’d enjoy working on—or just that you’d like a seat in an early match.
The repository is currently private. Public release under MIT is a possible future step; no project license has been selected yet.