Jump to content
A 2021 backup has been restored. Forums are closed and work in progress. Join our Discord server for more updates! ×
SoaH City Message Board

Sonic and Tails


Felik

Recommended Posts

Checking a region of a grid, for example. For example, some time ago, I used nested loops for loading a Sonic 2 level layout, and the program took at least 10 seconds to run the complete loop (and it's only a 128x128 map).

I see... I tried a grid-related Fastloop once, but I didn't nest it. It was pretty basic though. I should try a level generator and see if I can get it to work without nesting loops.

Link to comment
Share on other sites

I see... I tried a grid-related Fastloop once, but I didn't nest it. It was pretty basic though. I should try a level generator and see if I can get it to work without nesting loops.

If you know the size, it's pretty much possible. You've gotta create a loop of Width*Height, and then, the loop position is decomposed in x and y:

X = LoopPosition mod Width

Y = LoopPosition / Width

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...