Skip to content

cerwym/keeperfx

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5,589 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

KeeperFX

KeeperFX Logo

PRs welcome Release Downloads Discord

Visit our website | Join our Discord (Keeper Klan)

Intro

KeeperFX (Dungeon Keeper Fan eXpansion) is an open-source project that aims to fix up, enhance and modernize the classic dungeon management game, Dungeon Keeper. This project is dedicated to providing an improved and customizable gaming experience while staying true to the spirit of the original game.

KeeperFX is a standalone game but requires a copy of the original game files as proof of ownership. These files can be automatically copied from your old CDs, or from a digital edition like the ones from EA or GOG.

Originally, KeeperFX started out as a decompilation project, where we took the original game executables and reversed them back into usable code. Currently the whole codebase of Dungeon Keeper is remade and all code has been rewritten.

Features

  • Windows 7/10/11 support
  • Higher screen resolutions
  • Increased FPS, decoupled gfx and game logic
  • Improved and modernized controls
  • Many bugfixes
  • Map, campaign and modding customizability
  • Improved AI
  • Modern multiplayer protocol
  • Additional campaigns, maps, creatures and other content
  • ...

How to play

Installation instructions and a FAQ can be found on the Github Wiki.

You will need the original Dungeon Keeper files, either from an old CD or from the digital edition available on EA, GOG or Steam.

Development

Building with CMake + vcpkg

KeeperFX uses CMake with vcpkg for all dependency management. All platforms are built via Docker-based CI or locally using the same CMake presets.

Prerequisites

  • CMake 3.20 or later
  • Git (with submodule support)
  • A C++20-capable compiler:
    • Windows (native): Visual Studio 2022 or later (MSVC)
    • Windows (cross): MinGW-w64 cross-compiler (inside the Docker image)
    • Linux: GCC or Clang
  • Docker (optional, for cross-compile — uses the same images as CI)

Clone

git clone --recursive https://github.com/dkfans/keeperfx.git
cd keeperfx

Build — Windows x64 (MSVC, native)

# Bootstrap vcpkg (first time only)
.\external\vcpkg\bootstrap-vcpkg.bat -disableMetrics

# Configure & build
cmake --preset x64-windows-static-debug
cmake --build --preset x64-windows-static-debug

Build — Windows x64 (cross-compile via Docker)

# Pull the pre-built Docker image
docker pull ghcr.io/cerwym/keeperfx-build-mingw64:latest

# Run the build inside the container
docker run --rm -v $(pwd):/src ghcr.io/cerwym/keeperfx-build-mingw64:latest bash -c "
  external/vcpkg/bootstrap-vcpkg.sh -disableMetrics
  external/vcpkg/vcpkg install --triplet x64-mingw-cross \
    --overlay-triplets build/vcpkg-triplets --x-install-root=vcpkg_installed
  cmake --preset windows-x64-release
  cmake --build --preset windows-x64-release
"

Build — Linux x64

docker run --rm -v $(pwd):/src ghcr.io/cerwym/keeperfx-build-linux:latest bash -c "
  external/vcpkg/bootstrap-vcpkg.sh -disableMetrics
  external/vcpkg/vcpkg install --triplet x64-linux-keeperfx \
    --overlay-triplets build/vcpkg-triplets --x-install-root=vcpkg_installed
  cmake --preset linux-x64-release
  cmake --build --preset linux-x64-release
"

Available CMake presets

Preset Compiler Target
x64-windows-static-debug MSVC x64 Windows debug
x64-windows-static-release MSVC x64 Windows release
x86-windows-static-debug MSVC x86 Windows x86 debug
windows-x64-release MinGW-w64 x64 Windows x64 release (Docker)
windows-x86-release MinGW-w64 x86 Windows x86 release (Docker)
linux-x64-release GCC x64 Linux release (Docker)
linux-x64-asan GCC x64 Linux + AddressSanitizer

Notes

  • vcpkg provides all external dependencies (SDL2, FFmpeg, OpenAL, LuaJIT, etc.)
  • All libraries are built as static — no DLLs to distribute
  • The binary cache warms on first run; subsequent builds skip unchanged packages

Building with Make (Legacy)

⚠️ DEPRECATION WARNING: The Makefile build system is being phased out in favor of CMake. Please use CMake for new development.

For legacy Make-based builds, see the legacy build documentation.

Development Resources

To get started with KeeperFX development, refer to the Development Guide for detailed instructions on setting up a development environment and building KeeperFX from source.

If you wish to discuss development, you can join the Keeper Klan discord and ask to be added to the KeeperFX development channel.

For a CLion workflow using Docker cross-builds and local Windows GDB, see docs/clion-windows-debug.md.

Windows debug runtime from the mingw devcontainer

  • Build/package task for full debug runtime layout: Build & Assemble Windows Debug Runtime.
  • Output path: out/package/windows-x86-debug/ — identical structure to the release package.
  • Staying in the devcontainer (recommended): press F5 and choose Container F5: Attach via gdbserver (Windows Host).
    • preLaunchTask builds the debug runtime and copies gdbserver.exe into the package, then prints the exact host command.
    • On the Windows host run that printed command (one terminal, stays open).
    • VS Code connects via host.docker.internal:2159 using the cross-compile GDB inside the container; full breakpoints, step, locals, and source navigation work.
  • From a Windows-hosted VS Code session: use Host F5: Build + Assemble + Debug (Windows gdb) instead (runs gdb natively, no gdbserver needed).
  • Host debugger preflight (Verify Windows Host GDB) checks .vscode/gdb.exe and fails fast with instructions if missing.
  • First-time requirement: initialize .deploy/ once so layered runtime assets are available for assembly: powershell -ExecutionPolicy Bypass -File tools/init-deploy.ps1 -DungeonKeeperPath "C:\\Path\\To\\Dungeon Keeper".

Components

Component Language Info
KeeperFX C, C++ -
Launcher C++ Official Launcher to edit settings and start the game with run options.
FXGraphics - Sources of KeeperFX graphics files.
FXSounds - Sources of KeeperFX audio files.
Masterserver PHP (CLI) Multiplayer masterserver. Allows players to easily find public lobbies of others.
Website PHP https://keeperfx.net

Tools

Tool Usage
sndbanker Makes usable ingame sounds from SFX archives.
po2ngdat Converts .po files (language) to .dat.
png2bestpal Decides the best in-game color palette for an image and creates a .pal file.
png2ico Converts .png files to .ico.
pngpal2raw Creates a .raw image file that can be used by the game from a .png and a .pal (palette) file. The palette file can be created with png2bestpal.
rnctools Handles the RNC compression of many original DK data files.
dkillconv An unfinished tool to convert a map to a text based format.

Further Improvements

KeeperFX could be further improved in these key areas:

  • Multiplayer performance and features
  • Expand and improve AI / Computer player behavior
  • Improve pathfinding performance
  • Expand creative freedom for modders even further
  • Native cross-platform support
  • Improve code readability and maintainability
  • Lua support
  • ...

Contributing

We welcome contributions from the community to improve and expand KeeperFX.

  • Report bugs by opening issues.
  • Submit feature requests and discuss potential improvements.
  • Contribute code by creating pull requests.

Code Signing Policy

Free code signing provided by SignPath.io, certificate by SignPath Foundation.

License

This project is licensed under the GNU General Public License v2.0. Feel free to use, modify, and distribute it according to the terms of this license.

About

Open source remake and Fan Expansion of Dungeon Keeper.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • C 78.0%
  • C++ 17.1%
  • Python 2.0%
  • Lua 1.2%
  • CMake 0.6%
  • Makefile 0.4%
  • Other 0.7%