As the title states, I've run in to a minor (but still somewhat serious) issue regarding Arevulopapo/PK8's Particle Engine script causing a strobing/flickering problem when particles appear.
If the particles wait timer is set to a low number (eg = 4 frames) the particles will flicker rapidly as they appear and increasing the wait timer (eg = 20 frames) will cause it to strobe/pulse instead. This issue becomes far more noticeable if the particles blend type is set to "Add" or "Subtract" instead of "Normal". On this note, while decreasing the wait timers lower than 4 almost eradicates the flickering, having excessive particles on screen can cause severe FPS lag/drops (something many people want to avoid having issues with).
What I wish to do instead is to be able to add is a "fade-in" factor/function before they "fade-out" to prevent the strobing/flickering problem and to avoid causing an "epileptic" effect for people who suffer from epileptic seizures (along with other side-effects such as motion-sickness which personally I'm susceptible to).
As an example of my current work, I am trying to make a waterfall with better animated details than the current/default animated 3-frame tiles using particles.
At the top of each waterfall section is 3 events that generate 3 tile-wide (96x64) waterfall particles, spaced evenly between the 7 tile-wide waterfall. Because each particle is set to a base value of 255 while using an Add blend-type, they cause flickering/strobing which is not exactly how a waterfall works. As stated before, while decreasing the base value will improve particles using Add blend-types from becoming too bright, this will not stop the flickering/strobing as the particles will always appear at "100%" of what ever their base value is set to rather than gradually appearing in a smooth 0-to-100 transition.
Inside the script, I'm currently using this formula.
What I wish to change or adjust in the script is the [255,4+rand(2)] base factor to either include a value "before" this or to add a "part" to the value. Either something along the lines of [0,50+rand(10)], [255,4+rand(20)] or a combined value of [0,50+random(10),255,4+rand(20)] where the particle takes the secondary base value (in this case, 255) to calculate the maximum value of when to finish the fade-in (eg = 255 / 50 = 5 frames) before it starts the fade out process.
Arevulopapo/PK8's script can be found here.
If the particles wait timer is set to a low number (eg = 4 frames) the particles will flicker rapidly as they appear and increasing the wait timer (eg = 20 frames) will cause it to strobe/pulse instead. This issue becomes far more noticeable if the particles blend type is set to "Add" or "Subtract" instead of "Normal". On this note, while decreasing the wait timers lower than 4 almost eradicates the flickering, having excessive particles on screen can cause severe FPS lag/drops (something many people want to avoid having issues with).
What I wish to do instead is to be able to add is a "fade-in" factor/function before they "fade-out" to prevent the strobing/flickering problem and to avoid causing an "epileptic" effect for people who suffer from epileptic seizures (along with other side-effects such as motion-sickness which personally I'm susceptible to).
As an example of my current work, I am trying to make a waterfall with better animated details than the current/default animated 3-frame tiles using particles.
At the top of each waterfall section is 3 events that generate 3 tile-wide (96x64) waterfall particles, spaced evenly between the 7 tile-wide waterfall. Because each particle is set to a base value of 255 while using an Add blend-type, they cause flickering/strobing which is not exactly how a waterfall works. As stated before, while decreasing the base value will improve particles using Add blend-types from becoming too bright, this will not stop the flickering/strobing as the particles will always appear at "100%" of what ever their base value is set to rather than gradually appearing in a smooth 0-to-100 transition.
Inside the script, I'm currently using this formula.
What I wish to change or adjust in the script is the [255,4+rand(2)] base factor to either include a value "before" this or to add a "part" to the value. Either something along the lines of [0,50+rand(10)], [255,4+rand(20)] or a combined value of [0,50+random(10),255,4+rand(20)] where the particle takes the secondary base value (in this case, 255) to calculate the maximum value of when to finish the fade-in (eg = 255 / 50 = 5 frames) before it starts the fade out process.
Arevulopapo/PK8's script can be found here.