nmdist-log

Progress report: Week of 2024-11-17

This week was mainly devoted to refactoring the code and fixing bugs. The biggest part of the refactor has been moving the entity system over to an ECS. I’m not a fan of the ECS model, but it seems to be the easiest way to get this going in a way that will scale for all the entity types. I may come to regret this decision. Otherwise, here are some highlights:

The engine can now load (basic) GLTF files to render in the world. I replaced the normal indicator with a 3D arrow I cooked up in Blender. I have yet to port my full GLTF renderer from my older engine, that can happen when other features are needed. The new normal indicator, a 3D arrow that is textured black and red.

I can now make new maps using NetRadiant-Custom, an open source level editor primarily geared towards Quake but supports Half-Life. At first, there was a bug in nmdist that caused a test room to render improperly while it rendered fine in the original game as well as other Half-Life tools: A test level with a wall missing.

It turns out that when I first wrote the triangulation code for bsps, I omitted faces that referenced texture index ‘0’… for some reason. This worked fine for the inbox Half-Life maps, but my custom map actually used the first texture. I’m not sure why I put this check in there… it’s not like the node indices where they’re encoded. Removing the check fixed the issue and there doesn’t seem to be any regressions in the inbox maps.

Still moving ahead on cleaning up the entity system. I’m eager to implement trains and moving platforms.