Terrax Lighting system

● ARCHIVED · READ-ONLY
Started by Terrax 1467 posts Page 7 of 74 View original ↗
  1. Skurge said:
    Thanks for helping me with the colours.

    I came across a bug I think, for some reason colours positioned on map edges project the light/colour opposite side of the map's edge. So for example if I have a yellow light positioned on the top of the map, the bottom of the map's has the other half of the light projected on it. How can I fix this?
    I have to test this, but its probably due to the fact that i needed paralax maps to work with the script as well

    Cazziuz said:
    Firstly let me say this is an amazing and epic Plug in , i really think i will be getting a ton of use out it as it is , and i cant wait to see what else you add to it . I also want to know , if it is at all possible to make it so events on map can have the flash light effect ? ie im trying to use this plug in in conjunction with a sensor plugin ( thye both seem to play nice together) and i would like my roaming events ( alarms/guards) to have the flashlight effect , i tried to put the plugin command in there event , but it just triggers on the player. is this possible and im just messing it up ? and if it is not currently possible would it be something that could be done in a future update to the plug in ? 
    Its currently not included because i didn't want to go diggin for the direction of the events. The flashlight can also be a bit heavy on frame-rates, so i didn't want to overdo the effect.

    Lindar said:
    Does not work. I was the third day of trying to set up a suitable test value, but noted that a single value produces different results speed cycle. I do not understand what it depends on and how it works. It is sad...
    The timing at comes down to this :

    1  -> 1 hour  = 60 cycles =  around 1 second

    2  -> 1 hour  = 120 cycles = around 2 seconds

    3  -> 1 hour  = 180 cycles = around 3 seconds

    etc..

    It is however a bit dependent on frame-rate. (60 frames/second)

    I might have to look at RPG-makers inner time to set a real fixed time. Ill investigate.

    Btw.. How would you like to make the setting, your advise?  Something setting like 24 hours = 5 minutes in gametime?
  2. Ahh i came here to dig the comments and find solution to my problem. While playing on an android device this plug in seems to give some serious heavy lag. While in a map that uses the lights. Now I'm finding out it's the flash light that causes the frame rate drop. Is there any way to drop the flaah light?
  3. Terrax said:
    Btw.. How would you like to make the setting, your advise?  Something setting like 24 hours = 5 minutes in gametime?
    Ideally, I would prefer that option: There is a certain game time, which I of course will be different for the game and for the test. This plugin or another. And there is a system of global lighting, each period need to bind to a specific hour of game time. Set when the light, and when it's dark is not difficult. It is difficult to attach to every hour of sunrise and sunset, to a certain phase of twilight. Moreover, it should be possible to start a map is already in the process of a sunset, in some of its phases. (after, for example, 2 hours travel, or 4 hours of sleep). Therefore, control the duration of a full cycle (24 hours = 5 minutes) is not convenient. It is convenient to be able to tie each phase dimming, to a particular hour. And accurately controlled speed of dimming.

    Now, problems occur during the update every hour. Often, dimming delayed or comes too fast, and when the hour changes, darkening the color jumps. Unfortunately, I have no idea how it is possible to synchronize the phase dimming with a specific hour.
  4. Terrax, not sure if you're aware, but I asked Kaus to support your script in his Parallax script and he did it. So now your script is fully supported with Kaus and as far as i'm testing free of bugs :)
  5. Master100000 said:
    Ahh i came here to dig the comments and find solution to my problem. While playing on an android device this plug in seems to give some serious heavy lag. While in a map that uses the lights. Now I'm finding out it's the flash light that causes the frame rate drop. Is there any way to drop the flaah light?
    The flashlight is a little heavier then the other lights, but not much and only when its activated. A flashlight equals about 8 other lights (Basicly the flashlight is 8 lights drawn close together in a row). What probably causes the lag on some android devices is the script itself i'm afraid. It uses canvas filters to get the effects needed and those filters require a good bit of processor power. On PC's its hardly visible, but on older android devices the processor might not be up to the task.

    I'm afraid that can't be fixed (Other then getting a faster phone).

    Lindar said:
    Ideally, I would prefer that option: There is a certain game time, which I of course will be different for the game and for the test. This plugin or another. And there is a system of global lighting, each period need to bind to a specific hour of game time. Set when the light, and when it's dark is not difficult. It is difficult to attach to every hour of sunrise and sunset, to a certain phase of twilight. Moreover, it should be possible to start a map is already in the process of a sunset, in some of its phases. (after, for example, 2 hours travel, or 4 hours of sleep). Therefore, control the duration of a full cycle (24 hours = 5 minutes) is not convenient. It is convenient to be able to tie each phase dimming, to a particular hour. And accurately controlled speed of dimming.

    Now, problems occur during the update every hour. Often, dimming delayed or comes too fast, and when the hour changes, darkening the color jumps. Unfortunately, I have no idea how it is possible to synchronize the phase dimming with a specific hour.
    There is currently a bug in the daynight cycle that creates the weird stuff, working on it ;)

    Folkner said:
    Terrax, not sure if you're aware, but I asked Kaus to support your script in his Parallax script and he did it. So now your script is fully supported with Kaus and as far as i'm testing free of bugs :)
    Thanks, that will please a lot of users.
  6. Terrax said:
    The flashlight is a little heavier then the other lights, but not much and only when its activated. A flashlight equals about 8 other lights (Basicly the flashlight is 8 lights drawn close together in a row). What probably causes the lag on some android devices is the script itself i'm afraid. It uses canvas filters to get the effects needed and those filters require a good bit of processor power. On PC's its hardly visible, but on older android devices the processor might not be up to the task.


    I'm afraid that can't be fixed (Other then getting a faster phone).
    Did you try using paths for the shape of the flashlight ? It should be less consuming than having 8 lights.
  7. Schlangan said:
    Did you try using paths for the shape of the flashlight ? It should be less consuming than having 8 lights.
    Well, its not realy 8 lights, but drawing 8 circles, i tried several options but almost all of them gave real sharp edges (dark/light), it looked more like lasers then a flashlight effect.
  8. LIGHTS! FINALLY! Thank you, I have been waiting for someone to make this ever since MV was released.
  9. Bladeboy05 said:
    Yeah, thanks for the re-direction, but it doesn't work for. The lines he suggested to change, one of them doesn't exist, so it doesn't work for me.

    Terrax can you help me, so that I can get rid of the blackness while keeping the light source?
    I was facing the same problem and it is fixable in various ways, depending on what suits your situation best. So how exactly do you want the light to behave? I mean, theoretically, if you would just remove the darkness, you wouldn't see your light source anyways.
  10. Very nice. Going to download this and try it out right away!
  11. Bladeboy05 said:
    Yeah, thanks for the re-direction, but it doesn't work for. The lines he suggested to change, one of them doesn't exist, so it doesn't work for me.

    Terrax can you help me, so that I can get rid of the blackness while keeping the light source?
    I think what you mean can be done by the following:

    Create an lightsource in the middle on the map with a huge radius and a grey color  (Light 800 #888888) .. It will remove all the blackness but still darken the map a little so lightsources will be visible as lightsources (The 3rd room in the demo is an example of that)

    Experiment a bit with the grey values if you think its to light or to dark.
  12. Terrax said:
    I think what you mean can be done by the following:

    Create an lightsource in the middle on the map with a huge radius and a grey color  (Light 800 #888888) .. It will remove all the blackness but still darken the map a little so lightsources will be visible as lightsources (The 3rd room in the demo is an example of that)

    Experiment a bit with the grey values if you think its to light or to dark.
    I would suggest the same, though it is not the only way. I found the grey color #090909 to be most appealing.
  13. New version (1.1.0) now available

    http://mvplugins.com...Lighting System

    Version 1.1.0

    Mostly bugfixes and making sure that when a game is saved, lightradius and timeofday are restored to the correct values.

    Watch the new parameters when you are adding the script. The script takes game variables 10 and 11 to save values. If you

    already used variables 10 and 11 for your game, don't forget to adjust the parameters to free variables or they will be overwritten

    by the script.

    The speed of the daynight cycles has a clearer definition now.

    'daynight speed 50' means that 1 hour will take 50 seconds in the game, so one day will take 50 * 24 = 1440 seconds = 20 minutes realtime.
  14. Terrax said:
    The script takes game variables 10 and 11 to save values.
    Try to not do that as much as possible. You could maybe add new functions to the Game_Variables class, specifically for your variables.
  15. Schlangan said:
    Try to not do that as much as possible. You could maybe add new functions to the Game_Variables class, specifically for your variables.
    I'm afraid my knowlege of object orientated coding is lacking for stuff like that. I don't understand most of the stuff

    that goes on in the game script, it all seems to be fragmented to one line of code in each object.. i'm sure it has all has a

    use, but i learned coding on a C64 and later in GFA basic on an Atari. I just code in big chunks and only use subs

    when its usefull.

    Those 2 variables will be all though, i'm sure you can fit them in somewere :)
  16. Terrax said:
    New version (1.1.0) now available

    http://mvplugins.com...Lighting System

    Version 1.1.0

    Mostly bugfixes and making sure that when a game is saved, lightradius and timeofday are restored to the correct values.

    Watch the new parameters when you are adding the script. The script takes game variables 10 and 11 to save values. If you

    already used variables 10 and 11 for your game, don't forget to adjust the parameters to free variables or they will be overwritten

    by the script.

    The speed of the daynight cycles has a clearer definition now.

    'daynight speed 50' means that 1 hour will take 50 seconds in the game, so one day will take 50 * 24 = 1440 seconds = 20 minutes realtime.
    It would be really helpful, if you would change the variable to 150 or higher.
  17. Sideroxylon said:
    It would be really helpful, if you would change the variable to 150 or higher.
    You can change them yourself in the parameter settings when you add the script to your game

    Just change the 'Save daynightcycle' and 'Save lightradius' values to the values that are free in your game.
  18. Terrax, you are an updating feature adding machine!
  19. My game doesn't seem to work :(

    I don't have Kaus's plugin thing but I have Yanfly's ones.

    Could you help me please?

    rpg maker empty item.png