Instant Room Transition

Started by Slasher, Thu 20/06/2013 06:28:18

Previous topic - Next topic

Slasher

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



Crimson Wizard

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.

Slasher

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


Crimson Wizard

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).

Ryan Timothy B

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).

Crimson Wizard

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.

Slasher

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.


Ryan Timothy B

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.

Slasher

Hi Ryan

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



Ryan Timothy B

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?

Slasher

Cheers Ryan

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

Cheers Ryan





SMF spam blocked by CleanTalk