Terrax Lighting system

● ARCHIVED · READ-ONLY
Started by Terrax 1467 posts Page 25 of 74 View original ↗
  1. whydoesyourmomJK said:
    Hi! So far I am liking this plugin but I am unsure of how to use it. Has anyone made a tutorial for how to use this plugin? If not I would like permission to make one on YouTube so that future users don't need to scroll through 20 pages of posts to find a solution to their issue.


    Also is there a more in depth guide to using this plugin? I am finding it hard to understand and I would hate to ask a question that is either completely obvious or already answered. 

    There is a demo on the OP, if you open the project up (rather than the game) you can see how all the events are done - then test play to see what each function does.


    I mean I could draft something up (as this system is quite rooted into my game) - I have shops that open between certain times of day and such.


    What kind of things would you like to accomplish with this and I may be able to help (I'd need an idea of what to record / show in a demo)


    Cheers
  2. Hi Terrax, 


    Now I have got thinking, is there a way to incorporate a clock into your lighting system (or do you know of any compatible timers?)


    I have a fair few things time based (such as shops closing at certain times, guards leaving places unguarded at certain times and such.


    It would be nice to be able to see the time (or even call the debug timer from an item just make it a bit cleaner I guess/ appear in the bottom left/right corner)


    Guessing it may have  been asked for before, just curious if you are looking to implement it (i know you're busy!)
  3. BigToastie said:
    There is a demo on the OP, if you open the project up (rather than the game) you can see how all the events are done - then test play to see what each function does.


    I mean I could draft something up (as this system is quite rooted into my game) - I have shops that open between certain times of day and such.


    What kind of things would you like to accomplish with this and I may be able to help (I'd need an idea of what to record / show in a demo)


    Cheers

    I am redownloading and looking at the demo! 


    (ans as for what i hope to accomplish, learning how the plugin works all around so i can do  a tutorial on it)
  4. Great plugin! Have one question though.


    When I start my game and want to show a picture (even with the script disabled (not turned off, disabled via plugin commands)) the picture doesn't show. I don't know what to do XD Can anyone tell me what I'm doing wrong..?
  5. I noticed a huge performance drop when using tile tags as a lighting source compared to using events as the light source, luckily It''s an easy fix by using events but it would be nice to use tile tags as the light source without the performance hit. It's about 20-40fps when using tiletags, using events does not cause any drop at all. I'm not sure I can help you pin point the exact problem but it definitely has to do with the tags.
  6. just to repeat:  For the Flashlight part of this, can you make the direction the light from the flashlight effect is facing change with the event it is bound to when that event changes directions?Just for testing, I just made an NPC that ONLY changes directions, 90 degree turn to the right every 60 frames, and the light doesn't turn with him. It changes when a character moves just fine, but not when they turn (if they only turn, and don't move)
  7. Hi! I use Quasi abs. How do I use light in a fireball?
  8. Thanks awesome plugin!


    There are a few problems running on Android Chrome. Problems make the game unplayable.


    1.Frame Skip Problem


    Each time updates, the plugin renders gradient fill. Its not a ploblem when running on PC(because its FAST!). but, on Android Chrome, It makes the game slow.


    2.Gradient Fill Problem


    Simply, gradient fill is slow, especially in Android Chrome.


    3.Command Buffer Problem


    Android Chrome accumelates rendering commands when canvas is large, so the plugin needs clear.


    The plugin I fixed is following URL:


    https://gist.github.com/liply/9f141a54e2997c2600a8925e2e05dbe6


    I hope this fix helps mobile game creators.


    Thanks.
  9. @liply I'm assuming this will speed up performance on desktop as well? I will give it a test, thank you for doing this, I had my own thoughts on attempting to speed it up but I'm new to JS still so I never bothered.
  10. LTN Games said:
    @liply I'm assuming this will speed up performance on desktop as well? I will give it a test, thank you for doing this, I had my own thoughts on attempting to speed it up but I'm new to JS still so I never bothered.

    Yes.


    But, this modification changes original behavior(blinking).


    I wish Terrax implements frame skip feature. It's main performance problem.


    Other optimization targets Android Chrome.(Cache and Rasterizing Gradation)
  11. Thank you for doing this, even if it is only a small speed up, every bit of performance helps. On my map 27 height 78 width has a bit of a performance drop as soon as transferring, anywhere from 20-35fps but as soon as it's loaded everything seems to run decently. I would love to see Terrax work on performance, but I'm willing to wait for pixi4.0 for the possibility to add "deferred lighting" plugin for pixi. Check out this example here https://englercj.github.io/2016/01/03/pixi-deferred-lighting/ . It would be awesome to have lighting like this.


    Edit: I'm getting a few issues with your updated script, basically any events with flashlight notetag and set to specific direction are no longer working The flashlight on the player usually emits a radial gradient around the player, this gradient is no offset beside the player instead of over top of them. Also the plugin command to set the tint is no longer working.
  12. LTN Games said:
    Thank you for doing this, even if it is only a small speed up, every bit of performance helps. On my map 27 height 78 width has a bit of a performance drop as soon as transferring, anywhere from 20-35fps but as soon as it's loaded everything seems to run decently. I would love to see Terrax work on performance, but I'm willing to wait for pixi4.0 for the possibility to add "deferred lighting" plugin for pixi. Check out this example here https://englercj.github.io/2016/01/03/pixi-deferred-lighting/ . It would be awesome to have lighting like this.



    My main concern is Android, so I have to fix the problem. Original script makes game slow on Android Chrome(0.2~0.3 FPS, unplayable)


    PIxi4's lighting may not be enabled on mobile device, Because MV runs in Canvas Mode on mobile device.


    MV has memory issue(It does not clear image cache properly, so eats precious video memory). This is why MV runs in Canvas Mode on mobile device.

    Edit: I'm getting a few issues with your updated script, basically any events with flashlight notetag and set to specific direction are no longer working The flashlight on the player usually emits a radial gradient around the player, this gradient is no offset beside the player instead of over top of them. Also the plugin command to set the tint is no longer working.


    Thanks for reporting issue.


    I'll try.
  13. Hello Terrax (and other awesome people)


    For the life of me I can't get the flashlight to work on the player.


    I have it running on an event easy peazy. The lighting works phenomenally everywhere else.


    Using Plugin command: "Flashlight on" (I've tried it with and without variables) results in nothing. Game just shrugs it off, like Neo and bullets.


    Any help would be awesome.
  14. Is there a way how to edit the shape of the lightning?


    It can be jarring when I use the event on the torch and since the light can be nothing else than a circle, it doesn't collide with the wall and goes onto the platform above.
  15. YEEART said:
    Is there a way how to edit the shape of the lightning?


    It can be jarring when I use the event on the torch and since the light can be nothing else than a circle, it doesn't collide with the wall and goes onto the platform above.





     

    You can set the directions of the light, making it half circle and you can also setup the region tags or tile tags to block off light if it's a wall. You should check the plugins help file to see how to setup regionblocks and tiletag blocks. They're very useful.
  16. Problem solved. I didn't realize this from before, but without a player light radius, Flashlight will not work. If this was mentioned earlier, my apologies. Thank you all.
  17. Hey. So I love this program. It's amazing. But for whatever reason when porting it to android. The system completely stops working. And actually tints every screen yellow. Was wondering if anyone knew how to fix this or had any advice. 
  18. When downloading plugin via Chrome I get told it contains a virus.


    Any idea why?
  19. First of all thanks Terrax for this awesome plug-in! Second: maybe someone already asked (but I didnt find it), but I'm not able to turn the flashlight direction. I used the notetag from the help file but the flashlight always appears in left direction. 


    'Events can also use the flashlight effect. Use 'Flashlight 8 12 #888888 1 2' in the note-tag.


    where 8 is the length of the flashlights beam and 12 is the width of the beam. The last numbers are


    optional and can be used to turn the NPC's flashlight on or off and set the direction of the beam


    if the event is not moving (1=up, 2=right, 3=down, 4=left) the default is down.'


    I'm using this for my light


    Flashlight 10 5 #ffffff 3


    but it doesnt work. If I remove '3' (the direction of the light I assumed) the flashlight works but it face left and not down as I wish.


    I'm doing something wrong for sure.


    And a final little request :D


    Is it possible to have the 'Fire' option as a parameter? Like to do Flashlight that can flicker, or even the light of the Daynight cycle (that is... fantastic! I love it!).


    If someone can give me a hint will make me happy!
  20. Are there any overlays that work with this / what's the best compatibility wise?


    as I love the day/night cycle, however I want to be able to apply fog and such without it either not working or going funky