spawn vs recycle
chicop
Member Posts: 263
Howdy
So, what is it about spawn that causes frame rate to drop other then use memory?
it is such a great option to have and simple to use its a shame it slows down the game so much.
il be switching to recycling actors and images but its not going to be as easy
So, what is it about spawn that causes frame rate to drop other then use memory?
it is such a great option to have and simple to use its a shame it slows down the game so much.
il be switching to recycling actors and images but its not going to be as easy
Comments
Images are only going to cause memory usage to increase if they are unique, so 500 actors with the same image won't require that image to be loaded 500 times, just once. However 500 actors means it has to process a large amount of data for each of those actors, so it is likely to cause a spike for that reason.
Do some smaller scale (not in actor numbers but in a simple project) test in a test project before deciding to scrap your system, you may find recycling to be just as bad.
I had cases where it did matter and recycle was better but that could be in an older version of GS.
Lump Apps and My Assets
http://jamie-cross.net/posts/ ✮ Udemy: Introduction to Mobile Games Development ✮ Learn Mobile Game Development in One Day Using Gamesalad ✮ My Patreon Page
Send and Receive Data using your own Server Tutorial! | Vote for A Long Way Home on Steam Greenlight! | Ten Years Left
So I figure the only thing keeping the game smooth is destroying spawned enemies,
In your case maybe do if game over is false..spawn enemies or if you want to keep spawning enemies stop them from shooting bullets? So they only fire when your alive?
Darren.
Yes I was thinking the same to limit the spawning