/BERGASMS/GBA/07

..

10/08/22

New Goal: I will draw a sprite from the sprite memory.

Success. I can now draw a sprite from the object memory. As expected it wasn't a massive stretch to get this working after i got the background working. Anyway, here is a creeper styled sprite on a red lined background. Not pictured is the ability to move the creeper around using the D-Pad. I added that in just to make it more worthwhile. I also ran this on my actual GBA using the flash cart and it worked smooth as butter. There is not a lot more to share. Input is done in a super nasty way.

var readMem = Mem.Keys.*;
if (readMem & (0x1 << 4) == 0) {
    x = x + 1;
}
if (readMem & (0x1 << 5) == 0) {
    x = x - 1;
}
if (readMem & (0x1 << 6) == 0) {
    y = y - 1;
}
if (readMem & (0x1 << 7) == 0) {
    y = y + 1;
}
So of course for the actual game I will have to clean that up. For now though I have enough of a springboard that I can start to write a simple game. I know that the best way to figure out what you don't know is to start writing code and run into walls, so that is what I will do.

Ongoing Goal: Write a game.