ordoor

module
v0.0.0-...-55c2232 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 23, 2024 License: MIT

README

Ordoor

Ordoor is an unofficial game engine recreation of the Random Games, Inc., Strategy Engine, which was in use from 1996 - 2000.

Four games are known to have been published for this engine:

The aim of Ordoor is to be a complete reimplementation that allows all four of these games to be played on modern hardware. It should also permit new games of the same style to be built.

For each of the games above, You must have a copy of the original game data to play. Links are provided above if we're aware of an active publisher; otherwise, check your back catalogue, or perhaps a local charity shop.

Trademarks and intellectual property are the property of their respective owners, and the games mentioned above (including the game data) are protected by copyright. As a mere game engine recreation, we're confident that this project operates legally, and that its goal is a noble one. Do get in touch if you believe otherwise!

Ordoor is a portmanteau of Order Door, which is, of course, the opposite of a Chaos Gate. The project began with a Chaos Gate recreation, then more games were discovered, so scope expanded. A rename and/or rewrite may be on the cards as a result.

Current status

Chaos Gate

Some of the original file formats are either partially or fully decoded. Maps, menus, and most visual data can be rendered pixel-perfect. Sound can be played (with a preprocessing step). Some UI tookit work is done. No game mechanics are implemented yet.

I keep a GIF showcasing interesting progress here:

I've just been informed that another game from 1998, Soldiers At War, seems to use the same engine. Maybe at some point Ordoor will be able to play both. Will that need a rename? Hmm. Watch this space.

Soldiers At War

(At least some) objects display. Map support is being worked on in the soldiers-at-war branch, which can more-or-less display them, albeit with many errors.

Squad Leader

Squad Leader is the most recent of the games created with this engine. Nothing has been done with it yet, but a preliminary look at the game data suggests many changes are afoot. The object files are a different format, at the very least.

Wages of War

This is the oldest of the four games. The object file format seems to be mostly the same. the installer only copies some data to the game directory; we may want to work directly from the CDROM instead, if we can.

Maps are uncompressed, around 243K, and no header is present. They look similar in principle to the tile data of Soldiers At War or Chaos Gate maps, otherwise.

The menu system seen in Chaos Gate is not present; instead, there is a BUTTONS directory and a lot of pcx files under PIC that, I suspect, do the job for this game.

Even with a full installation, Wages of War leaves a lot of data on the CD. It may be best to run solely from the WOW directory on the CD, assuming it's a strict superset of what gets installed, data-wise.

Long-term goals

Once full playthrough of the official single-player campaign for all four games has been achieved, thoughts turn to other things we could do. Here are some ideas, mostly at random.

Multi-player support.

Graphics enhancements - 3D models instead of sprites, high-resolution tile sets, 32-bit colour, etc. Hopefully we'd be able to drop these in one at a time.

Vastly improved AI.

Mash-ups? How do mercenaries fare against cultists fare against Nazis? Only one way to find out!

New campaigns with existing assets. Tell new stories, or elaborate on / modify existing ones.

Completely new fantasy game using the same engine.

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. Dependency management uses go mod, so ensure you have at least Go 1.11.

$ go version
go version go1.14 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 libasound2-dev mpv ffmpeg

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

Configuring

Since we support multiple games, a fair bit of configuration is required. Copy config.toml.example to config.toml and edit it to your requirements. The data_dir for the engine(s) you want to use is probably the most important bit, along with the default_engine.

The various games all use snapshots of the original engine at different points in time, and specify a lot in code that we need to specify in data. That should all go into the config file, so new games will be able to adapt the engine to their needs.

Running

To run:

$ make view-map
$ ./bin/view-map -map Chapter01

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.

Menus / UI widgets have fairly good support now; you can use the view-menu binary to inspect them:

make view-menu
./bin/view-menu -menu Main

This renders the menus found in Chaos Gate and Soldiers At War. The Squad Leader format seems basically the same, but has some extra files and aren't 8-bit colour. They don't display at the moment. Wages of War uses a different format altogether.

For Chaos Gate, there is the start of the game in an ordoor binary:

$ make ordoor
$ ./bin/ordoor

The idea is to hook all the different parts together, and to an abstract game state (which is called ship for ordoor), to make the whole thing playable. It isn't playable yet, but it's heading in that direction.

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.

Resources

Here's a collection of links that I'm finding useful or otherwise interesting, and don't want to lose track of...

Directories

Path Synopsis
cmd
internal
data/rle
Package rle implements the run-length encoding scheme discovered in Chaos Gate .obj files.
Package rle implements the run-length encoding scheme discovered in Chaos Gate .obj files.
idx
package idx parses the Idx/WarHammer.idx file.
package idx parses the Idx/WarHammer.idx file.
ordoor
package ordoor implements the full WH40K.EXE functionality, and is used from cmd/ordoor/main.go
package ordoor implements the full WH40K.EXE functionality, and is used from cmd/ordoor/main.go
scenario
package play takes a map and turns it into a playable scenario
package play takes a map and turns it into a playable scenario
ui
util/asciiscan
package asciiscan is used to parse plaintext files into structured data
package asciiscan is used to parse plaintext files into structured data

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL