glob2
Health Pass
- License — License: GPL-3.0
- Description — Repository has a description
- Active repo — Last push 0 days ago
- Community trust — 49 GitHub stars
Code Pass
- Code scan — Scanned 12 files during light audit, no dangerous patterns found
Permissions Pass
- Permissions — No dangerous permissions requested
No AI report is available for this listing yet.
Open-source real-time strategy game where autonomous units carry out your priorities. Play in your browser or download for desktop and mobile.
Real-time strategy where you set the priorities and your colony does the work.
Free. No ads. No in-app purchases. No loot boxes. Open source.
The game · Screenshots · Get the game · Community · For engineers · Build · Contribute
The game
Most real-time strategy games ask you to click on every worker. Globulation 2
doesn't. You run a colony of globs: you decide what gets built, how many
workers each job needs, where to explore and where to fight. Your globs work
out the rest on their own. They gather food and wood, raise buildings, train
in schools, eat at inns and march to the flags you plant.
The result is strategy about decisions rather than clicks. Balance a growing
economy against the rival colony pushing into your land, then decide when to
turn workers into warriors and take the fight to them.
Why players stay
- Command, don't micromanage. Set priorities, place construction sites and
drop exploration, war and clearing flags. Your globs choose who does what. - A living economy. Wheat and wood regrow, inns need feeding, schools and
racetracks upgrade your units, and unfed globs starve. - Skirmish, campaign and tutorials. Learn the basics in the training
campaign, then take on computer opponents with distinct play styles. - Online and LAN multiplayer. Rooms, ratings, leaderboards and match
history at app.glob2.online, plus local network
play. - A new map every match. Hand-made maps, 68 procedural map generators, and
a full map editor with scripting. - Play alongside your own AI agent (desktop). The desktop builds include an
opt-in MCP server. Connect the AI
agent you already use and run the same colony together. - Everywhere you are. Windows, macOS, Linux, iPhone and iPad, Android, and
right in your browser, in 49 interface languages.
The fair deal
Globulation 2 is free on every platform listed here. There are no ads, no
in-app purchases, no loot boxes and no in-game currency. Nothing is for sale.
It is free software under the GPL, so the game you play is the code in this
repository.
Screenshots
![]() Under raid. A developed colony turns its warriors on an invading swarm. |
![]() Battle for the oasis. Rival colonies collide over the only water for miles. |
![]() Build. Place a site, set how many workers it gets, and watch them raise it. |
![]() Economy. Inns, wheat and wood keep a hungry colony working. |
![]() Territory. Hold the land between the crater lakes against a rival. |
![]() Maps. City States, one of 68 procedural map generators. |
Get the game
| Platform | Where to get it |
|---|---|
| 🌐 Browser | Play now at app.glob2.online, nothing to install |
| 🪟 Windows | Microsoft Store · installer or portable ZIP · itch.io |
| 🍎 macOS | Apple Silicon and Intel downloads |
| 🐧 Linux | Snap Store · Flatpak, deb, RPM, Arch and tarball |
| 📱 iPhone and iPad | App Store |
| 🤖 Android | APK downloads |
| 🛠️ Source | Latest GitHub release · build it yourself |
Also on Game Jolt. Every
option is free.
Community and media
| 🌐 Website | glob2.online: guides, news and downloads |
| 🎮 Online play | app.glob2.online: leaderboard, matches, maps |
| 💬 Discord | Join the server to find games, ask questions and talk development |
| ▶️ YouTube | @Globulation2Online: trailers and gameplay |
| 📺 Twitch | twitch.tv/globulation2: live streams |
| 🕹️ Stores | Microsoft Store · App Store · Snap Store · itch.io · Game Jolt |
| 🐞 Bugs and ideas | GitHub issues · support guide |
| 📜 History | The original wiki keeps older manuals, strategies and translations |
For engineers and contributors
Development of Globulation 2 began in 2001. Today this repository holds the
whole product: a deterministic C++ simulation, native, mobile and WebAssembly
clients, seven rendering back ends, CPU and GPU flow-field solvers, a family of
AI opponents with their own tournament system, 68 map generators, an embedded
MCP server and a TypeScript online platform. If you enjoy engine work, this is a
game with a lot of engine to enjoy.
At a glance
| Languages | C++ (about 725k lines in src/, libs/, tools/ and test/), TypeScript (about 120k, online platform and web shell), Python (about 150k, build, asset and analysis tooling) |
| Platforms | Windows, macOS, Linux, Android, iOS and iPadOS, browsers (Emscripten and WebAssembly) |
| Rendering | Programmable OpenGL and OpenGL ES, legacy OpenGL, SDL GPU (Vulkan and Metal), WebGL2, opt-in WebGPU, portable SDL and a CPU software rasterizer |
| Pathfinding | Integer flow fields on scalar, SSE2 and NEON CPU kernels, with experimental OpenCL, Vulkan and WebGPU compute |
| Scripting | SGSL and JavaScript through QuickJS-ng; JavaScript map generators with a typed toolkit |
| Tests | About 1,400 test cases in 404 test and harness files, plus golden replays and cross-platform checksum runs |
| CI | 47 GitHub Actions workflows: a fast gate on every PR, a full matrix on master, and release pipelines for each storefront |
| Content | 68 procedural map generators, 23 hand-made maps, 10 training missions, 49 interface languages, six soundtrack sets |
Architecture
flowchart LR
C["Native, mobile or browser client"] -->|queued orders| O["Simulation owner"]
P["Online platform (TypeScript)"] -->|identity and match admission| C
C <-->|sequenced turns| R["Match relay"]
R -->|ordered turn bundles| O
O -->|immutable snapshots| A["AI workers"]
A -->|validated orders at fixed deadlines| O
O -->|published scenes| C
One simulation owner is the only thing that changes a match. Humans, AI
controllers and map scripts all submit orders; the owner validates and applies
them tick by tick. Background workers compute from frozen copies of state, and
the owner decides when their results become visible, so game outcomes never
depend on frame rate, thread timing or how fast a GPU finishes. Presentation
reads an extracted scene, never live simulation objects. The
system overview walks through it.
Engineering highlights
Bit-identical lockstep on every platformMultiplayer sends orders, not state, so every client must compute exactly the
same match. The simulation path is compiled with strict numeric flags
(-fno-fast-math -ffp-contract=off, enforced in cmake/numeric-contract.cmake)
and uses its own deterministic random streams. SIM_REVISION insrc/game/SimRevision.h versions behavior: online rooms, ratings and replay
verifiers only admit matching revisions.
CI enforces it. The fast gate's sim-diff check fingerprints what a pull
request simulates on fixed scenarios and fails if behavior changed without a
revision bump. Simulation changes then run a browser and native equivalence job
that requires Linux, Windows, macOS and the browsers to verify the same match
identically. See simulation verification
and the turn engine.
Hundreds of globs move at once, so they don't each run A*. Resources, buildings
and flags publish gradient fields: integer distance maps that every glob
simply walks downhill. The field library in src/field/ relaxes them with
bucket queues on scalar, SSE2 and NEON kernels, and can offload them to OpenCL,
Vulkan or WebGPU compute (experimental, opt-in). Every back end must produce the
same integer fields before it qualifies, and field results are published at
owner-chosen tick deadlines, so switching back ends mid-game never changes the
outcome. See
simulation state
and gradient benchmarks.
The renderer consumes immutable scenes and can run on programmable OpenGL,
legacy OpenGL, SDL GPU, WebGL2, WebGPU, portable SDL or a
pure CPU rasterizer. Auto tries a per-platform order picked from frame-time and
memory measurements, not preference. Draws are batched while keeping painter
order, HD sprites share texture-array pages under fixed memory budgets, and
asset workers block-compress every mip level (BC3 or ETC2) so the driver never
encodes. Every renderer applies one shared HD sprite policy. See
rendering and
software rendering.
Each AI lives in its own directory under src/ai/ behind oneAIImplementation interface: Maxima (modular economy, placement, farming and
combat), Cortex (with optional trained policy modes), Nicowar, and older
controllers kept for comparison. Controllers read one shared immutable
observation and must deliver validated orders by fixed deadlines.
tools.tournaments runs immutable binary bundles across local and SSH workers
and scores AIs by an adjusted win-probability trajectory, with paired seeds,
seat rotation and confidence intervals. See AI and
tournaments.
From Braided Delta and Crater Lakes to City States and Bastion Keys, each
generator under src/map/generator/generators/ builds a playable map
from a seed, with golden tests that pin their output. Map makers can also write
generators in JavaScript against a typed toolkit
(content/data/generators/toolkit.d.ts). See
map generators and scripting.
The browser client is the same C++ engine compiled with Emscripten, sharing
simulation, formats and online play with native clients. Platform concerns sit
behind an ApplicationHost boundary: cooperative loading, durable save storage,
WebGL2 rendering and network transports. The design decisions are recorded as
ADRs in the browser guide; the standard and lite
editions are described in editions.

Desktop builds embed a Model Context Protocol
server. Turn it on in Settings → MCP server and any local MCP client can see
the window, read the game world and operate the interface athttp://127.0.0.1:27202/mcp. It listens on loopback only and human input stays
active, so you and your agent play the same colony. Agents can also install
small standing programs that run on a schedule, like the one placing war
flags above.
Accounts, rooms, ratings and match history live in a TypeScript service underservices/online/. A native relay sequences turns and arbitrates checksums,
while clients run the simulation themselves. See
multiplayer, the relay
and hosting to run your own instance.
Each soundtrack set has three mood stems (calm, building, combat) built on one
shared timeline. When the game's mood changes, the mixer crossfades at the same
playback position, so the switch lands on the same beat and harmony. The
pipeline guarantees identical frame counts, seamless loops and a shared loudness
ladder. See the music pipeline.
Repository map
| Directory | Holds |
|---|---|
src/game/, src/engine/ |
Authoritative simulation, orders and rules; engine timing and the simulation thread |
src/unit/, src/building/, src/team/, src/resource/ |
Domain state, type tables, and their drawing and HUD code |
src/map/, src/field/ |
Maps, routing, generators, the editor, and the flow-field library |
src/ai/ |
One directory per AI behind AIImplementation |
src/render/, src/hud/, src/ui/ |
Scene renderer, in-game HUD, menus and settings |
src/net/, src/online/, src/relay/, src/replay/ |
Turn netcode, LAN, online client, match relay and replays |
src/mcp/, src/scripting/ |
The embedded MCP server; SGSL and JavaScript scripting |
libs/ |
The project's own libraries: gag/ (graphics, UI, files) and usl/ (scripting) |
content/, content-src/ |
Runtime data, maps, campaigns and scripts; editable source art and provenance |
platforms/ |
Shells and packaging for web, mobile, macOS, Windows, Linux and stores |
services/online/, deploy/ |
The TypeScript online platform and its hosting scripts |
tools/, test/ |
Build helpers, asset and music pipelines, tournaments, and cross-domain tests |
AGENTS.md has the detailed map and the compatibility rules for
saves, replays and the simulation version.
Build and run
Install your platform's prerequisites from the
build guide, then:
python3 tools/dev_build.py --build=build/local-dev tests
python3 test/run_tests.py --build-dir build/local-dev --quick
./build/local-dev/src/glob2
tools/dev_build.py drives CMake and Ninja with a shared compiler cache for
every target, including browser and mobile. Add perf=1 for profiling builds orrelease=1 for shipping builds; build options
lists the rest. python3 test/run_tests.py runs the headless tier, --affected
runs only the tests your change touches, and --tier full adds display and slow
cases. Testing explains how to choose.
Contribute
Contributions are welcome, from bug reports, translations and maps to AI and
engine work.
- Read the contribution guide and the
development guides. - Find your area in the documentation library: architecture,
features, AI, map generators, assets, scripting, multiplayer, browser, mobile,
hosting and releases. - Open a pull request once your change builds and its focused tests pass. The
fast gate (contract checks, thesim-diffcheck, header layering, a Linux build and the
headless tests) finishes in about 15 minutes, and green is enough to merge.
The full matrix of Windows, macOS, Android and browsers runs on master.
Verification and CI has the details.
Good places to start: write a map generator,
tune an AI against the tournament tools, improve a
translation in content/data/texts.*.txt, or pick up an
open issue. Ask on
Discord any time.
Releases covers packaging and every storefront. The
public website lives in
glob2-online-website.
License
Globulation 2 is free software under the GNU General Public License v3.
Asset and third-party notices are indexed in
licensing, and contributors are listed in
AUTHORS.
Reviews (0)
Sign in to leave a review.
Leave a reviewNo results found







