Background animation limit

Started by Stacy Davidson, Tue 13/05/2014 13:10:31

Previous topic - Next topic

Stacy Davidson

Has anyone looked into why there are only 5 frames of background animation allowed and whether allowing an increase in this number would break anything?  Has anyone tried making a mod for this?
-Stacy Davidson
Jack Houston and the Necronauts
Warbird Games
www.warbirdgames.com

Crimson Wizard

#1
I have. ;)
http://www.adventuregamestudio.co.uk/forums/index.php?topic=48629.0

On other hand, simply increasing max number will change savegame format (because backgrounds modified at runtime must be saved),.

Calin Leafshade

Because AGS does no inter-frame compression on the backgrounds I would advise against using them and using an object instead. By removing the unchanged pixels from the object animation you allow AGS's compression to work better and make your game smaller and make disk-memory transfers faster. This is especially important at large resolutions like 1080p and with non-pixel art.

Stacy Davidson

That's interesting. I should try that.

QuoteBy removing the unchanged pixels from the object animation

Is this something I need to do? Or is this just the way the compression works?

Also, isn't there a major slow-down issue with 32-bit sprites? I assume this is why I can't have more than a small number of alpha channel sprites on screen at a time? So, it would probably be best to convert the background object to 16-bit, right?

-Stacy Davidson
Jack Houston and the Necronauts
Warbird Games
www.warbirdgames.com

Calin Leafshade

By removing the unchanged pixels all I mean is only have your animation cover the things that change and having the rest blank (rgba 0,0,0,0).

There shouldnt really be any slowdown with 32bit sprites in the hardware accelerated mode. Characters, GUIS and Objects are drawn by the GPU so it should be plenty fast enough. Anything done with DrawingSurfaces would be slow because thats all done on the CPU.

Stacy Davidson

I've noticed that I sort of hit a brick wall with too many room-size objects, which makes it tough to do the background this way. Any idea what that is? Basically, if I have two alpha images for a foreground and a midground, I'm fine. But if I add a third object for a background (which isn't even an alpha channel PNG, it's an 8-bit JPG), the game suddenly slows to a crawl and is unplayable. Going from zero to two object layers has no slowdown at all, and the third breaks it. And I've tried swapping them around, it doesn't seem to matter which 3 layers are on, it's like it just can't handle anything over two. But if I have several smaller alpha channel objects, that doesn't cause any issues.
-Stacy Davidson
Jack Houston and the Necronauts
Warbird Games
www.warbirdgames.com

NickyNyce

I guess I'll throw this question in here. Is it too difficult to add delays for the 5 frames of the background, like in a view?

I probably haven't thought this through, but I had begun to wonder if this might help with mixing things up a bit with the BG animation without using a giant BG object?

Crimson Wizard

Quote from: NickyNyce on Fri 16/05/2014 00:25:23
I guess I'll throw this question in here. Is it too difficult to add delays for the 5 frames of the background, like in a view?
For this moment, uniform delay may be set in room properties ("Background Animation Delay"), and varied delay may be scripted using timer and calls to SetBackgroundFrame().

NickyNyce

Like I said...I probably haven't thought this through. You learn something new everyday around here from you guys. Thanks for the heads up Wizard.

SMF spam blocked by CleanTalk