Code archives/3D Graphics - Effects/Mesh Based Particle Lib

This code has been declared by its author to be Public Domain code.

Download source code

Mesh Based Particle Lib by RifRaf2009
Simple to use mesh based particle lib.
The system core is the emitters, wich internally handle sound effects and multi layer parenting with several
effects.

You may also attach paths wich will alow your effects to
travel a given pattern either one way, ping pong, or emitter termination on one way completion.

Below is a zip containing all media and source code needed to test the lib for yourself. It was tossed together
quickly so you may be able to improve on in a great deal.
I only ask that if you do, you update this achive entry.

Thanks to StevieG for helping point out some Interpolate math wich I based most of the movement in this lib on.
.......................................................
All in one zip.
Http://www.empowergames.com/misc/rifmeshpart.zip


It has min documentation (flung together remember) so if you dont get how im doing somthing, just ask.

The test program simply shows some of the features such as.
 Aligning particle effects to meet collision angles,
 parenting several emitters together, applying paths to
 emitters and objects that are parents to emitters, as well
 as showing the visual difference betwen parent and
 superparent flags. (superparent means every particle is
 also parented to emitter or main parent). Sound management
 is integrated into the particle system so you dont have to
 worry about that at all, you just indicate sounds in the
 emitter presets

Comments

patmaba2009
Bravo


Mike01012009
Incredible! Perfect!


AJ002002009
How would you include this in your own project.
(I don't want to go through all of that code.)
I want to use the fire in my project.


RifRaf2009
Well you dont have to go through all the code of the library, just look over the demo example code, wich is commented so that you can learn how to use it.

If you can do that, and still have questions. Im all ears.

On a side note, ive made a visual editor for effects with this lib, as well as improved it some. I will post the modifications and editor when I have time. probably after I finish Tiny Tanks.


Blitzplotter2009
Bravo, Bravo I've just downloaded your code and it is very impressive - great work. Do you know if anyone has threaded into a program running in conjunction with JV-ODE, I've succeeded to a point (it compiles, incorporated my main game within updategame as recommended) however only got this far by commenting out a couple of things.

The lightning effect was working, which is promising, I'm hoping to get the smoke particle effect working in conjunction with JV-ODE.


RifRaf2009
nice. I have a fix for the lib ill post as soon as possible.
however, I dont know if anyone has used it at all.


RifRaf2009
ok i updated the .zip file linked above. What happens if you run the code on a machine thats been on for many days without a reset, the milliseconds timer gets very high, or negative or somthing and things dont animate as they should instead it looks like stop motion claymation transitions.

I fixed this by adding
Global part_starttime#=MilliSecs()

into the library then using this instead of referencing milliseconds() alone.
Local GameTimer#=Millisecs()-Part_StartTime#


The demo in the zip as you can see if very very basic, because they are meshes you can extend this in a number of ways.. one good example is that your particles can cast shadows with fastext library, or you can toon shade them with a cubemap like I do in Tiny Tanks , and so on.


Blitzplotter2009
Interesting RifRaf, I'll try the updated zip file. I feel I may have some way to go before I have the smoke paricles doing the business - or it could just be the minor tweeks I need to do to successfully thread JV-ODE & your particle lib together. I'll let you know how I progress.

I just like to say how impressed I was with the demo code you attached showing the capability of your particle system.


cyrille2010
url wrong :/


RifRaf2010
ill try to fix that soon. Ive moved alot of my files around for my subdomain.


RifRaf2010
link has been fixed.


Mikorians2014
link WAS fixed


Code Archives Forum