2DArray

2DArray

@2darray.bsky.social

i make games and silly code demos. some free gamedev tutorials: http://demoman.net buy "Trackminia" on the Playdate: https://play.date/games/trackminia/ older games: http://2darray.itch.io

1K followers57 following57 posts

what do we call tweetjams now? (dunno. 248 bytes) #pico8 ?"\^!5f10█▒1⬇️3⬅️;⌂♥7" ::_::flip()cls()w=t()/8for i=0,700do for j=0,1do srand(i)f=w+j/120g=i*.618a=g+sin(f+g+rnd()/9)y=cos(f+g)r=sqrt(1-y*y)x=r*cos(a)z=r*sin(a)h=120/(z+3)u=x*h+64v=y*h+64if(j<1)p=u q=v else line(p,q,u,v,rnd(9)+1) end end goto _

View full thread

2DArray reposted

Very excited to share that Big Hops' first public demo will be at Day of the Devs' pre-GDC event at the Midway on March 16th! Most of our team will be around for GDC, so get in touch if you're interested in doing an interview or playing the demo.

trying another #playdate idea: guy with a candle/lantern quite noisy, but it has soft shadows with correct penumbra behavior, and runs at a stable 30fps on the device!

View full thread

trying another #playdate idea: guy with a candle/lantern quite noisy, but it has soft shadows with correct penumbra behavior, and runs at a stable 30fps on the device!

View full thread

pathfinding for large agents: the spider patrols by default and chases you when you're in a place that it can reach (it can't fit through smaller doorways) eventually this will have some stealthy line-of-sight stuff, but for now the spider just has magic awareness

trying another #playdate idea: guy with a candle/lantern quite noisy, but it has soft shadows with correct penumbra behavior, and runs at a stable 30fps on the device!

View full thread

started adding support for a moving camera - this is harder than usual in this game, because of the lighting system! getting more and more interested in making the whole game one continuous/seamless map, instead of doing room-transitions...

trying another #playdate idea: guy with a candle/lantern quite noisy, but it has soft shadows with correct penumbra behavior, and runs at a stable 30fps on the device!

View full thread

kinda dry, but i've been making a custom language for dialogue/scenario authoring for the past few days. sorta like yarn spinner, where you can mix "coding-script" logic and "theater-script" dialogue. it's finally executing some code! video of this script running in the next post

video of what happens when running the script from the previous post. currently it just prints stuff to the console, but i'll get into proper in-game dialogue rendering soon works in a traditional way: source text -> lexer -> parser -> AST -> bytecode

#pico8 flurry, 274 bytes ?"\^!5f10076=1▒" s={}::_::cls()for i=0,2do add(s,{x=rnd(130),y=-10,d=1+rnd(5),u=0,v=0})end for i,p in pairs(s)do p.u=(p.u+rnd(.3)-.16)*.98p.v=(p.v+rnd(.4))*.8line(p.x,p.y,p.x+p.u,p.y+p.v,p.d)p.x+=p.u/p.d p.x-=flr(p.x/130)*130p.y+=p.v/p.d if(p.y>130)del(s,p) end flip()goto _

here's an oldie #pico8 cls(6)m=8192?"shit",3,3,1 memcpy(0,m*3,m)::_::cls()w=-t()/2rect(36,54,37,127,2)for x=0,60do a=x/45 for y=0,30do c=sget(x/3,y/3)+(x+y)%2+.2p=a*(sin(x/20+w)+cos(y/16+w))q=a*(cos(x/23+w)+sin(y/19+w))u=x+p v=y+q+a*7circfill(u+39,v+54,1,c+p/3-q/3)end end flip()goto _

2DArray reposted

This is so cool that I had to try it on my CRT monitor! I shrunk the glow a bit so that the edges of the Pico-8 border wouldn’t cut it off and look a bit ugly. First image is in full screen, second is 1x size.

2DArray@2darray.bsky.social

#pico8 gas giant (204 bytes) ?"\^!5f100█ˇ☉8🅾️◆?7" ::_::x=rnd(4)-2y=rnd(4)-2d=x*x+y*y c=max(2-d/4)if(d<1)z=sqrt(1-d)c=2+(1.5+(x-y+z)*2+abs((y+sin(atan2(x,z)*8+t()/8)/14-z/4)%.4-.2)*5)*(1-(1-z)^2) pset(64+x*32,64+y*32,c+rnd())goto _

trying another #playdate idea: guy with a candle/lantern quite noisy, but it has soft shadows with correct penumbra behavior, and runs at a stable 30fps on the device!

View full thread

#pico8 ?"\^!5f101😐<😐1🐱2🅾️◆?7♥웃8☉2" ::_::u=rnd(128)v=rnd(128)g=u-99h=v-64d=max(20,sqrt(g*g+h*h))c=9+d/20+rnd() if(v>65)p=v-64z=120/(v-64)x=(u-64)/p d=sqrt(x*x+z*z)s=z/d+x/d/4w=(z+sin(x/3+t()/8)+rnd())%4c=w+(c-w)*min(z/40+s^14/4,1) pset(u,v,c)goto _

trying another #playdate idea: guy with a candle/lantern quite noisy, but it has soft shadows with correct penumbra behavior, and runs at a stable 30fps on the device!

View full thread

trying some ambient occlusion - i'm doing it in an unusuable bruteforce way for now, but i like how it looks enough that it feels like it'll be worthwhile to find a smarter way to do it

trying another #playdate idea: guy with a candle/lantern quite noisy, but it has soft shadows with correct penumbra behavior, and runs at a stable 30fps on the device!

View full thread

for some reason i can't post video replies in this thread anymore lol. maybe just a bug in the site, will try again later. here's a screenshot for now: normal mapping for floors, highlights for lit faces of walls, ambient light for the more relaxed scenes

making a map editor, partly to make it faster to set up rooms, but also so i can auto-generate these red sectors... sectors are always rectangles, so any two points inside the same sector are guaranteed to have line-of-sight to each other. this should allow a much faster raycasting strategy!

trying another #playdate idea: guy with a candle/lantern quite noisy, but it has soft shadows with correct penumbra behavior, and runs at a stable 30fps on the device!

a clip showing the penumbras more clearly - the shadow's edge is softer when standing very close to the shadowcasting corner, and gets sharper as the light gets farther away. it's a "real" area-light!

#pico8 gas giant (204 bytes) ?"\^!5f100█ˇ☉8🅾️◆?7" ::_::x=rnd(4)-2y=rnd(4)-2d=x*x+y*y c=max(2-d/4)if(d<1)z=sqrt(1-d)c=2+(1.5+(x-y+z)*2+abs((y+sin(atan2(x,z)*8+t()/8)/14-z/4)%.4-.2)*5)*(1-(1-z)^2) pset(64+x*32,64+y*32,c+rnd())goto _

trying out video-upload since apparently it works now! here's my (almost finished) racing game "Trackminia" for the Playdate handheld console the game usually relies on heavy dithering (Playdate has a 1-bit screen with high DPI), this is using a greyscale exporter that i made for trailer purposes

here's some regular gameplay footage, as it'd display on the real device - the dithering does look like full greyscale when it's small, but if you make the video fullscreen on a computer monitor, it looks like total shit. the greyscale export is an attempt to capture how it feels on the device

You are up to date.