t2dstaticsprite memory/performance question
by Johnny Vo · in Torque Game Builder · 06/30/2009 (10:42 am) · 3 replies
In my game that I'm currently working on, I always have about 10-15 sprite on screen and constantly killing them off and making new ones. Now my question, is it better to have 10-15 objects and reuse them or is it okay the way I'm doing it (deleting and creating new sprites). I'm creating this game in TGB right now but it's intended to be on the iPhone later. Will the method I'm using right now be a problem (like memory or performance problems) on the iPhone.
Thanks!
Thanks!
About the author
Enlevel - Programmer. Games released with iT2D: Are You Quick Enough?, Coloring 4 Kids, Twistum
Torque Owner Ehrlich
so, the way you're doing it is ok, if you keep the ammount of immages created and deleted low, but if you think that eventually that number will increase greatly, then you should think on maybe making those images invisible for awhile, and then reuse them (reseting its previous values and stuff)...
just an idea.