Adventure Game Studio

AGS Support => Modules, Plugins & Tools => Topic started by: Akumayo on Fri 30/12/2005 05:35:21

Title: MODULE: Shifting Color
Post by: Akumayo on Fri 30/12/2005 05:35:21
'lo again.Ã,  Here's my newest module.Ã,  Some may find it useless, but I can think of a good many things it would be good for.Ã,  Basically, when called in a repeatedly_execute script, the function in this module slightly alters the color, shade, and lighting of the specified character, object, or region over and over.Ã,  Giving a "flowing color/light" effect.Ã,  It could be used to animate say... a magic orb, a glowing wall, a tank of unknown liquid, etc.
NOTE:Ã,  This module requires the Advanced Randoms Module to be imported and placed before this module in the module manager to function, as it calls two of the functions used in the Advanced Randoms Module.
Download the Advanced Randoms Module near the bottom of this post.

Here is a breakdown of the function:

WildColorGo(WhatToTint param, int tintedthingsidnumber);


WhatToTint controls what you're attempting a tint on, be it a character, object, or region.

tintedthingsidnumber is the ID number of the thing you're tinting.Ã,  This is easily called using commands such as player.ID.

Example of use:

function repeatedly_execute()
Ã,  {
Ã,  Ã,  WildColorGo(TintCharacter, player.ID);
}


This will constantly update the player character's tint to a different color and shade, giving it a 'glowering' sort of look.
NOTE:Ã,  Objects and characters must have sprites that were imported FOR a depth above 256.Ã,  For example, using the default game and changing the color depth to 16-bit, then trying to run this function on ROGER, will do nothing, as ROGER has sprite's that cannot be properly tinted because of their depth.

THE SHIFTING COLOR MODULE IS DISTRIBUTED AS IS, WITH NO WARRENTY OF ANY KIND.Ã,  THE USER, UPON RECEIVING THE SHIFTING COLOR MODULE, MAY IMPLEMENT, REVERSE-ENGINEER, RE-DISTRIBUTE, COPY, AND OTHERWISE ALTER THE SOFTWARE AS THEY SEE FIT.

User Experience Recommended:
-Basic knowledge or understanding of the 'Tint' function

(I'm not a very good documenter, but you get the point, a credit would be nice if you use it, but that's all)

Downloads:

Please reply any bugs or suggestions regarding the module

-Regards, Akumayo
Title: Re: MODULE: Shifting Color
Post by: Rui 'Trovatore' Pires on Fri 30/12/2005 15:28:45
Well, two suggestions would be a preview of what it does (in a GIF format, or as a small test game) and the inclusion on the Advanced Randoms module in the zip, if it's necessary.

I'll add it to my site, and if it's ok with you, I'll add the advanced randoms module myself.
Title: Re: MODULE: Shifting Color
Post by: Akumayo on Fri 30/12/2005 17:49:33
As per Rui's request, I added a download link that includes the Shifting Color Module, the Advanced Randoms Module, and a very small demo game.
Title: Re: MODULE: Shifting Color
Post by: Pumaman on Wed 04/01/2006 14:01:23
Hehe, that generates quite a nice effect, good stuff :)
Title: Re: MODULE: Shifting Color
Post by: Candle on Sun 07/05/2006 05:08:37
What a bitching Module.
I have an object that is kind of dark how would I make it be lighter when the Module runs or can that be done?
Title: Re: MODULE: Shifting Color
Post by: Akumayo on Sun 07/05/2006 05:16:36
My my, it's been a long while since I've looked at this one...

Try openening the module's main script, and replacing line 6:

int wild_luminance = 50;


With this instead:

int wild_luminance = 100;


I think that should start the object at its normal brightness, rather than automatically darkening it.  It will still darken as the module runs, but it should at least START as its normal color.  I don't think you can lighten it up though, with this module.

Quote
What a bitching Module.
Thank you?

-Regards, Akumayo
Title: Re: MODULE: Shifting Color
Post by: Candle on Sun 07/05/2006 05:22:55
Oh ya that work a lot better , I had cut out the tank and added it as an object then did the Mod on it and man it looks so cool when it flashs ,
Image for you to see what I'm talking about.
(http://img116.imageshack.us/img116/598/187gl1.jpg)
Title: Re: MODULE: Shifting Color
Post by: Akumayo on Sun 07/05/2006 05:28:33
Wow!  Thanks for the kind words about the effects!  I'm glad the module has found a use for someone!  I wish you good luck with your game (looks kinda' creepy).

-Regards, Akumayo
Title: Re: MODULE: Shifting Color
Post by: Candle on Sun 07/05/2006 05:31:41
It is and man you make the best Mods.. Let me know when you have something new:)
Title: Re: MODULE: Shifting Color
Post by: Akumayo on Sun 07/05/2006 05:34:56
I certainly will  :D
Title: Re: MODULE: Shifting Color
Post by: Candle on Fri 12/05/2006 07:04:41
You think it is able to do hotspots too?
Would save a lot of time if you could cover an area with a hotspot and have it work.
Title: Re: MODULE: Shifting Color
Post by: Akumayo on Mon 15/05/2006 23:35:20
I don't think so, the module takes advantage of AGS's ability to tint things, and it doesn't tint hotspots.  Perhaps you should try using regions instead?
Title: Re: MODULE: Shifting Color
Post by: Meystari F on Wed 07/11/2007 14:43:10
I can not play the demo because my Windows Vista don't play games in 320x200 and 320x240 any longer. So perhaps if you could include Winsetup with the demo I can change the game in 640x400 and above.
Title: Re: MODULE: Shifting Color
Post by: Gilbert on Wed 07/11/2007 15:23:26
You don't really need the setup executable (http://www.adventuregamestudio.co.uk/kbview.php?id=60) to set up an AGS game, though yes, it's a good habit to include it to avoid confusions.
Title: Re: MODULE: Shifting Color
Post by: Monsieur OUXX on Mon 12/11/2007 15:54:46
I just to complain about the demo game, which is ugly and doesn't really give an idea of what the module is for (Why didn't you use your idea of a glowing orb, instead of putting a giant-pixellated-midly-glowing insect ???)  :D

but the module is really cool !