Tiny Code Christmas - Day 8

Welcome to Day 8 of Tiny Code Christmas! We have a full week of sizecoding in the rearview mirror and only 5 more days 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 a rotation combined with a pixel effect. We can use cos and sin to get the x and y coordinates from an angle and use that to animate a rotating effect. I saw this effect put into practice by Aldroid at a Field-FX bytejam a few weeks ago, it’s a great way to learn about rotation.

This is the TIC-80 palette code mentioned in the video, adapted from the Bytebattle page on sizecoding.org:

for j=0,47 do
 poke(16320+j,math.sin(j/15+math.sin(j%3*13.7))^2*256)
end

The Challenge: Round and Round!

The first challenge is to get an animated tentacle effect on the screen! Use a for loop to create multiple circles, rotate them and apply the pixel effect to create the tentacles!

You can check out our Day 8 video above for an overview on this type of effect.

An Example of the Day 8 Challenge completed with TIC-80
An Example of the Day 8 Challenge completed with TIC-80.

The second challenge is to keep your effect at a maximum of 256 characters. Experiment with some of the palettes from the Bytebattle page on sizecoding.org!

The Expert Challenge

These expert challenges will push your sizecoding knowledge to the limit! Don’t forget to check out our previous Expert Challenges!

  • Create a clockwise rotating filled triangle that spins around its (approximated) center
  • Don’t use the ’tri’ or ’line’ functions
  • Add a gradient background
  • TIC-80: 200 characters or less
  • PICO-8: 150 characters or less
An Example of the Day 8 Challenge completed with TIC-80 by Superogue
An Example of the Day 8 Challenge completed with TIC-80 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