Source code
Last updated
Heroes 2 Online's game client is free software. Here you can download the source code of the version you are playing.
1. The download
This is the source code of the game as it runs in your browser right now: the version and commit below are the ones this page was built with. Every update of the site replaces it with the source of the new build.
It is free software. You may use, study, change and share it under the GNU General Public License, version 2 or (at your option) any later version. The licence's text is in the archive's LICENSE file.
2. Why it is here
The game's rules are ported from fheroes2, the open-source Heroes of Might and Magic II engine, which is licensed under the GNU General Public License. Part of that code runs in your browser, for route previews, prices and showing your moves at once. Anyone who receives a program under that licence may have its source, and change and share it on the same terms, so we offer it here beside the game.
3. What is in it
- The game client: the web app the site serves.
- The rules it runs: the port of fheroes2, its catalogs of creatures, spells, artifacts and buildings, and the tools that generate those catalogs from fheroes2's own source.
- The fheroes2 revision the port follows, and how to build it all.
What is not in it:
- The art, music, sounds and maps. They are Heroes of Might and Magic II's, which belong to Ubisoft. They are not covered by this licence, and the download does not include them. The original game is on GOG.
- The game server and its infrastructure. They run on our own machines and are never sent to you, so they are not part of the program you receive.
4. Building it
You need Node 20.19 or newer and pnpm. The archive's README.md gives the full steps and the settings a production build needs:
tar -xzf heroes2online-source.tar.gz cd heroes2online-* corepack enable pnpm install --frozen-lockfile pnpm typecheck pnpm build
5. fheroes2
Thank you to the fheroes2 developers, whose work this game is built on. Their copyright notices travel with the code:
- fheroes2, github.com/ihhub/fheroes2: copyright © 2019–2026.
- Free Heroes2 Engine: copyright © 2009 Andrey Afletdinov.
Heroes 2 Online is not part of fheroes2 and is not endorsed by its developers. Questions about this game go to us, not to them.
6. An earlier version
If you received an earlier build of the game and want its source, write to support@heroes2online.com with the version and commit it showed (in Settings, or at the foot of the home page), and we will send it. See also our Terms of Service.