Ok that's an actual programming language now!
The code is JIT-compiled to exactly 314 aarch64 cpu instructions (1256 bytes)
Thank you!
I've realized that since my toy language supports foreign functions now, it can have side effects, meaning I can finally implement a hello world! π
(yes, there are no strings yet, and arrays aren't supported by the aarch64 jit compiler yet either)
See bsky.app/profile/lisy...
Please see bsky.app/profile/lisy...
I guess I'm in my distraction project era again π
Returned to my toy programming language, implemented short-circuiting && and || (both for bools and integers), added support for foreign (C FFI) functions (currently just dlsym'ed from the current process).
Honestly, I've never seen a single programming language with a community as shitty as this one
Which is a realy shame since Rust itself is pretty cool ngl
It wasn't really a problem, the code actually shouldn't compile but that's not entirely obvious to a first-year student
I meant something like "this code would work if it did compile using the single most reasonable interpretation of this code"
Things I've actually said while lecturing C++:
- This code compiles, but doesn't work. This other code works, but doesn't compile.
If anyone is willing the share the following, I would be so grateful!
We just launched Piece by Piece on Steam ππ
It's a cozy repair shop sim, you play a woodland fox who inherits his grandfather's store. You fix up items with your hammer and paintbrush π¨ποΈπ¦
store.steampowered.com/app/3179050/...
I absolutely get it. Hating and dunking are different things though
OK, distraction project is over, I'm back to the village building game. Notice anything strange? I think my sun shader is subtly off... π
#indiedev #indiegames #gamedev
I think I've finished the first version of this thing! π€©
Meet π·Polyhedriaπ·: a tiny in-browser sandbox that allows you to build funny stuff by joining together various (mostly-)uniform polyhedra!
lisyarus.github.io/webgl/polyhe...
Huh. I hate browsers :)
Will try to fix tomorrow, thank you.
You mean saving doesn't work? Does the developer panel (F12) show any errors?
Done!
First update: implemented save/load to JSON and export to GLB! You can now e.g. view your scene in Blender π₯°
(of they do overlap, then just the faces are enough). This point is exactly the minimal separation vector that needs to be added to the segment to make it just touch the polyhedron. Rescaling it using the capsule radius gives the same vector for the capsule.
If the Minkowski difference contains the origin, the segment and the polyhedron overlap, otherwise they don't. In both cases, I compute the point on the boundary of the Minkowski difference that is closest to the origin by looping over all vertices, edges and faces of the difference.
Then I compute the Minkowski difference (actually the Minkowski sum with reflection through the origin, but everybody calls it Minkowski difference) of the polyhedron and the segment that defines the capsule.
First I transform the capsule into polyhedron's model space (i.e. apply the inverse translation and rotation) for convenience (capsule is defined by 2 points and a radius, polyhedron is defined by a lot of points).
Yeah, GLB with instancing makes the most sense. I'll think about that!
I've been thinking about that... What format do you think would suit here?
Nope, that's not implemented
Press F :)
I think I've finished the first version of this thing! π€©
Meet π·Polyhedriaπ·: a tiny in-browser sandbox that allows you to build funny stuff by joining together various (mostly-)uniform polyhedra!
lisyarus.github.io/webgl/polyhe...
I don't get it, why would it break if I allow the blocks to rotate?
(btw in the video above most of them are already rotated and everything works fine)
At some point I tricked myself into thinking that this can easily be reduced to quadratic convex minimization, but no, it can't
I've spent a good couple of days overthinking capsule-polyhedron collisions (GJK is too unstable, brute force code missed some cases, etc) and finally settled on an algorithm based on explicitly computing the Minkowski difference. Works like a charm, I can finally move on π