Discussion about software development for the old-school Gameboys, ranging from the "Gray brick" to Gameboy Color
(Launched in 2008)
You are not logged in.
Taking some ideas from the web and "fasebonus forum", I managed to code a scroll for big maps in C.
What I do, is to fill the line / column that is going to appear on screen. I made it in two steps or different frames, because GBDK is not fast enough to fill an entire line very fast.
set_bkg_tiles(POS_X, TY, 1, 1, (unsigned char *) &MapPLN0+Cnt);
Only a forward scroll is working for the moment, just like in super mario land, you can't go back. It can also work in all directions, i tested it to see cpu usage, but it is not working well now.
You can see a 128x128 map, and CPU usage, DMG(green), CGB (orange):
1-Not filling lines / columns
2-Filling just one line / column
Every 8 pixels we move, just for horizontal or vertical scroll.
On CGB, we need twice CPU power, to fill the new line with colors.
3-Filling a line and a column
If we move in two directions, requires more CPU.
Optimization
We can draw every line in 4 frames, but this will need 8 frames in case we are scrolling in two directions. 4 to draw a column, and the next 4 to draw a line, for example.
I'll upload a source soon.
Last edited by Mills (2015-11-18 15:52:33)
Offline
would love to see your progress on this mills. i'm currently working on a zelda style room transition system and am struggling a lot.
Offline