Pico-8 Lua code by zep@lexaloffle:
t=0 ::a:: cls() t+=1/9 for i=0,1,0.1 do x=64+cos(i+t)*48 y=64+sin(i+t)*24 circfill(x,y,y/12,12+y%4) end ?"\146 rad bot! \146",40,60 flip() goto a
TIC-80 Lua code by me:
-- title: `rad bot` demo zep@lexaloffle
-- author: Al Rado 03.03.2017
-- desc: ported from Pico-8 =)
-- script: lua
-- pal: PICO8
function TIC()
cls()
t=time()/3000
for i=0,1,0.1 do
x=120+cos(i+t)*48
y=68+sin(i+t)*24
radius=y/12
-- divide by 2 for slowed color change
color=12+(y/2)%4
circ(x,y,radius,color)
print("rad bot!",100,65,color)
end
end
-- PICO-8 cos
function cos(a)
return math.cos(2*math.pi*a)
end
-- PICO-8 sin
function sin(a)
return -math.sin(2*math.pi*a)
end
