Small performance tips

UtopianGamesUtopianGames Member Posts: 5,692
edited November -1 in Working with GS (Mac)
So if you have actors checked to movable and have a lot of them it will cause low frame rates.

There is a way to still move certain actors depending on what you want to do.

For eg in my platform game i have some platforms movable attribute set to unckecked and you can still move it with interpolate self.position.Y to self.Position.Y-48

You can also still move actors by using the constrain to mouse X or Y if movable is unchecked.

Hope this helps.

Darren.

Comments

  • TouchTiltGamesTouchTiltGames Member Posts: 1,162
    Awesome thanks, D.
  • JGary321JGary321 Member Posts: 1,246
    You can also of course just change X/Y if you don't need any move effect & just need to get it from one place to another. This is great for 'trigger' actors.

    However 2 actors with moveable off will not 'collide'. In other words they will not be able to effect each other. As long as 1 has it on though you can still effect the other. Does this make sense?

    -JGary
  • quantumsheepquantumsheep Member Posts: 8,188
    JGary321 said:
    You can also of course just change X/Y if you don't need any move effect & just need to get it from one place to another. This is great for 'trigger' actors.

    However 2 actors with moveable off will not 'collide'. In other words they will not be able to effect each other. As long as 1 has it on though you can still effect the other. Does this make sense?

    -JGary

    Makes perfect sense mate :D

    Dr. Sam Beckett never returned home...
    Twitter: https://twitter.com/Quantum_Sheep
    Web: https://quantumsheep.itch.io

  • FanStudioUKFanStudioUK Member Posts: 459
    So, if i have an actor that is using the Move behavior (which goes through the screen), I can uncheck the movable box and assign an interpolate self position.x to self.position.x + 480 and he will pass the screen as it would have done it with the Move behavior?
  • JGary321JGary321 Member Posts: 1,246
    Yes. If you only have a few actors then do whatever is easier. But if you have a lot of actors this will definitely help with performance. You learn to squeeze every bit out of the engine.
  • FanStudioUKFanStudioUK Member Posts: 459
    I have a lot of actors! I wil try it right now :) I can't wait to see the improvement! :D
  • FanStudioUKFanStudioUK Member Posts: 459
    Yes, but if I use the interpolate value the Pause functionality I've added it's not working aymore....also I don't see a major improvement: I'm spawning 3 enemies every 3 seconds.
    In the viewer I have the same framerate: 56-60 and 21 Mb Ram
  • AfterBurnettAfterBurnett Member Posts: 3,474
    Good tips!
  • scitunesscitunes Member, Sous Chef Posts: 4,047
    If you are getting 56-60 you don't need to do anything, that's about as good as it gets.
Sign In or Register to comment.