hotn-gay-digital-garden/twitter/tweets/11_7_2020.md
2026-02-15 21:39:13 -06:00

37 lines
1.1 KiB
Markdown

{{{
"planted": "11/7/2020",
"repotted": "1/4/2026",
"nobreak": "true"
}}}
* I wanted to make a more technically impressive game for #TweetTweetJam5, so I spent a bit of time making "Islehopper"! fly around procedurally generated 3D worlds in this 560 character game! https://valeradhd.itch.io/islehopper-ttj5
(source in replies) #pico8
![](media/11_7_2020.gif)
<div class="code"><p>
pal({[0]=1,15,143,138,11,139,3,131,132,5,6,7,7,7,12},1)cls()_=127n=rnd
x=32q=cos
y=32u=sin
d=0z=8w=64e=64l=line
for i=0,30do
a=n(_)b=n(_)r=n(9)for i=1,9do
circfill(a,b,r,i)r-=n(4)end
end
memcpy(0,6<<12,8192)::_::
cls(14)for i=0,_ do
a=x
b=y
r=d+(i/256)-.25p=_
for j=1,24do
a+=q(r)b+=u(r)h=sget(a&_,b&_)s=sin(t()/8)*4+64-(h-z)*64/j
if(s<p)l(i,p,i,s,h)p=s
end
end
b=btn()w+=b\2%2-b%2e+=b\8%2-b\4%2x+=q(d)/4y+=u(d)/8r=atan2(w-64,e-_)-.25m=t()for f=e,e+2do
j=u(m)/16l(w+q(r-j)*16,e+u(r-j)*16,w,f,13)l(w+q(r+.5+j)*16,e+u(r+.5+j)*16)end
d+=(w-64)/_/_*4
flip()goto _
</p></div>
*gardener's note: this one turned out underwhelming. this style of raycasting is slightly too intensive to be done well in pico-8*