Balls

Sadly not much to show in terms of screenshots but I’m slowly getting back to it. Spent some time on refactoring, multiplayer (dealing with third party libraries) and migrating to Zig 0.16. Look ma, std.log received some colors!

Refactoring

Old codebase was a mess of various types of update functions, we once per frame updates for things like UI, fixed timesteps for physics, etc. To make both physics and multiplayer a bit easier to implement I set out to clean that up. With some nice references in hand, like Fix Your Timestep! and Fixed timestep without interpolation I set out to perform this at first seemingly simple task. As usual it went a bit out of hand, but here I am with a new shiny foundation!

Multiplayer

Not much fun to show in this department, but it’s getting there. Not wanting to reinvent the wheel I’ve spent some time looking at third-party libraries for networking. The two contenders are Valve’s GameNetworkingSockets and Glenn Fiedler’s netcode + reliable. Though I appreciate Glenn Fiedler’s philosophy since GNS is somewhat of a mess, I’m still leaning towards using GNS. It’s tested and if I would ever release a game it would likely end up on Steam.

They both were a real pain in the ass to get building within the Zig build system though. GNS is a messy C++ project with a bunch of dependencies and doesn’t really provide a clean C API I can just hook up. Netcode on the other hand just straight up produced miscompiled code (Zig toolchain bug that seems to have been resolved now), and sodium vendored with the project is dated so I had to deal with that as well.

Now they both build (need some fixes for Zig 0.16) and next step is to actually write some code.

Zig 0.16

Zig 0.16 was released introducing a lot of goodies, one of them being the breaking I/O as an interface change. And thus, one of the goals for this month has been migrating existing code. This includes both mine and third-party libraries.

The migration wasn’t that bad, but there are spots that got a bit awkward and that I might want to revisit when I understand the new features better. This release also came with some fixes for bugs affecting me so I’m stoked that I’m finally able to remove some workarounds.

vulkan-zig also had some breaking changes so put had to do some maintenance in my RHI as well.

Cool stuff

Robots and the goblin

I don’t know if it was my ability to write reasonable prompts or if Claude just got worse, but one thing that is certain is that I was slowly losing my mind. Claude is great at quickly spewing out features. In fact, it’s so good that you wake that nasty goblin in your head that just wants more. Initially it wasn’t that much of an issue. I carefully reviewed everything and was always there to push the LLM in the right direction. However, as the codebase grew, Claude clearly got dumber. As I started questioning my decisions in life, the goblin took over. Now I have a bunch of experimental codebases that I despise and an LLM that probably dislikes me just as much as I dislike it.

I hereby declare, next month is no-LLM month. I’ve already started and who knew, programming is kinda fun! Sure, I won’t have the great power of AI at my disposal but I don’t see it as that big of a loss. The fact that I don’t have to manage the utter chaos spread by a bunch of mansplaining robots and a lazy goblin should give me more time to focus on something useful.