haroldo-ok/dragon-blaster

Improve performance of actor drawing routines

haroldo-ok opened this issue · 0 comments

Actor movement is currently taking up 12.5% of CPU time:

Profiler results:
_check_collision_against_shots 16892265 16892265 2991 1432/10447/5647,7
_draw_actor 20625499 20625499 34096 229/3595/1333,5
_draw_meta_sprite 19328321 19328321 15885 490/2408/1558,5
_move_actor 19212395 19212395 11700 217/1940/1642,1

Create an auxiliary data structure in RAM to accelerate the collision checking.