Adventure Game Studio

AGS Support => Advanced Technical Forum => Topic started by: Calin Leafshade on Tue 25/08/2009 19:17:58

Title: Multiple Backgrounds
Post by: Calin Leafshade on Tue 25/08/2009 19:17:58
Is it possible to have multiple backgrounds for a room and change them at will?

For example a day and night version of the same scene?
Title: Re: Multiple Backgrounds
Post by: Snake on Tue 25/08/2009 19:22:09
Yes. You can have up to 5 backgrounds for each room (0-4, 0 being the default background frame). You can use them for animation purposes or what you mentioned above, night and day scenes.

You can call it using:

SetBackgroundFrame(int frame);


You can also of course use variables to check when they should be changed at room load.
Title: Re: Multiple Backgrounds
Post by: Calin Leafshade on Tue 25/08/2009 19:33:13
merci
Title: Re: Multiple Backgrounds
Post by: Dualnames on Wed 26/08/2009 07:50:37
You can also use the Ags_theoraplayer plugin by Scothc to have a video as a background
Title: Re: Multiple Backgrounds
Post by: monkey0506 on Wed 26/08/2009 10:34:27
And you can use the DrawingSurface functions (formerly the RawDraw functions) to make dynamic modifications to the room's background.

And you can use characters/objects in the room for animations of specific areas.

So yeah, there's lots of ways to do this. The easiest way for a nighttime background is as Snake advised you. ;)
Title: Re: Multiple Backgrounds
Post by: Dualnames on Wed 26/08/2009 10:39:49
You can also fade it in and out so you can create a day night cycle of some sort.