Tiny Code Christmas - Day 4⌗
Today we’re going to look at our first demoscene effect: plasma. A Plasma effect is created by changing the pixel color based on the sin values of its position and combined with a time value to animate it. If sin and cos trigger any bad memories, don’t worry they’re your best friends here! Tune in tomorrow to find out how to make a tunnel effect.
The Challenge: Sines of the times!⌗
The first challenge is to get a basic animated per-pixel plasma effect on the screen! Use two for loops to address every pixel, and set the colour based a combination of sin() values!
You can check out our Day 4 video above for an overview on this type of effect.
The second challenge is to keep your effect at a maximum of 128 characters. If you’re coming up against the character limit in PICO-8 using a custom palette you can choose not to include the palette in today’s challenge character count.
The Expert Challenge!⌗
These expert challenges will push your sizecoding knowledge to the limit!
- Plasma with at least 2 sins to form sphere shapes
- Low frequency plasma preferred
- TIC-80: 80 characters or less
- PICO-8: 70 characters or less