2018-03-22 20:17:02 +00:00
|
|
|
# Ordoor
|
2018-02-24 13:50:35 +00:00
|
|
|
|
2018-03-22 20:17:02 +00:00
|
|
|
Portmanteau of Order Door, a remake project for Warhammer 40,000: Chaos Gate,
|
|
|
|
the game from 1998.
|
2018-02-24 13:50:35 +00:00
|
|
|
|
|
|
|
**You must have a copy of the original game data to use this project**
|
|
|
|
|
2018-03-17 04:16:14 +00:00
|
|
|
No game yet, nothing even close. I'm in the very early stages of trying to
|
2018-03-18 04:23:34 +00:00
|
|
|
understand the various file formats. Until then, you can play WH40K: Chaos Gate
|
2018-03-17 04:16:14 +00:00
|
|
|
in a WinXP VM, disconnected from the internet. It doesn't need 3D rendering!
|
|
|
|
|
2018-03-22 20:17:02 +00:00
|
|
|
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").
|
|
|
|
|
2018-03-18 04:23:34 +00:00
|
|
|
## Building from source
|
2018-03-17 04:16:14 +00:00
|
|
|
|
2018-03-18 04:23:34 +00:00
|
|
|
I'm writing code in Go at the moment, so you'll need to have a Go runtime
|
|
|
|
installed on your system:
|
|
|
|
|
|
|
|
```
|
|
|
|
$ go version
|
2020-03-21 23:45:51 +00:00
|
|
|
go version go1.14 linux/amd64
|
2018-03-18 04:23:34 +00:00
|
|
|
```
|
|
|
|
|
2018-03-22 20:35:19 +00:00
|
|
|
In addition, you'll also need the following packages installed, at least in
|
|
|
|
Debian:
|
|
|
|
|
|
|
|
```
|
2019-10-08 22:28:45 +01:00
|
|
|
# apt install libx11-dev libxcursor-dev mesa-common-dev libxrandr-dev \
|
2020-03-21 23:45:51 +00:00
|
|
|
libxinerama-dev libgl1-mesa-dev libxi-dev libasound2-dev mpv ffmpeg
|
2018-03-22 20:35:19 +00:00
|
|
|
```
|
|
|
|
|
2019-10-08 22:28:45 +01:00
|
|
|
You can then run `make all` in the source tree to get the binaries that are
|
2020-03-21 23:45:51 +00:00
|
|
|
present at the moment.
|
2018-03-18 04:23:34 +00:00
|
|
|
|
|
|
|
Place your WH40K: Chaos Gate installation in `./orig` to benefit from automatic
|
|
|
|
path defaults. Otherwise, point to it with `-game-path`
|
|
|
|
|
2018-03-22 20:17:02 +00:00
|
|
|
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.
|
|
|
|
|
2020-03-21 23:45:51 +00:00
|
|
|
Current status: almost pixel-perfect map rendering. Static objects (four per map
|
|
|
|
coordinate: floor, centre, left, and right) are rendered fine, and each Z level
|
|
|
|
looks good. There are a few minor artifacts here and there.
|
2018-09-07 20:28:33 +01:00
|
|
|
|
|
|
|
Characters and animations aren't touched at all yet. Rendering performance is
|
2020-03-21 23:45:51 +00:00
|
|
|
poor. No gameplay, no campaign logic. Interaction with the play area is minimal
|
|
|
|
and limited to pan, zoom, and click for basic console output.
|
2018-09-07 20:28:33 +01:00
|
|
|
|
|
|
|
Still, I'm proud of myself.
|
2018-03-24 03:00:31 +00:00
|
|
|
|
2018-03-22 20:17:02 +00:00
|
|
|
To run:
|
|
|
|
|
|
|
|
```
|
|
|
|
$ make view-map
|
2020-03-21 23:45:51 +00:00
|
|
|
$ ./view-map -map Chapter01
|
2018-03-22 20:17:02 +00:00
|
|
|
```
|
|
|
|
|
2018-09-08 02:00:03 +01:00
|
|
|
Looks like this:
|
|
|
|
|
|
|
|

|
|
|
|
|
2018-03-22 20:17:02 +00:00
|
|
|
Use the arrow keys to scroll around the map, the mouse wheel to zoom, and the
|
|
|
|
`1` - `7` keys to change Z level.
|
|
|
|
|
2019-10-08 22:28:45 +01:00
|
|
|
Dependency management uses `go mod`, so ensure you have at least Go 1.11.
|
2018-03-18 05:53:01 +00:00
|
|
|
|
2019-10-08 22:28:45 +01:00
|
|
|
There is the **start** of the menu / campaign flow in a `wh40k` binary:
|
|
|
|
|
|
|
|
```
|
2020-03-21 23:45:51 +00:00
|
|
|
$ cp config.toml.example config.toml
|
2019-10-08 22:28:45 +01:00
|
|
|
$ make wh40k
|
|
|
|
$ ./wh40k
|
|
|
|
```
|
|
|
|
|
2020-03-21 23:45:51 +00:00
|
|
|
This plays the introductory videos so far, and nothing else.
|
|
|
|
|
|
|
|
Menus are in the process of being rendered; you can use the `view-menu` binary
|
|
|
|
to inspect them:
|
|
|
|
|
|
|
|
```
|
|
|
|
make view-menu
|
|
|
|
./view-menu -menu ./orig/Menu/Main.mnu
|
|
|
|
```
|
|
|
|
|
|
|
|
This menu *displays* OK, including
|
|
|
|
|
|
|
|
## Sound
|
|
|
|
|
|
|
|
Sound is in the very early stages. Chaos Gate uses ADPCM WAV files, which are a
|
|
|
|
pain to play in Go, so for now, a preprocessing step that converts them to .ogg
|
|
|
|
is used instead. To create ./orig/Wav/*.wav.ogg, run:
|
|
|
|
|
|
|
|
```
|
|
|
|
# apt install ffmpeg
|
|
|
|
$ ./scripts/convert-wav ./orig/Wav
|
|
|
|
```
|
|
|
|
|
|
|
|
As with video playback, the ambition is to *eventually* remove this dependency
|
|
|
|
and operate on the unmodified files instead.
|
2018-03-18 04:23:34 +00:00
|
|
|
|
2018-03-22 20:17:02 +00:00
|
|
|
## Miscellany
|
2018-03-17 04:16:14 +00:00
|
|
|
|
|
|
|
"Mission Setup" includes information about available squad types
|
2018-02-24 13:50:35 +00:00
|
|
|
|
|
|
|
From EquipDef.cpp Dumo: CEquipment we learn the following object types:
|
|
|
|
|
|
|
|
0. DELETED
|
|
|
|
1. WEAPON
|
|
|
|
2. GRENADE
|
|
|
|
3. MEDIPACK
|
|
|
|
4. SCANNER
|
|
|
|
5. GENESEED
|
|
|
|
6. CLIP
|
|
|
|
7. DOOR KEY
|
|
|
|
8. DOOR KEY
|
|
|
|
9. DOOR KEY
|
|
|
|
10. DOOR KEY
|
|
|
|
|
|
|
|
And we learn they can be "on"....
|
|
|
|
|
|
|
|
0. CHARACTER
|
|
|
|
1. VEHICLE
|
|
|
|
2. CANISTER
|
2018-12-31 00:57:19 +00:00
|
|
|
|
|
|
|
I'm starting to see some parallels with [this](https://github.com/shlainn/game-file-formats/wiki/)
|
|
|
|
in the data formats, and the timeline (1997) seems about right. Worth keeping an
|
|
|
|
eye on!
|