←
Tommy D. Rossi14,099 posts
Tommy D. Rossi avatar

Tommy D. Rossi

@__morse

Christ is king of kings. building kimaki.dev & holocron.so

◷ Joined April 2016▧ 880 Photos and videos
Tommy D. Rossi avatar
Tommy D. Rossi@__morse·Nov 17

multiplayer is one cloudflare durable object that keeps the whole valley in memory, up to 200 players. you send 13 bytes 6 times a second while moving, the server answers 15 times a second with the 64 nearest players, and it checks every sword hit itself. with 200 players in one crowd a tick takes about 3 ms in the node benchmark

Post attachmentPost attachment
Tommy D. Rossi avatar
Tommy D. Rossi@__morse·Nov 17

there is no physics mesh. the ground is a function that takes x and z and returns the height of your feet, and everything else is one of 1,639 circles that the player is pushed out of every frame. bushes are soft circles, they stop your feet but the third person camera goes through them

Post attachment
Tommy D. Rossi avatar
Tommy D. Rossi@__morse·Nov 17

far away a stroke would shrink below a pixel and shimmer, so every dab gets a random rank when the world is built. with distance only the low ranks are drawn and they grow to cover for their neighbours, and because the rank never changes the strokes never swap places as you walk. there are no lights either, each dab asks a sun depth map once whether it is in the sun and takes the answer whole

Post attachmentPost attachment
Tommy D. Rossi avatar
Tommy D. Rossi@__morse·Nov 17

strokes alone would leave gaps, so like a painter the game first lays an underpainting of rough shapes in flat colour, then the strokes go on top. this is the real renderer drawing only the dabs below a rank, and raising it

Post attachment
Tommy D. Rossi avatar
Tommy D. Rossi@__morse·Nov 17

the brush is 8 marks generated in code when the game loads, no image files. each mark stores where the paint is, how thick it stands so a light from the upper left can rake across it, a streak of a second colour, and a plain version for strokes too small to show bristles. swap the brush and the same world becomes a different painting

Post attachment
Tommy D. Rossi avatar
Tommy D. Rossi@__morse·Nov 17

every stroke is one instanced quad with 40 bytes of its own: position, size, rank, wind, direction, normal and colour, about 175 MB in total. leaves, bark and grass turn to face you, while ground, walls and roofs lie flat on their surface and follow its grain

Post attachment
Tommy D. Rossi avatar
Tommy D. Rossi@__morse·Nov 17

the usual trick is a filter over the finished frame, but then the strokes belong to the screen and the paint slides over the world every time you turn your head. here every stroke is pinned in the world, so the paint stays on the things it paints

Post attachment
Tommy D. Rossi avatar
Tommy D. Rossi@__morse·Nov 17

asked Opus to make a video explaining how the game was made. incredible result. one shot (with skills)

4:12

omw. fable 5.2 created it for real. playable in your browser

0:30
Tommy D. Rossi avatar
Tommy D. Rossi@__morse·Nov 17

multiplayer is one cloudflare durable object that keeps the whole valley in memory, up to 200 players. you send 13 bytes 6 times a second while moving, the server answers 15 times a second with the 64 nearest players, and it checks every sword hit itself. with 200 players in one crowd a tick takes about 3 ms in the node benchmark

Post attachmentPost attachment
Tommy D. Rossi avatar
Tommy D. Rossi@__morse·Nov 17

there is no physics mesh. the ground is a function that takes x and z and returns the height of your feet, and everything else is one of 1,639 circles that the player is pushed out of every frame. bushes are soft circles, they stop your feet but the third person camera goes through them

Post attachment
Tommy D. Rossi avatar
Tommy D. Rossi@__morse·Nov 17

far away a stroke would shrink below a pixel and shimmer, so every dab gets a random rank when the world is built. with distance only the low ranks are drawn and they grow to cover for their neighbours, and because the rank never changes the strokes never swap places as you walk. there are no lights either, each dab asks a sun depth map once whether it is in the sun and takes the answer whole

Post attachmentPost attachment
Tommy D. Rossi avatar
Tommy D. Rossi@__morse·Nov 17

strokes alone would leave gaps, so like a painter the game first lays an underpainting of rough shapes in flat colour, then the strokes go on top. this is the real renderer drawing only the dabs below a rank, and raising it

Post attachment
Tommy D. Rossi avatar
Tommy D. Rossi@__morse·Nov 17

the brush is 8 marks generated in code when the game loads, no image files. each mark stores where the paint is, how thick it stands so a light from the upper left can rake across it, a streak of a second colour, and a plain version for strokes too small to show bristles. swap the brush and the same world becomes a different painting

Post attachment