Particle Editor
Visual editor for creating particle effects.
Overview
The HGE Particle Editor is a visual tool for designing particle effects like fire, smoke, explosions, magic spells, and other dynamic visual elements. You design effects in real-time and export them for use in your game.
Interface
The particle editor window shows:
- Preview area — See your effect in real-time
- Parameter panels — Adjust all effect properties
- Texture selection — Choose particle sprites
- Preset management — Save and load effect files
Key Parameters
Emission
- Emission rate — Particles spawned per second
- Lifetime — How long particles live
- Direction — Initial movement angle
- Spread — Angle variation (cone width)
Movement
- Speed — Initial particle velocity
- Gravity — Downward acceleration
- Radial acceleration — Expand/contract from center
- Tangential acceleration — Spiral motion
Appearance
- Size — Particle start and end size
- Rotation — Spin speed
- Color — Start and end colors with alpha
- Blend mode — Additive or alpha blending
Creating Effects
Fire Effect
- Set high emission rate (100+)
- Direction pointing up with medium spread
- Enable gravity (negative to rise)
- Start color: bright orange/yellow
- End color: dark red with zero alpha
- Use additive blending
Smoke Effect
- Lower emission rate (30-50)
- Slow speed with high spread
- Particles grow over lifetime
- Start color: light gray with some alpha
- End color: dark gray with zero alpha
- Use alpha blending
Explosion Effect
- Use burst mode (high rate, short duration)
- High initial speed
- Strong negative gravity (or radial)
- Rapid fade out
- Multiple colors for variety
Using Effects in Code
// Load the effect
hgeParticleSystem *ps = new hgeParticleSystem("effects/fire.psi", sprite);
// In frame function
ps->Update(dt);
// Move the emitter
ps->MoveTo(x, y);
// Trigger burst effects
ps->Fire();
// In render function
ps->Render();
Tips
- Start simple — Begin with default values and adjust one parameter at a time
- Watch performance — High particle counts can impact frame rate
- Test in context — Effects look different against various backgrounds
- Save often — Keep versions as you experiment