Terrax Lighting system

● ARCHIVED · READ-ONLY
Started by Terrax 1467 posts Page 51 of 74 View original ↗
  1. Terrax said:
    I've been doing timing in the script to see whats parts of the code are causing the most processor time. I've localized the main drain points and i'm happy to report those can be avoided by rewriting some parts. Going to start on it right away.

    Sounds like tremendous progress, glad to hear it :)
  2. Parallax Panda said:
    I guess I have to bother with another question, this time about the event flashlight. I'm trying to use it as a light source from a dim spotlight but it seems you can't change the brightness on the flashlight the same way I can with other light sources, true? For all my other light sources I just picked a color value that was close to the map tint, just a little brighter and the effect was achieved. The flashlight only seems to decide what color it's supposed to be and then make a super bright beam out of it. If that's the way it works I guess it can't be helped. Just want to know if I missed something.

    Since the spotlight is static I'm using the note tag (Flashlight 8 12 #6f1d1d 1 3).



    The problem with the current flashlight is that its realy a number of globes stacked together on top of eachother to make a beam like shape. Since the globes overlap the brightess setting doens't do much good. I'm going to work on a new type of flashlight soon, i think the new flashlight will be better for brightness settings.
  3. Terrax said:
    No, i don't do paid jobs, i do this just for fun :)


    But if you have brilliant idea's, i just might get excited and build them very fast.

    SO here my suggestion. Many people did't work with a different map for inside house.


    Many love map like this:


    Dragon-Quest-IV-Screen.jpg


    Of course with modern  graphic...


    SO it's make it not really bautifull to have the whole map darker.


    If you add a possibility to put inside house not dark at all that will be great.


    Maybe using a rgion id all around the house, or tag, etc. Or even if it's require the whole house to have a tag that can be done.


    What did you think of this idea?
  4. XGuarden said:
    SO here my suggestion. Many people did't work with a different map for inside house.


    Many love map like this:


    Dragon-Quest-IV-Screen.jpg


    Of course with modern  graphic...


    SO it's make it not really bautifull to have the whole map darker.


    If you add a possibility to put inside house not dark at all that will be great.


    Maybe using a rgion id all around the house, or tag, etc. Or even if it's require the whole house to have a tag that can be done.


    What did you think of this idea?

    Basicly you would like some square lightsources that could be placed in the middle of the house so the house is light.


    Square lightsources are easy to make, so yes, that can be done.
  5. Exactly. Of course making the whol house with a specifid tag or regionid can limit a little bit but it's fine.


    Of course a light source in middle and whole house got light was great, but now sur how you can detect border of the house and how fps drop w will get from this.


    I looking for that for a long time lol.
  6. XGuarden said:
    Exactly. Of course making the whol house with a specifid tag or regionid can limit a little bit but it's fine.


    Of course a light source in middle and whole house got light was great, but now sur how you can detect border of the house and how fps drop w will get from this.


    I looking for that for a long time lol.

    I can't detect borders, but i can make lightsources that are square and you can set width and height, if you puzzle a bit and your houses are mostly square, a few lightsources can have the desired effect, i will have to puzzle a bit, but clipping lightsources could be an option.


    Create a lightsource in the house, the set a clipping rectangle for that lightsource in the tag as well.
  7. Hum, most of them are close to be square right. But if I put region ID 65 all arround the house for define border, you are able to determinate the inner of the house?


    Or optionnaly, Can you make all tiltag 8 do not be affecter at all by dark?
  8. I've uploaded a new version to Github in a test-branch.


    https://github.com/Terraxz/TerraxLighting/tree/TestVersion


    I've adjusted the code and i'm pretty amazed by the result. Maps with non-moving events got 400% faster, moving events got faster as well, but less. It seemed that calling the games variables from the event structure costs a massive amount of processing time. I now do this once every map, and save them into a array. The effect was amazing.


    I'm going to continue working on the region and tile-tags, they still have to be improved this way.


    Give the new script a test run!

    XGuarden said:
    Hum, most of them are close to be square right. But if I put region ID 65 all arround the house for define border, you are able to determinate the inner of the house?


    Or optionnaly, Can you make all tiltag 8 do not be affecter at all by dark?

    There are some options available, but i'm not satisfied with the effect, it would need square lightsources


    Try giving the inside of the house Region 9, then call plugin command: RegionLight 9 ON #FFFFFF 50
  9. I've just tried it and it works wonders! That one map on which I used to have like 30FPS now runs smoothly!


    However, I am now encountering the problem that if an event with a light is made to move via the Set Movement Route call, the light will not move with the event. It's not a big deal but I thought you might want to know :D
  10. Verdelite said:
    I've just tried it and it works wonders! That one map on which I used to have like 30FPS now runs smoothly!


    However, I am now encountering the problem that if an event with a light is made to move via the Set Movement Route call, the light will not move with the event. It's not a big deal but I thought you might want to know :D



    Ah yes.. thats why i made a beta version.


    Event are scanned on mapload, events that change movement later will therefor not move.. but as always.. there is a fix


    I will make a plugin call you will need to call when you change an events movement from fixed to moving.. that will reload the events again and everything will work nicely again..


    Ill update with the specifics tomorrow.
  11. I'm probably doing something stupidly wrong, but light cycle is not working for me.


    I'm on a map where the lamps are working, flashlight aswell, but a traffic light like effect is not working.


    I set an event with the note at the top Light cycle #FF0000 50 #00FF00 50 #0000FF 50 (Just for testing before tweaking the colors)


    And nothing happens, tried making it a parallel event aswell as action button, no luck...


    Am I missing something? I feel it's something basic I am missing... =/


    EDIT:


    Oh got it to work. Shamelesly copied the event from your demo, now it works =)
  12. I've uploaded a new beta-version to Github.


    https://github.com/Terraxz/TerraxLighting/tree/TestVersion


    If you change static events to moving events (set movement route etc) its best to use plugin command : reload events.


    Events will automatic reload every few seconds, so even if you forget the lights will catch up sooner or later, but it might look a little glichy.


    Give it a testrun and tell me if you find any bugs.


    Terrax.
  13. Hi Terrax, hope is going well for the next update- really hoping that fixes my lag issue and flash lights etc. But just a quick question about the cycle colour commands- the seconds cycle with 50 miliseconds..how do I translate that into the wait command timer? Just asking so I can better understand what graphic to cycle with the light colour, I can't seem to get it correct.
  14. Skurge said:
    Hi Terrax, hope is going well for the next update- really hoping that fixes my lag issue and flash lights etc. But just a quick question about the cycle colour commands- the seconds cycle with 50 miliseconds..how do I translate that into the wait command timer? Just asking so I can better understand what graphic to cycle with the light colour, I can't seem to get it correct.



    Hmm yes, that could be a problem, It measures real time in miliseconds, so its not easy to time in RPG maker, i could change that to every 10 frames instead, so its much easier to time.
  15. I think doing so in frames would be beneficial for game makers here :)
  16. @TerraxI've noticed that, in the new beta version, the reduction of lag in large maps is substantial...  I approve!  But for some reason the lag rises incredbly high AFTER I use themenu for any reason.  The lag disappears when I enter a battle and remains gone afterward, but that's the only time.  Even if i change maps or something then the lag remains...  unless I go to a map that has no lights on it - then the lag reset, but returns when entering a lighted map again.  So unlike entering a Battle [which seems to wipe the lag away] entering a new map with NO lights just temporarily provides relief.


    This doesn't happen all the time mind you, but it happens enough to be annoying.
  17. Skurge said:
    I think doing so in frames would be beneficial for game makers here :)



    I've uploaded a new beta-version to github, i chanced the 10ths of seconds into 10 frames. Its about the same speed, but probably easier for you  to time.

    firestalker said:
    @TerraxI've noticed that, in the new beta version, the reduction of lag in large maps is substantial...  I approve!  But for some reason the lag rises incredbly high AFTER I use themenu for any reason.  The lag disappears when I enter a battle and remains gone afterward, but that's the only time.  Even if i change maps or something then the lag remains...  unless I go to a map that has no lights on it - then the lag reset, but returns when entering a lighted map again.  So unlike entering a Battle [which seems to wipe the lag away] entering a new map with NO lights just temporarily provides relief.


    This doesn't happen all the time mind you, but it happens enough to be annoying.



    Some other users reported on this problem, but it after a lot of testing they found that it was not a problem of my script, but something else going wrong.


    But i could be wrong, so you can test it yourself.


    If you use plugin command : 'script speedtest on' a counter will be displayed (after around 5 seconds) that will give the average speed in ms the script runs measured over 500 frame-cycles. If you are right, the counter should go up a lot after the menu changes. If it stays the same, some other plugin is screwing up.
  18. I can confirm lag does occur entering and exiting menu screens. I think I mentioned this a week ago.
  19. Terrax said:
    I've uploaded a new beta-version to github, i chanced the 10ths of seconds into 10 frames. Its about the same speed, but probably easier for you  to time

    I've loaded it in and tinkered with the events timers along with the tags, but the delay seems way off, also lag has returned with the region and terrain and it's dropped frame rate worse than ever. :/
  20. I have a problem.


    If i move ONLY diagonal with my Actor and theres a Lamp-event (example: "Light 180 #CCCCCC B25 D2 6" ) on the map, the screen shake ( The screen is often hung up )
    If i move only up, down, left, or right = no problems

    My Screensize X is 1200 , with problems with diagonal actor move.


    If the Screensize X is 816, no problems with diagonal actor move.

    Please help