Original Post
🔒 Locked
Particle Tutorial/Explanations.
Advertisement
Well, creating a basic particle engine isnt that hard.
what do you want your particles to do?
what performance do you need?
does your particle engine require scripted behaviors?
as always copy/past wont learn you anything, and if you cant think of the basic idea behind a partcile system you should start with something simpler.
i will however show point in the "right" direction.
to make a simple yet robust particle engine you would need the following classes
Paricle - Holds particle data (position,size,velocity)
Emitter - Emmits particles
System - Container for particles and emitters
just try to implement the basics, then restart from scratch and consider the faults you did with the first one.
what do you want your particles to do?
what performance do you need?
does your particle engine require scripted behaviors?
as always copy/past wont learn you anything, and if you cant think of the basic idea behind a partcile system you should start with something simpler.
i will however show point in the "right" direction.
to make a simple yet robust particle engine you would need the following classes
Paricle - Holds particle data (position,size,velocity)
Emitter - Emmits particles
System - Container for particles and emitters
just try to implement the basics, then restart from scratch and consider the faults you did with the first one.
As the scene progresses are you moving the various particles along the path you want them to travel?
In your case the cannon (emitter) needs to fire its balls (particles) and travel (distance) towards a target (direction).
Your scene, if I am understanding this rightly (someone please correct me if I am wrong), needs to update the distance and hence new position of the cannon ball before it decides if it hits or misses the target.
In your case the cannon (emitter) needs to fire its balls (particles) and travel (distance) towards a target (direction).
Your scene, if I am understanding this rightly (someone please correct me if I am wrong), needs to update the distance and hence new position of the cannon ball before it decides if it hits or misses the target.
Quote:
Original post by snoddas14
well i thing is, i did that.
but i dident work.
and i gone use it for my canons on an pirate ship!
*** Source Snippet Removed ***
well, for a simple particle that struct is sufficient.
are you updating you particles?
what does your system do now?
are the particles getting correct values?
Loop through all the particles and update thier position (every frame)
with help from the velocity variable.
you could also recolor, resize, change velocity, play a sound, emitt particles from the particle and whatever you can think of in this update.
with help from the velocity variable.
you could also recolor, resize, change velocity, play a sound, emitt particles from the particle and whatever you can think of in this update.
I've successfully built a simple particle system using this tutorial as a starting point. It goes over the implementation as well as usage of such a system.
Topic Locked
This topic has been locked by a moderator. New replies are not allowed.
Sign in to reply to this topic.
Advertisement