Pause Music When The Game Pauses Window Unfocused

Labyrinthine

Artist/ Developer
Veteran
Joined
Jun 23, 2014
Messages
454
Reaction score
403
First Language
Finnish
Primarily Uses
Edit: OK, this just got a lot more complicated. I would also need some way to stop the game pausing while the window is unfocused, and when it is dragged. This will completely break the cycle. Another option would be to also pause the music when the game pauses, but I have no idea how to do this? Actually, this is a lot bigger problem than the one I started with...


Here's another question in my journey of trying to create an animated title screen.


I've been trying to create a scene where the music syncs with flash animations and changes with the parallax background of the title screen map. The timing would have to be very accurate for the desired effect. However, it seems that the music goes out of sync at times, and this seems to be completely random.


At times when I open the game, the title screen appears and the music and animations play out fully synced. Other times, it's slightly out of sync, and sometimes it may be noticeably out of sync. For example, the first cycle of the parallel process event might be synced, but the second is not, after the music starts from the beginning second time. Sometimes the first one isn't synced either. What's going on here?


Here's my parallel process event opening with the title screen map. I'm using Shaz Multilayer Fogs and Acezon's Map as Title Screen scripts.


Map as title screen: https://dl.dropboxusercontent.com/s/0gntv6b3qu9eosp/Map_Title_Screen.rb


Shaz Fogs: http://pastebin.com/bk4BKECW





Note: I'm not really sure whether this problem is even related to the scripts mentioned or having something to do with the engine itself, so I just placed it in this thread. You can, of course, move it if this is the wrong area =)
 
Last edited by a moderator:

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

Holy stink, where have I been? Well, I started my temporary job this week. So less time to spend on game design... :(
Cartoonier cloud cover that better fits the art style, as well as (slightly) improved blending/fading... fading clouds when there are larger patterns is still somewhat abrupt for some reason.
Do you Find Tilesetting or Looking for Tilesets/Plugins more fun? Personally I like making my tileset for my Game (Cretaceous Park TM) xD
How many parameters is 'too many'??
Yay, now back in action Happy Christmas time, coming back!






Back in action to develop the indie game that has been long overdue... Final Fallacy. A game that keeps on giving! The development never ends as the developer thinks to be the smart cookie by coming back and beginning by saying... "Oh bother, this indie game has been long overdue..." How could one resist such? No-one c

Forum statistics

Threads
105,857
Messages
1,017,015
Members
137,563
Latest member
MinyakaAeon
Top