Which way saved more ram?
cptongsg
Member Posts: 70
Hi, I have 5 actor with difference action. Each time when a touch is execute, it change to another actor with difference action. Will it be advisable to spawn & destroy actor on the same position or will it be better to change image & attribute in one actor. The one actor will be heavily code vs Spawn & destroy. Which is better? Thks!
Comments
here is a thread about making unique actor ID setups
http://gamesalad.com/forums/topic.php?id=4297
It would be an elaborate setup to some degree but not too difficult...it would take thought and planning but it would be lighter on the game engine than spawning.
But spawning would be the easiest way.
What is the weight of the actor?? `If it is an actor with a lot of rules move wins. If it only has a few spawn wins.`
How often will you use this actor? `If it's something that will be used a lot, move wins. If not spawn.`
How much action is going on, on screen? `If there is a lot going on a one time, move wins. If not spawn.`
Sometimes adding the rules to recycle an actor are more trouble than it's worth. You are adding more rules, so the weight of the actor goes up. Thereby increasing your TOTAL ram usage, which is very important. Again there are a lot of variables in whether to spawn or move, only you can decide what's right for your game. But hopefully this gives thought into it & will help you.
JGary