Tiny Code Christmas - Day 5

Welcome to Day 5 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 second demoscene effect: tunnels. A tunnel effect is created using polar coordinates combined with a time value to animate it. We’ll be taking a look at the atan2 function and using it to create our tunnel. Tune in tomorrow to find out how to make a sine scroller!

The Challenge: Polar Express!

The first challenge is to get an animated tunnel effect on the screen! Use two for loops to address every pixel, and use the polar coordinates to set the colour!

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

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

The second challenge is to keep your effect at a maximum of 256 characters. You should have plenty of room to play around and come up with an awesome effect, but you can always try for 128 if you need a bit more of a challenge!

The Expert Challenge

These expert challenges will push your sizecoding knowledge to the limit! We will be adding expert challenges to most days so check out the previous challenges too!

  • Animated moving tunnel effect
  • with pattern
  • z-perspective
  • TIC-80: 100 characters or less
  • PICO-8: 80 characters or less

Day 5 Expert Challenge completed 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