MG/Unit Particle XML

From MegaGlest
Revision as of 16:41, 3 September 2010 by Titus (talk)
Jump to: navigation, search

Particles have a lifecycle. They are born with energy-max and they die with energy=0. With every step their energy is lowered by one. A unit particle system currently can control 200 particles. If the particle system has a high emission rate and you would get more than 200 alive particles the ones with the lowest energy are recyclet and used as new ones.


<?xml version="1.0" standalone="yes"?>
<unit-particle-system>
    	<texture value="true" path="images/particle.bmp" luminance="true"/>
	<mode value="normal"/>                                              <!-- currently supported is normal and black. -->
                                                                            <!-- its the way the particle colors are calculated by the renderer -->
	<primitive value="quad"/>                                           <!-- line qorks too, but its not really useful -->
	<offset x="0" y="-0.4" z="0.0"/>                                    <!-- position of the particle system -->
	<direction x="0" y="1" z="0"/>                                      <!-- starting direction(and speed) of the particles -->
	<color red="1.0" green="0.0" blue="0.0" alpha="0.8" />              <!-- particles are born with this color -->
	<color-no-energy red="1.0" green="1.0" blue="0.3" alpha="0.6" />    <!-- particles die with this color (if they are not recycled!) -->
    	<radius value="0.7" />                                              <!-- size of the region where the particles are emitted -->
    	<size value="0.6" />                                                <!-- particles are born with this particle size -->
    	<size-no-energy value="0.3" />                                      <!-- particles die with this particle size (if they are not recycled!)-->
    	<speed value="3.0" />                                               
	<gravity value="0"/>
    	<emission-rate value="10" />
    	<energy-max value="30" />
    	<energy-var value="0" />
    	<fixed value="false" />
    	<relative value="true" />
    	<teamcolorNoEnergy value="false" />
    	<teamcolorEnergy value="false" />

</unit-particle-system>