Welcome Guest ( Log In | Register )

[ Big| Medium| Small] -



Post new topic Reply to topic  [ 48 posts ]  Go to page 1, 2  Next
    levanan
  Tue Apr 14, 2009 6:15 pm
Member

Light Circles Script v1.2c


Introduction
This script is for RMXP.
It creates light circles for hero and events.

Features

  • create circles just with script
  • have flickering effect now
  • different light radius for each event
  • support moving events



Expand to see the code.


put 1st comment of number on each event to represent their id. Then, put 2nd comment of number to represent the strength of light radius of each event. Next, put the 3rd comment of number to represent the power of flickering.(Both the 3 comments can be put as what number as you want, no more limitation^^ but the 1st comment must be put according to the sequence, which mean must start with value of '1', then '2', then '3'... if you do not wish the event to flick, just set the 3rd comment value as '0' or don't create 3rd comment)

@tone represents how dark is the screen in the game, the higher value of @tone, the darker the screen.@light_limit represents the number of lights are allowed in the screen. for example, if @light_limit equals 5, the maximum light events in the screen is 5. @x_limit is where the light source being switched on or off. If the distance of x between hero and light source is more than @x_limit, the light source will be switched off. The same thing goes with @y_limit.

To set radius of single event or only hero, use $sensitivity_2[A]=value where A represents each event's id. If A equals 0, it represents hero. When $light_switch is set to 0, the script is being ignored. When $light_switch is set to 1, the script is in used. To let hero's light flick, set $flick to a value. The bigger the value $flick is, the stronger the flickering effect.

To change the darkest tone in the game, call $scene.spriteset.tone=A, where A is a number. The bigger the number, the darker the tone is.

Place this script just above Main.^^


The v1.01 version perhaps will be smoother and less lag. Comments are welcomed. Thanks^^

24-11-2010
Minor improvement is made on v1.02 which make it perhaps smoother. Some bugs fixed( picture sprite updated corrected back to number of 50). Coding is modified to provide clearer vision of the script. Thank you.


14-04-2011
v1.1 provides more effiecient coding which makes it less laggy. Moving events are now supported.
The variables '$sensitivity' is no more in used, all will just be controlled by 'sensitivity_2[A]' array.Thank you.

11-07-2011
v1.2 changes quality of light render depending on the graphic frame rate. No demo available yet, tell me if it is needed.


Demo download link(v1.1)
http://www.2shared.com/file/9Ho9UZC7/LCS_v11.html

Demo download link(v1.2)
http://www.2shared.com/file/AU1X2nyD/LCS_v12.html

FAQ



not sure to SDK



Credits and Thanks


Please give comments for this(especially to see whether it will be lag or not). TQ!!!



no need to be credited, but you are welcome to give me credits



updated photo(5-5-2009)
Image
smoother circle

Image
different light circle radius

update photo(19-7-2009)
Image
Image
Image
light don't seem to be ignoring other anymore~

Set light circles for events
Image

Updated photo(28-8-2009)
Image
the resolutions of the light circles are improved(7*7pixels)


Last edited by levanan on Thu Aug 25, 2011 5:50 pm, edited 40 times in total.

Top Top
Profile      
 

    levanan
  Thu Apr 23, 2009 2:54 pm
Member

no reply? or i hv done anything wrong?
dis script existed b4?


Top Top
Profile      
 

    Kingdom Ablaze
  Fri Apr 24, 2009 6:10 am
Smile, you never know when you are on camera!
User avatar



Location: Usa
ok, i looked at it, here is my first two thoughts:
1. people need to know what maker it is for.
2. and a screen shot is allways good(here is one for everyone)
[removed]
i know you said it is a wip so i wont over critic, i like it so far, hope it can be smoothed out more and less boxy :) good luck :)

_________________
Image
Kingdom Ablaze Twitter: https://twitter.com/KingdomAblaze
Kingdom Ablaze Deviant Art: http://kingdomablaze.deviantart.com/
Kingdom Ablaze: Facebook: https://www.facebook.com/KingdomAblazeTradingCardGame


Last edited by Kingdom Ablaze on Fri Apr 24, 2009 3:33 pm, edited 1 time in total.

Top Top
Profile      
 

    levanan
  Fri Apr 24, 2009 1:40 pm
Member

deathbethecost, thanks for ur opinion.
This script is suitable for RMXP and I hv uploaded pictures for this script.
It is improved for a less boxy effect as well^^


Top Top
Profile      
 

    Kingdom Ablaze
  Fri Apr 24, 2009 3:34 pm
Smile, you never know when you are on camera!
User avatar



Location: Usa
no problem man, i deleted my pic cause yours look better :) cant wait to see a smoother version i like what u can do with this script.

_________________
Image
Kingdom Ablaze Twitter: https://twitter.com/KingdomAblaze
Kingdom Ablaze Deviant Art: http://kingdomablaze.deviantart.com/
Kingdom Ablaze: Facebook: https://www.facebook.com/KingdomAblazeTradingCardGame


Top Top
Profile      
 

    levanan
  Fri Apr 24, 2009 6:37 pm
Member

Heh, I will try my best to improve on it!


Top Top
Profile      
 

    regi
  Sat Apr 25, 2009 1:23 am
raptor king
User avatar
Sponsor

This looks like a pretty useful script. Does it work with the command "Change Screen Color Tone", or does it automatically darken the screen?

I'm not a scripter, but here are some suggestions. Try to break the limit of only 5 events; I'm sure there's a way to add more (or an infinite) number of events. Also, each light source should be able to have its own radius, so you can make lights of varying sizes. Finally, try working on smoothing it out, like death suggested. Good luck with it!


Top Top
Profile      
 

    LooseEnds
  Sat Apr 25, 2009 1:39 am
Omar! King Of The Salt Lands!
User avatar
Member


Location: The Black Hole Sun
This is perfect for a poke'mon style cave lighting!
Can you darken the screen to near black and intensify the light radius?

_________________
Oh No! Monster Are Unstopable! Please Saving Us!

This Post Has Been A Loose Ends Production....

Image


Top Top
Profile      
 

    zareth
  Sat Apr 25, 2009 3:22 pm
User avatar
Member

great script! is there something like a switch to switch this modus on and off?
because i want to use that only in caves^^

Zare


Top Top
Profile      
 

    levanan
  Sat Apr 25, 2009 7:35 pm
Member

To Regi, thanks for ur idea. I hv modified the script so that people can set their own event limits but it will be more lag if there r more light circles on the same map.

To looseEnds, yes. You will get your hero very difficult to see things(can be totally black) once the $sensitivity is below a value and no darken area if $sensitivity is set to a high value.(I will write it on the explanation part)

To zareth, sorry I not yet make a switch for this. There is an alternative solution: you can put the $sensitivity to a high value. This makes it virtually no darken area.

I hv improved the script to a better resolution(16*16 pixels). It should b smoother than before but I scared it is a bit lag.

Guys, thanks for ur comments and continue on it. I need all these!!! haha


Top Top
Profile      
 

    Kingdom Ablaze
  Sat Apr 25, 2009 8:57 pm
Smile, you never know when you are on camera!
User avatar



Location: Usa
hmmm it is alot smoother, i like it better now :)

_________________
Image
Kingdom Ablaze Twitter: https://twitter.com/KingdomAblaze
Kingdom Ablaze Deviant Art: http://kingdomablaze.deviantart.com/
Kingdom Ablaze: Facebook: https://www.facebook.com/KingdomAblazeTradingCardGame


Top Top
Profile      
 

    Metal_X
  Tue May 05, 2009 6:50 am
Member

I really like your script, but i found a bug, when you use the teleport command, the light go to the left part of the map and stay there, and when you put a light on an object and teleport like before, when you return to the last place the screen is entirely white.
And another thing, the light is too quadrangular can you do something about that?

Thnx for the script!


Top Top
Profile      
 

    MontBlanc
  Tue May 05, 2009 9:33 am
User avatar
Member

^.^

Another script to be add in my project.

:biggrin:


Top Top
Profile      
 

    levanan
  Tue May 05, 2009 12:33 pm
Member

To Metal_X, you are welcome and thanks for the bugs detection but can you tell me more details about it? I hv updated the script and tried to fix some bugs that you found. Hopefully it can fix the problems, if it does not work just tell me...
Of coz , I am trying my best to make it looks smoother^^(so far only managed to make it to 11*11 pixels for each light dot)


Top Top
Profile      
 

    Metal_X
  Tue May 05, 2009 9:33 pm
Member

The bug is now fixed, thnks!
The light is smoother but its lagging too much now =/
RM is soo limited....


Top Top
Profile      
 

    omen
  Sat May 09, 2009 4:14 am
User avatar
Member

Dude, I freaking love you! My game is in a world that has no sun, making it always night time....I was having fun making all the fog effects on each map to give it the nice night time glow...but this script saves me loads of time and I like the visual look to it better then the ones I made. You will see your name in my credits for sure!


Top Top
Profile      
 

    kwik2thakatch
  Tue May 19, 2009 7:31 pm
Member

Cool script man, adds heaps of atmosphere.
One bug I noticed was in my menu (Stormtronics ABS with Blizz ABS Premenu commands in the Main Selection) the windows for AI Behaviour and AI triggers are dark and I can only slightly see the Actor. The same happened with another window until I made draw_map_as_background=false.


Top Top
Profile      
 

    levanan
  Thu May 28, 2009 11:30 am
Member

to kwik2thakatch, is that when the screen is displaying the menu, the background map is being displayed as well?


Top Top
Profile      
 

    BlueEagle7
  Thu May 28, 2009 1:29 pm
User avatar
Member

What a fantastic script. One thing I noticed, though, is that where two light sources touch, it is dark. This is where light sources would actually overlap and therefore be lighter. Kudos on a useful script.


Top Top
Profile      
 

    nicol100
  Thu May 28, 2009 4:48 pm
Member

There is another perfect script that my game will contain, can you put the demo please?


Top Top
Profile      
 

    Balian
  Wed Jun 10, 2009 5:14 am
Formerly Sirus01
User avatar
Member


Location: Sticks
I've seen may of these but this one rocks! It's so easy to use since you don't have to do anything! lol :haha:

Like people have said before though, it would be nice if you could add a few features like call script at a certin point and dismiss script. Another cool feature i'd like to see is a "flicker" effect for things like candles or torches. Makes it more realistic.


Top Top
Profile      
 

    thenotorioustater
  Tue Jul 07, 2009 2:10 am
Glenn the Frog
User avatar
Member

this script seems awesome but i was wondering if there was any way you could make it customizable so if say u wanted the light around a fire it would appear red, like the fire light. Or, for example, if you wanted to make a glowing bug or something you could make it glow purple.


Top Top
Profile      
 

    Barchetta
  Wed Jul 08, 2009 10:08 pm
Your grenade is unpinned...
User avatar
Member


Location: B-Town, Florida
I'm trying to figure out the script commands but I keep coming up with syntax errors when I call script.

This should work:
$game_player.change_sensitivity(5,4)

But it does nothing.

When I use:
$game_player.change_sensitivity2(5,4)
I get:

NoMethodError occurred while running script

undefined method 'change_sensitivity2' for
#<Game_Player:0x75b04b0>


Top Top
Profile      
 

    levanan
  Sat Jul 18, 2009 10:33 pm
Member

I have accidentally deleted my explanation about the script but will make another as soon as possible~

to BlueEagle7, you are right. There are something problems with my script and I have corrected the problem that you stated before. Thanks for your comment~

to nicol100, I will try to make it as soon as possible~

to Sirus01 and thenotorioustater, thanks for your idea and I will try to make it^^

to Barchetta ,
--> $game_player.change_sensitivity(5,"sensitivity_2")
the code above means that i want a light of power value equals to 5 , put on only hero

--> $game_player.change_sensitivity(2,"sensitivity")
the code above means that i want a light of power value equals to 2 , put on hero and events

the way of writing out the code I think is a bit of confusing and wasting time which I should improve it long time ago...very sorry for that lol~
if you still can't make it, then just write :
$sensitivity=5
$sensitivity_2[A]=5
where A equals the event id that you wish to change its light radius(if A==0, it direct to hero)
$sensitivity is a universal light radius which mean if u add the value of $sensitivity, both hero and events' light radius will be added.


Top Top
Profile      
 

    Zealo
  Mon Aug 24, 2009 6:29 am
User avatar
Member

can anyone tell me exactly how to use this script? Please.


Top Top
Profile      
 

    levanan
  Thu Aug 27, 2009 8:30 pm
Member

Nice to meet you Zealo^^

~To use this script, place this script just above Main.
~The hero and events settings have to be configured.
~Set the event's configuration by referring to the photo showed above(I have just updated it)
~To change hero's light circle radius, change the value of $sensitivity_2[0].
~To change both hero and all events' light circle radius, change the value of $sensitivity.
~To make hero's light circle flick, change $flick to value of 1 or higher.
~To ignore the script's effect, change $light_switch to value of 0.

Hopefully this helps you...


Top Top
Profile      
 

    DreadOmen
  Sun Oct 04, 2009 6:46 pm
Member

Hello. Cool script, I'm definitely going to use this. One question:

Can I change the @tone value with a call script?

I want some maps to be darker than others... And some maps to be normal without any darkness!

Thanks in advance.


Top Top
Profile      
 

    levanan
  Tue Oct 06, 2009 12:32 am
Member

to DreadOmen:
Thanks for your comment.
Yes, I have just updated the script. You can call $scene.spriteset.tone=A, where A is a number.
The bigger the number, the darker the tone is.
If you want the map without any darkness, just put $light_switch=0.


Top Top
Profile      
 

    MarkDarkness
  Sun Oct 11, 2009 6:33 am
User avatar
Member

This script is awesome, but it quickly takes my processor to 100% activity and then lags a lot, never letting the processor usage get lower until I shut the game off. Maybe you should look into a more efficient way of controlling the geometric calculations?

But anyway, could you provide me a really simple version of the script, with decreased quality? I really don't need it to be as pretty as it is right now... I just need a dyamic light circle that works as well as yours, doesn't matter if it's a plain white blob interacting with an undithered dark background. Could you please fill this request?


Top Top
Profile      
 

    DreadOmen
  Wed Oct 14, 2009 7:46 pm
Member

Funny, I noticed that when I accidentally typed "$slight_switch=0" in call script instead of "$light_switch=0" like I meant to, then started the game, the hero's light circle started as a small circle then grew to fill the whole map. I had a call script "$sensitivity_2[0]-=-1" on the same map, and I noticed that when I changed the "hero sensitivity" to a positive number the light circle did the opposite, it dimmed. I found this by accident, but is this a considered part of the script?


Top Top
Profile      
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 48 posts ]  Go to page 1, 2  Next


Who is online

Users browsing this forum: No users and 11 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

cron
We are an independent, not-for-profit game making community.
Homepage
Board Index
About Us
Downloadable Games
Free Browser Games
Games in Development
RPG Maker Support
Game Maker Support
Construct 2 Support
HBGames the eZine
Advanced RPG Maker
Site Announcements
Powered by phpBB © phpBB Group