Skip to content

VicMarBall/ParticleSystems_and_SpecialEffects

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Particle Systems and Special Effects

I'm Victor Martin Ballesta, student from CITM, and this is my personal research for Proyect II

Particle System

A particle system is an object that emit particles, giving them their properties and managing them.

A particle can be simple texture with basic editions, like size, color and rotation.

A particle system usually requires a lot of particles to work properly. Because creating new objects is time consuming, we will create an object pool with a maximum number of particles.

68747470733a2f2f692e696d6775722e636f6d2f47364c6e4e466e2e676966

Object Pool

An object pool is a component that occupies a certain memory with a certain type of object.

Object pools are useful for when you will create a lot of similar objects that are created and deleted continuously. Particles are a perfect example of that.

The particles will be lended by the object pool and will return once the particle system is destroyed.

objectpoolingmikegeig

Examples

Campfire_with_smoke EaiN-hrpcmqv3205702

tumblr_8bd5434864ee91df6ca0ffaaf2d8894e_b824f32a_540

How to implement into your proyect

Add the files related to particles

Add the following files found in this Github proyect: Particle.cpp, Particle.h, ParticleSystem.cpp, ParticleSystem.h, ParticleSystemManager.cpp, ParticleSystemManager.h

Add the Module ParticleSystemManager

Add the ParticleSystemManager to your App's Module System (and adapt any possible inconsistencies)

Add the DrawParticleAlpha in your Render Module

To be able to print the particles with changing colors, a new function has to be added to the Render module (This is made to work with SDL). You can find the function DrawParticleAlpha in Render.cpp

Extra Posible Inclusions

XML Inclusion

A possible extra inclusion could be making the blueprints in an XML file, loading them and having them separated from the code.

Animated Particles

Another thing that could be added is making the alphas as a spritesheet and making the particles animated.

Various Interpolation Funtions

Now, when the particles change over time, they do it in a linear manner (LERP). Another addition can be to make different interpolation with different functions.

References

Making a Particle System WITHOUT a Game Engine! - Small Hedge Games

Object Pool - Optimization Patterns - Game Programming Patterns

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors