An unofficial reconstruction, in C++, of the program of Age of Empires II HD (the 2013 edition, version 5.8), that builds for the web browser: random-map games against the computer, played in a page, with the game's data from your own copy.
This is an unofficial fan project. It is not made, endorsed or supported by Microsoft, Xbox Game Studios or Forgotten Empires. Age of Empires is a trademark of Microsoft Corporation, named here only to say what this code reconstructs. Nothing of the game is in this repository: no data, no pictures, no sounds, no executable. To run it you need your own copy of the game. Not for commercial use. See NOTICE.md.
Try it: https://shellbear.me/aoe2/ runs the free trial of the game's expansion in your browser, and takes your own copy for the full game.
![]() |
![]() |
![]() |
The browser build running with a player's own copy of the game. The game and its art are Microsoft's; the pictures are here to show what the code does.
This repository holds no game data. To build and play you need Age of Empires II HD, version 5.8, which you can buy on Steam. The build and the page read your copy on your own computer; it is not uploaded anywhere. Other versions of the game are not supported.
| Folder | What it is |
|---|---|
src/ |
The reconstructed source: the engine, the game's rules, its computer players, its screens. Each function carries the address it has in the original program. |
platform/ |
Our own layer that lets that source run in a browser: files, window and input, drawing with WebGL, sound, and the page around the game. |
tools/ |
One command, web.py: it builds the page, serves it locally, and packs a folder for a web host. |
docs/ |
How to set up, build, play and pack. |
You need Python 3, Node.js and Emscripten, and your own copy of the game
(the folder that holds AoK HD.exe and resources/), linked or copied here
as game/.
python3 tools/web.py build # builds build/web/
python3 tools/web.py serve # http://127.0.0.1:8000/
docs/setup.md has the details.
python3 tools/web.py pack full --lean # build/site-full: the page and your own game's files
python3 tools/web.py pack own # build/site-own: the page alone
full is for yourself: it copies your own game's files next to the page, so
keep it on your own computer or a host only you reach, never a public
address. own holds no game file at all: the page asks each player for
their own game folder, keeps it in their browser and plays it.
python3 tools/web.py pack --help lists the options.
Random-map and other single games against the computer, from the game's own main menu to the end of a game: every civilization and map your copy has, saved games, recorded games. Multiplayer and the campaigns are not the aim of this project. Music is not played yet.
The reconstructed source in src/ is derived from a program whose rights
are Microsoft's: it is not ours to license. What we wrote ourselves, the
browser layer in platform/ and the scripts in tools/, is under the MIT
licence (LICENSE). NOTICE.md says which is which.


