LoginLogin
Might make SBS readonly: thread

Indefinite map scrolling in SB3?

Root / Programming Questions / [.]

Gaelstrom_ValenceCreated:
The tile limit is probably enough for my purposes, so I'm asking more out of curiosity for now. Since the end of a map just gets cutoff, at least as far as I can tell, is there anyway to do indefinite scrolling like in Petit Computer?

I had a system that extended the limit before my SD died again. I had the map data stored in a 2D array (and maybe have 2 or 3 of them for the layers). Then I set up the BG layers being slightly bigger than the screen and keep track of the BG position in seperate variables so I can rerender the scene if the screen was moved. I'll try remaking it asap to show what I mean.

I don't know what your solution is But I glanced into, I think solid soldier's code, and it looks like it just kind of emulates the indefinite scrolling by using BGCOPY

it looks like it just kind of emulates the indefinite scrolling by using BGCOPY
Yes, that's actually it; you keep the scroll offset in a portion like BGOFS 0,32+X MOD 16,32+Y MOD 16 and at the edges of the BG layer, you feed new data. whereas the 32+ offsets the BG screen so you can also feed data on the left and top edges without the "seam" being on-screen