Interesting find with interpolate vs movable

UtopianGamesUtopianGames Member Posts: 5,692
edited November -1 in Working with GS (Mac)
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.

Comments

  • JuggerJugger Member, PRO Posts: 238
    Yes
    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
  • UtopianGamesUtopianGames Member Posts: 5,692
    Been using Interpolate for ages...I'm shocked at the fps drop with 3 movable actors though :(

    Darren.
  • StormyStudioStormyStudio United KingdomMember Posts: 3,989
    hmm..interesting, I think I'm using interpolate for most things, but used move for something as I did'nt want the ease-in/ease-out function...maybe a quick reworking of one of my swipe rules may be in order.
  • gazjmgazjm Member Posts: 578
    the fps usage is a pain, as when using interpolate for a moving platform it stops rules such as jump from working, I'm using a mixture of the two for my platformer.
  • beefy_clyrobeefy_clyro Member Posts: 5,394
    If you dont want ease-in/ease-out then just select linear
  • TwistedMechTwistedMech Member Posts: 408
    do you still get collision with intepolate? QS reported he did in an older thread but it did not work for me.
  • gazjmgazjm Member Posts: 578
    yes, when I use it I can collide, but not much else.

    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.
  • GamersRejoiceGamersRejoice Member Posts: 817
    Very interesting, I'd like to try this but I'm not sure how to implement it. I have actors that accelerated down to the bottom of the screen right now. How would I go about using interpolate for that instead?
  • StormtrixStormtrix Member Posts: 256
    hey darren, how are you recycling the bullets instead of spawn
  • PhoticsPhotics Member Posts: 4,172
    utopiangames said:
    Thought I'd share...sucks that movable is so resource heavy.

    Ha ha, I'm thinking that you didn't buy a copy of my book!

    Without that Interpolate trick, Commove would have been much harder to create.
  • GamersRejoiceGamersRejoice Member Posts: 817
    Photics said:
    Ha ha, I'm thinking that you didn't buy a copy of my book!

    Without that Interpolate trick, Commove would have been much harder to create.

    Hey Photics, I just ordered a copy of your book, how do I get the goods?
  • PhoticsPhotics Member Posts: 4,172
    GamersRejoice said:
    Hey Photics, I just ordered a copy of your book, how do I get the goods?

    Since I'm at my desk, in less than 15 minutes you should receive an email with download instructions.
  • GamersRejoiceGamersRejoice Member Posts: 817
    Photics said:
    Since I'm at my desk, in less than 15 minutes you should receive an email with download instructions.

    Awesome! Thanks
  • UtopianGamesUtopianGames Member Posts: 5,692
    I will have this and another 14 templates available soon in a massive mega pack.

    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.
  • beefy_clyrobeefy_clyro Member Posts: 5,394
    @darren, awesome
    @twistedmech, i think interpolate doesnt detect collision if you're changing size. If your interpolating to move i think it detects the collisiions
  • PhoticsPhotics Member Posts: 4,172
    utopiangames said:
    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.

    Cool. It also reminds me of Codemonkey's tips...
    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.
  • PhoticsPhotics Member Posts: 4,172
    beefy_clyro <a href="http://gamesalad.com/forums
    @twistedmech, i think interpolate doesnt detect collision if you're changing size. If your interpolating to move i think it detects the collisiions


    It does. If not, dropping your interpolation in a timer might help with collision detection.
  • UtopianGamesUtopianGames Member Posts: 5,692
    It's a shame we have to find these work arounds tbh, when i used game maker you could throw pretty much anything at it and the performance was great.

    With GS you have to be VERY careful with your code to get decent results.

    Darren.
  • PhoticsPhotics Member Posts: 4,172
    I'm not sure what's going on with GameSalad. It is unfortunate that the performance is lacking. They've been pretty quiet lately. Maybe they're working on something cool.
    "The measure of success is not whether you have a tough problem to deal with, but whether it is the same problem you had last year."

    - John Foster Dulles
    Compared to last year, there's been some great progress for GameSalad.
  • beefy_clyrobeefy_clyro Member Posts: 5,394
    Photics said:
    It does. If not, dropping your interpolation in a timer might help with collision detection.

    Yeh i wrapped my interpolate in a timer to achieve collisions in my up coming game
  • UtopianGamesUtopianGames Member Posts: 5,692
    Well GS keeps me on my toes but I'm sure the guys are working hard behind the scenes.

    Darren.
Sign In or Register to comment.