RMRK is retiring.
Registration is disabled. The site will remain online, but eventually become a read-only archive. More information.

RMRK.net has nothing to do with Blockchains, Cryptocurrency or NFTs. We have been around since the early 2000s, but there is a new group using the RMRK name that deals with those things. We have nothing to do with them.
NFTs are a scam, and if somebody is trying to persuade you to buy or invest in crypto/blockchain/NFT content, please turn them down and save your money. See this video for more information.
[VX] Light Spell/Torch Demo v 1.0 RMVX(Dragonwarrior style)

0 Members and 1 Guest are viewing this topic.

**
Rep:
Level 66
RMRK Junior

DOWNLOAD LINK:
Light Spell/Torch Demo v 1.0 DOWNLOAD LINK
Want 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)
« Last Edit: February 23, 2014, 03:55:26 PM by modern algebra »
My Soundcloud:

RMRK Forum - Musical "Works in Progress"
I'm a Musician (Sonar X1, Piano, Guitar, game music inspired), and a visual artist/animator (Adobe Photoshop/After FX).
My musical inspirations include Sigur Ros, Pat Metheny, Andy McKee, Tool, Yokko Kanno, Yasunori Mitsuda, etc, to name a variety.
My favorite RPG series is Breath of Fire.
I love RPG's, & enjoy dabbling with RPG Maker, & am considering projects to start someday.

**
Rep:
Level 66
RMRK Junior
***Edited for inforrect info

Edit:  After some testing in my game, I have found it to be compatible to with random battles; the images stays on the regular map.  This is good news!  I'm not sure if the game pauses the event timing during the random battle or not, I have not timed the effect yet.  As well, to make the dark effect disappear after leaving a dark room, you must use the info in the teleport event included in the demo, this will return the game to normal and reset the switches.

I realize some of these changes are easy to do, but nonetheless, when I release an update to the system, it will include:
1) "Ever Burning Torch" item/skill (doesn't go out)
2) "Darkness" Spell (makes a room dark; might be useful for gameplay/story purposes).
3) anything else cool I think of worth including.
« Last Edit: May 28, 2012, 10:24:52 AM by evildrspock »
My Soundcloud:

RMRK Forum - Musical "Works in Progress"
I'm a Musician (Sonar X1, Piano, Guitar, game music inspired), and a visual artist/animator (Adobe Photoshop/After FX).
My musical inspirations include Sigur Ros, Pat Metheny, Andy McKee, Tool, Yokko Kanno, Yasunori Mitsuda, etc, to name a variety.
My favorite RPG series is Breath of Fire.
I love RPG's, & enjoy dabbling with RPG Maker, & am considering projects to start someday.

*
RMRK's dad
Rep:
Level 86
You know, I think its all gonna be okay.
For going the distance for a balanced breakfast.Project of the Month winner for June 2009For being a noted contributor to the RMRK Wiki2013 Best WriterSilver Writing ReviewerSecret Santa 2013 Participant
Being used for a sekrit prawjekt... coming sometime in 2014.
:tinysmile: