Adventure Game Studio

AGS Support => Advanced Technical Forum => Topic started by: Haddas on Sat 27/08/2005 00:52:40

Title: Suggestion: Layered Backgrounds
Post by: Haddas on Sat 27/08/2005 00:52:40
I know this might have been brought up before, but I've been thinking about it more, lately. I brought it up at Brittens this summer and have been wondering about how plausible this feature would be?

Eg. The background is outside and you want the sky to move. As in, the clouds drifting. It could be done with characters, but this would save time. I've always disliked animating backgrounds, as it increases the file size when you need more images, as you need frames for the animation. Another one would be in a cave, with foreground objects that move at a different speed as you do. Again, characters, as proposed in a thread that came up that I searched.

These are all terrible examples. I remember there were some really good useful examples at Brittens, but sadly I've forgotten most of it. Something with the ocean...
Title: Re: Suggestion: Layered Backgrounds
Post by: ildu on Sat 27/08/2005 01:01:18
Yes, it would be useful for implementing parallax mapping. I don't think AGS is able to give reasonable for it.
Title: Re: Suggestion: Layered Backgrounds
Post by: Ben on Sat 27/08/2005 02:24:21
You can already make paralax foregrounds using overlays. I think Gilbert had a simple demo showing how do do it at one point.

Paralax backgrounds is a different story, though.  I guess you could use really huge objects, but that would obviously be way too slow.
Title: Re: Suggestion: Layered Backgrounds
Post by: Rui 'Trovatore' Pires on Sat 27/08/2005 07:24:53
As for the "cave" example, there's the plugin for that. As for the "clouds", using objects/characters is better. It aditionally gives you control over each individual cloud.
Title: Re: Suggestion: Layered Backgrounds
Post by: Pumaman on Sat 27/08/2005 11:16:38
I believe there's a Parallax Scrolling plugin that does this?
Title: Re: Suggestion: Layered Backgrounds
Post by: Rui 'Trovatore' Pires on Sat 27/08/2005 11:21:51
Ayuh, there is. Quite a good one, too, methinks.
Title: Re: Suggestion: Layered Backgrounds
Post by: Haddas on Sat 27/08/2005 11:36:24
I know about the plugin, but I'm really hesitant about using plugins, as I always screw up. Anyway, 'twas worth a shot.
Title: Re: Suggestion: Layered Backgrounds
Post by: Ben on Sat 27/08/2005 23:49:52
You can do it without a plugin.  Like I said, Gilbert made an example. I just don't remember where to download it.  I was kind of hoping Gil would show up so I could be lazy and not search for it myself.
Title: Re: Suggestion: Layered Backgrounds
Post by: Gilbert on Sun 28/08/2005 06:40:06
Well I need to do some searching to find it, it's actually an crappy conversion of the plugin's demo into one that does not need a plugin (hence the messy code).

Download it here (http://www.2dadventure.com/ags/PXDemonew.zip).
Note that it was made with AGS V2.6SP1, I'm not sure if it can be compiled directly with V2.7+.
Title: Re: Suggestion: Layered Backgrounds
Post by: Gilbert on Mon 29/08/2005 13:14:02
Bump for a primitive Script Module.

Make sure you use V2.7+ for it and read parallax.txt

Download it here (http://www.2dadventure.com/ags/parallax.zip).
Title: Re: Suggestion: Layered Backgrounds
Post by: Rui 'Trovatore' Pires on Mon 29/08/2005 13:23:01
Yay, script module!

Mind if I add it to my sitey, Gilbot?
Title: Re: Suggestion: Layered Backgrounds
Post by: Gilbert on Mon 29/08/2005 13:25:13
Quote from: Rui "Brisby" Pires (a Furry) on Mon 29/08/2005 13:23:01
Mind if I add it to my sitey, Gilbot?
Of course I don't mind that! :=
Title: Re: Suggestion: Layered Backgrounds
Post by: SSH on Mon 10/10/2005 14:01:36
Could you add the possibility of using Objects as well as layers, Gil? That way, the objects can be BEHIND things in the room, instead of always on top...
Title: Re: Suggestion: Layered Backgrounds
Post by: Gilbert on Tue 11/10/2005 03:02:09
Yes it's possible, but I'll expect characters are probably better to use than objects, since you need to create the objects in the rooms beforehand. In that case, since you have to do preparations for each room manually, it will lose its functionality as a script module.