Graphics #2 - It’s alive !

1 minute read

Hi there,

It’s been a while since the last update but as you will see, we’ve been pretty busy ! Isaac now moves in all four directions and has a minimal walk animation. we had to sacrifice some of the aestetics for the sake of code efficiency.

Isaac’s sprite is too big to fit in only one 8x8px tile so we need 4 of them to display him correctly. We wanted him to have walking animation (4 frames) in every direction (x4) with the possibility to have an attack animation at the same time (that adds up to a lot). If we used all 4 tiles for every possible frame of animation, we would have filled the memory of the gameboy. We needed an idea.

isaac

In order to reduce memory space used and execution time, we exploited some particularities of isaac’s sprite. As you can see here, isaac is very symetrical and turning him left and rigth is almost the same as making his eyes/tears disapear.

Comparing all of the frames individually, we noticed that we could re-use a lot of them and make combinations in order to reproduce every possible frame. I’ll pass on the details but the main idea is to represent where isaac is facing with two bits; one for left, and one for rigth. If a bit is a “1”, it mean that the corresponding eye and tear will be displayed. that way ‘00’ looks like the back of his head, ‘11’ looks like he is facing us and ‘10’ looks like the side of his face.

direction

This strategy allowed us to store Isaac in only 14 tiles (224 bytes of memory).

logic

With a little more ingenuity and a few bit operations, this is the result.

direction

logo 2

Tags:

Categories:

Updated: