Copy and paste the snippet below into your HTML.
Note: This cartridge's settings do not allow embedded playback. A [Play at lexaloffle] link will be included instead.
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