Best way to spawn
Breezeonhold
Member Posts: 187
My game runs super slow on my ipod touch and was wondering if I could some how make it faster by changing the way my spawners work.
I have cars spawning out however is there a better way to do that? Should I even be using the spawn feautre??
I have cars spawning out however is there a better way to do that? Should I even be using the spawn feautre??
Comments
While testing for a tutorial project, I tested spawning by making something spawn everytime I tapped the screen and I had a counter to track how many actors were spawned this way. The frame rate seemed to drop by about half when I had spawned about 300-400 actors which are all still live on the stage.
Either
1) You create multiple instances of your actor and put them offscreen and move them in/out when needed based on a set of rules OR
2) Prespawn them (finite number) at run time (just before game starts). Meaning when game scene is loading, you spawn a dozen and keep them offscreen. Then as when u want, you move them in and out of the play area.
The best way to avoid spawning is to recycle your actors (look in code monkeys tips at the top of the forums).
How can I fix that??? Is it because my acceleration is to high on the jump..
My jump is... accelerate speed: 8500 for .1 seconds.