From The Mana World
(→Blinking: first chapter, till lacking real explanation.) |
(added fountain effect) |
||
Line 34: | Line 34: | ||
==Water Fountain== | ==Water Fountain== | ||
Moving particles with physics. | Moving particles with physics. | ||
[[Image:Particle-tutorial-fountain.png|right]] | |||
*horizontal- and vertical-angle | *horizontal- and vertical-angle | ||
*power | *power | ||
*gravity | *gravity | ||
*Killed by floor contact | *Killed by floor contact | ||
<pre><nowiki> | |||
<?xml version="1.0"?> | |||
<effect> | |||
<particle> | |||
<emitter> | |||
<!-- no position-bla this time - all particles are spawned at the same point. --> | |||
<property name="output" value= "1" /> <!-- Again...--> | |||
<property name="horizontal-angle" min="0" max="360" /> <!-- launched in a full horizontal circle --> | |||
<property name="vertical-angle" value="45" /> <!-- launched in a fixed vertical angle --> | |||
<property name="power" value="3" /> <!-- Initial speed of 3 pixels per tick --> | |||
<property name="gravity" value="0.1" /> <!-- Accelerated by 0.1 pixels per game tick to the ground --> | |||
<property name="image" value="graphics/particles/orb-medium.png"/><!-- This time we use the orb sprite. --> | |||
</emitter> | |||
</particle> | |||
</effect> | |||
</nowiki></pre> | |||
==Fireball Fountain== | ==Fireball Fountain== |
Revision as of 05:38, 3 June 2008
This will become a tutorial for creating particle effects. Still in the conceptualisation phase.
Basics
- how does the engine work
- where are the files for what purpose
- how can particle effects be added to maps
- how can particle effects be added to NPCs
Blinking
Basic particle effect which creates a box of blinking particles.
- Basic emitters
- position-x, position-y, position-z
- lifetime
- output
- image
<?xml version="1.0"?> <effect> <particle> <emitter> <property name="output" value= "1" /> <!-- We want one new particle per game tick --> <property name="lifetime" value= "10" /> <!-- we want each particle to survive for 3 game ticks --> <property name="image" value="graphics/particles/star-medium.png"/><!-- We want the particles to look like white stars. --> <property name="position-x" min="0" max="32" /> <!-- We want the particles to be spawned in an area 32 pixels wide...--> <property name="position-y" min="0" max="32" /> <!-- ...32 pixels deep and...--> <property name="position-z" min="0" max="32" /> <!-- ...32 pixels high. --> </emitter> </particle> </effect>
Water Fountain
Moving particles with physics.
- horizontal- and vertical-angle
- power
- gravity
- Killed by floor contact
<?xml version="1.0"?> <effect> <particle> <emitter> <!-- no position-bla this time - all particles are spawned at the same point. --> <property name="output" value= "1" /> <!-- Again...--> <property name="horizontal-angle" min="0" max="360" /> <!-- launched in a full horizontal circle --> <property name="vertical-angle" value="45" /> <!-- launched in a fixed vertical angle --> <property name="power" value="3" /> <!-- Initial speed of 3 pixels per tick --> <property name="gravity" value="0.1" /> <!-- Accelerated by 0.1 pixels per game tick to the ground --> <property name="image" value="graphics/particles/orb-medium.png"/><!-- This time we use the orb sprite. --> </emitter> </particle> </effect>
Fireball Fountain
- Nested emitters
- bounce
- animation
Orbiting Spheres
- acceleration
- momentum
- die-distance
- dyeing
Smoke puffs
Demonstrates the use of nested emitters for pulsating effects using the nomads pipe as an example
- Negative minimum output for irregular output
- Using nested emitters for timing purpose
Triangle in circle
- Using nested emitter for circular and linear effects
- Using trigonometrical calculations for creating geometric shapes.