New version: Line emitter, curve distribution and focal points!


This new version comes with a few interesting features:

Curved distributions:
Replacing the Gaussian randomization, there is now an option to use animation curves to alter the distribution along U and V coordinates, and also for the speed and life of a particle.

You can add an animation curve asset when creating the emitter and it will be loaded in automatically as long as the curves have the correct names: "u_coord", "v_coord" "speed" and "life".


Something like this would be an approximation of a Gaussian bell distribution, with less values at the extremes and more at the center.
You can also add curve channels by using the method .set_distribution_speed(anim_curve,channel) , .set_distribution_life(anim_curve,channel) , .set_distribution_u(anim_curve,channel) , or .set_distribution_v(anim_curve,channel) 

Also, you can now set different amount of divisions for the even distribution, making it easier to know what result to expect.

Line Emitter
Now the emitter's shapes or forms are made by using the method form_path or form_line, (while a circle is the default form).
The new Line emitter allows to do a simple line or ,if you increase the radius of the emitter, a rectangle. You need to add point B's x and y as the arguments. These coordinates are relative to the x and y emitter position when you actually burst the particle emitter.

Focal Point

The focal point is a point to which the particles go towards or away, that is not the center of the form.
This point can be anywhere, and is set by accessing the variables "x_focal_point" and "y_focal_point" directly . By default their value is 0 (so, the center of the form,  or the default normal/transversal angles ).
These coordinates are also relative to the emitter's position.

It doesn't currently work with paths, only with circles and lines.

That's it for now!

For the future, Im considering removing the particle system from the emitter creator. I'm trying to conceptually separate Systems as a rendering stage, emitters as a dynamic stage and particles as a static or starter stage. This way, the same emitter can be used with different systems, which can be modified by shaders, or be at different depths, etc.

Files

pulse_0_4.yymps 109 kB
Jul 24, 2023

Get Pulse - Particle magic for GM

Download NowName your own price

Leave a comment

Log in with itch.io to leave a comment.