LaroldsJubilantJunkyard / flappy-bird-gameboy

Flappy Bird Gameboy Homebrew. Now you can play the popular hyper casual game on your nintendo gameboy.
10 stars 0 forks source link

Recommendation to use new, improved GBTD/GBMB and const arrays for gfx #1

Open bbbbbr opened 2 years ago

bbbbbr commented 2 years ago

Congrats on the site launch and all the shared project code! It's an impressive amount of content and looks really approachable. I've been hoping someone might put together an updated collection of tutorials like this.

At first glance I have a recommendation for both the site content generally and this projects code (maybe other's haven't looked close yet):

On this page, (and perhaps elsewhere?) the old version of GBTD/GBMB is recommended. https://laroldsjubilantjunkyard.com/useful-resources/

While it works ok, there is an updated version by one of the GBDK-2020 maintainers (toxa). Among the main things it fixes are defaulting to export C arrays as const unsigned char (which uses ROM) instead of unsigned char (which uses RAM and increases code size due to needing to init the RAM). https://github.com/gbdk-2020/GBTD_GBMB https://gbdk-2020.github.io/gbdk-2020/docs/api/docs_coding_guidelines.html#const_gbtd_gbmb

As an example within this project, the following array looks like it would be a pure const ROM array instead and save a bunch of RAM: https://github.com/LaroldsJubilantJunkyard/flappy-bird-gameboy/blob/master/source/default/Graphics/BirdAndPipes.c#L26

LaroldsJubilantJunkyard commented 2 years ago

Thanks or checking everything out @bbbbbr . I'll do that today.