-
Notifications
You must be signed in to change notification settings - Fork 0
05_VISUAL_EFFECTS
This chapter focuses on adding visual effects to your custom wand, enhancing its magical appearance and making it stand out in the game world. We'll cover particle effects, glowing, and other visual enhancements.
Particle effects can make your wand look more magical or emphasize its elemental nature. These effects are added using the SpriteParticleEmitterComponent
in your wand's entity XML file.
Here's a basic example of a particle effect that creates a subtle magical aura around the wand:
<SpriteParticleEmitterComponent
sprite_file="data/particles/ray.xml"
delay="0"
lifetime="1.5"
color.r="1" color.g="1" color.b="1" color.a="0.5"
color_change.r="0" color_change.g="0" color_change.b="0" color_change.a="-0.5"
velocity.x="0" velocity.y="0"
gravity.x="0" gravity.y="0"
velocity_slowdown="0"
rotation="0"
angular_velocity="0"
scale.x="1" scale.y="0"
scale_velocity.x="-0.2" scale_velocity.y="4"
emission_interval_min_frames="3"
emission_interval_max_frames="6"
emissive="1"
additive="1"
count_min="1" count_max="1"
use_velocity_as_rotation="1"
randomize_position.min_x="-5"
randomize_position.max_x="5"
randomize_position.min_y="-5"
randomize_position.max_y="5"
randomize_velocity.min_x="-30"
randomize_velocity.max_x="30"
randomize_velocity.min_y="-30"
randomize_velocity.max_y="30"
velocity_always_away_from_center="1">
</SpriteParticleEmitterComponent>
-
sprite_file
: Change this to use different particle sprites. Noita provides many options in thedata/particles/
directory. -
color
andcolor_change
: Adjust these to change the particle color and how it fades over time. -
velocity
andgravity
: Modify these to change how particles move. -
scale
andscale_velocity
: Adjust the size of particles and how they grow or shrink over time. -
emission_interval
andcount
: Control how often particles spawn and how many spawn at once.
You can combine multiple effects to create a unique look for your wand.
While visual effects can make your wand look amazing, be mindful of performance. Too many particles or complex effects can slow down the game, especially if many of these wands are present at once.
In the next chapter, we'll explore some advanced features and techniques to further customize your wand's behavior and interactions within the game world.