Remake of the classic Warhammer 40K: Chaos Gate game Ordoor = Order Door = Chaos Gate. Obviously.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Nick Thomas 65249b59c4 Rename go module 1 month ago
cmd Rename go module 1 month ago
doc Add some more details of the .mnu [SUB]MENUTYPE field 1 year ago
internal Rename go module 1 month ago
investigation/Palette Turns out the palette is actually identical to that in wh40k.pcx 1 year ago
scripts Fix a bug in scripts/try-uncompress 1 year ago
.gitignore Convert to go mod 4 months ago
.gitlab-ci.yml Update .gitlab-ci.yml to build with go mod 4 months ago
LICENSE Update README to reflect name, add MIT licensing 1 year ago
Makefile Rename go module 1 month ago Convert to go mod 4 months ago
config.toml.example Add a TOML configuration file 1 year ago
go.mod Rename go module 1 month ago
go.sum go mod tidy 2 months ago


Portmanteau of Order Door, a remake project for Warhammer 40,000: Chaos Gate, the game from 1998.

You must have a copy of the original game data to use this project

No game yet, nothing even close. I'm in the very early stages of trying to understand the various file formats. Until then, you can play WH40K: Chaos Gate in a WinXP VM, disconnected from the internet. It doesn't need 3D rendering!

WH40K.exe is the existing game engine, and WH40K_TD.exe is the map editor. Allows things to be saved as .MAP or as .SMF (“Super Macro File”).

Building from source

I'm writing code in Go at the moment, so you'll need to have a Go runtime installed on your system:

$ go version
go version go1.13 linux/amd64

In addition, you'll also need the following packages installed, at least in Debian:

# apt install libx11-dev libxcursor-dev mesa-common-dev libxrandr-dev \
  libxinerama-dev libgl1-mesa-dev libxi-dev mpv

You can then run make all in the source tree to get the binaries that are present at hte moment.

They're not very interesting :D.

Place your WH40K: Chaos Gate installation in ./orig to benefit from automatic path defaults. Otherwise, point to it with -game-path

The view-map binary attempts to render a map, and is the current focus of effort. Once I can render a whole map, including pre-placed characters (cultist scum), things can start to get more interesting.

Current status: map tiles are rendered at correct offsets. Static objects (four per map coordinate: floor, centre, left, and right) are rendered mostly fine, although objects at each Z level don't quite stack correctly on top of each other yet.

Characters and animations aren't touched at all yet. Rendering performance is atrocious. No gameplay, no sound, no campaign logic. Interaction with the play area is minimal and limited to pan, zoom, and click for basic console output.

Still, I'm proud of myself.

To run:

$ make view-map
$ ./view-map -map orig/Maps/Chapter01.MAP -txt orig/Maps/Chapter01.TXT

Looks like this:

Use the arrow keys to scroll around the map, the mouse wheel to zoom, and the 1 - 7 keys to change Z level.

Dependency management uses go mod, so ensure you have at least Go 1.11.

There is the start of the menu / campaign flow in a wh40k binary:

$ make wh40k
$ ./wh40k

This plays the introductory video so far, and nothing else. I'm hopeful I can render the main menu next.


“Mission Setup” includes information about available squad types

From EquipDef.cpp Dumo: CEquipment we learn the following object types:

  7. CLIP
  10. DOOR KEY
  11. DOOR KEY

And we learn they can be “on”....


I'm starting to see some parallels with this in the data formats, and the timeline (1997) seems about right. Worth keeping an eye on!