Interesting find with interpolate vs movable
UtopianGames
Member Posts: 5,692
Working on a shooter template and when testing on a 2nd gen touch found that my 3 enemies are using 5fps each, when movable is checked the game runs at 45 fps.
When i uncheck movable and use interpolate to move my enemies i get 60 fps.
I'm not spawning anything (I'm recycling the bullets) so the memory stays at around 10mb total.
Thought I'd share...sucks that movable is so resource heavy.
Darren.
When i uncheck movable and use interpolate to move my enemies i get 60 fps.
I'm not spawning anything (I'm recycling the bullets) so the memory stays at around 10mb total.
Thought I'd share...sucks that movable is so resource heavy.
Darren.
Comments
in our wiki
Interpolate Can Move Too: Interpolation can be used instead of Move or Accelerate. This will allow you to move actors without turning on physics. It's a significant savings in performance. This can create issues with physics, but ask on the forums for solutions
Darren.
Its odd. On a horizontal moving platform I can still move left and right, but on a vertical moving platform I can't move at all.
Without that Interpolate trick, Commove would have been much harder to create.
The reusing of actors instead of spawning in the shoot em up is really cool and the total memory doesn't move from around 12mb, also the fps with 40 actors flying around never goes below 45 fps on a 2nd gen touch so i'm pretty pleased with this work around.
Darren.
@twistedmech, i think interpolate doesnt detect collision if you're changing size. If your interpolating to move i think it detects the collisiions
http://gamesalad.com/forums/forum.php?id=15
Tip #7 - http://gamesalad.com/forums/topic.php?id=595
He stopped doing those a long time ago though.
Also, I find that the big problem for GameSalad is images. That's when I see framerates really drop. Large background images - especially moving one ones - decimate performance.
With GS you have to be VERY careful with your code to get decent results.
Darren.
Darren.