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

Discussion in 'JS Plugin Releases (RMMV)' started by Khas, Apr 22, 2017.

    Tags:
  1. Ally

    Ally Linked Rooms Games Founder - Fleshforward Member

    Messages:
    332
    Likes Received:
    153
    Location:
    Italy
    First Language:
    Italy
    Primarily Uses:
    RM2k
    Ohhhhh yeah! :kaoluv:
    I can't wait for this!
     
    #81
    Leanne and Khas like this.
  2. KermexRPG

    KermexRPG Mapper Member

    Messages:
    25
    Likes Received:
    18
    First Language:
    Spanish
    Primarily Uses:
    RMVXA
    Sweet! I was waiting for this feature. Thanks khas, u are the man.
     
    #82
    Khas likes this.
  3. Kilitar

    Kilitar Veteran Veteran

    Messages:
    141
    Likes Received:
    41
    First Language:
    czech
    Primarily Uses:
    RMMV

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

    lonewolph Veteran Veteran

    Messages:
    194
    Likes Received:
    14
    First Language:
    English
    will realtime shadows work with parallax mapping?
     
    #84
  5. Khas

    Khas Detective lv73 Veteran

    Messages:
    282
    Likes Received:
    374
    Location:
    Brazil
    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 :)
     
    #85
  6. Khas

    Khas Detective lv73 Veteran

    Messages:
    282
    Likes Received:
    374
    Location:
    Brazil
    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 :)
     
    #86
  7. Nicke

    Nicke Fortune seeker Veteran

    Messages:
    537
    Likes Received:
    524
    Location:
    Sweden
    First Language:
    Swedish
    Primarily Uses:
    RMMV
    Nice! Gonna do some testing right now :D
     
    #87
    Khas likes this.
  8. KermexRPG

    KermexRPG Mapper Member

    Messages:
    25
    Likes Received:
    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.
     
    #88
  9. Khas

    Khas Detective lv73 Veteran

    Messages:
    282
    Likes Received:
    374
    Location:
    Brazil
    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
     
    #89
    KermexRPG likes this.
  10. HasdrubalBarca

    HasdrubalBarca Veteran Veteran

    Messages:
    160
    Likes Received:
    56
    First Language:
    English
    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.

    [​IMG]
     
    Last edited: Aug 29, 2017
    #90
  11. Alastor01

    Alastor01 Veteran Veteran

    Messages:
    220
    Likes Received:
    255
    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 :)
     
    #91
    Khas likes this.
  12. 10kk

    10kk Parallel Process irl Veteran

    Messages:
    209
    Likes Received:
    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: Aug 29, 2017
    #92
  13. Ally

    Ally Linked Rooms Games Founder - Fleshforward Member

    Messages:
    332
    Likes Received:
    153
    Location:
    Italy
    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?
     
    #93
  14. Khas

    Khas Detective lv73 Veteran

    Messages:
    282
    Likes Received:
    374
    Location:
    Brazil
    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.
    [​IMG]
    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 :)
     
    #94
    Shade Aurion, Kilitar and Alastor01 like this.
  15. 10kk

    10kk Parallel Process irl Veteran

    Messages:
    209
    Likes Received:
    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.
     
    #95
  16. Ally

    Ally Linked Rooms Games Founder - Fleshforward Member

    Messages:
    332
    Likes Received:
    153
    Location:
    Italy
    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!
     
    #96
    Alastor01 and Khas like this.
  17. Khas

    Khas Detective lv73 Veteran

    Messages:
    282
    Likes Received:
    374
    Location:
    Brazil
    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 :)
     
    #97
    Shade Aurion likes this.
  18. Ally

    Ally Linked Rooms Games Founder - Fleshforward Member

    Messages:
    332
    Likes Received:
    153
    Location:
    Italy
    First Language:
    Italy
    Primarily Uses:
    RM2k
    @Khas for example?
    And.. Its possible set regions 1 to 10? And not 10, 20 etc?
     
    #98
  19. Hyouryuu-Na

    Hyouryuu-Na Poker-faced girl who will lurk from now on Veteran

    Messages:
    387
    Likes Received:
    731
    Location:
    . . .
    First Language:
    Bangla/Bengali
    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: Aug 31, 2017
    #99
  20. Kirika

    Kirika Villager Member

    Messages:
    23
    Likes Received:
    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
     

Share This Page