# 40 Pico-8s In 2018: Cart #2

It’s Pico Of The Beast!

It’s a scrolling demo/port of the 1989 Amiga game Shadow Of The Beast. In particular, it’s a port of the famous 12-layer parallax scrolling from the game’s starting area.

My goal with this cart was just to replicate the scrolling, not to implement the game proper - this meant I could use the entire spritesheet for the background elements and not worry about the other stuff. It turns out there’s still free space in the sheet anyway so with a bit of optimizing you could probably fit the rest of the game in there, swapping in different spritesheets for the various locations.

The scrolling itself was fairly straightforward to implement, but I did use a couple of Pico-8 tricks for the title screen. The first is the aforementioned spritesheet swapping: the title screen is an entire spritesheet of its own, swapped in using TRASEVOL_DOG’s super excellent text string compression functions, seen on this BBS thread.

Pro tip: Remember to swap the other spritesheet back in before starting the game, or it will look like this.

The other trick I used was screen fading. Heaps of other Pico-8 coders have done this so it’s nothing new, but I wanted to have a crack at it myself. It’s nothing complicated (if a bit tedious to implement), you just remap the various colours of the Pico-8 palette to increasingly darker shades until everything is black.

If anyone’s interested, here are the colour mappings I used. ‘0’ is black, ‘7’ is white and the colours fade from left to right, i.e the first colour in each table is the colour’s ‘real’ index and the last is the colour completely faded, with the intermediary colours appearing in between.

function init_fadematrix()
end


I set the fading with this function - level is an integer between 0 (no fading) and 5 (completely faded out):

function set_fade(level)
for i=0,15 do