Skip to content

The engine ​

CyberFlix's DreamFactory engine, reimplemented in TypeScript from the files rather than from the source. This section is about the machine: what its containers hold, what its scripts say, and how the port runs them. Nothing here is about one particular game — where a page cites Titanic or Dust, it is citing the evidence, because the machinery was recovered from what those two discs actually contain.

Three generations of it ship in this repository: DreamFactory 1 is what Dust: A Tale of the Wired West ran on in 1995, and DreamFactory 4 is what Titanic: Adventure Out of Time ran on in 1996. Two years apart, the same lineage, and different enough on disk that several formats have a -v1 page of their own. DreamFactory 5 is RedJack's (1998): v4's formats with the palette moved into every picture, and a new kind of room, looked round from points rather than turned through fixed views (its containers, its rooms). Older than all three is what this port calls DreamFactory 0, Lunicus's (1994) and Jump Raven's: the same envelope with no version tag, so it is read by its own -v0 readers and never detected (its containers).

Start with these ​

Then the two halves ​

  • File formats — the DFile container and every format inside it: rooms, props, films, stages, characters, audio, saved games. The reading and the writing, since the port does both.
  • Runtime — what happens when those files are played: the heartbeat, the stage layer, actors and puppets, audio channels, saving and loading, and the browser host it all sits in.

The code is engine/ in the repository — src/df/ for the formats, src/runtime/ for the machine, src/web/ for the browser it runs in. It imports no other package — no game, and not site/ — a rule enforced by site/tests/layering.ts. The rule is that it knows about no particular game, not that it is DOM-free: src/web/ is full of DOM.

Where the two generations differ, the difference is a separate reader and not a branch, which is why src/df/ carries set-v1.ts, mov-v1.ts, snd.ts and savegame-v1.ts beside their v4 siblings, and sett.ts, mov-v5.ts and image-v5.ts for v5. The version is always asked rather than guessed: v1 and v4 put the tag as an i32 at container 0 + 0x02, and v5 keeps it there as a u16, with the container's kind straight after it.

Back to Documentation.

Docs licensed GPL-3.0 (the decoder is ported from DFET). Game data © CyberFlix — not included.