Adventure Game Studio

AGS Support => Modules, Plugins & Tools => Topic started by: Akumayo on Thu 22/06/2006 20:39:47

Title: MODULE: Lightning v1.0
Post by: Akumayo on Thu 22/06/2006 20:39:47
A small, but effective, module I worked out because I was bored.Ã,  I'll spare you the description, and go straight to th pictures ^_^

(http://www.2dadventure.com/ags/lightning_screenshot_one.PNG)

(http://www.2dadventure.com/ags/lightning_screenshot_two.PNG)

(http://www.2dadventure.com/ags/lightning_screenshot_three.PNG)

(http://www.2dadventure.com/ags/lightning_screenshot_four.PNG)

The download includes a demo game, a short manual, the Advanced Randoms module (the Lightning module uses it), and the Lightning module itself.

Lightning Module Bulk File (http://www.2dadventure.com/ags/Lightning_Module_Bulk_File.zip)

User Experience Recommended:
-Basic understanding of the RawDraw functions, especially RawRestoreScreen()

If you find any bugs, or have any suggestions, post them here.

-Regards, Akumayo
Title: Re: MODULE: Lightning v1.0
Post by: Kweepa on Thu 22/06/2006 21:18:54
Shouldn't you be working on your MegaDemo? >:( :=

Looks good. The lightning could be quicker, but I guess that's tweakable...
Also, you can call RawSaveScreen yourself in the module's event handler. Makes the module a bit easier to use.

I got this error after about 30 seconds of the demo game:


A fatal error has been generated by the script using the AbortGame function. Please contact the game author for support.

in Lightning (line 22)
from Room 1 script (line 10)

Error: Cast_Lightning called when not enough bolts to process.
Title: Re: MODULE: Lightning v1.0
Post by: Akumayo on Thu 22/06/2006 22:33:55
Quote
you can call RawSaveScreen yourself in the module's event handler.

I may look into that, it would make the module more user-friendly.

As for the error, it happens sometimes due to me being FAR too lazy to add a check to make sure there are enough bolts before the demo decides to generate yet another one.

QuoteShouldn't you be working on your MegaDemo? 
The Lightning module is FOR the MegaDemo ;D

-Regards, Akumayo
Title: Re: MODULE: Lightning v1.0
Post by: Kweepa on Thu 22/06/2006 23:13:03
Quote from: "Acqua" Akumayo on Thu 22/06/2006 22:33:55
The Lightning module is FOR the MegaDemo ;D

Oh good! Looks like it's just you and me, and I'm not eligible. :P

How does the lightning differ from that in your WeatherEffects module?
http://www.adventuregamestudio.co.uk/yabb/index.php?topic=25077.0
From what I can see you've added the ability to have multiple bolts, but is there anything else?
Title: Re: MODULE: Lightning v1.0
Post by: Akumayo on Thu 22/06/2006 23:15:18
Multiple bolts, multiple casts, and faster handling.  (Pleased to see that you know about the old lightning too though  :))

Plus, I'll actually update this one, I don't plan on going back to the Weather Effects module.
Title: Re: MODULE: Lightning v1.0
Post by: R4L on Fri 23/06/2006 08:11:56
Is it possible for the lightning to fade away? Nice demo though...
Title: Re: MODULE: Lightning v1.0
Post by: Khris on Fri 23/06/2006 08:54:04
Looks nice, a suggestion about the color, though:
Try using blue (67, 137, 231) at x-1 and x+1, then white at x instead of drawing a single line.

(http://img84.imageshack.us/img84/5660/lightning2mx.png)
Title: Re: MODULE: Lightning v1.0
Post by: jasonjkay on Fri 23/06/2006 12:19:39
Looks ok, i'll add it to my site soon.
Title: Re: MODULE: Lightning v1.0
Post by: Akumayo on Fri 23/06/2006 18:49:34
Quote
Is it possible for the lightning to fade away? Nice demo though...

You mean fade out when it's finished, rather than just disappear?Ã,  Possibly.Ã,  I'll look into it with the next update.

Quote
Looks nice, a suggestion about the color, though:
Try using blue (67, 137, 231) at x-1 and x+1, then white at x instead of drawing a single line.

(http://img84.imageshack.us/img84/5660/lightning2mx.png)

I feel stupid, but, I really don't understand what you're saying.Ã,  Ã, :-[
Oh, I see now (zoomed in on image).  That does look neat.  Do you think it would be worthwhile to add an option to do this type of lightning rather than a single line?

jasonkay:Ã,  Okay, thanks!
Title: Re: MODULE: Lightning v1.0
Post by: Kweepa on Sat 24/06/2006 00:13:42
Quote from: "Acqua" Akumayo link=topic=27069.msg344191#msg344191Do you think it would be worthwhile to add an option to do this type of lightning rather than a single line?
Only you can answer that...
Title: Re: MODULE: Lightning v1.0
Post by: Alynn on Sat 24/06/2006 13:23:59
Or just an option to set the colors... (I haven't looked at this jsut putting this in)

Lightning.SetOuterColor(int color)
Lightning.SetInnerColor(int color)
Lightning.SingleLine(bool singleLine)

Then they can set it to whatever they want. Normally uses the Inner color if singleLine is true, if not uses inner and outer colors.