Yet another plasma demo! I've been meaning to implement this classic demo effect for years. Thanks to PICO-8 (which I've only just discovered!) I finally got around to it.
I created a continuous wrap around palette from the seven rainbow colours so I can cycle the palette continuously. I implemented these as sprites so I didn't have to mess around dithering, etc in the code.
Thanks to @rez for idea of each "pixel" being a 2x2 image.
Loads of room for improvement, but I'm pretty happy with this as a first attempt.
I felt like poking at this and making a version that used fill patterns, and also reduced CPU usage by not calculating trigonometric functions repeatedly when they could be calculated once per frame.
Here's a version that uses no sprites at all, and runs at 60fps with a lot of CPU leftover in fact if you uncomment the CPU meter code at the bottom. Enjoy comparing versus your own if you'd like!
[Please log in to post a comment]