I wanted to have a good game for my Gadgeteer Game Console. Rick Dangerous is an old classic game that I played long time ago and really liked.

img1

Fortunately there is a clone of the game in C - xrick from BigOrno.net. Quote from BigOrno:

Way before Lara Croft, back in the 1980’s and early 1990’s, Rick Dangerous was the Indiana Jones of computer games, running away from rolling rocks, avoiding traps, from South America to a futuristic missile base via Egypt and the Schwarzendumpf castle.
xrick is a clone of Rick Dangerous, known to run on Linux, Windows, BeOs, Amiga, QNX, all sorts of gaming consoles… download and install the game, learn how to play, and enjoy!

It took some time, but here it is, running on Gadgeteer (FEZ Spider).

I have ported all C code from xrick to C#. The main difference between my code and xrick is how data is organized and stored. xrick uses a 8x8 pixels tiles as as smallest unit. There are 3 pages of 256 tiles each.

img2

Maps are build from blocks - block is a 4x4 tiles square (32x32 pixels). Blocks are rendered during map construction using tile data from a tile page for that map. So there is a lot of calculations happening before a map is constructed. The tile and page data is used to access environment flags for each 8x8 pixels area.

I have changed this from tiles to blocks. I have rearranged blocks, so they all grouped together for each map. I have replaced tile list for each block with the list of environment flags directly. This is how map related tiles are grouped into blocks:

img3

Tiles for map introduction screens were put together as well:

img4

The only tiles that I have left are for text and status information:

img5

More information later…