Adventure Game Studio

AGS Support => Advanced Technical Forum => Topic started by: Tarlash on Sun 30/05/2004 07:58:16

Title: Fading walls optimisation
Post by: Tarlash on Sun 30/05/2004 07:58:16
I searched trough the forums and didn't found it, so...

Fading walls effect (like in "A friend Indeed") probably could be easily achieved by fading/animating objects.

Is there way to make it in less "item-eating" (linits, limits...) way?
Title: Re: Fading walls optimisation
Post by: Scorpiorus on Sun 30/05/2004 15:31:19
What do you mean by "less item-eating"? Generally, you could place an object and then do SetObjectTransparency() in a blocking 'while' loop or within the repeatedly execute event.
Title: Re: Fading walls optimisation
Post by: Tarlash on Mon 31/05/2004 09:01:05
Quote from: Scorpiorus
What do you mean by "less item-eating"

I meant that, making this way you wery fast reach the limit objects per room.
Title: Re: Fading walls optimisation
Post by: MrColossal on Mon 31/05/2004 09:12:24
you can try using characters also
Title: Re: Fading walls optimisation
Post by: Darth Mandarb on Tue 01/06/2004 04:51:46
I even considered using GUIs for awhile (limit of 40/game).

But you're allowed 20 objects per room.Ã,  I didn't figure I'd EVER have more than 20 objects per room.

I used objects for all the walls that 'faded' and then only used objects for stuff you can get/pickup.

Aside from that all interactions were done using Hotspots (which I then scripted up to 4 seperate interactions for each color of hotspot dependant on mouse location.)

I never even came close to running out of objects/hotspots.

Title: Re: Fading walls optimisation
Post by: YOke on Tue 01/06/2004 09:01:14
I guess you could do this with one object, with all the walls on it. Then you could just switch the view on that object depending on what room you are in. Just a thought...
Title: Re: Fading walls optimisation
Post by: Darth Mandarb on Tue 01/06/2004 13:22:24
Quote from: YOke on Tue 01/06/2004 09:01:14I guess you could do this with one object, with all the walls on it. Then you could just switch the view on that object depending on what room you are in. Just a thought...
I thought about trying something like this in JP & Cosmo, but found out it would be a LOT more work than necessary.

If you only use one object, in order to get just a part of that one object to fade out, you'd need to make many animations (with alpha channels) to achieve the fading effect.Ã,  Then switch to the view, then animate object.Ã,  Now, if you just want the wall to vanish, this would be easier!Ã,  But I wanted the fading effect.

If you're really pushing the 20 objects/room limit this would probably be the way to go though, I agree.
Title: Re: Fading walls optimisation
Post by: YOke on Tue 01/06/2004 13:47:57
Good point...
For fading you would need two objects at least. One of them being a "fade object" that takes the position and appearance of the wall to be faded. Not too hard if you don't have any problems with scripting (and tedious plotting of coordinates) but is best left alone unless you are forced... ;)
Title: Re: Fading walls optimisation
Post by: Tarlash on Tue 01/06/2004 16:56:28
Quote from: Darth Mandarb
But you're allowed 20 objects per room.Ã, 

Phew, I thought limit is 15. Looks like I worked with hotspots too long... ;)