I found out what was making my game slow down when in the bottom right corner of the map. It has to do with sprites clipping when they are drawn with negative coordinates. Consider the two examples below:
function _draw() cls() spr(0,1000,1000,1,1,false,false) cursor(0,0) print(stat(1)) end |
This gives me 11 % CPU use.
function _draw() cls() spr(0,-1000,-1000,1,1,false,false) cursor(0,0) print(stat(1)) end |
This gives me ~700 % CPU use.
This is bizarre since both obviously are clipped and nothing is ever drawn on the screen. The CPU use has to do with how far in the negative coordinates the sprite is drawn.
[Please log in to post a comment]