Music Skipping Between Rooms

Started by GoToHellDave, Tue 12/02/2013 11:43:14

Previous topic - Next topic

GoToHellDave

Hi All.

I'm aware that this is a known issue with the engine and that there are a few topics on the forum which mention this issue. I was wondering if there are any known work-arounds for this. It only seems to be an issue on lower-spec computers. On my rig at home, the music doesn't skip between rooms, but on my laptop at the office, it does.

Your help is appreciated as always.

Ben.

CaptainD

Not sure about the specific programming issues but I think we got round this by quickly fading out the currently playing track on room exit and quickly fading in the new music for the next room immediately after this.  I'm pretty sure this is what we did for the Captain Disaster demo and the music doesn't skip even on my laptop (which it does for other games).

GoToHellDave

Thanks for the suggestion CaptainD.

This would work for most scenarios. Unfortunately, however, I have a couple of instances where the music must remain the same when moving between rooms. For example, there are two rooms in our game which are outside a night-club and the music is emanating from the club. So fading it out and back in again just wouldn't work.

Snarky

Are you using the fade to black transition between the room? If so, switching to the instant transition might help. (Instead you can manually fade in and out an all-black full-screen GUI, which as an additional bonus doesn't freeze animations, and allows you to control the speed of the transition.)

JJS at one point made a version of the engine that apparently fixed this problem. I'm not sure whether this fix is included in current builds.

GoToHellDave

Playing around with the different transitions doesn't seem to help. Although I'm getting the impression that it is skipping because the transitions don't give enough time for everything to load up. I might try manually giving the room a few extra game loops in which to load up.

GoToHellDave

I can't seem to be able to manually control the length of FadeIn and FadeOut. I'm using what I believe is the correct code but it doesn't seem to be having any effect.

Khris

Even if you get it to work, it's no use; you can't give the game more time for the transition like that.
When a new room is loaded, the engine halts whatever it is usually doing until the new room's data is available, and if that process takes too long due to low performance, the music will skip.

It's a really long shot, but you could try upping the sprite cache in winsetup.exe -> Advanced. It'll probably do nothing though.

Or you can try switching from mp3 to ogg (or the other way around).

Long story short, this is an engine issue and cannot be fixed using AGS Script.

selmiak

you could of course change the background frame while fading in a black gui and fading it out again without switching rooms and go crazy with defining and turning on and off walkable areas and characters and all other stuff.

GoToHellDave

Thanks for the tips guys. I'll give them a try. I suppose at the end of the day, you can't always cater to every PC that anyone might ever play your game on. I guess it's just something we'll have to accept.

SMF spam blocked by CleanTalk