playMaker

Author Topic: Music starts right away, but game starts 5 seconds later[SOLVED]  (Read 103 times)

dshad44

  • Junior Playmaker
  • **
  • Posts: 55
    • View Profile
Music starts right away, but game starts 5 seconds later[SOLVED]
« on: September 14, 2017, 11:56:44 AM »
Hi guys and gals.

I've got an issue where my game suddenly started taking longer to start. I added all my objects to Pooly that I want to draw from. (I'm guessing it's loading all my Pooly objects in the beginning before it can take the first action of my game manager).

Is there a way to speed this up, or a way for me to start my music AFTER the loading is done? As it stands, the music plays for 3-5 seconds, throwing the entire opening of the game out of sync.

Any advice would be appreciated.
Thanks!
« Last Edit: September 17, 2017, 11:28:27 PM by jeanfabre »

HeathClose

  • Full Member
  • ***
  • Posts: 223
    • View Profile
Re: Music starts right away, but game starts 5 seconds later
« Reply #1 on: September 14, 2017, 04:48:53 PM »
is this in unity editor or on the device / desktop export?

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 12342
  • Official Playmaker Support
    • View Profile
Re: Music starts right away, but game starts 5 seconds later
« Reply #2 on: September 15, 2017, 01:00:09 AM »
Hi,

 you will need to profile your game to check what's going on.

 If indeed it's all your gameobjects that take time. Simply wait for them to load up and then synchronise the start of both the sounds and the menus or intro screen or game play.

 Bye,

 Jean

dshad44

  • Junior Playmaker
  • **
  • Posts: 55
    • View Profile
Re: Music starts right away, but game starts 5 seconds later
« Reply #3 on: September 15, 2017, 04:19:06 PM »
This is in the Unity editor. I'll try making a build to see if it still happens.

And yes, I thought I would just change the music to start playing when the game itself starts to play with the first state from the game manager.

Thanks all!

dshad44

  • Junior Playmaker
  • **
  • Posts: 55
    • View Profile
Re: Music starts right away, but game starts 5 seconds later
« Reply #4 on: September 15, 2017, 06:38:15 PM »
Seems like balancing the number of objects to Pool was the correct answer. Too many and the game chugs at start up, too few, and the objects don't respawn when needed.

Thanks all!