LoginLogin

Is there a way to bypass the 127*128 Bgscreen?

Root / Programming Questions / [.]

HedrixCreated:
I want to make bigger maps in the future.

I think, no. The BG's width multiplied with it's height must be 16383 or less. Actually it could have been 128x128 but 16384 > 16383. I think you could have a big 254x256 layer but only 1 by arranging the 4 layers in a square and load each quarter of the map for each layer. Though I think it might be difficult because there are no BG editors that would allow it unless you would make your own.

Thanks.

Games on tile-based consoles (NES, SNES, GB, etc.) solved this problem by loading in new map data as you scrolled. For example, normally the NES's video chip only has enough memory for a two screen wide/tall map, but games like Super Mario Bros. and Metroid were able to have maps that appear much larger with this technique, by not actually storing it all in memory at once. In this animation, the top area displays the tiles as they're stored in memory, and the bottom shows what's displayed on-screen. Unfortunately, this particular technique won't work in SmileBASIC, because BG data doesn't wrap around (if you scroll off the right edge of the BG, you don't end up on the left side), but something similar can still be done. That said, this is definitely more complicated to pull off than loading the entire map in one go, and depending on how you do it, you may need to make tools that support the way you store your map data.

Games on tile-based consoles (NES, SNES, GB, etc.) solved this problem by loading in new map data as you scrolled. For example, normally the NES's video chip only has enough memory for a two screen wide/tall map, but games like Super Mario Bros. and Metroid were able to have maps that appear much larger with this technique, by not actually storing it all in memory at once. In this animation, the top area displays the tiles as they're stored in memory, and the bottom shows what's displayed on-screen. Unfortunately, this particular technique won't work in SmileBASIC, because BG data doesn't wrap around (if you scroll off the right edge of the BG, you don't end up on the left side), but something similar can still be done. That said, this is definitely more complicated to pull off than loading the entire map in one go, and depending on how you do it, you may need to make tools that support the way you store your map data.
Umm actually, you can imitate wrapping around by putting a bit of the beginning at the end and then when the player passes that you use bgofs to move it to the beginning and imitate that. But yes, you can just have it load a bit then another when you move on.

SwanBot’s Program (RIP Picy) I think allows you to have bigger maps for the editor. He found that the default limits for the editor are actually smaller than they can be (going off of long ago memory). Idk you’ll just have to download the program to see what it actually does lol.

Thank you guys, I think I had a breakthrough

Theoretically, if I use data maps(which I do), I can have it display part of the map based on your location, essentially bypassing the 16383 limit, right?

Sure you can. I completely forgot something like this...