my vertical scrolling is slow

BlitzMax Forums/BlitzMax Beginners Area/my vertical scrolling is slow

The difficulty is that every inner loop you're iterating through all the tiles 24 times, regardless of if they're on screen or not, and then iterating through them once again 24 times to display them (again regardless of if they're on screen or not). That's a lot of tiles.
agree with this it's my pb !


create images instead of drawing rects.


i use images into my game




The difficulty is that every inner loop you're iterating through all the tiles 24 times, regardless of if they're on screen or not, and then iterating through them once again 24 times to display them

note that i separate logic and drawing into the game to apply delta time.


- hold the tiles in an array, not a list;
- apply a global decal offset to the values;

good idea.

Many thanks for your idea, is somebody know how to avoid this for-next loops ??? Finally i'm searching a better code structure ! My first idea produce bad code !!!