Manage many sprites

serge

Member
Licensed User
Hi,

I'm doing an aplication where I have to manage many objects at the same time, some of them are static and some are moving, right now i'm just using one sprite for each object in the screen, of course the performance is very poor. I could implemet a function to set the statics objects as part of the background, but fist at all I'd like to know if there is an optimized way to do it. I hope somebody could help me and provide me with an example.

Thank you and regards
 

Erel

Administrator
Staff member
Licensed User
You should not add "static" sprites. Each sprite is redrawn (and checked for collision events) every tick.
 

serge

Member
Licensed User
Thanks Erel, I supose that i have to paint the "static" objects as part of the background, right?. How could i do it?

Thanks again
 
Top