Log In  


Cart #37437 | 2017-02-14 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
10

A fast single-pixel particle system using bitwise operations and constant-time addition and removal. The top part of the program is the reusable particle system. It features acceleration, velocity, particle colors, and particle lifetimes. Please reuse, but please also keep my name attached to the code.

The bottom part is the waterfall demo and some generic particle emitter code.

You can save a few more cycles if you hardcode the gravity constant. Otherwise I believe that this is close to optimal.

More information at my github

10


Thank you for this, I was hoping to find a bitwise/poke example and here it is!



[Please log in to post a comment]