Post news Report RSS Particle Effects!

This week I added substantial support for a huge range of awesome particle effects into the game!

Posted by on

Hello everyone! So another week of development has passed, and this week I have a load of shiny particles to show for it. If you want to see these particles in action then check out this week's development log video, or you can read about the update in more detail below the video. Enjoy!

Main Features:

  • Particles: All particles are just quads that are rotated each frame to make sure that they always face the camera. On creation, every particle is given an initial speed, direction, life-length, and a susceptibility to gravity. The positions of all live particles are updated every frame using these variables, and dead particles are removed. I also made it possible to set the average number of particles that are emitted each second.

  • Animated textures: The particles can be animated through the use of a texture atlas. A texture atlas contains a load of different particle textures, each one representing a stage of the particle's life. Throughout the life of a particle it fades linearly through all the textures in the texture atlas, making the particle seem as if it were animated.
Particles in Action

  • Directed Particles: Particle systems can emit particles in random directions or in a defined direction. When an emitting direction is defined all particles are emitted along it. An error margin for this direction can also be set, allowing particles to deviate a given amount away from the defined direction.
  • Spawn Areas: I also created 4 different spawn shapes, which define areas in which particles can spawn. The point spawn is the simplest with particles always being emitted from the exact same point. A circle spawn defines a circle of a given radius and orientation, and particles can spawn anywhere on its surface. A sphere spawn allows particles to spawn within the volume of a sphere, and finally a line spawn emits particles along a line.
  • Blending: Particles can either use additive blending or alpha blending. The particles using additive blending appear more translucent and glowing, while other particles seem more opaque. Particles that don't use additive blending are kept sorted each frame using an insertion sort.
Particles in Action

Post comment Comments
Guest
Guest - - 691,825 comments

Looks really good! I especially like the smoke

Reply Good karma Bad karma+2 votes
Post a comment

Your comment will be anonymous unless you join the community. Or sign in with your social account: