You will find here some information concerning the game Captain Blood.
The main reverse engineering work has been done on the ingame interpreter used by the UpCom to talk with the aliens and the realtime fractal engine.
The interpreter executes a script from the beginning when the UpCom is activated and each time Blood enters a new sentence.
- The input is the sentence entered by Blood.
- The output is the alien reply.
When the alien replies a sentence, the interpreter is suspended until Blood clicks on the mouth. Then the interpreter is resumed at the position it was suspended.
The interpreter uses 3 main groups of instructions:
- Conditional instructions (if)
- Sentence matching: if the matching conditions are met, the alien replies with the sentence and the following assignement instructions are executed.
- Assignement instructions (=): executed if the previous sentence or condition is accepted
- They are 1 bit length (1=true or 0=false)
- Some variables are local to the UpCom session, some are global to the game.
- Variables beginning with "UpCom" are local. "UpCom_Var" variables are initialized to 0 when the UpCom is activated.
||1 = you are talking to the Xth (up to 4) alien of the current script race
||0 = the alien #A has been disintegrated or destructed with his planet
||0 = the alien #A has been destructed with his planet
||1 = the alien #A is at his wanted planet
||0 = the alien #A is missing and can't be talked to
||1 = the player has destructed less than 5 planets
The script executed by the UpCom depends on the race of the current alien. There are 16 scripts, 1 for each race:
The full 16 scripts compiled in 1 page: 16 scripts
The Fractal Engine
The Oorxx flying above the planet
A fractal synthesized landscape
When the Oorxx flies above the planet, the terrain is computed in realtime.
The procedural terrain generator uses 1D fractional brownian motion (fBm) with random mid-point displacement.
When a new curve appears at the horizon, 7 vertices are computed. Then mid-point displacement with fBm are applied to thes 7 initial points. This results in a discrete curve of 512 samples.
The random number generator and the fBm Hurst parameter H are adapted according to the current terrain type (flat, canyon...). This gives very different visual landscapes (plains, moutains, desert...).
No more fractal computation is done on the discrete curve. This explains the polygonal glitches we can notice when the curve is zoomed in.
Up to 10 curves are displayed on screen. These curves are used as a base to compute the synthesized landscape too.
Some games on 8 bits systems have a similar wireframe fractal engine: Rescue on Fractalus, Koronis Rift, The Eidolon.
The Digitized Speech
Captain Blood uses digitized speech through the whole game.
The game contains 17 samples. Some are words, others are sound effects:
- Words: space, vision, planet, galaxy, map, destroy, oorxx, landing, teleport, desintegrate, activated, hyper, up, com
- Effects: engine (long), engine (first half), engine (second half)
Samples are played together to form sentences:
- Galaxy Map Activated
- Destroy Planet Activated
- Oorxx Landing Activated
- Desintegrate Activated
- Teleport Activated
- Vision Planet Activated
- Vision Space Activated
- Up Com Activated
- Vision Oorxx Activated
- Hyper Space Activated
The sound engine has 3 main features, it can:
- play a sample at a choosen frequency. A higher frequency gives a fast and high voice. A lower frequency gives a slow and low voice.
- start playing a sample at a specific memory location for a specific duration. All the samples are adjacent to each other in memory (forming 1 block), without additional data between them. They could be played from the first to the last in one go without any glitches.
- play a sample reversed (yes, from end to start, reversed!).
These 3 features are the core of the aliens digitized speech.
- Each alien race has its own voice frequency.
- Each symbol is made up of 2 syllables. Each syllable is defined by 2 values:
- a value indicating if the syllable is played reversed or not
- an index used to compute the start offset of the sample in the "contigous sample memory block" seen previously (offset = index * 1437). To give a reference point, the word Vision has a length of 3488 bytes.
Every syllables have the same memory length of 1024 bytes, but the frequency with which they are played makes them shorter or longer.
This is a very ingenious system, building a language on top of existing samples.
There are 64 aliens in the game, split in 16 races (4 aliens per race).
|Idea 347||No No||2|
|Idea 762||Small Friend||3|
|Buggol||Spirit 137||Pop Unknown||5|
| || ||6|
|Rosko 2||Good Unknown||8|
|Migrax||Reproduction 14||Great Bounty||9|
|Reproduction 128||Missile Brave||10|
| || ||11|
| || ||12|
|Croolis-Ulv||Trap 4||Dead Genetic||13|
|Great Trap||Great Destroy||14|
|Bad Trap||Howdy Prison||15|
|(Insult) 80||(Insult) 4||16|
|Croolis-Var||Trap 2||Good Nonsense||17|
|Great Fear||Male Warrior||18|
|Kill You||Bad Crazy||19|
|Trap 1||Poor Genetic||20|
| || ||22|
| || ||23|
| || ||24|
| || ||26|
| ||Trauma Good||27|
| || ||30|
| || ||31|
| || ||32||
|Tricephal||Small Home||Good Friend||33|
| || ||34|
| || ||35|
| || ||36|
| || ||39|
| || ||40|
|Antenna||Kristo 15|| ||41|
|Kristo 7|| ||42|
|Kristo 34|| ||43|
|Kristo 08|| ||44|
|Tubular-Brain|| ||Brain 4||45|
| || ||46|
| || ||47|
| || ||48|
|Tromp|| || ||49|
| || ||50|
| || ||51|
| || ||52|
|Kingpak|| || ||57|
| || ||58|
| || ||59|
| || ||60|
|Duplicate|| ||Duplicate 1 & 5||61|
| ||Duplicate 2||62|
| ||Duplicate 3||63|
| ||Duplicate 4||64|