Khas Advanced Lighting v4.2 Ultra (now with real-time shadows!)

KermexRPG

Mapper
Member
Joined
Jan 11, 2014
Messages
25
Reaction score
18
First Language
Spanish
Primarily Uses
RMVXA
Sweet! I was waiting for this feature. Thanks khas, u are the man.
 

Kilitar

Veteran
Veteran
Joined
Jul 28, 2015
Messages
141
Reaction score
43
First Language
czech
Primarily Uses
RMMV
@Kilitar thanks for the suggestion, I have added an offset option to battler lights :)

Could you try placing the HIME plugin before my plugin and see if they work as expected?

Confirmed, sorting Hime plugin on top of my list solved conflict with your plugin. Good advice :).
 

lonewolph

Veteran
Veteran
Joined
Oct 25, 2015
Messages
211
Reaction score
14
First Language
English
will realtime shadows work with parallax mapping?
 

Khas

Detective lv73
Veteran
Joined
Sep 16, 2012
Messages
282
Reaction score
380
First Language
Portuguese
Primarily Uses
RMMV
@Kilitar nice! I checked its code and it does rewrite a method instead of aliasing it (which is strongly not recommended). It seems a lot of MV developers are doing stuff like this and it's been breaking plugins around.

@lonewolph hopefully yes! You set walls with region tags, so as long as they are aligned, it should work :)
 

Khas

Detective lv73
Veteran
Joined
Sep 16, 2012
Messages
282
Reaction score
380
First Language
Portuguese
Primarily Uses
RMMV
Here's the final update for my lighting system! Now it has two versions, and the only difference between them is the addition of real-time shadows:
- Version 3.1 is the most lightweight lighting system for RPG Maker MV
- Version 4.0 Ultra has real-time shadows, but it is performance intensive


This is also my final plugin, so now I'm no longer making RPG Maker content anymore. I'll still be around to help everyone and to fix an eventual crazy bug that I may have forgotten, but this version is intended to be the final :)

@Kilitar both versions now have offset for battler lights :)
 

Nicke

Fortune seeker
Veteran
Joined
Apr 4, 2012
Messages
549
Reaction score
551
First Language
Swedish
Primarily Uses
RMMV
Nice! Gonna do some testing right now :D
 

KermexRPG

Mapper
Member
Joined
Jan 11, 2014
Messages
25
Reaction score
18
First Language
Spanish
Primarily Uses
RMVXA
Great! Hey Khas, what about the performance impact with the real time shadows? I mean, its more or less like your previous RMVXA Ultra lighting script?

Thanks.
 

Khas

Detective lv73
Veteran
Joined
Sep 16, 2012
Messages
282
Reaction score
380
First Language
Portuguese
Primarily Uses
RMMV
@KermexRPG well, it will have an impact, but it really depends on your game and the number of moving lights (the system optimizes lights that are not moving) and their size. But it should run pretty well on any modern graphics card :D
 

HasdrubalBarca

Veteran
Veteran
Joined
Feb 4, 2015
Messages
162
Reaction score
56
First Language
English
Primarily Uses
Hey Khas. Having a bit of a problem with the new version. In game when I add the PlayerLanter command I end up receiving this error

/C:/Users/Moisesjr/Documents/Games/1.5/Project4%20-%20Copy/js/plugins/KhasUltraLighting.js:1096 2
/C:/Users/Moisesjr/Documents/Games/1.5/Project4%20-%20Copy/js/plugins/KhasUltraLighting.js:1096 8
rpg_managers.js:1950 TypeError: Cannot read property '26.625' of undefined
at Game_Map.getHeight (/C:/Users/Moisesjr/Documents/Games/1.5/Project4%20-%20Copy/js/plugins/KhasUltraLighting.js:486)
at Game_Player.Game_CharacterBase.lightHeight (/C:/Users/Moisesjr/Documents/Games/1.5/Project4%20-%20Copy/js/plugins/KhasUltraLighting.js:616)
at Sprite_Light.refreshHeight (/C:/Users/Moisesjr/Documents/Games/1.5/Project4%20-%20Copy/js/plugins/KhasUltraLighting.js:1183)
at Sprite_Light.refreshShadows (/C:/Users/Moisesjr/Documents/Games/1.5/Project4%20-%20Copy/js/plugins/KhasUltraLighting.js:1192)
at Sprite_Light.update (/C:/Users/Moisesjr/Documents/Games/1.5/Project4%20-%20Copy/js/plugins/KhasUltraLighting.js:1178)
at Khas_Lighting.update (/C:/Users/Moisesjr/Documents/Games/1.5/Project4%20-%20Copy/js/plugins/KhasUltraLighting.js:1380)
at Khas_Graphics.updateScene (/C:/Users/Moisesjr/Documents/Games/1.5/Project4%20-%20Copy/js/plugins/KhasUltraLighting.js:1347)
at Spriteset_Map.updateKhasGraphics (/C:/Users/Moisesjr/Documents/Games/1.5/Project4%20-%20Copy/js/plugins/KhasGraphics.js:149)
at Spriteset_Map.update (/C:/Users/Moisesjr/Documents/Games/1.5/Project4%20-%20Copy/js/plugins/KhasGraphics.js:139)
at rpg_scenes.js:112

This isn't present in the demo but it's present on my project. Do you know what might be causing it?
Edit: Actually thorugh more testing I found out it's caused by the pixel movement plugin I use. Causing any object to move with the light tag causes the error. This error, however, does not appear in the advanced version even with pixel movement. It only happens in the Ultra version.

Edit: Also another question. Do you know how I can center the player's visibility in the fog? It's not centered around the player which I suspect might be because I'm using bigger sprites.

 
Last edited:

Alastor01

Veteran
Veteran
Joined
Nov 13, 2016
Messages
218
Reaction score
256
First Language
Russian
Primarily Uses
N/A
Omg, this is amazing!
I would expect lighting system to be quite heavy...
Nothing better than lots of colored lights :)
 

10kk

Parallel Process irl
Veteran
Joined
Apr 10, 2013
Messages
209
Reaction score
76
First Language
English
Primarily Uses
RMMV
Why can't you just have a download with only the necessary plugins and the lighting plugin.. a little frustrating having to download 110mb of extra things I really don't need.
Thank you for the contribution, I hope it works okay.
 
Last edited:

Ally

Linked Rooms Games Founder - Fleshforward
Member
Joined
Mar 17, 2012
Messages
332
Reaction score
154
First Language
Italy
Primarily Uses
RM2k
Is there a way to use the light when you press a button? (As it happened in Vx Ace version)
Or do you need to create a common event associated with an object?
 

Khas

Detective lv73
Veteran
Joined
Sep 16, 2012
Messages
282
Reaction score
380
First Language
Portuguese
Primarily Uses
RMMV
@HasdrubalBarca thanks for reporting this, I'll take a look on the weekend!

@Alastor01 thank you! :D

@10kk seriously, I can't believe you're complaining about downloading a 21.3mb demo designed to showcase all the plugin features and help you to use it. I even removed all the unused files before packing it.

Geez. A "little frustrating" to spend a lot of effort and receive this kind of feedback.

@Ally I left this functionality for users to implement. You can build a lot of different systems around the lighting engine with common events :)
 

10kk

Parallel Process irl
Veteran
Joined
Apr 10, 2013
Messages
209
Reaction score
76
First Language
English
Primarily Uses
RMMV
Khas. The only download you offer is a 112MB package with different versions of your other plugins too. I'm just saying you should have a direct download to only the js file and lights folder, because that is the plugin for this topic.
 

Ally

Linked Rooms Games Founder - Fleshforward
Member
Joined
Mar 17, 2012
Messages
332
Reaction score
154
First Language
Italy
Primarily Uses
RM2k
If I wanted to turn the player torch on / off with a button, how could I do it?


I did not have problems downloading the files. Also, khas is working for free, so do not complain!
 

Khas

Detective lv73
Veteran
Joined
Sep 16, 2012
Messages
282
Reaction score
380
First Language
Portuguese
Primarily Uses
RMMV
@10kk if you follow the download link on the topic, you'll be redirected to my blog. Then, click on the download link on my blog and you'll be redirected to a Mega shared folder. There you can navigate to the plugin you want to download, which has a demo (21.3mb) and the js file for those who just want to update.

@Ally you may create an event running on parallel process and do the logic there. A bit of knowledge of setting up event systems is required in order to do that :)
 

Ally

Linked Rooms Games Founder - Fleshforward
Member
Joined
Mar 17, 2012
Messages
332
Reaction score
154
First Language
Italy
Primarily Uses
RM2k
@Khas for example?
And.. Its possible set regions 1 to 10? And not 10, 20 etc?
 

Hyouryuu-Na

Sapphire Sodium
Veteran
Joined
Jun 15, 2017
Messages
862
Reaction score
2,023
First Language
Not English
Primarily Uses
RMMV
Hi! I really really love this plugin and I really want to make a game using this... but I have a problem...

khas.png

This error pops up every time. It used to run in my previous pc. But it got attacked with lots of virus and I had to get it fixed and now this doesn't work anymore.

*Edit* I just tested it from the browser. It works. I also exported the game and it opens and works. So, the only problem (for me... I'm not sure if anyone else is having this problem) is that it doesn't work from the playtest. Anyways, I guess it's not a big problem :) I can use it!
 
Last edited:

Kirika

Villager
Member
Joined
Aug 12, 2014
Messages
23
Reaction score
1
First Language
na
Primarily Uses
N/A
Hi
is there a way make tile always under shadow (even when light source directly under it) ?
in my case i want tile remain dark even when character with lightsource walk under it
 

Users Who Are Viewing This Thread (Users: 1, Guests: 2)

Latest Threads

Latest Posts

Latest Profile Posts

Dad's watching a WWII documentary while I work on some cool assets for my games. I just love RPG Maker!
Also Happy Halloween! Dad's friend won't be coming unfortunately, but Dad will still be taking me to Boxi Park to have some fun tonight! I'll be posting a video on my YouTube channel of the show, and I'll be sure to post a link here.
"Nightmares exist outside of logic and there's little fun to be had in explanations. They're antithetical to the poetry of fear. In a horror story the victim keeps asking why, but there can be no explanation and there shouldn't be one..." - Stephen King
I feel people seek explanation and demand it sometimes in games, but in the horror genre, well, maybe you shouldn't have one. Silent Hill 1 comes to mind...
Managed to implement QSprite.

Always double check your plugin order.


Finally! I've been puzzling over why it wasn't working for two days now. Turns out all of my calculations were correct, I just forgot to give some events hitboxes. :kaoswt: Now my randomly generated maps check for collision errors, and move stuff around in real time if they finds any. :LZSexcite:
Ami
--- OP Candy ---

Kids: Trick Or Treat!
Hero: Alright,here's the Candies (Give A Bunch Of Candy).
Kids: Thank you,Mister! (Running)
Hero: How cute they are…
F.Archer: Did you give them a OP Candy,accidently?
Hero: Huh?

Forum statistics

Threads
104,681
Messages
1,008,066
Members
136,171
Latest member
emcautley1
Top