Log In  
Follow
Sylfare
Follow

Cart #wuduhenami-0 | 2022-01-17 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
1

I've seen many demos and cool art made with pico8 on Twitter, so I tried to do something. This is my first tweetcart. There's probably many ways to optimize it more, but at least it works.

Press left and right arrows to widen or narrow the road, and up or down arrows to move the horizon.

Some values can also be changed in line 3:

  • b: default horizon position
  • s: offset between the sun center and the horizon
  • p: default road position
  • n: amount of horizontal lines
  • i+=2: speed of horizontal lines
l=line
r=rectfill
b=64s=5e=128h=64p=45n=6i=0poke(24364,5)::_::i+=2i%=e
r(0,0,h,b,2)r(0,0,h,.6*b,9)r(0,b/3,h,b*.6,8)circfill(h,b-s,20,10)r(0,b,e,e,1)l(0,e,p,b,2)for j=1,n do
k=(i+e/n*j)%e
x=p*(e-k)/e
y=k/e*(e-b)+b
l(x,y,h,y,2)end
d=btn()p+=d\2%2-d%2b+=d\8%2-d\4%2flip()goto _

Thanks to @ElGregos' way to process which saved me some characters!

P#105240 2022-01-17 21:50

Follow Lexaloffle:        
Generated 2022-06-29 10:08:46 | 0.065s | Q:10