LoginLogin
Nintendo shutting down 3DS + Wii U online services, see our post

Seamlessly looping a square map using bg chunks

Root / Programming Questions / [.]

spaceturtlesCreated:
How can that be done?

Maybe you should use mod operator to loop the structure. Here is an example pseudocode using one dimension
var maxChunk=10
var currentChunk

while true
 `input code
 if move then
  currentChunk=currentChunk+move
  if currentChunk<0 then
   currentChunk=(maxChunk-currentChunk) mod maxChunk
  else
   currentChunk=currentChunk mod maxChunk
  endif
 endif
 
 `render
wend