bug: partical fade to alpha 0 fails
BigDave
Member Posts: 2,239
I have this issue since a while
if i do a partial effect and change color from a to b and b has alpha 0 it sometimes is ignored
even tough the time for the color change is less than the actual life time the transition to alpha 0 is ignored
Comments
Yes, I've noticed this too - I work in 12.10 and even in this older version fade to alpha is broken - it used to work fine in even older GS versions.
It might be the rounding error problem you're encountering. Try using roundTo or prec, depending on your preference. See if that helps.
Or perhaps this was the one I fixed by doing (alpha*10)/10, I can't remember. I remember coming across a similar problem though, and it was a floating point rounding problem!
Contact me for custom work - Expert GS developer with 15 years of GS experience - Skype: armelline.support
We are talking about the colour/alpha in the particles behaviour (which doesn't have expression control over colour/alpha), it used to work fine, fading particles out, but it's not worked for the last few GS releases.
Ah sorry, I tend to fail to read the word "particle"... it's been so long since I used the behaviour rather than spawning them myself. Doh!
Contact me for custom work - Expert GS developer with 15 years of GS experience - Skype: armelline.support
@Socks good to know i am not crazy
@Armelline you spawn your own particles?
so actors with certain effects + lifetime ?
How is this impacting the performance vs using particles behaviour?
My Apps
https://itunes.apple.com/de/artist/david-zobrist/id733552276
https://play.google.com/store/apps/developer?id=David+Zobrist&hl=de
i used an older bug for this purpose
http://bugs.gamesalad.com/show_bug.cgi?id=374
My Apps
https://itunes.apple.com/de/artist/david-zobrist/id733552276
https://play.google.com/store/apps/developer?id=David+Zobrist&hl=de
@BigDave Making a custom particle system is very doable and more flexible, but yes it can have some impact on the performance. It really depends what kind of particles you want to have. If you need to spawn a lot of particles at the same time, then I would go with the particle behavior for sure. But something like wood chopping particles that are flying around, or sword fight particles (which might be what you're looking for regarding your Orcs game?) can be definitely done with some spawning or recycled particles. However, I would only do that if you want to add something extra to the particles, like bouncing of the floor or something like that.
I avoid the particle behaviour pretty much entirely. The benefits of spawning your own particles are:
There's no doubt more, but that's off the top of my head.
Performance will take a hit if you spawn too many, but don't go overboard, and don't keep them alive too long, and you'll not have any problems. If you're spawning 100 particles over 5 seconds, for example, it's really not going to affect performance compared to the particles behaviour. Try and spawn 100 in 1 second though and you'll struggle.
Contact me for custom work - Expert GS developer with 15 years of GS experience - Skype: armelline.support
One issue with the Particle behaviour is that you cannot (reasonably) produce a constant/predictable stream of particles, this alone would make the behaviour enormously more useful, you could use it to lay out dotted lines, dashed lines, patterns of all sorts, but with the production of particles being random it prevents the behaviour from being used in so many more situations than it could.
For example, tire tracks on a car would be great if it weren't for the randomness.
@BigDave
Problem solved (at least for me), you need to have an image selected for the fade to alpha to work, you cannot fade a particle without an image.
@Socks ahhhhhhhh alright! thanks dude
My Apps
https://itunes.apple.com/de/artist/david-zobrist/id733552276
https://play.google.com/store/apps/developer?id=David+Zobrist&hl=de