Log In  

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

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

Pretty neat, @Sylfare. Sort of like train tracks riding to the horizon.

P#105267 2022-01-17 22:34

[Please log in to post a comment]

Follow Lexaloffle:          
Generated 2024-03-28 13:01:49 | 0.031s | Q:16