Tiny Code Christmas - Day 5 - EXTRA

Welcome to Day 5 of Tiny Code Christmas EXTRA! We’re glad that you’re joining us again on this festive journey into the world of sizecoding. TCC Extra is intended for people who completed Tiny Code Christmas last year and want a new challenge!

If you haven’t already, read the overview to find out what Tiny Code Christmas is all about!

The Challenge: Flyover!

The challenge is to make the smallest implementation you can of the combined rotation code from yesterday and perspective code from today while keeping the center of rotation moving.

TIC-80

function TIC()
 t=time()/399
 for y=0,135 do
  for x=0,239 do
   Z=math.abs(y-68)+0.1
   u=(x-120)/Z
   v=99/Z
   c=(u+t)//1&(v//1)
   pix(x,y,c&11)
  end
 end
end

PICO-8

function _draw()
 t=time()
 for n=0,3500 do
   x=rnd(127)
   y=rnd(127)
   z=abs(y-64)+0.1
   u=(x-64)/z
   v=99/z
   c=(u+t)&v
   pset(x,y,c)
 end
end

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