Help with google game services pausing/muting music

0 favourites
  • 3 posts
From the Asset Store
Google Analytics 4 Plugin for Construct 3 enables metrics and analytics for your games easily.
  • On the start of gameplay i have a countdown. On the end of that countdown the music starts, along with sound fx. When the player dies, the music gets paused.

    Over and over.

    But i have a problem with google game services ( cranberrygame - plugin - game) that when the leaderboard is shown or when the player logs in, when you return to the gameplay no music or sounds play. It doesn't happen always, but enough for someone to tell there's something wrong.

    And the status bar, which was hidden throughout the layouts, is now visible again. That i can handle.

    But i can't figure out how to get the music and sound fx to play again. If i back out of the game and run it again, it works fine. But constantly checking leaderboards, the sounds are gone again.

    Anyone have any ideas?

  • This sounds like a problem I had a while back. The fix for me was the solution posted in this thread: Android Chrome's loss of sound

    For me, if my game was allowed to sit for a few minutes of inactivity then music and/or sfx could occasionally stop working. This would happen if I left the game open in the menus, in a level, paused, with an add open. Basically in any stage of the game.

    I followed the fix in the thread above and it solved the problem. It involves making an inaudible sound play once every second throughout the game.

    Im not sure if thats the scenario you are experiencing. For me it involved a delay. Like, if I put my phone down for 1-2 mins, then came back to the game, the sound or music might have stopped working. If you're experiencing something more immediate, like going straight from the leaderboards back to the game within just a few seconds, with no delay involved, it's probably not the same issue. In that case, as you say it might be to do with the events you have to start / stop music... although your sfx shouldnt crap out... the fact that your sfx stop working suggest it *could* be the same bug discussed above... coz its not like you have to turn the sfx on / off, or pause them like you do with music.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • I'm wondering if the google game services takes a kind of control of the game. Like all the focus is on google logging in and showing leaderboards.

    I had google game login on menu then changed it to another layout. On the start of Menu layout the music would start playing, but as soon as google game started to login the user, the music would stop.

    Kind of the same issue now. I haven't left the game for any matter of time, so the issue you mention doesn't seem likely, but i will still check it out. Always good to learn.

    Also, since i'm using cranberrygame's game plugin, wonder if that may be an issue.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)