Open RTS — hold the line.
A deterministic real-time strategy engine written in Rust, in the spirit of the cancelled Generals 2. Pick one of fourteen generals, build an economy, field an army, and take on the AI, the Onslaught's waves alone or with a friend, or a short campaign, on the original Generals and Zero Hour maps.
What it is
An original engine — no code from EA's release is ported into it — with its own procedural art, a strict determinism story, and a skirmish mode where the AI sees only what its own units see.
Deterministic to the tick
Integer fixed-point, no floats in state, a per-tick hash. Every match records a replay that re-simulates bit for bit; a golden replay guards the behaviour in CI.
Skirmish, your way
Up to 8 players (human or AI, in teams if you like) on 85 original Generals and Zero Hour maps plus a built-in one, with bridges you can blow up and rebuild. Pick factions, generals, teams, starting credits, fog and seed, or play an eight-mission campaign at three difficulties.
Together or against each other
A LAN lobby finds games on your network, and hosting asks your router to forward the port so a friend can join over the internet, with no server in between. Play head to head, or side by side in co-op Onslaught. Allies share vision and win together.
Three AI levels
Easy sends small waves, and not before 6:00. Normal weighs every fight, keeps its artillery behind the line and retreats units that are losing, but sends nothing before 4:00 and builds its army slowly. Hard does all that at full speed, from the first minute. Each level beats the one below about nine times in ten.
Three factions
EU, APA and GLA, each with its own economy shape, armour and generals, combat units from rifles to artillery and helicopters, a hero, a base defence, upgrades and veteran ranks. Units have abilities (Nitro, self-destructs, grenades, stuns); GLA tunnels and hides. Numbers come from the 2013 alpha's own data where the archive has it; the rest are placeholders tuned by measured matches, so every faction wins 47–55% of them. The rules are plain data files you can edit.
Fog of war
Per-player visibility and memory of enemy buildings, in the simulation and in the hash. The AI sees exactly what you see — it scouts instead of cheating.
Sound from scratch
Every sound is synthesized in code: rifle cracks, cannon thumps, artillery, blasts, kills, chimes for your finished units and buildings, panned to where they happen on screen. No sound files. A fight you can't see stays silent, so the fog gives nothing away.
The field remembers
Tracers, shell arcs and blasts; damaged buildings smoke and burn, wrecks smoulder, tanks leave tread marks and dust, and shells leave craters. Soldiers walk and fall, barrels lift to their target, birds scatter from a fight and flags stream in the wind. All decoration only: the sim never depends on a single pixel of it.
Screens
Rendered by the game itself, with a copy of the 2013 closed alpha imported: the unit and building models, the bottom-bar HUD, portraits and build icons are the alpha's (EA's art), laid out by its own HUD files and fed by this game's simulation. Without the import the game draws its own procedural models and HUD instead.
--frames 900), the camera drifting after the fighting.
Controls
| Select | Left click / drag; Shift adds to the selection |
|---|---|
| Orders | Right click: enemy → attack, supply → gather, foundation → help build, ground → move. Ctrl + right click attack-moves. |
| Build | Constructor selected: click a build-grid button, click places, Esc cancels; a selected foundation's Cancel cell removes it for a full refund |
| Produce | Building selected: click a build-grid button to queue units, right click it to cancel one (Backspace: the last queued); right click the ground sets a rally point |
| Groups | Ctrl + 1–0 makes a control group, 1–0 selects it (twice: jump to it); Z selects everything on screen, X every unit of the selected kinds, V jumps to the latest alert |
| Camera | WASD / arrows / screen edge to pan, wheel zooms, Q/E rotates, click the minimap to jump |
| Game | Space pauses, + / − or the buttons top left set the game speed, Esc or MENU opens the menu, F10 surrenders, M mutes |
| Extras | G arms your general's power, F1–F6 your support powers (click to aim), R / F / C a unit's abilities, T deploys artillery, E empties a garrison, Tab selects the next collector |
Build and run
Rust 1.99+, nothing else. The engine needs no game files.
# run the game (Linux; X11) cargo run -p g2-client --release # play a specific match from the command line cargo run -p g2-client --release -- --faction gla --enemy apa --map "zh:Tournament Desert" # tests: unit, economy, determinism, golden replay cargo test --workspace
Or grab a build from the releases page: a Linux AppImage, a Windows zip or a macOS disk image, each with the original maps.
Status and licensing
Active development. The engine is original work under GPL-3.0. Not affiliated with or endorsed by EA; all trademarks are the property of their owners.
What is in
Skirmish vs AI or other players in teams, over a LAN or the internet, co-op and solo Onslaught modes of scheduled waves, an eight-mission campaign with three difficulties, on 86 maps (85 original, one built in) with destructible bridges and hills that block fire, three factions with a hero each, fog, stealth, tunnels, artillery, helicopters, garrisons, upgrades, veterancy, unit abilities, synthesized sound, fourteen generals with their own units, powers and a perk tree you rank up by playing, replays, moddable rules and a deterministic core.
What is not
A relay for players whose routers can't forward a port, the heroes' passive abilities, art of its own beyond procedural shapes and textures; the alpha's music and voices only play from an imported copy. The balance is measured, not designed: placeholders are tuned until the AIs' matches come out even. Nobody has played it in a window yet.
The 2013 alpha
EA's cancelled
Command & Conquer had a closed alpha test in 2013. It is optional here: the game is
complete without it. If you already have that client, the main menu's 2013 Alpha page
(pick its CnC.exe) decodes it into a cache on your machine, and the game then uses
its models, animations, sounds, voices, music and HUD. Neither the alpha nor the cache is in
this repository or the downloads; the screenshots above show it.
The maps
Original Generals and Zero Hour map data is read at runtime from EA's GPL release (submodule), never copied into this repository or the AppImage beyond the maps themselves.