Nikita Lisitsa

Nikita Lisitsa

@lisyarus.bsky.social

He/him I teach C++ & computer graphics and make videogames Working on a medieval village building game: https://youtube.com/playlist?list=PLSGI94QoFYJwGaieAkqw5_qfoupdppxHN&cbrd=1 Check out my cozy road building traffic sim: https://t.ly/FfOwR

7,145 Followers 972 Following 2,375 Posts Joined Oct 2023
15 hours ago
Post image Post image

Ok that's an actual programming language now!
The code is JIT-compiled to exactly 314 aarch64 cpu instructions (1256 bytes)

43 0 1 0
16 hours ago

Thank you!

0 0 0 0
16 hours ago
Post image

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)

42 1 2 0
1 day ago

See bsky.app/profile/lisy...

1 0 0 0
1 day ago

Please see bsky.app/profile/lisy...

1 1 1 0
1 day ago
Post image Post image

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).

40 0 1 0
1 day ago

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

31 0 5 0
1 day ago

It wasn't really a problem, the code actually shouldn't compile but that's not entirely obvious to a first-year student

3 0 0 0
1 day ago

I meant something like "this code would work if it did compile using the single most reasonable interpretation of this code"

5 0 1 2
1 day ago

Things I've actually said while lecturing C++:
- This code compiles, but doesn't work. This other code works, but doesn't compile.

105 5 9 0
2 days ago
Post image

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/...

249 170 9 7
2 days ago

I absolutely get it. Hating and dunking are different things though

2 0 1 0
3 days ago
Video thumbnail

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

53 4 12 0
4 days ago
Preview
Polyhedria

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...

100 9 9 2
4 days ago

Huh. I hate browsers :)
Will try to fix tomorrow, thank you.

2 0 0 0
4 days ago

You mean saving doesn't work? Does the developer panel (F12) show any errors?

1 0 1 0
4 days ago

Done!

2 0 1 0
4 days ago

First update: implemented save/load to JSON and export to GLB! You can now e.g. view your scene in Blender πŸ₯°

38 2 2 0
4 days ago

(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.

1 0 0 0
4 days ago

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.

1 0 1 0
4 days ago

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.

1 0 1 0
4 days ago

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).

1 0 1 0
4 days ago

Yeah, GLB with instancing makes the most sense. I'll think about that!

2 0 1 0
4 days ago

I've been thinking about that... What format do you think would suit here?

1 0 1 0
4 days ago

Nope, that's not implemented

0 0 0 0
4 days ago

Press F :)

1 0 1 0
4 days ago
Preview
Polyhedria

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...

100 9 9 2
4 days ago

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)

0 0 1 0
4 days ago

At some point I tricked myself into thinking that this can easily be reduced to quadratic convex minimization, but no, it can't

2 0 0 0
4 days ago
Video thumbnail

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 πŸ˜…

55 1 4 0