Recovery

Rebuilt from the original file, not remade

There was no source code. Every level, sprite and sound here came out of one compiled Flash file from 2009, and the physics was ported line by line from the bytecode inside it.

# Fireboy & Watergirl - The Forest Temple.swf
format   CWS v9, 1,855,972 bytes
levels   32   adventure 17 · puzzle 9 · speed 6
sprites  268  shapes 460 · fonts 5
sounds   17
classes  220  ActionScript 3, ported to TypeScript
# verified
✓ all 32 levels pinned by digest
✓ 640,000 frames of soak, run twice, identical

The first sixteen bytes of that file already say what it is:

43575309AAE62300789CECBD777C54D5 CWS#xw|T

CWS

9

2,352,810

zlib

…the game

43 57 53 · “CWS”
A compressed Flash file.
09
Flash Player 9, which means ActionScript 3.
AA E6 23 00
2,352,810 bytes once inflated, stored little-endian.
78 9C
A zlib stream: everything after this is the game, deflated.

What was inside

A catalogue of one file

Each entry is the real thing, extracted and redrawn, not a recreation.

01 · LEVELS

Thirty-two levels

Adventure 17, puzzle 9, speed 6. Each tile grid was decoded on its own and then checked against the collision shapes the engine builds from it.

02 · SPRITES

Two run cycles

Eight drawn frames each, played at the game's 26 frames per second. Two of 268 sprites and 460 vector shapes.

03 · ANIMATION

The exit door

Twenty-two frames of the door lifting on its stair. Every eighth-of-a-second of it is still vector art.

04 · SOUND

Seventeen sounds

Real waveforms of four of them, drawn from the extracted audio.

// Game.as, decompiled
m_level = new level(_loc3_, param2);
trace("COOL");
m_level.scaleX = 0.8;
m_level.scaleY = 0.8;
m_level.x += 16;
m_level.y += 16;
05 · CODE

220 classes

Ported line by line to TypeScript. 39 tiles × 20 px × 0.8 + 16 = 640: the stage size falls straight out of the original.

Trajan Promenus · two cuts
Thayer Street NDPlevel text
Solemnitytitles
Adine Kirnberg Scriptcredits
06 · TYPE

Five embedded fonts

Named here, not shipped: they are licensed faces, so the rebuilt interface uses the reader's own system font and keeps the originals inside the game.

07 · BACKGROUND

The temple wall

The menu's backdrop: rows of paired doors, fire and water, which is the whole game in one picture.

The tools

Read once, cross-checked, then left alone

Python that runs once and is not part of any build. Where it mattered, two independent readers had to agree.

  • swfabc.py, disasm.py: the ActionScript bytecode's constant pool, classes and method bodies, and their operand shapes.
  • extract_levels.py walks the if/else chain that builds each level, and is cross-checked against parse_source_levels.py, an independent path through the decompiled source.
  • export_assets.py: every sprite as PNG and SVG, the 17 sounds, the 35 text fields and the button states.
  • as3_to_ts.py, gen_game.py: Box2DFlash 2.0.2 and the game's own classes, transliterated into TypeScript the engine compiles.
← NetcodeArchitecture →