Sign in

grapefrukt

@grapefrukt.com
1.9K followers 406 following 979 posts

.1x engineer. makes games: holedown, subpar pool, rymdkapsel & twofold inc grapefrukt.com

PostsRepliesMedia
grapefrukt @grapefrukt.com · 15h
i would like to apologize to everyone for the weird vibes lately. my waving cat had run out of batteries and i didn't notice. the situation has been rectified and vibes should improve shortly.
a waving cat (maneki-neko) made from golden plastic sitting on a teak shelf.
0180
grapefrukt @grapefrukt.com · 28/09/2026
you can tell i was cooking with this code because it requires a small novel to describe to *me* what i was up to. it's actually not too bad, it's just that i very much forget how it works and why when i don't touch it for a couple of months.
Dear future me, here's how the cutout rendering works:
This class gets the playfield rects (usually just one, but may be up to three for wide levels)
It figures out a rect that wraps all of them and resizes the cutout quad to match that maximum size
It also crops all the individual rects to the bounds of the playfield and passes them to a global vector array
This is so that we can later read them in the shader. 

The rendering happens in two passes, as configured entirely in the URP render passes.
The Cutout object belongs to the Cutout layer which is how we work out what actually gets rendered.
These passes then replace the material accordingly, hence this not having a material set in the editor.
It all gets swapped out at runtime anyway.
 *
The first pass is the Cutout pass. This renders the complex playfield shape to the stencil buffer only.
This pass does some SDF math to do rounded corners etc. It needs to use alpha clipping, because the stencil buffer
(at least the way we use it) can't do partial transparency.
 *
Once we have our cutout in the stencil buffer, we can do another pass. The Passepartout. 
This is a much simpler one, we move the quad *very* close to the camera using the vertex shader and render it with a
plain color. This is where the stencil buffer from before gets used, to decide where to *not* draw the passepartout.
 *
This results in the passepartout (or playfield frame if you wanna be like that) being very close to the camera,
while the "hole" is just like normal.
 *
The goal here is not having to do anything special in any of the games other shaders, "it just works".
Because the passepartout is so close to the camera, anything within a reasonable range will get culled by the
z-buffer.
280
grapefrukt @grapefrukt.com · 26/09/2026
magpie conference minutes after the murder. that cat's just made some powerful enemies!
040
grapefrukt @grapefrukt.com · 26/09/2026
(content warning: cat kills bird) some drama on the driveway this morning. just a pigeon minding its own business, then a murder and then magpies! it brought its friends just a couple of minutes later too, video in the next post.
140
grapefrukt @grapefrukt.com · 24/09/2026
for your consideration: this phone
An old analog phone, with buttons. First the typical 0-9 *# and then letters FGHP and then L1 through L8 and also DTCR. It's a lot.
1110
grapefrukt @grapefrukt.com · 24/09/2026
can't say installing updates for anything is particularly enjoyable in these times of ai-everything, but this is a new level of suckage.
• Instantly customise your Pixel with Harry Potter audiobook packs to celebrate the release of Harry Potter: The Full-Cast Audio Editions on Audible. One tap changes your wallpaper, icons and sounds with elements from the audiobooks. [2]
6386
grapefrukt @grapefrukt.com · 21/09/2026
what's a couple of million vertices between friends. should be fine right?
4100
grapefrukt @grapefrukt.com · 16/09/2026
i think i've posted about this before, but it gives me great pleasure to have little emojis in my log that tell me which sub-system is talking. also, pro tip: change the unity log to show just one line per entry. makes everything so nice and tidy!
a screenshot of the unity editor log, where each line is prefixed by a timestamp and then an emoji
3333
grapefrukt @grapefrukt.com · 15/09/2026
did some bitwise math today like a big boy. had to draw myself a table to keep track of what i wanted.
a hand scribbled table of bitwise flags being set and unset and what the changes werea snippet of code, the relevant part being:
var added   = ~before & after;
var removed = before & ~after;
4160
grapefrukt @grapefrukt.com · 14/09/2026
i know this firmly falls under "old man yells at cloud", but man, this new generation of LLM-fueled spam is making me so sad. who exactly do you think you're fooling with this absolute garbage?!
"Small confession: Subpar Pool made the rounds at our office last week, and the way you build a run out of 18 different cards that twist the physics of every table got a few of us properly hooked."
2130
grapefrukt @grapefrukt.com · 10/09/2026
spent a while reorganizing the office network equipment a while ago. i do love a good network rack.
A router and a switch stuffed in a small network rack with various cables running to and from patch panels.
170
grapefrukt @grapefrukt.com · 02/09/2026
a dog decked out in a motion capture "suit" with those funny looking reflective balls
0140
grapefrukt @grapefrukt.com · 02/09/2026
it's a for a fujifilm finepix digital camera! i had one of those! maaaaybe it's time to throw this out then, the camera stopped working 20 years ago.
a different image of the same cable labeled "fuji FinePix 4pin"
190
grapefrukt @grapefrukt.com · 02/09/2026
I was digging around my box of cables and stumbled upon this odd thing. What the heck kind of tiny usb connector is that?!
A closeup of the two ends of a USB cable, the rightmost connector is a regular USB A, on the left is a tiny, squareish four pin thing?
200
grapefrukt @grapefrukt.com · 02/09/2026
ah, an agate falls just between a pearl and a nonpareil. that's half the size of small pica!
From the American Dictionary of Printing and Bookmaking (1894):[1]

    Agate: A small size of printing-type, between pearl and nonpareil, half the size of small pica. A little over thirteen lines go to the inch. By the point system, it corresponds to five and a half points. Its chief use is for advertisements and market reports in daily papers, on which it is generally the smallest size used. It is also largely employed in time-tables. It was unknown before 1822, when George Bruce, who was endeavoring to have a truer relation between the bodies of type than then existed, saw the gap between pearl and nonpareil, and introduced this size to fill it. In England it is called
230
grapefrukt @grapefrukt.com · 02/09/2026
i haven't used indesign in a minute. agates and ciceros?!
120
grapefrukt @grapefrukt.com · 31/08/2026
gonna be at a local market this weekend selling my wares, had some postcards printed so I can actually hand people something instead of just a boring code. plan is to do pay-what-you-want, which means you can get things dirt cheap but you'll have to look me in the eye while fleecing me.
Four stacks of square postcards on a desk
1320
grapefrukt @grapefrukt.com · 28/08/2026
440
grapefrukt @grapefrukt.com · 27/08/2026
praise be
Georgy Feodosyevich Voronoy
120
grapefrukt @grapefrukt.com · 27/08/2026
it's not quite friday yet, but you may have some procedural cracking as a treat anyway.
4467
grapefrukt @grapefrukt.com · 27/08/2026
020
grapefrukt @grapefrukt.com · 24/08/2026
i'm exhibiting at a local con in a couple of weeks and was looking for something to use as a tablecloth. this fake fur came up and this has to be a genius idea, no?
a roll of long haired fake fur fabric, white
130
grapefrukt @grapefrukt.com · 21/08/2026
how about some procedural chains as a friday treat?
1412
grapefrukt @grapefrukt.com · 21/08/2026
pre-vacation martin left a little note for present martin. thanks bud.
a compiler warning that reads: #warning: 'this is wrong and bad and omg'
080
grapefrukt @grapefrukt.com · 12/08/2026
oops, was running in debug mode when benchmarking. it's really 1700x faster 😊
040
grapefrukt @grapefrukt.com · 12/08/2026
here's some example output, it's in swedish. sorry.
avlägsen	slag	även
kraftiga	gift	raka
närmaste	äter	mans
tränaren	äter	rann
städerna	äter	sand
lugnande	lund	ange
rättvist	värt	sitt
naturlig	liga	runt
söndagar	dans	göra
samtiden	dans	time
användes	dans	även
enskilda	dans	like
städerna	dans	äter
eftersom	fest	more
kläderna	länk	reda
250
grapefrukt @grapefrukt.com · 12/08/2026
now it does the same job in 100 milliseconds. that's 920x faster. now, i need to go outside again for a bit. (or maybe i make it faster still?)
a console showing the text:
read 10 000 input words in 63,0 ms
1 171 four letter words and 1 010 eight letter words 
starting check of 685 035 pairings
found 1 825 combinations in 26,9 ms at 25 311 949,2 checks / second
all done and output written in 99,8 ms
140
grapefrukt @grapefrukt.com · 11/08/2026
I'm sorry to pollute your timelines with slop, but a döner place I pass by on the regular just put up these atrocities in their windows. It looks like some kind of nightmare food!
An extremely ai generated image of a doner
11272
grapefrukt @grapefrukt.com · 05/08/2026
I had to unscrew an exterior light fixture on my house today to get at some cabling, naturally this is affixed using five entirely different screws. Different heads on all of them too. Old houses, man. What a beautiful mess.
A random assortment of six screws of various sizes and types held in an open palm
0140
grapefrukt @grapefrukt.com · 02/08/2026
13 years ago I put my game on mobile and it did things!
a screenshot of the ios appstore with my game rymdkapsel featured as the editors choice.
9883
grapefrukt @grapefrukt.com · 26/07/2026
It's a grim story, but it being noblemen and 800+ years ago makes it mostly funny to me! en.wikipedia.org/wiki/Erfurt_...
010
grapefrukt @grapefrukt.com · 26/07/2026
To commemorate the 842nd anniversary of the Erfurt Latrine Disaster, when sixty noblemen drowned in shit, we're having some thematically appropriate chocolate mousse.
A photo of a glass with layers of chocolate mousse, raspberries and whipped cream.
2100
grapefrukt @grapefrukt.com · 19/07/2026
this guy in the lower right will solve most of your issues.
101
grapefrukt @grapefrukt.com · 10/07/2026
this is what i'm getting for the login form. a whole lotta' nothin'!
100
grapefrukt @grapefrukt.com · 02/07/2026
whoever designed this house near me wasn't bothered by notions of symmetry or anything aligning at all. I like it!
A yellow brick house with a random smattering of windows per floor
1160
grapefrukt @grapefrukt.com · 30/06/2026
you can also do these, but only for things that return something!
220
grapefrukt @grapefrukt.com · 26/06/2026
this is a bit of a niche skeet, but GOOD LORD do i appreciate having a build server set up. making the game magically appear on my devices without having to use a single braincell is extremely worth the effort it was to set up (and maintain). total luxury!
a progress bar showing a build in uh, progress
3210
grapefrukt @grapefrukt.com · 24/06/2026
making the playfield vary in width should be straightforward. i just gotta update the places these are used at to pass along a second parameter. (spoiler: it is not easy and it is used in 50+ places)
020
grapefrukt @grapefrukt.com · 23/06/2026
i do love when a wikipedia article just hits me with the raw technobabble.
When a parabola is rolled along a straight line, the roulette curve traced by its focus is a catenary. The envelope of the directrix of the parabola is also a catenary. The involute from the vertex, that is the roulette traced by a point starting at the vertex when a line is rolled on a catenary, is the tractrix.
2130
grapefrukt @grapefrukt.com · 22/06/2026
yeah, i use the external file thing a lot. but that little inline code editor is the work of satan. variable width font, no hints, no highlights. criminals!
130
grapefrukt @grapefrukt.com · 22/06/2026
i had a think about this while biking to work and i would say my main gripe with node based things (in this case unitys shader graph) is that the minimum visual size of an operation is too big as compared to its text counterpart. here i'm doing uv += float2(time*2, 0) this lil wrangle takes 4 nodes!
4191
grapefrukt @grapefrukt.com · 20/06/2026
I went to the countryside and did a little game jam last weekend. Finally got around to make a proper game out of all the oscilloscope stuff I got figured out years ago. This is snek, two player versus, one button per player. Eat the other players tail to win.
110321
grapefrukt @grapefrukt.com · 11/06/2026
i have now figured out render textures and am officially back on my bullshit.
a screenshot of a small, single channel texture in the unity editor. 
it has a few abstract blobs on it.
3160
grapefrukt @grapefrukt.com · 08/06/2026
went looking for something on facebook, found @martinpi.bsky.social instead. from 2016. jesus.
170
grapefrukt @grapefrukt.com · 08/06/2026
i put a temperature sensor in my office and now i'm cursed with the knowledge that the temperature drops by like 2 degrees at 05 each morning. why? why?! (i don't need to know why, it's all a trap set up to keep me from doing anything of value with my life)
280
grapefrukt @grapefrukt.com · 06/06/2026
i needed a bluetooth proxy in my garden because of reasons. it's hilarious how absolutely tiny that little microcontroller is compared to the enclosure and power brick. i didn't even attach it to the enclosure, it's light enough that the cable holds it just fine!
a tiny microcontroller inside a waterproof enclosure alongside a 5V power adapter.
080
grapefrukt @grapefrukt.com · 04/06/2026
time for a pallet cleanser.
a person cleaning a pallet using a pressure washer
0160
grapefrukt @grapefrukt.com · 03/06/2026
I could be making a video game for you, but instead I'm watching videos about assembler programming for demo scene shenanigans. Sorry.
2130
grapefrukt @grapefrukt.com · 24/05/2026
be warned!
030
grapefrukt @grapefrukt.com · 22/05/2026
i had to extend my range a bit for the tv, but the monitor is PERFECT.
a 40" tv from probably 2009 or so and a monitor from maybe 2003, standing on my office floor. sadly unplugged.
010