increpare
@increpare.bsky.social
Game developer in Berlin, innit.
www.increpare.com
www.increpare.com
Rain making CSG statue look even more CSG ( en.wikipedia.org/wiki/Constru... )
November 11, 2025 at 10:00 AM
Rain making CSG statue look even more CSG ( en.wikipedia.org/wiki/Constru... )
All the same, for better or worse (honestly a bit relieved - one less thing to think about)
November 10, 2025 at 10:26 PM
All the same, for better or worse (honestly a bit relieved - one less thing to think about)
Final results!
Doing a direct benchmark so we can compare the relative performance (this is over a whole run, invoking each version 500 times a second), we get this: That’s a nice > 100x speedup! Now it barely shows up at all! [25/25]
Doing a direct benchmark so we can compare the relative performance (this is over a whole run, invoking each version 500 times a second), we get this: That’s a nice > 100x speedup! Now it barely shows up at all! [25/25]
November 10, 2025 at 8:46 PM
Final results!
Doing a direct benchmark so we can compare the relative performance (this is over a whole run, invoking each version 500 times a second), we get this: That’s a nice > 100x speedup! Now it barely shows up at all! [25/25]
Doing a direct benchmark so we can compare the relative performance (this is over a whole run, invoking each version 500 times a second), we get this: That’s a nice > 100x speedup! Now it barely shows up at all! [25/25]
Ideally we’d want to pick a plane so that we have similar numbers of points on both sides, but at this point we’re more than fast enough - I just want to see if this extra little step would help. And it did, a ~25% speedup. [24/x]
November 10, 2025 at 8:46 PM
Ideally we’d want to pick a plane so that we have similar numbers of points on both sides, but at this point we’re more than fast enough - I just want to see if this extra little step would help. And it did, a ~25% speedup. [24/x]
Fourth optimization: find_bottom_point_radial_split
Checking signs is a really easy way to subdivide things, soI thought I’d try divide these arcs depending on whether they’re above or below the y=0 plane: [23/x]
Checking signs is a really easy way to subdivide things, soI thought I’d try divide these arcs depending on whether they’re above or below the y=0 plane: [23/x]
November 10, 2025 at 8:46 PM
Fourth optimization: find_bottom_point_radial_split
Checking signs is a really easy way to subdivide things, soI thought I’d try divide these arcs depending on whether they’re above or below the y=0 plane: [23/x]
Checking signs is a really easy way to subdivide things, soI thought I’d try divide these arcs depending on whether they’re above or below the y=0 plane: [23/x]
Now instead of 8 buckets with 82-124 vertices, we have 32 buckets with precisely 28 vertices each (you can’t see, but each spoke includes the subdivided points on both sides of it at the pointy side of the egg). [22/x]
November 10, 2025 at 8:46 PM
Now instead of 8 buckets with 82-124 vertices, we have 32 buckets with precisely 28 vertices each (you can’t see, but each spoke includes the subdivided points on both sides of it at the pointy side of the egg). [22/x]
But we can still slice it up like a pie, and that worked really well once I got it working. This was super fast, took ~ 15% of the time of the previous optimisation. [21/x]
November 10, 2025 at 8:46 PM
But we can still slice it up like a pie, and that worked really well once I got it working. This was super fast, took ~ 15% of the time of the previous optimisation. [21/x]
Oops. I had forgotten I had subdivided the top (I think for texturing/lighting purposes). So a pure meridian subdivision doesn’t work. [20/x]
November 10, 2025 at 8:46 PM
Oops. I had forgotten I had subdivided the top (I think for texturing/lighting purposes). So a pure meridian subdivision doesn’t work. [20/x]
Third optimization: find_bottom_point_radial
Looking at the egg, there is structure that we might be able to capitalise on: we have meridians! [18/x]
Looking at the egg, there is structure that we might be able to capitalise on: we have meridians! [18/x]
November 10, 2025 at 8:46 PM
Third optimization: find_bottom_point_radial
Looking at the egg, there is structure that we might be able to capitalise on: we have meridians! [18/x]
Looking at the egg, there is structure that we might be able to capitalise on: we have meridians! [18/x]
I wanted to avoid having to go traverse multiple neighbourhoods recursively. When I made them big enough that you would almost always find yourself in the same neighbourhood, the biggest neighbourhood was bigger than the biggest of the octants, because vertices cluster at the tip of the egg. [16/x]
November 10, 2025 at 8:46 PM
I wanted to avoid having to go traverse multiple neighbourhoods recursively. When I made them big enough that you would almost always find yourself in the same neighbourhood, the biggest neighbourhood was bigger than the biggest of the octants, because vertices cluster at the tip of the egg. [16/x]
So, the reason I jumped to implementing octant bucketing first is that it’s super easy to check which bucket you’re in - you just have to check the signs of the various coordinates. [13/x]
November 10, 2025 at 8:46 PM
So, the reason I jumped to implementing octant bucketing first is that it’s super easy to check which bucket you’re in - you just have to check the signs of the various coordinates. [13/x]
So, the next speedup was to split up the egg’s vertices into eight buckets according to which sides of the XY/YZ/XZ planes space they were on: [11/x]
November 10, 2025 at 8:46 PM
So, the next speedup was to split up the egg’s vertices into eight buckets according to which sides of the XY/YZ/XZ planes space they were on: [11/x]
Dot products are way cheaper than full transforms. One way of thinking about this is that a transform gives you a whole vector, but a dot product is just calculating a single number. This is borne out by the speed-up, it just takes a third of the time to execute! [8/x]
November 10, 2025 at 8:46 PM
Dot products are way cheaper than full transforms. One way of thinking about this is that a transform gives you a whole vector, but a dot product is just calculating a single number. This is borne out by the speed-up, it just takes a third of the time to execute! [8/x]
If we think of getting the y coordinate of a vector as projecting it onto the y axis, a more efficient approach: instead of transforming the individual points and extracting their y coordinates, just transform the y axis, and project the points onto it in their coordinate space! [7/x]
November 10, 2025 at 8:46 PM
If we think of getting the y coordinate of a vector as projecting it onto the y axis, a more efficient approach: instead of transforming the individual points and extracting their y coordinates, just transform the y axis, and project the points onto it in their coordinate space! [7/x]
OG function: find_bottom_point_old
The easiest way to do this is just to loop through all points, transform them, and find the one with the lowest y-coordinate: [4/x]
The easiest way to do this is just to loop through all points, transform them, and find the one with the lowest y-coordinate: [4/x]
November 10, 2025 at 8:46 PM
OG function: find_bottom_point_old
The easiest way to do this is just to loop through all points, transform them, and find the one with the lowest y-coordinate: [4/x]
The easiest way to do this is just to loop through all points, transform them, and find the one with the lowest y-coordinate: [4/x]
So, what does find_bottom_point do? It finds the altitude of the lowest point for the egg, given a certain rotation (I learned this is called a support function). [3/x]
November 10, 2025 at 8:46 PM
So, what does find_bottom_point do? It finds the altitude of the lowest point for the egg, given a certain rotation (I learned this is called a support function). [3/x]
How to find bottoms quickly🧵
I’m working on a 3d physics platformer right now called Oeuf. Wanting to take a break from interface coding, I opened up the profiler, to be surprised that a pretty innocuous function in my camera code was featuring quite highly: [1/x]
I’m working on a 3d physics platformer right now called Oeuf. Wanting to take a break from interface coding, I opened up the profiler, to be surprised that a pretty innocuous function in my camera code was featuring quite highly: [1/x]
November 10, 2025 at 8:46 PM
How to find bottoms quickly🧵
I’m working on a 3d physics platformer right now called Oeuf. Wanting to take a break from interface coding, I opened up the profiler, to be surprised that a pretty innocuous function in my camera code was featuring quite highly: [1/x]
I’m working on a 3d physics platformer right now called Oeuf. Wanting to take a break from interface coding, I opened up the profiler, to be surprised that a pretty innocuous function in my camera code was featuring quite highly: [1/x]
TIL ( allenchou.net/2013/12/game... )
November 9, 2025 at 5:58 PM
TIL ( allenchou.net/2013/12/game... )
Ok, I thought it would be smart to use sets based on angular subtension (the egg doesn't roll topolgically!), forgetting that the angular density of the points changes a lot, and picking an angle that will give me a 9-point neighbourhood on the bottom gives me a 257-point neighbourhood on the top...
November 9, 2025 at 3:02 PM
Ok, I thought it would be smart to use sets based on angular subtension (the egg doesn't roll topolgically!), forgetting that the angular density of the points changes a lot, and picking an angle that will give me a 9-point neighbourhood on the bottom gives me a 257-point neighbourhood on the top...
strange jigsaws v. good
November 7, 2025 at 12:07 AM
strange jigsaws v. good
Had a fun geometry problem last night to optimize - given all the vertices of the egg (in local coordinates, that you know in advance), and it's rotation, to find the lowest point (y-coordinate). Here's the slow version of the code - how would you optimize it?
November 6, 2025 at 5:51 PM
Had a fun geometry problem last night to optimize - given all the vertices of the egg (in local coordinates, that you know in advance), and it's rotation, to find the lowest point (y-coordinate). Here's the slow version of the code - how would you optimize it?
artisinal quality settings - just low and high, but I do things like adjust the fog so you can see further when the outline shader is disabled, along with other tweaks. (can't figure out how to totally turn off anti-aliasing for some reason...)
November 5, 2025 at 10:57 PM
artisinal quality settings - just low and high, but I do things like adjust the fog so you can see further when the outline shader is disabled, along with other tweaks. (can't figure out how to totally turn off anti-aliasing for some reason...)
Broke: play when you want to play.
Woke: play every day to keep up your streak.
Bespoke: stream yourself playing every day so that your viewers don't lose their viewing streaks.
Woke: play every day to keep up your streak.
Bespoke: stream yourself playing every day so that your viewers don't lose their viewing streaks.
November 5, 2025 at 6:36 PM
Broke: play when you want to play.
Woke: play every day to keep up your streak.
Bespoke: stream yourself playing every day so that your viewers don't lose their viewing streaks.
Woke: play every day to keep up your streak.
Bespoke: stream yourself playing every day so that your viewers don't lose their viewing streaks.
"Ex Ovo Omnia" - "everything from an egg", positing that every creature must come from an egg (even before mammalian eggs could be observed). Here we have Zeus holding an egg hatching a great variety of creatures.
November 5, 2025 at 1:46 PM
"Ex Ovo Omnia" - "everything from an egg", positing that every creature must come from an egg (even before mammalian eggs could be observed). Here we have Zeus holding an egg hatching a great variety of creatures.
🤔 idk about this idea...
November 5, 2025 at 2:40 AM
🤔 idk about this idea...