Kroah's Game Reverse Engineering Page

 

~ Captain Blood ~

You are here:  
  • Home
    • »  Captain Blood
      • »  Main

Main

Captain Blood - Bridge Captain Blood - Buggol

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.

  1. The Interpreter

    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

    The variables:

    • 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.

    Examples:

    Variable name Meaning
    UpCom_IsAlien#X 1 = you are talking to the Xth (up to 4) alien of the current script race
    #A_RACE_#B_NAME.IsAlive 0 = the alien #A has been disintegrated or destructed with his planet
    #A_RACE_#B_NAME.IsNotDestructed 0 = the alien #A has been destructed with his planet
    #A_RACE_#B_NAME.IsAtWantedPlanet 1 = the alien #A is at his wanted planet
    #A_RACE_#B_NAME.IsThere 0 = the alien #A is missing and can't be talked to
    <=4PlanetsDestroyed 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:

    Izwal Buggol Migrax Croolis-Ulv
    Croolis-Var Yukas Torka Trauma
    Tricephal Sinox Antenna Tubular-Brain
    Tromp Robhead Kingpak Duplicate

    The full 16 scripts compiled in 1 page: 16 scripts

  2. The Fractal Engine

    The Oorxx flying above the planet

    Captain Blood - Oorxx flying
    A fractal synthesized landscape

    Captain Blood - Fractal 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.

  3. 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.

  4. The Aliens

    There are 64 aliens in the game, split in 16 races (4 aliens per race).

    Race Planet Alien #
    IzwalBow-BowSmall Yoko1
    Idea 347No No2
    Idea 762Small Friend3
    Rendez-Vous 67Maxon4
    BuggolSpirit 137Pop Unknown5
      6
    RoskoMorlock7
    Rosko 2Good Unknown8
    MigraxReproduction 14Great Bounty9
    Reproduction 128Missile Brave10
      11
      12
    Croolis-UlvTrap 4Dead Genetic13
    Great TrapGreat Destroy14
    Bad TrapHowdy Prison15
    (Insult) 80(Insult) 416
    Croolis-VarTrap 2Good Nonsense17
    Great FearMale Warrior18
    Kill YouBad Crazy19
    Trap 1Poor Genetic20
    YukasFemale 021Yukas21
      22
      23
      24
    TorkaPlanet SpiritOndoyante25
      26
     Trauma Good27
    Corpo 28
    TraumaImpossibleTrauma 129
      30
      31
      32
    Race Planet Alien #
    TricephalSmall HomeGood Friend33
      34
      35
      36
    Sinox128Good Spirit37
    256Brain Radioactivity38
      39
      40
    AntennaKristo 15 41
    Kristo 7 42
    Kristo 34 43
    Kristo 08 44
    Tubular-Brain Brain 445
      46
      47
      48
    Tromp  49
      50
      51
      52
    Robhead145 53
    264 54
    387 55
    403 56
    Kingpak  57
      58
      59
      60
    Duplicate Duplicate 1 & 561
     Duplicate 262
     Duplicate 363
     Duplicate 464
Visitors visitors since 05/01/2006. Sitemap
Copyright © 2006-2012 by Kroah. Total or partial reproduction forbidden.
All trademarks and copyrights are the property of their respective owners. All rights reserved.
Email Me      Get Firefox Powered by PHPEdit      Valid XHTML 1.1 Valid CSS