General Performance Question - Spawning VS Placed actors.

tdormaneshtdormanesh Member, PRO Posts: 10
edited February 2016 in Working with GS (Mac)

For this app I'm working on, the path I went down was to have an actor that I use as a manager, and it uses timers to spawn actors at the appropriate time.

Each scene has a unique actor manager, I'm trying to not have any spawn functions for unused actors on the manager.

I'm about 1/2 way through and starting to get delays and long times before a scene starts. I use the self.time on the manager actor to schedule all the spawns and that is starting to be inconsistent. Even though I use a new manager actor for each scene.

What could be causing this slow down / inconsistent timers? I did notice that when my laptop is hot, the timer is off by more, but still unreliable when the laptop is at a cool temp.

I feel like I'm not overloading every scene, almost nothing is used between scenes. Can that be an issue? Just a lot of unique art, even though it's not being used, slowing down the whole program?

Would it be better if instead of spawning all the actors off a manager, having each one placed in the scene, off to the side or something and then they use their own timers to move on screen when needed?

I know I'm not really making the type of app GS is normally used for. I'm making more of an choose your own adventure, interactive book. So timing the spawning to go with the audio is very important.

Thanks for any tips in advance!

Comments

  • Spalding004Spalding004 Member, BASIC Posts: 89

    @tdormanesh said:

    I'm attempting a choose your own adventure-like app. Not really a game, but you get to choose where the story goes. Each chapter I do some visuals to go with the audio. There is not text to read, just listen and watch the graphics.

    Anyways, there are only 5 chapters / choices with 2 choices each, so it's only 10 separate levels. 12 if you count the title screen

    Did you mean 'placed' actors, as in pre-placed?

    If you spawn a TON of actors all at once or in rapid succession, and I mean a LOT, there will be a bit of a lag spike, but I've never really had a problem spawning in a scene from nothing at runtime.

    Just try it both ways and test on devices to see which works better.

  • Spalding004Spalding004 Member, BASIC Posts: 89

    How many actors are you trying to spawn in at once per scene?

  • tdormaneshtdormanesh Member, PRO Posts: 10

    It's normally only one or 2 at a time. Overall though, the manager probably spawns 20-30 unique actors throughout the whole chapter.

  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949

    I merged the two threads. Next time, no need to create a whole new thread... just ask a moderator (e.g. me) to change the name for you.

    New to GameSalad? (FAQs)   |   Tutorials   |   Templates   |   Greenleaf Games   |   Educator & Certified GameSalad User

  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949

    Having a couple of actors (even a couple dozen) on a scene at one time isn't an issue... unless you have a bunch of timers, constrain behaviors, interpolate behaviors, etc. slowing things down.

    New to GameSalad? (FAQs)   |   Tutorials   |   Templates   |   Greenleaf Games   |   Educator & Certified GameSalad User

Sign In or Register to comment.