Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: Slasher on Thu 20/06/2013 06:28:18

Title: Instant Room Transition
Post by: Slasher on Thu 20/06/2013 06:28:18
Hi,

Instant Room Transition: With a character animating and the room changing I note that the character stops animating for about half a second before room change, is this normal?

cheers


Title: Re: Instant Room Transition
Post by: Crimson Wizard on Thu 20/06/2013 08:14:06
My first guess is that new room takes time to load, and since transition does not include fading this delay has visible effect.

I think it is possible to make a test: create an empty room without backgrounds/region masks and anything else, and see if delay duration is less when you travel to that room.
Title: Re: Instant Room Transition
Post by: Slasher on Thu 20/06/2013 08:30:21
Hi Crimson,

I can tell you now that when the next room Loads there are no objects or anything of the like but there are 2 characters that begin a speech after Fadein.

The room is 2000 x 480 that may be the problem perhaps?

cheers

Les

Title: Re: Instant Room Transition
Post by: Crimson Wizard on Thu 20/06/2013 08:38:46
Quote from: slasher on Thu 20/06/2013 08:30:21
I can tell you now that when the next room Loads there are no objects or anything of the like but there are 2 characters that begin a speech after Fadein.

The room is 2000 x 480 that may be the problem perhaps?

Characters are not saved in room, they are global objects.
Room load time depends on:
a) primarily on backgrounds (size and color depth matters) and walkable/hotspot/walkbehind/region masks (again, size matters);
b) secondly on the sprites assigned to objects: if you enter the room for the first time these sprites have to be cached first.
c) lastly on script length (if it is a really large script).
Other data takes much less time to load.

I can't tell anything for certain, I've never done any tests, so I have no idea how much does it take to load 2000 x 480 background. Only practical experiment will show (see my first answer).
Title: Re: Instant Room Transition
Post by: Ryan Timothy B on Thu 20/06/2013 16:50:19
QuoteCharacters are not saved in room, they are global objects.
d) the sprites assigned to the characters that are in the new room (as long as they weren't travelling with you, AGS has to load their sprites into memory).
Title: Re: Instant Room Transition
Post by: Crimson Wizard on Thu 20/06/2013 17:23:22
Quote from: Ryan Timothy on Thu 20/06/2013 16:50:19
QuoteCharacters are not saved in room, they are global objects.
d) the sprites assigned to the characters that are in the new room (as long as they weren't travelling with you, AGS has to load their sprites into memory).

If I remember correctly, their sprites are loaded after the room has changed, because that's when they are first referenced by the engine.
Thinking more, this probably refers to room object sprites too.
But, well, I do not remember this precisely right now.
Title: Re: Instant Room Transition
Post by: Slasher on Thu 20/06/2013 18:51:10
Hi Guys

seems I mentioned the wrong room. It is a room with 5 backgrounds but nothing else except character moving up the screen... Sorry. I expect having 5 backgrounds slows it down.

Title: Re: Instant Room Transition
Post by: Ryan Timothy B on Thu 20/06/2013 18:56:40
I find that people animate backgrounds far more than they need to. They often over use it. For instance having the clouds at the top of the image change shape, one doesn't need two different backgrounds (unless the whole background is affected by this change). All you would need is an object covering the sky with the cloud images - instead of perhaps 5 entire background images for just the skyline.
Title: Re: Instant Room Transition
Post by: Slasher on Thu 20/06/2013 19:27:26
Hi Ryan

it's actually a wormhole tunnel.. Maybe I could get away with 3. I'll try..


Title: Re: Instant Room Transition
Post by: Ryan Timothy B on Fri 21/06/2013 03:07:51
Sorry, I didn't mean to suggest you were doing it wrong. I just meant if it's only a small portion of the background which is actually changing (not the entire image. Eg: night to day) then you're better off having a single background with an object animating the small background area that changes. Understand?
Title: Re: Instant Room Transition
Post by: Slasher on Fri 21/06/2013 06:09:07
Cheers Ryan

The 'object' way may be a better option to try.

Cheers Ryan