Question of Method -> Animating Backgrounds.

Started by None, Mon 03/08/2009 05:08:31

Previous topic - Next topic

None

This is not so much as question as to 'how to' as much as 'how should.'

I have an animating background created, but I was *ahem* unaware of the restricted number of frames.
What would be the best way to fix this? Create a large object, and animate that?

Or is there some way to increase the number of possible frames the background can use?

Thx In Advance for any help you can provide. -SAG.


Gilbert

No. There is currently no way to increase the background limit.
You have to either reduce the number of backgrounds, use an object or character, etc., or, if the background is not supposed to be scrolling, tile the frames up into a large background and set the viewport accordingly during the animation (this orks if it's meant to be a standalone animation but if there're objects, characters, etc. in the room this would be hard to manage as you have to relocate these things whenever the viewport has changed).

GarageGothic

You can also use DrawingSurface routines to draw sprites directly to the background. I wrote this code a while back for someone with the same problem, to draw sprite frames from a View to the background. Should have no frame limit. It uses the old RawDraw function instead of DrawingSurface though, but it's easily changed. Instead of the line (replace both occurences of it):

Code: ags
RawDrawImage(0, 0, backgroundviewframe.Graphic);


Put:

Code: ags
DrawingSurface *surface = Room.GetDrawingSurfaceForBackground();
surface.DrawImage(0, 0, backgroundviewframe.Graphic);
surface.Release;


SMF spam blocked by CleanTalk