Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines
A jam submission

1kBicycleView game page

A bicycle in 1k code with PICO-8
Submitted by HikoKyoujurou (@HIKOkyoujurou) โ€” 3 days, 7 hours before the deadline
Add to collection

Play game

1kBicycle's itch.io page

Compressed Bytes used
1015

Source Code (OPTIONAL)
bl={}๐˜ง=rectfill ๐˜ช=circfill o=cos z=sin ๐˜ญ=line
function ๐˜ฃ(s)for i=1,1000do
add(bl,{x=rnd()*3500000,y=rnd()*80,๐˜ด=s,w=rnd()*(90-s*10)})end
end function i(x,y,r,s,c)for a =0,s do
oval(x-r+a,y-r,x+r-a,y+r,c)oval(x-r,y-r+a,x+r,y+r-a)end end
๐˜ณ=0function dt(x,y)for i= 0,10 do
k = ๐˜ณ+i/10local m,๐˜ฎ,n,๐˜ฏ = 13*o(k),13*z(k),2*o(k),2*z(k)๐˜ญ(x+๐˜ฏ,y+n
,x+๐˜ฏ+m,y+n+๐˜ฎ,6)๐˜ญ(x-๐˜ฏ,y-n,x-๐˜ฏ+m,y-n+๐˜ฎ)end
i(x,y,16,3,5)end
l=8ls=2g=5function ๐˜ฅ(o1,o2,c,cs,d,w)local
c=c or l cs=cs or ls
w=w or 2for i=0,w do
๐˜ญ(o1.x+i,o1.y,o2.x+i,o2.y,c)end
if(d==0)w=0๐˜ญ(o1.x+w,o1.y+1,o2.x+w,o2.y+1,cs)end
function dl(x1,y1,x2,y2,c,cb)mx,my= (x2-x1),(y2-y1)ll=(mx^2+my^2)^0.5ms=(46^2-ll^2)^0.5/2px=mx/2+x1+ms*my/ll
py = my/2+y1-ms*mx/ll
๐˜ฅ({x=x1,y=y1},{x=px,y=py},c,cb,0,6)๐˜ฅ({x=px,y=py},{x=x2,y=y2},c,cb,0,5)
end b={}function y(x,y)return {x=x+b.x,y=y+b.y}end
๐˜ด=0r=0s=0๐˜ค={1,13,9}๐˜ฃ(1)๐˜ฃ(2)๐˜ฃ(3)b={x=32,y=100}::_::cls(12)๐˜ด*=0.99s*=0.9if(btn(โžก๏ธ))s+=0.004๐˜ด+=s/50r-=s
๐˜ณ-=๐˜ด
for b in all(bl)do ๐˜ง(b.x,116,b.x-b.w,36+b.y-b.๐˜ด*5,๐˜ค[b.๐˜ด])b.x-=๐˜ด*b.๐˜ด^3
end ๐˜ง(0,116,128,128,5)f,p,a,t,c,p1,p2,h,n,e=y(54,0),y(23,0),y(14,-30),y(43,-40),y(47,-27),y(23+9*o(r),9*z(r)),y(23-9*o(r),-9*z(r)),y(10,-35),y(23,-60),y(28,-45)dl(h.x,h.y,p2.x,p2.y-3,13,1)๐˜ฅ(p,p2,13,5)๐˜ง(p2.x-3,p2.y-1,p2.x+3,p2.y+1,5)๐˜ง(p2.x,p2.y-3,p2.x+7,p2.y-2,2)dt(f.x,f.y)dt(b.x,b.y)๐˜ฅ(p,b)๐˜ฅ(p,c)๐˜ฅ(c,f)๐˜ฅ(b,c)๐˜ฅ(a,p,l,ls,0)๐˜ฅ(t,f,l,ls,0)๐˜ง(a.x-3,a.y,a.x+8,a.y+4,g)๐˜ช(t.x,t.y,2.5)circ(b.x,b.y,2)๐˜ญ(b.x,b.y+2,p.x,p.y+4,1)๐˜ญ(b.x,b.y-2,p.x,p.y-4)i(p.x,p.y,4,1,g)๐˜ฅ(p,p1,6,13,0)๐˜ช(h.x+4,h.y+1,3.5,13)๐˜ฅ(n,h,14,8,1,7)dl(h.x,h.y,p1.x,p1.y-3,12,1)๐˜ง(p1.x-3,p1.y-1,p1.x+3,p1.y+1,13)๐˜ง(p1.x,p1.y-3,p1.x+7,p1.y-2,8)๐˜ฅ(n,e,14,8,0,4)๐˜ฅ(e,t,15,4,0,4)๐˜ช(n.x+6,n.y-4,5,15)flip()goto _

Leave a comment

Log in with itch.io to leave a comment.

Comments

HostSubmitted

This is a really neat interactive demo.
The look & feel of the movement is great.
Nice one! ๐Ÿ‘