Skip to content

Latest commit

 

History

History
150 lines (100 loc) · 4.52 KB

README.md

File metadata and controls

150 lines (100 loc) · 4.52 KB

MDCII

Another unofficial 1602 AD project. However, the focus here is not on reading the original files, but on creating an editable isometric game world.

You must have a copy of the original game installed on your computer.

Compiling MDCII

Docker

You need the original Anno files on the container. The best way to do this is to copy the Anno directory into the project and change the (Linux) path in the config.ini.

Make sure that under no circumstances does any data end up on public servers such as GitHub or Cloud services.

Allow connections from the Docker container to the X server:

xhost +local:docker

Run a build:

docker build . -t stwe/mdcii

Starts the container:

docker run -it \
    --device=/dev/dri:/dev/dri \
    --group-add video \
    --env="DISPLAY" \
    --volume="/tmp/.X11-unix:/tmp/.X11-unix:rw" \
    stwe/mdcii

Stop sharing X server access:

xhost -local:docker

Using Vcpkg with CMake

You can use any package manager. Currently, I'm using Vcpkg.

I can't explain every IDE here, but the short Vcpkg story is as follows:

  • Clone/install and bootstrap Vcpkg - Those who use the CLion IDE can now use their Vcpkg plugin.
  • Install the additional packages mentioned below.
  • Link the Vcpkg toolchain file.

Using Vcpkg with CMake and Visual Studio Code

To install Vcpkg, you can follow the official instructions on GitHub.

Step 1: Clone Vcpkg

git clone https://github.com/Microsoft/vcpkg.git

Step 2: Run the bootstrap script to build Vcpkg

Make sure you are in the Vcpkg directory.

./bootstrap-vcpkg.sh

Step 3: Install libraries

Make sure you are in the Vcpkg directory and install the Requirements:

./vcpkg install gettext-libintl spdlog imgui protobuf

Step 4: Linking the Vcpkg toolchain file

You will need the full path to your Vcpkg repository for linking the Vcpkg toolchain file.

Open settings.json by selecting File->Preferences->Settings. In the newly opened window, click the editor button to switch to text editing mode. See mouse cursor on the image below.

Now add the following line somewhere within the settings.json file

"cmake.configureSettings": {
    "CMAKE_TOOLCHAIN_FILE": "/home/your_name/vcpkg/scripts/buildsystems/vcpkg.cmake"
}

It is quite possible that some CMake caches have to be deleted or reloaded at this point.

Included dependencies

Additional requirements

Platforms

The project runs on Windows and Linux.

Running MDCII

The original game is needed.

For a program start so-called tile atlas graphics are needed, which have to be created first. For this purpose a TileAtlasCreator is located in the install directory. See README.

In the MDCII config.ini the paths must be adapted.

The first start takes longer, because the haeuser.cod will be parsed.

Roadmap MDCII v0.2

  • sound system: play background music and sound effects
  • refactoring menus and add missing translations
  • it should be possible to build roads
  • animations should be possible showing how residents brings goods from A to B; for this the A* algorithm can be implemented
  • further down my priority list: the terrain is to be expanded to include rivers and mountains

Reporting bugs

You can use GitHub issues for reporting bugs.

License

MDCII is licensed under the GPL-2.0 License, see LICENSE for more information.