@z303 (Im sure this could be optimized in some places) I like your shortcuts for x + y without having to do nested for loops :)
w=240
t=0
r=16
s="[mRg]"
m=math
function TIC()
cls(8)
for i=0,32640 do
x=i%w
y=i//w
z=y/w+.5
pix(x,y,9+((x-w/2)/z//(r*2)+(y/z+t)/16)%2)
end
for e=1,5 do
vr=m.sin(t/r+5+(.1*e))*r
print(string.sub(s,e,e),100+(e*6),vr+64,12,true)
end
t=t+1
end
@emargee Nice code. As you only use m once. Not having the variable would be shorter :) I think the break-even is two for maths and three for a variable.
The single loop is from C. You can't really dynamically allocate a 2D buffer, so you end up doing your own indexing.
It has been strange for me to think in characters, not assembled size. With assembled size you can get a nice saving with lots of functions
@emargee Very cool. Exploring is at least half the fun.
Survived the Dentist. Round two on Tuesday