4hex
Turn-based tactical strategy on a hexagonal battlefield. PROTOTYPE
Cavemen, fantasy warriors, modern troops, and future machines share the same board. The setting is deliberately a sandbox.
- Hexagonal board
- Terrain with elevation
- Fog of war
- Smart enemies
- 1-to-4 hotseat
- Map editor
ABOUT THE GAME
A board that doesn't pick an era
4hex is a turn-based strategy game that runs in the browser, on a hexagonal field you can drag and zoom however you like. The inspiration comes from Battle for Wesnoth and Titans of Steel, but the setting is deliberately ruleless: nothing stops a caveman from facing off against a mech in the same match.
Terrain isn't decoration. Each hex type sets movement cost, elevation, sight range, and how much it hides you from whoever's shooting. High ground improves aim and stretches range. Every unit projects a Zone of Control over its six neighboring hexes, and stepping into it costs you your move on the spot, forcing you to fight or take the hit.
Underneath, the priority is the simulation: a deterministic rules engine with a thin presentation shell. That's what lets an entire match be recorded, exported, and replayed hex by hex, and it's the foundation for what's still coming, like online turn-based matches.
HOW TO PLAY
Controls
You can play with just the mouse. Left click: selects the unit, moves and attacks · right click: context menu for the hex or unit · drag: pans the camera · mouse wheel: zooms in and out · E: ends the turn · Ctrl+Z: undoes the last move. Arrow keys and the keyboard also pan the camera and cycle selection.
Hovering over a hex opens a reading panel before you decide: what that terrain is, how far the unit can reach, who threatens that position, and how combat would play out if you attacked from there. The legend panel explains every marking on the board, so nothing needs to be memorized.
TECH SHEET
Credits
HTML5, CSS3, and ES6 JavaScript, with minimal dependencies and typing via JSDoc plus @ts-check, no build step. Runs as an installable PWA, and a Tauri desktop version is planned. Local multiplayer for 1 to 4 players, with AI available from day one and hand-written behavior personalities. Procedural audio. Code, art, and design original.
NOTE FROM IDEABOB
Why I made this
My favorite genres have always been 4X and roguelike, and 4hex was born from wanting to understand from the inside how a real tactics game works: not just moving a piece, but terrain that matters, line of sight that deceives, and an AI that makes defensible decisions. That's why the foundation came before the content. It's still a prototype and I'm in no hurry at all: I'd rather leave the foundation solid now than have to redo everything later.