hearts
a little interactive animation, in 507 characters of code. (less than 2 tweets!)
controls:
- move the attractor with the mouse
- hold right or left mouse button to modify the pullyness/pushyness of the attractor
code:
e=128poke(24340,3,139,138,7,133,130,136,14,129,1,140,12)z={}r=rnd
poke(24365,3)function _(x,y,c)add(z,{x=x,y=y,u=0,v=0,c=c})end
for i=1,99do
_(r(e),r(e),r{7,11,15})end::_::for i=0,300+100*cos(t()/3)do
a=r(e)b=r(e)c=pget(a,b)-1
if(c%4==3)c=0
circfill(a,b,1,c)end
a=stat(32)b=stat(33)q=stat(34)for c in all(z)do
i=a-c.x
j=b-c.y
h=((i*cos(t()/13))^2+(j*sin(t()/11))^2+3)^.9/sin(t()/4)*(3-2*q)
c.u+=(i-j/3)/h
c.v+=(j+i/3)/h
c.u*=.9c.v*=.9c.x+=c.u c.x%=e
c.y+=c.v c.y%=e
?"♥",c.x,c.y,c.c
end
?"♥\^1",a,b,7
goto _
Updated | 21 days ago |
Status | Released |
Platforms | HTML5 |
Rating | Rated 5.0 out of 5 stars (1 total ratings) |
Author | pancelor |
Genre | Simulation |
Made with | PICO-8, Sublime Text |
Tags | Colorful, Minimalist, PICO-8 |
Average session | A few seconds |
Inputs | Mouse, Touchscreen |
Accessibility | High-contrast, Textless |
Comments
Log in with itch.io to leave a comment.
Rad-looking stuff, reminds me of Trasevol_Dog's work!
neat :)