Wanna give your GB Studio project some perspective?


A perspective view game on the GameBoy is quite uncommon, especially when using GB Studio. That's precisely why I decided to take it as a challenge and create a mini-game with this element for my submission to GBcompo2023.

Some GameBoy racing games have utilized a perspective view by employing scanline interrupts per line to provide players with a sense of depth. However, my approach is simpler and doesn't require scanline interrupts (at least for the GameBoy Color). You can achieve the desired visual effect without writing an engine library if you're targeting the GameBoy Color.



The image above showcases the raw background image (with some offset and cropping). It consists of three sections: the HUD, the sky (to render the protagonist), and the ground. The HUD section is quite straightforward, just set it to fixed position and it's good to go. As for the sky and ground sections, my current method involves using the window layer for the sky and the background layer for the ground. However, upon further consideration, I realized that I can actually swap them around, using the window layer for the ground and the background layer for the sky. This way, I can achieve the desired effect without relying on an engine library. Now, you might wonder, why does the ground appear to look like moving?



The answer is "palette swapping". It has some pro and con when comparing to scanline interrupt.  While it may be limited to only four frames, it requires less processing power. Additionally, I can draw the ground unevenly to give it a more cartoony appearance. In my use case, palette swapping is sufficient (please note that an engine library is still needed to support GameBoy DMG).



To bring the background to life, I've added some animated looping trees in sides, creating the illusion of the protagonist moving forward. Although they visually blend into the background, the animated trees are actually sprites, whereas the protagonist is comprised of background tiles. I find this fact quite amusing. For your reference, I drew inspiration for this design idea from the chase game in Mickey Mania  (Mickey Mania's "Impossible" 3D Chase - How Was It Done?).



The final aspect to address is the game objects. Due to the GameBoy's lack of hardware scaling support, I had to draw them in multiple sizes. (PS: Simply scaling them in Photoshop is not advisable for pixel art.) The movement is 2D linear to minimize calculations.

And that's how I created the visual aspect of the second mini-game in Kaiju Kai Kai. I hope my experimentation proves helpful to you in creating something entertaining with GB Studio in the future.

Get Kaiju Kai Kai

Download NowName your own price

Comments

Log in with itch.io to leave a comment.

(+1)

GB STUDIO users really are more creative than other devs i know, the limitation in both console and engine really sparks creativity. bonus for sharing!

(+1)

It's funny how we both used similar techniques in our games without knowing of each others' projects :O

Very well written description of how you built the scene. Also, the Mickey Mouse example looks epic and gives me a lot of inspiration for future projects.

The only thing I don't understand is how you managed to animate and move the protagonist if he consists of background tiles.

Thanks for reading.

I have tried your game. The minigames are fun and the visual is good. I haven't made a comment on your game page, because I haven't yet got enough time to fully play your game once. 

for the protagonist animation, it's just tile swapping via GBVM. The GB studio website, has tutorial about swapping one tile, but the engine actually has GBVM function that can actually swap big chunk of tiles as long as they are in order. 

And for the character movement, it's just moving the overlay layer / camera (depends on which layer you are using) 

(+1)

Thanks for your response and the explanation. I really should look into GBVM at some point. I feel like that opens up a lot more possibilities than the GUI.

If you should ever want to revisit my game, make sure to download the latest version, please. It's much more polished than the jam submission version :) 

ok i will do it

(+1)

Very interesting, thank you :)

(+1)

thank you for giving us an inside look. super cool :)

(+1)

The effect is so good! Thanks for sharing how you did it. :)