Tiny Code Christmas - Day 4

Welcome to Day 4 of Tiny Code Christmas! If you’re just joining us don’t forget to check out the overview, and start at Day 1! You can start whenever you like, there are no deadlines!

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.

An Example of the Day 4 Challenge completed with TIC-80
An Example of the Day 4 Challenge completed with TIC-80!

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
  • Color-cycle
  • Low frequency plasma preferred
  • TIC-80: 80 characters or less
  • PICO-8: 70 characters or less

Day 4 expert challenge completed in PICO-8 by Superogue

Sharing is Caring!

If you feel like it, why not share what you’ve done with us on the LoveByte Discord, #lovebyte on IRCnet, or share on Twitter and Mastodon using the hashtag #lovebytetcc