Game Boy Platform Game
https://github.com/miscellus/gameboy-game.
My unfinished platform game for the original Nintendo Game Boy written in assembly language. A nostalgic project that has really made me admire the creators of the games I used to play as a child. I love that the limited instruction set of the Game Boy makes every little paragraph of code a small puzzle to solve.
Making the Walls Solid
In the video above, you see me jumping around a simple platform level. I want to talk a bit about how I prevent the little guy from falling through the ground or walking through walls.
When the player moves, it does so in descrete steps, once every frame of animation. Thus, every frame, the player's velocity is added to its current position to calculate its new position. But if the new position is inside a wall, we need to find a way to move the player out of the wall. But first, we need a way to tell if the player is inside of a wall.
In short, I divide the player's X and Y coordinate by the level tile size, 8, to lookup into a bitmap where each bit tells if the corresponding tile is solid or not.
TODO