[]()
[]()
[]()
[]()
[](https://github.com/stefanhendriks/Dune-II---The-Maker/actions/workflows/build_master.yml)




Dune II - The Maker
===================
A.k.a. D2TM. Is a [Dune 2](http://en.wikipedia.org/wiki/Dune_II) remake.
- Website: [https://dune2themaker.fundynamic.com](https://dune2themaker.fundynamic.com)
- Discord: [https://dune2themaker.fundynamic.com/discord](https://dune2themaker.fundynamic.com/discord)
- Twitter: [https://twitter.com/dune2themaker](https://twitter.com/dune2themaker)
Report bugs via Discord, Twitter or add one in Github.
Read [the wiki](https://github.com/stefanhendriks/Dune-II---The-Maker/wiki) for more information about startup params, controls, and more.
# Sponsor
# Compiling
## Prerequisites
- `CMake` version 3.21 or higher
- `GCC` version 14 or higher
Make sure you can run `make` (or `ninja`) from command line.
## Windows (MinGW64)
It depends on a MinGW64 environment, via [MSYS2](https://www.msys2.org/). From
an MSYS2 MINGW64 shell, install the same packages CI installs (see the
`install:` line of the "Install MSYS2 with MinGW 64-bit" step in
[`build_pr.yml`](.github/workflows/build_pr.yml) for the current list) via
`pacman -S `.
- git clone this project
- create a `build` dir
```
mkdir build
cd build
cmake .. -G "MinGW Makefiles"
cmake --build . --target all -- -j 6
```
If you use `ninja` you can use `cmake .. -G Ninja` instead.
Once compilation is done you'll end up with a `d2tm.exe` file and several DLL's.
## Ubuntu
- git clone this project
- run `./install_dependencies_ubuntu.sh` (only required once)
- create a `build` dir
```
mkdir build
cd build
cmake ..
make -j4
```
## MacOS
- git clone this project
- run `./install_dependencies_macosx.sh` (only required once)
- create a `build` dir
```
mkdir build
cd build
cmake ..
make -j4
```
## Clion
### Mac OS
Make sure you set up your toolchain to use `gcc-15` and `g++-15`. Ie, change your default toolchain
OR create a new one (and make sure CMake points to that one), with the following values:
| Field | Value |
|--------------|--------------------------|
| C-Compiler | /opt/homebrew/bin/gcc-15 |
| C++-Compiler | /opt/homebrew/bin/g++-15 |
Then make sure to (re)load `CmakeLists.txt`
# Running
Run `create_release.bat` (Windows) or `./create_release.sh` (Linux/macOS) once after building to produce a complete runnable package in `bin/`, including all required dependencies. Then run the executable from `bin/`.
## Music (MIDI soundfont)
D2TM plays music from MIDI files via FluidSynth. FluidSynth requires a General MIDI soundfont (.sf2) to render audio — without one, music is silent.
**Install a soundfont:**
- **Linux:** `sudo apt install fluid-soundfont-gm` (installs to `/usr/share/sounds/sf2/FluidR3_GM.sf2`)
- **macOS / Windows:** Download [FluidR3_GM.sf2](https://member.keymusician.com/Member/FluidR3_GM/index.html) or [GeneralUser GS](https://schristiancollins.com/generaluser.php) and place it anywhere.
**Point the game at it:**
Set the `SDL_SOUNDFONTS` environment variable to the path of your `.sf2` file before launching:
```sh
export SDL_SOUNDFONTS=/path/to/FluidR3_GM.sf2 # Linux/macOS
set SDL_SOUNDFONTS=C:\path\to\FluidR3_GM.sf2 # Windows
```
Add the `export` line to your shell profile (`~/.zshrc`, `~/.bashrc`) to make it permanent.
# Project status
See the [Project Board](https://github.com/stefanhendriks/Dune-II---The-Maker/projects/1) what's going on.
# Binaries
You have various options:
- Grab the [latest release from Github](https://github.com/stefanhendriks/Dune-II---The-Maker/releases)
- Grab a version from [D2TM's homepage](https://www.dune2themaker.com)
- Compile this project yourself
# Topics
In the code there are several known concepts; see below for extra information
about them:
- [Angles: how to calculate and use them to draw things](resources/doc/convertAngleToDrawIndex.md)