Log In  


Colour cycling like it's 1984.

Cart #pohengama-0 | 2020-07-16 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
4

4


Impressive 3D effect for such a small amount of code.

It looks like you're precomputing the sphere in sprite memory, then using palette cycling to make it appear to rotate.. right?


Yep, all palette tricks like the original: https://www.youtube.com/watch?v=YlAhRJjOhDg


And in tweetcart form(but without sound, and plotting directly rather than pallete trickery)

r=24q=576
f=0m=.5n=.87
d=1g=0
::_::
flip()cls(1)for x=-r,r do for y=-r,r do if x*x+y*y<q then
i=n*x+m*y
j=n*y-m*x
w=sqrt(q-j*j)/2
c=i%w*8/w
if(j\6%2==0)c^^=4
c=(c+f)%8\4+7
pset(x+r+f,y+r+70-60*abs(sin(g/70)),c)
end
end
end
f+=d
g+=1if(f%79==0)d=-d
goto _


[Please log in to post a comment]