DOWNLOAD LINK:Light Spell/Torch Demo v 1.0 DOWNLOAD LINKWant to make rooms dark that need a Torch or Light Spell? Look no further!
************************************************************
1) How it Works
************************************************************
In this Demo, I have made a Light Spell and Torch item by using Images I have made in Photoshop and using the subtraction blending mode (and a little creativity). The blending mode determines how the computer combines the color data. With subtraction, lighter colors actually shift colors darker (with white blending an image to black), while darker colors have little to no effect (with black appearing transparent). This creates a realistic lighting effect as the colors are shifting in color tone towards a warmer shade as they get darker, which gives the image a "lighted" look. Also, the bright areas are 100% the normal color of the background; this effect is noticeably different from having a colored light image over where you want light; this is actively blending the map's color data as the screen moves, causing a very pleasant effect, and using the map's data to your advantage, causing what appears to be natural shadows.
The demo image above has this image blended over it:
What's the difference from just, say, overlaying a black image with a soft edged circle?
vs this:
I find the way the colors blend far more visually interesting and more realistic in the subtracted image. Then again, in the end it is about finding the look that works for your project.
All the effect does is have the smaller images fade out to reveal the larger images. The
dark_room.png image fades out and reveals the
lightspell_small.png image, which then fades in and out over a slightly larger
lightspell_large.png, giving the appearance of a glowing light. This repeats over 600 frames and then the effect stops with the
dark_room.png fading back in over the other images, then deletes the 2 lightspell images. (so they can't get in the way of when another spell/item is used that causes this effect)
************************************************************
2) Using in your Projects
************************************************************
To use this in your project, You need to:
1) Export/import the 5 images under Graphics/Pictures in the Resource Manager. (When importing into your project, select the 1 pixel wide red line on the far right of each image as the transparent/semitransparent color; otherwise, any other color will will throw off the blending)
2) Copy/Paste the "Dark Room Lighting Effects" Event (located in the Cave map in the lower right hand corner; it's icon is a lantern) into any map you want to have the effect used.
3) Copy/Paste the 2 Common Events from the Demo's Database.
4) Copy/Paste the "Light" Skill and the "Candle" item from the Demo's Database.
5) The Demo uses Switches 3,5, and 6. If these are used for other functions, either remap those functions or carefully go though my "Dark Room Lighting Effects" Event and the Common Events to choose different switches.
6) It should work! When the actor enters a map with the "Dark Room Lighting Effects", you should only see a spot in the middle of the screen illuminating the actor. If a Candle item or the Light spell is used, it should illuminate the room by the respectable amount and appear to glow. Each effect lasts approx. 1 minute. If you enter a room with light, the effect will immediately end.
The Light Spell is designed to overlap the Candle, but the Candle will not reduce the size of the Light Spell's area.
************************************************************
3) Compatibility/Room for improvement
************************************************************
This should be compatible with all systems and scripts out there that I know of. Any map using the lighting effect must be made in a way that the character is always in the center, as if the character can walk out from the center of the screen they will walk out of the light and be lost from view. This allows the illusion the light is emanating from the actor.
After making this system, I realized I made a few grievous mistakes.
1) Battle processing will not pause the effect, so I think the light effect will have gone out after one random encounter. I have a feeling remedying this will require reworking the entire event pages concerning the effect, possibly with loops and a timer/variables; however the system as written will work perfectly for maps without random encounters.
2) The items/skills can be used multiple times, wasting a player's items or MP; a simple check switch can be created to avoid this.
4) The items/skills can be activated on a regular map. Upon entering a dark room, the room will be illuminated for any remaining duration of the effect. However, I designed it to end when leaving a dark room; this could be removed, if preferred.
5) To my knowledge there is no way using this method to create multiple sources of light that move independently of eachother (i.e, static torches and character); I really want to find a way to do this, though. See next section below.
Any other big problems, please let me know. I am still quite a beginner, and may have done something stupid.
************************************************************
4) Development for further versions (what I want from YOU - the user)
************************************************************
I really want to allow multiple lighted areas for a character to move through with their torch. Passing torches on the wall, lights shining in from windows - however the only way I can think this can be done would be if the game had to draw and output an image for every frame as the character moved to combine data using a script. If there's a simpler, smart way to do this, I really want anyone's input. (Note I have no knowledge of how to script with RGSS)
Also, suggestions for a solution to the battle processing problem (pausing the effect and resuming for the correct amount of time after a random encounter). I'm sure I could come up with a solution, just something I've never done before and am always up for help and learning from others ideas.
Thanks for your time and I hope you find my ideas useful!
DOWNLOAD LINK:Light Spell/Torch Demo v 1.0 DOWNLOAD LINK(edited once to update download links)