q=32768a,p,r=q,poke2,rnd
p(24365,-1) function _update60() cls() x,y=stat(32),stat(33)circfill(x,y,1,7)
if(stat(34)>0)for i=1,64 do p(a,x<<8)p(a+2,y<<8)p(a+4,(r()-r())<<8)p(a+6,(r()-r())<<8)a=q|(a+8) end
for i=q,-1,8 do pset(%i>>8,%(i+2)>>8,6+((i>>11)%10))poke4(i,$i+$(i+4))end end
// for each dot it uses poke2's to store x,y,dx,dy as 8:8 fixed point numbers, which means the velocity can be added each frame with:
poke4(i,$i+$(i+4))
Oops -- that was only 4k dots. 8k dots doesn't fit in base ram or cpu, but using lua tables at 30fps here's what 8k looks like:
• • •
Missing some Tweet in this thread? You can try to
force a refresh