Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: ColtonPhillips on Fri 13/11/2009 09:04:07

Title: Dynamic BG's?
Post by: ColtonPhillips on Fri 13/11/2009 09:04:07
Is there a function or module for AGS which can make dynamic backgrounds easily?
In other words, backgrounds where things farther of in the distance can move at a slower pace than the foreground, midground?

if not what would the best solution for this be?
Title: Re: Dynamic BG's?
Post by: Khris on Fri 13/11/2009 09:44:40
You're looking for the so-called parallax scrolling. There's no built-in way, but there's a module, and it can be coded relatively easy.
Title: Re: Dynamic BG's?
Post by: ColtonPhillips on Fri 13/11/2009 10:08:48
Any problems with resolution settings?  Does it slow the game down much?
Title: Re: Dynamic BG's?
Post by: Matti on Fri 13/11/2009 12:36:20
I made this scrolling room (800 x 600 resolution), containing 7 large objects with alpha-channels and didn't have any slowdown. I have a 2x2 GHz, 4 GB RAM Laptop with a crappy graphic card.

The main thing that slows the game down is the size of the objects and whether they have alpha-channels or not.

(http://www.2dadventure.com/ags/Nebelwald-Ani.gif)
Title: Re: Dynamic BG's?
Post by: RickJ on Fri 13/11/2009 18:27:44
Matti that looks pretty cool.  How did you do it?  What techniques and/or modules did you use? 

I have been thinking about ways of improving DermoCycle.  Specifically I would like to make it so the roadway can meander from side to side and and so that roadside objects can be easily added to the course. 

Your little demo gives some inspiration and insight as to what/how things can be done.  It makes me think about star wars, jet cycles, and ewoks.  Any ideas about how to make your background also appear to move towards the screen/player?
Title: Re: Dynamic BG's?
Post by: Matti on Fri 13/11/2009 18:36:49
Quote from: RickJ on Fri 13/11/2009 18:27:44
Matti that looks pretty cool.  How did you do it?  What techniques and/or modules did you use?

I used Ali's Parallax module. Nickel and me already posted this sample here (http://www.adventuregamestudio.co.uk/yabb/index.php?topic=33142.msg483361#msg483361) and were able to implement it in a game, after modifying the values in the module.

EDIT: Here (http://www.megaupload.com/?d=ZJK3BLXZ) is a little demo which illustrates it better, in case you're interested.

Quote
Any ideas about how to make your background also appear to move towards the screen/player?

No, not at all  ;)