Deadly Tide Decomp

Deadly Tide Decomp is a native PC port and reimplementation of Deadly Tide for Windows, Linux, and macOS that supports 60 fps video and sharp HUDs.

README

Deadly Tide, reimplemented

build

A new engine for Deadly Tide (Rainbow Studios / Microsoft, 1996). The original is an underwater rail shooter for Windows 95: you fly through pre-rendered Cinepak video while enemies, your guns and the HUD are drawn over it, with a small real-time 3D "free-look" view in places. This project documents how the original works and plays it again on modern systems, natively on Linux, Windows and macOS and in the browser.

Play it in your browser: https://awkto.github.io/deadly-tide-decomp/ (bring your own game files) Downloads: latest release

No game data is included. You need your own copy of the original four CDs. The engine reads the game's files from your disk; in the browser they are read locally and never uploaded.

What you get

  • The whole game: video and audio, the branching scene graph, enemies, weapons with heat, ACT missiles, health and death, save points, the mission-select globe, the free-look 3D scenes, and the original launcher screen (pilots, difficulty, controls, volume) drawn from your own DT.EXE.
  • 60 fps: the game still thinks at its original 15 Hz, but the engine draws frames in between, so the camera, enemies, shots, explosions and screen shake move at your display's rate. With a motion pack the video itself plays at 60 fps (see 60 fps video).
  • Sharp HUDs: the original HUD redrawn as vector shapes at your screen's resolution (Classic HD), an alternative instrument-style HUD (Alt), or the 1996 pixel art.
  • Skip, record, gamepad: Enter skips any cinematic; F9 records gameplay to a video file; gamepads work, including hot-plugging.
  • Builds everywhere: C11 and SDL3, one code base for the desktop and WebAssembly builds.

Getting started

1. Your game files

Copy the .L96 files from each CD into one folder, or keep them as cd1/ … cd4/ subfolders: LOGOS, INTRO, INTROB, LEVEL00–LEVEL15, EPILOG, CDn_NEXT, plus DT.EXE for the launcher screen. Names are matched case-insensitively (logos.l96 is fine).

2a. Play in the browser

Open https://awkto.github.io/deadly-tide-decomp/, pick (or drag in) the folder with your files, choose how to start (original launcher, full game, a single level, or the demo) and press Play. Settings and pilots are kept in your browser.

2b. Play on the desktop

Download the zip for your system from the latest release and put the executable next to your game files (or next to the cd1/ … cd4/ folders). Double-click it. Without --data it looks in the folder used last time, then next to the executable, then in the current directory; if the files are not there it opens a folder picker and remembers your choice (--choose-data asks again).

The Linux build needs glibc 2.35 or newer. The binaries are not signed, so Windows SmartScreen and macOS Gatekeeper will ask before the first start.

Controls

ActionKeyboard / mouseGamepad
Aim / firemouse / left buttonleft stick (absolute, like the original joystick) / A or right trigger
ACT weapon (missile)SpaceB, X or left trigger
Skip the cinematicEnter (the web page also has a Skip button)Y
Original per-scene skip (can return to the hub)EscStart
Back to the hubF2Back
Restart the levelF5
Pause / help while pausedPause or F3 / F1
HUD look (Classic HD, Alt, original)F6
Video source (motion pack on CPU or GPU)F7
Record gameplayF9
Mute / screenshotF4 / F12
FullscreenF11 or Alt+Enter
QuitQ

The game pauses by itself when the window loses focus. In the launcher the stick moves the cursor, A clicks and the D-pad selects; F8 opens the video packs page.

60 fps video

The video is 15 fps. A motion pack (STEM.M60, one per .L96 file) lets the engine show three extra frames between every two video frames. A pack holds no pictures: it carries the motion data of the RIFE frame interpolator (two flow fields and a blend mask on an 8x8-pixel grid per in-between, about 2 KB each), and the engine rebuilds each in-between from your own video frames, on the CPU or as two warped meshes on the GPU (F7). Every entry is checked against a checksum of the frame it belongs to, so a pack never applies to the wrong picture.

Packs go in a smooth/ folder next to your .L96 files (or next to them directly). Three ways to get them:

  • Download deadlytide-motion-packs.zip from the motion-packs-v1 release (435 MB, all files) and unzip it into your game folder. The browser build at GitHub Pages uses them automatically.
  • Build them in the game: press F8 in the launcher, pick files (or all of them) and press Enter. Or from a terminal: deadlytide --make-packs all (also missing, or a list such as LEVEL01,LEVEL02; --packs-on gpu|cpu to choose). This uses the rife/ folder shipped in the Linux and Windows zips. With a Vulkan GPU a level takes a few minutes; on the CPU it runs several processes and takes 30 to 90 minutes per level. On Linux the RIFE binary needs the Vulkan loader (libvulkan1) even for the CPU. DT_RIFE=/path/to/rife points the game at another RIFE folder. The macOS zip has no rife/ yet; use the script below.
  • From a source checkout (Linux, macOS): tools/smooth/make_motion_packs.sh /path/to/game all builds the engine and the patched RIFE, then runs the generator. Details in tools/smooth/.

Without packs, everything except the video itself still moves at display rate. --no-smooth (or the checkbox in the browser) turns all of it off.

Recording gameplay

F9 starts and stops a recording. The desktop build reads back every frame at the window's resolution (sharp HUD included), pipes it to ffmpeg (which must be on your PATH) at a constant 60 fps together with the game's final audio mix, and saves deadlytide-YYYYMMDD-HHMMSS.mp4 in the user data folder; the window title shows [REC] meanwhile. The browser build records the canvas and the game's audio with MediaRecorder (F9 or the Record button) and downloads a .webm. The "ENTER SKIP" hint is hidden while recording.

Picture and HUD

The picture is two layers: the scene (video, enemies, explosions, tracers) and the HUD on top. The Classic HD and Alt HUDs are vector shapes and text drawn at your window's own resolution (fonts: Chakra Petch and IBM Plex Mono), so they stay sharp at any size. --filter sets how the 320x200 scene is scaled: smooth (default; Catmull-Rom 2x, then bilinear), linear, or nearest (hard pixels). In the launcher, GRAPHIC QUALITY I / II / III picks nearest / linear / smooth.

Command line

deadlytide --help lists everything. The most useful options:

OptionEffect
--data DIRfolder with the game files
--level NAMEstart at LOGOS (full game), LEVEL00 (mission globe) or a level
--no-menu / --menuskip / require the launcher screen
--difficulty 0|1|2, --pilot NAMEdifficulty and pilot (saved progress)
--hud classic|alt|originalHUD look
--filter nearest|linear|smooth, --scale N, --fullscreenpicture
--no-smoothonly draw the 15 Hz ticks
--make-packs LIST, --packs-on auto|gpu|cpu, --jobs Nbuild motion packs and exit

Saves (dt_save.ini), screenshots and recordings go to the per-user data folder (~/.local/share/DeadlyTide/deadlytide/ on Linux, %APPDATA%\DeadlyTide\deadlytide\ on Windows).

Building from source

Requirements: CMake 3.16+, a C11 compiler (GCC, Clang or MSVC). SDL3 is downloaded and built statically.

cmake -S engine -B build/native -DCMAKE_BUILD_TYPE=Release
cmake --build build/native -j
build/native/deadlytide --data /path/to/game
  • Browser: with emsdk: emcmake cmake -S engine -B build/wasm && cmake --build build/wasm, then serve build/wasm/ over HTTP and open index.html. A server can also bundle game files for a private install: list them in data/manifest.json (see engine/web/index.html).
  • Headless (no SDL, for tests): cmake -S engine -B build/headless -DDT_HEADLESS=ON, then for example build/headless/deadlytide --data DIR --level LEVEL01 --headless --no-pace --bot (a bot plays and prints the path taken and combat stats) or --dump-frames OUT --every 15.
  • CI: GitHub Actions builds Linux, Windows, macOS and WebAssembly on every push and pull request, deploys the browser build to GitHub Pages, and publishes the zips as a release when a v* tag is pushed.

How it works

The original engine is DTPLAYER.EXE. It was studied with a decompiler to understand the file formats and the game rules, which are written up in docs/; the engine here is new code written from those notes, not a translation of the original's code.

PartFiles
.L96 container (video groups, audio, carry sectors)engine/src/l96.c, docs/L96_FORMAT.md
Cinepak video decoderengine/src/cinepak.c
Scene graph: segments, branches, hub, saves, deathsengine/src/chain.c, scene.c, docs/SCENE_GRAPH.md
Enemies, sprites, combat, HUD rulesengine/src/game.c, sprites.c, docs/GAMEPLAY_DATA.md, docs/COMBAT_SPEC.md
Free-look 3D rendererengine/src/freelook.c, docs/FREELOOK_SPEC.md
Launcher screen from DT.EXE resourcesengine/src/menu.c, peres.c, docs/LAUNCHER.md
Display-rate frames, motion packs, pack generatorengine/src/smooth.c, chain.c, packgen.c
Sharp HUD (vector drawing, fonts)engine/src/vg.c, hud.c
Platform layer (SDL3: window, audio, input, recording)engine/src/platform.c, record_sdl.c

docs/ENGINE_MAP.md maps the original engine's threads and subsystems, and docs/COVERAGE.md tracks what is implemented. docs/graphs/ has rendered scene graphs.

Tools

tools/l96.py (reader: info, check, graph), tools/sprites.py (sprite decoding and overlays), tools/freelook.py (renderer prototype), tools/dump_assets.py (bulk export from your own files), tools/ghidra/ (headless decompiler export), tools/wine/ (running the original under Wine for reference), tools/smooth/ (motion packs). engine/tools/ has small C tools and fuzzers for the decoders.

Legal

This is an unofficial fan project. It is not affiliated with or endorsed by Microsoft or Rainbow Studios. "Deadly Tide" is used only to name the game this engine plays. The repository contains no game data; the engine does nothing without your own copy. The motion packs in the motion-packs-v1 release are derived from the game's video (motion data only, no images) and are offered separately from the code. If you hold rights to the game and want something removed, please open an issue and it will be taken down.

Licence

The code and documentation in this repository are under the MIT licence. Third-party parts keep their own licences; the full texts are in THIRD_PARTY_LICENSES.txt, which every release zip includes:

ComponentLicenceWhere
SDL3zlibdownloaded at build time
stb_truetype (Sean Barrett)MIT / public domainengine/third_party/stb_truetype.h
tinf 1.2.1 (Jørgen Ibsen)zlibengine/third_party/tinf/
sdefl (Micha Mettke)MIT / public domainengine/third_party/sdefl/
Chakra Petch, IBM Plex Mono fontsSIL Open Font Licence 1.1engine/third_party/fonts/
rife-ncnn-vulkan (nihui) and the RIFE v4.6 modelMITbuilt by CI with tools/smooth/rife-flow-dump.patch, shipped as rife/ in the Linux and Windows zips
ncnn (Tencent), glslang (Khronos)BSD 3-Clause and otherslinked into rife/rife-ncnn-vulkan