Organizing code

Blitz3D Forums/Blitz3D Programming/Organizing code

Restrict your for next loops based on data subsets. For example, instead of making a for next loop that checks the status of all the entity/sprites/whatever create a seperate list that only the data that needs to be checked for that frame.

Type BadGuy
Field X,Y,Data
end Type

Type VisibleBadGuy
Field VBadGuy.BadGuy
end Type

For VBadGuy.VisibleBadGuy = Each visibleBadGuy
....do stuff to it
next