Topic:   Particle Systems   (Read 6475 times)


0 Members and 1 Guest are viewing this topic.

Gan


  • Administrator

  • ^ This guy is amazing.

  • *****


  • Posts: 4411
Particle Systems
« on: March 01, 2012, 11:04:58 PM »
Have any of you guys experimented with particle systems?

I've noticed, Terraria has some top notch particle effects. From sparks, to chopped up vines, to even fire and water!
Fascinating stuff, really bumps up a game's quality to a whole new level.

I've never experimented with making a particle system, would you think it'd be difficult?

Connors


  • ^ This guy is amazing.

  • ****


  • Posts: 2374

  • It's a secret to everyone...
Re: Particle Systems
« Reply #1 on: March 02, 2012, 06:43:31 PM »
Well a simple particle effect isn't hard, it would make some objects with a random size and direction and if you want you make them affected by gravity. They don't need to be sprites unless they are large enough for you to tell or else they might lag more. It might be even faster to make only one particle object with a 2D array containing a row for each particle in an effect.
You already made one when you programmed the continuous laser in Space Marine, where it adds random dots at the end. But those don't move. I bet if you made that bigger and had it only  appear when the laser hit a zombie it would be an okay blood splat.
Warning: The above post may have been modified multiple times.

"In a great game, the character must never perfectly obey the user's command"
 - Tim Rogers

http://connorspuzzles.tumblr.com/

x


  • GMG-er

  • **


  • Posts: 247
Re: Particle Systems
« Reply #2 on: March 02, 2012, 06:54:25 PM »
The trick with a particle engine in not in the creation of particles, but the cleaning up and logistics of them. Luckily the language you will use will probably have a garbage collector. Thus the main problem you face is collisions; working out collisions for 100s-1000s of particles can really slow a game down.

Connors


  • ^ This guy is amazing.

  • ****


  • Posts: 2374

  • It's a secret to everyone...
Re: Particle Systems
« Reply #3 on: March 03, 2012, 12:07:24 AM »
Well perhaps we won't bother with collisions for now. Unless the effect is pretty big that is. Maybe you could also draw the particles after the floor but before walls? But that would be hard because of the way the map draws.
 I'm thinking each separate effect like an explosion or splattering could be a particle object with an array for it's own particles. Garbage collection should be no problem.
Warning: The above post may have been modified multiple times.

"In a great game, the character must never perfectly obey the user's command"
 - Tim Rogers

http://connorspuzzles.tumblr.com/