|
Blue Zodiakos: Suggestion RE Particle System Motion Blue Displaying 1-3 of 3 total.
1
Omni
|
In your particle code you define five (or was it four?) surfaces for motion blue, and each frame you copy the data from the current/actual surface to the other surfaces to create an echo/blur effect thing, right?
Instead of using GrabRegion, just rotate the echo surfaces down the list. EX, the current surface image becomes the first blur image, the second becomes the third, the third becomes the fourth, and the fourth becomes the first image, which the new scene is then drawn on. Instead of moving image data, just rotate the pointers for the images through the zps_frame[] array.
Just an idea. It might speed up the motion blur. I bet simple assignment is faster than four GrabRegions per frame.
Posted on 2005-01-29 08:04:02 (last edited on 2005-01-29 08:04:34)
|
blues_zodiakos
|
Hehe, I wondered who downloaded that file last night. :D
You are correct, and that most likely would speed up the blur quite a bit. That's not the only problem with my particle system by far, though. The whole thing is really outdated. When I first made it I thought it was one of the coolest things, but I've learned so much since then that I realize now how crude and un-useful it is.
I've had a chance since then to study many different particle systems. One of the big problems with it is that it relies on static arrays instead of dynamically creating particles. If verge had real classes, this would be much easier to write, but I've had a look at freyr's Verge Classes code, and it confused the hell out of me (but it looked spiffy, hehe).
In addition, the actual math behind moving individual particles is FUBAR'd. It actually does work, to a certain extent, how it is supposed to, but I believe that's a coincidence. One thing I'd like to do away with completely is the code's reliance on frame throttling/skipping to determine the speed of the particles, because I think that should be something left to the game creator. I'd like ZPS to be something that you can just drop in your project and use it without having to rewrite or replan anything.
I'm actually planning to rewrite the whole thing from scratch, because a game I'd like to make would use it as the basis for it's effects. I'm just trying to come up with a way that's much better than the current one for handling the particles. My first *goal* would be to create a fire demo with a flame that swirls upwards. I think that would be a worthy goal for an extensible, flexible particle system.
Posted on 2005-01-29 13:32:57
|
blues_zodiakos
|
Update:
You inspired me to go back and rewrite it from scratch. It's insane how at the time, I thought it was efficient, but it's actually horrible, hehe.
I've got most of the basic stuff in place. I can tell you that the new system will be something very exciting. :D I'll post a teaser on my site soon.
Posted on 2005-01-29 17:04:46
|
Displaying 1-3 of 3 total.
1
|
|