Back to docs

GPU Effects

All visual effects in Glyft are GPU-rendered using instanced drawing. Each system uses a single draw call regardless of how many effects are active, with zero per-frame memory allocations.

EffectAPIUse Case
Particlesgame.particles.emit()Explosions, impacts, trails
Ringsgame.rings.emit()Shockwaves, spell effects, AoE
Arcsgame.arcs.emit()Sword slashes, melee attacks
Float Textgame.floatText()Damage numbers, XP, pickups
Labelssprite.labelTextNames, icons, indicators
HP Barssprite.hpBarVisibleHealth bars above sprites
Tweensgame.tween()Property animation, easing

Particles

GPU-instanced particle system with color/size fade, gravity, and spread control. Define emitters in config or at runtime, then emit bursts at any position.

Rings

Expanding ring/shockwave effects with predefined color gradients. Great for spell impacts, healing bursts, and area-of-effect indicators.

Arcs

Directional arc effects for melee attacks and sweeping motions. Multiple shape presets for different weapon types.

Floating Text

Animated text popups for damage numbers, XP gains, and notifications. GPU-rendered with a shared font atlas.

Labels

Per-sprite text labels with optional icons. Visibility can be set to always show, on hover, or based on proximity to the player.

HP Bars

GPU-rendered health bars above sprites. Automatically positioned relative to labels.

Tweens

Animate any numeric property with easing curves. Supports delays, update callbacks, and completion handlers.

Performance

All effect systems share the same performance characteristics:

  • Single draw call per effect type, regardless of count
  • GPU-computed animation, color interpolation, and transforms
  • Ring buffer pools with no per-frame allocations
  • Instanced rendering for maximum batching efficiency