An inofficial open source remake of Warcraft II: Tides of Darkness
This open source project is not affiliated, associated, endorsed by, or in any way officially connected with Blizzard Entertainment, Inc., or any of its subsidiaries or its affiliates. The official Blizzard Entertainment website can be found at http://www.blizzard.com.
This project is a completely independent and non-commercial undertaking. It is not intended for sales or profit, and no monetary gain is derived from its operation. This project is intended for educational and informational purposes only.
It is important to note that in order to use this open source project, an original version of Warcraft 2 is required. This project/repository does not provide any game assets from Warcraft 2.
Warcraft II: Tides of Darkness was released in Europe in 1996. As a small kid, I immediately fell in love with this game. I spent hundreds of ours playing it, I had endless network battles with my family and friends. Since Warcraft II had a heavy influence on me and I am still in love with this game, I decided to create war2.5, which is an inofficial open source remake of Warcraft II. It has the following goals:
I started working on this in 2021 as a single developer during my free time. Now in January 2024 I realized that additional support is required and the next logical step is to release the current development state public on github.
See Section How to build
See Section How to run
Play your favorite map in any season. Press w,s,a,d to switch the season on the fly without reloading/restarting. Minimap can be seen at the top right.
C++ is the programming language I started learning programming with. I wanted to create an open source project that uses object-oriented programming (OOP) in modern C++. Thus, classes, inheritance, polymorphism and further concepts are used. My goal was to write code that is maintainable and flexible while using modern C++ such as C++17 and C++20 features. You know Warcraft II and as a programmer you expect objects of type "Mage"? Then just look into Mage.h and Mage.cpp. Interested in how Peasants mine gold? Just open CompositeStateMining.h and have a look.
The current game is designed using the RTS lockstep approach. This means, all relevant actions such as unit production or movements result in events that are executed at the beginning of a new gameframe (=tick). This is especially important when considering so far missing multiplayer code. The current code is far from perfect, but I think it allows you to contribute. You contribution is highly welcomed!
See Section How to build
As written, I worked for three years in my rare freetime, completely alone on this project. Nonetheless, this project has a quite advanced development state. war2.5 is at least a bit playable! Many game mechanics have already been implemented. However, several major components are still missing, such as proper animation and time/frame management, network, AI... Just some of the things that work:
See Section How to run
This work would definitely not have been possible without
Oh well, a lot of things are either missing, buggy or might be optimized. There are small things you could start with, e.g., when double clicking a unit all visible units of the same type should be selected. And there are big things you could contribute, e.g., optimizing pathfinding. Some more examples:
As you can see, there are plenty of places to start with. You contribution is highly welcomed!
Debug mode allows for, e.g., inspecting tiles:
Exploration is partially working:
Buildings have production queues:
Select and command as many units as you like:
Pathfinding using AStar:
Play the original game music (or add own sound files):
Use the pud browser to load any map you want:
Building on linux has been done on Ubuntu. Note: war2.5 can be built&run on Ubuntu also inside VirtualBox.
sudo apt install libsdl2-image-2.0-0 libsdl2-image-dev libsdl2-mixer-2.0-0 libsdl2-mixer-dev libsdl2-ttf-2.0-0 libsdl2-ttf-dev git cmake git clone https://github.com/war2/war2tools.git
cd war2tools
mkdir build
cd build
cmake ..
make
sudo make installgit clone https://github.com/glfw/glfw.git
cd glfw
mkdir build
cd build
cmake ..
make
sudo make installgit clone https://github.com/hsbgit/war25.git
cd war25/src/build
cmake ..
make -j4DONE
Unfortunately, we have can’t simply do sudo apt-get install all required libs when using windows. Hence, we have to get the following third party libraries on our own. However, we do not build them; We simply use the provided releases.
To make things even more simple, a fully functional set of libs is already included in 3rdparty/win. This means the following steps are not required unless you want to change to another lib version.
war2tools has no pre-compiled release. Thus, we have to compile this lib on our own:
Change the windows src/3rdparty/win/ paths to the paths corresponding with the correct lib version numbers.
Done, compiling and linking should work.
Copy DLLs from their respective lib folders to the build folder
This repository does not contain any Warcraft 2 assets. Hence, to run war2.5, a Warcraft 2 Battle.Net edition is required for data extraction. Your CD folder should look like this:
As a first step, we have to extract the assets (sounds, graphics, etc.) from the CD. This work would definitely not be possible without Wargus Importer and scripts for Warcraft II which are used to initially extract assets from your original Warcraft 2 copy.
wartool.exe your_warcraft2_cd_folder extracted_data
That's it, start war2.5!