LambdaMod: State of the Game, May 14 2024
14th May 2024
It's that time again! This post is coming out much later than I'd hoped. I was planning on getting it out roughly six months after the last one rather than eleven but it'll have to do. A lot of things got in the way, including my custom VR headset project and the difficulty of getting the sound signal processing to work without pops and crackles. Still, a lot of progress has been made so let's go over that now, comparing with the situation in the last state of the game update.
Core & Networking
The core system has remained mostly the same since the last update although a number of smaller changes have been made. The executables have been renamed, gone are the days of lmod-client
and lmod-server
now they're called lambdamod
and lambdamod-server
. Many issues with incorrect timing of system steps have been fixed. Save backup has been added to prevent destruction of the save file when the server is closed unexpectedly. Issues with the transformed states of entities syncing incorrectly have been rectified. Issues with text requests not working have been fixed. Various issues with 3D editing have been fixed and new editing bindings added. The manual has also been completely rewritten to have a better layout, be more consistent and cover much more of the systems present in LMOD, although there's still lots to do on this front. New primitives have been added including a number of basic solid shapes: cuboid, cone, capsule, sphere and cylinder. A system has been added to track which users are currently viewing which text requests to improve game master situational awareness. A new meta-mechanic called "doom" has been added which allows the game master to formally signal to the players that they're in danger without revealing what it is, providing a sort of sixth sense that can help players out of risky situations or feel more in control of their defeats.
Going forward I expect the core systems to continue receiving small code quality improvements, new features and bug fixes but nothing major.
Scripting
The scripting system is still quite stable, the only major addition being repeaters. These are functions run on every step of the game simulation but not tied to any entity, useful for implementing global logic like a score or weather system. The main development for scripting though is the completion of the node editor. This allows users who aren't familiar with programming to more easily create LMOD scenarios. The node editor is completely cross-compatible with the scripting language (it actually produces script under the hood) so users can author scenarios using a mixture of both without issue.
Again I expect the script system to continue receiving small changes, in particular new control flow primitives may need to be added which suit the node editor better than code, but this is hopefully the last major change.
User Interface & Input
The user interface system remains fairly stable but has received a wide variety of new features and improvements. Unsigned integer and floating point values are now supplied via special entry fields that prohibit negative values. Fraction edits have been replaced with percentage edits that better communicate their purpose. Quaternion edits have been replaced with euler angles by default, with an option to return to the original if you feel that makes more sense to you. Angular velocity is now listed in axis-and-angle/time notation for greater clarity. A new input has been designed for passwords that stars them out. Window titlebars have been added to make it easier to add, resize and close the various editing windows within LMOD. The main menu has been reworked to be more visually appealing. Many new UI sounds have been added including one for startup. Tooltips are now available on most entry fields to better explain their purpose. New views have been added to configure many of the system settings straight from the UI, including full editors for the color theme and keybindings. A plethora of input and focus issues have been fixed. And much much more.
The main changes I see still to come for the UI system are a more comprehensive look n' feel system and dynamic UI resizing, which will probably be implemented together. The last major accessibility feature that LMOD is missing is the ability for the UI to be resized for use either on large screens far away (e.g. TVs) or small screens close up (e.g. phones and handhelds like the Steam Deck). This is difficult to implement because the UI uses a lot of hardcoded size constants that are in practice relative to the font size but not calculated as such. These all need to be replaced with dynamically calculated values to support this. At the same time LMOD has a growing problem with having two separate sets of UI widgets: one for the editing UI windows and one for the "world UI" e.g. the VR menus, the main menu, the text prompts sent by the game master during gameplay. These are actually implemented as separate widgets in the code resulting some unnecessary code duplication and they limit what the "world UI" is capable of because not all widgets are available in that style. I hope to merge these two systems together at the same time as implementing UI resizing, as many of the same issues have to be resolved to support both.
Render
The render engine, which was in the process of being upgraded at the time of the last post, is now fairly complete and stable. A system for ambient occlusion has been added to support dark interior areas e.g. a sealed basement underneath a bright sky won't take on light from the sky. This system uses hardware raytracing where available and falls back to software on-GPU raytracing otherwise. The way objects become darker has been adjusted so they fade to the background color, making it difficult to navigate in dark areas even if you change your background color to a light color. A world fog effect has been added that limits visibility by fading everything to the background color as distance increases. Emissive objects have been added, allowing any primitive in LMOD to glow even in a pitch-dark scene. Bloom has been added, only visible on emissive objects and the sky (which is itself emissive) to better communicate which objects are glowing to the user. The expected Vulkan version is now 1.2 although for Vulkan 1.0 and 1.1 has been added provided the requisite extensions to replace missing 1.1/1.2 functionality are available. New sky layers have been added for a moon with phases and an aurora.
Overall the renderer is probably the most finished component of LMOD excluding the network. Aside from potential performance improvements (if performance starts to degrade in large scenes) and the steady addition of more effect-specific code for certain visual effects (like particles) I don't see any further changes being necessary.
Sound
This is the big one. The sound system had been largely implemented but not tested at the time of the last post. This system turned out to be woefully inadequate and required massive amounts of additional work to get functional but I'm pleased to say it worked and LMOD now has a sound system just as advanced as its render system. The system that now exists supports sound spatialization by way of inter-aural time delay and a choice of panning for speakers or a head-related transfer function for headphone and VR users. It supports a delay on distant sounds implemented via a delay buffer that dynamically adjusts to the distance between the listener and the sound source and doppler effects by way of stretching or compressing the sound in that buffer. Sounds can be emitted directionally and become quieter with distance. Sounds reverberate off the environment and are occluded by it, this is based on an automatically generated spatial graph and requires no configuration by the user. Almost every effect affects high frequencies more than low ones for a more convincing experience of occluded or distant sounds. Sounds can be authored using the sound editor and played, paused or seeked by the user. The sound system uses an exposure system, similar to the one used for visuals, which allows an explosion to be a billion times louder than a whisper just like in real life.
The main thing that's missing now on the sound front is a greater variety of sound primitives. Right now the only one that's available is the tone primitive which produces a simple sine-wave tone at a user-supplied frequency. I hope to add generators for other more human-friendly onomatopoeic sound categories like "crunch", "crack" or "woosh" soon.
Physics & Animation
Physics remains mostly unchanged from last time. A few bugs have been fixed and new physics features have been added including functional buoyancy and a flow velocity for the world medium. This allows you to implement effects like wind blowing objects through the environment. Animation has been entirely untouched aside from mirroring changes made to sound playbacks onto animation playbacks and a tiny bugfix in inverse kinematics. Animation represents the main area where LMOD needs to receive additional work in order to reach 1.0. Right now there are the bones of a traditional keyframes-and-interpolation timeline-based animation editor but I don't believe this is going to be practical for LMOD to use. Creating 3D animations by hand in this way is a non-trivial skill that very few people possess and is extremely time consuming. At the same time animation quality is very important for the overall feel of the game. The highest quality model of a human animated poorly looks awful (I won't provide any examples because I don't want to embarrass anyone but I'm sure most people can think of a low-budget game they played where the player's hand model was high quality but the animations weren't quite up to scratch) while a PS1-style model with low fidelity textures and under a thousand polygons can look great if animated well. You can see this in action in atelier's amazing Signalis animations like this one (warning for low-poly violence and gore, it is Signalis after all).
The plan then is probably to try an implement a procedural animation system. Inverse kinematics is already implemented in LMOD so what's needed is a set of carefully designed presets where the user will mark certain parts of a body as being legs or arms and then tell it to use the walking or throwing preset, combined with sliders that will customize the exact implementation of the animation along human-friendly axises, for example a panicked running animation vs. an injured running animation vs. a confident walking animation. This is a very open-ended problem without a clear path to follow but I'm confident I can find a way to make it work.
Platform Support
Huge strides have been made in support of cross platform compatibility and LambdaMod has now been successfully compiled on Windows, FreeBSD, RHEL, Debian and Arch Linux. MacOS compilation is also within reach, blocked only by the issue of accessing the windowing, input, sound, etc. systems on MacOS. These systems only have Objective-C APIs available, a language I'm unfamiliar with, so significant additional work will be necessary to access them. Also of note is PipeWire support has been added on Linux as an alternative to the already existing PulseAudio sound backend. All of this has come with the creation of build scripts for LMOD on all of the above platforms that will eventually enable me to do automated builds of new versions and release LMOD binaries for the first time.
Binaries will be available as soon as I sign off on another version number, which will probably happen in the coming days or weeks. They should be available for all the platforms I mentioned above on x86, possibly ARM as well. This excludes MacOS which may or may not be available depending on whether I get around to figuring out Objective-C.
VR
In the last update I said that VR hasn't been tested in a long time so while it should be working there are likely many undiscovered issues with the mode. I've since tested it and I was right. VR mode was absolutely riddled with startup crashes, validation errors and particularly rendering and input issues where menus would either render incorrectly, refuse to accept any input or accept too much and gobble inputs intended for other systems. All of these have now been fixed and the VR mode works again. Alongside fixing problems the VR mode has also received substantial upgrades including a fix for incorrect color processing in SteamVR's OpenXR implementation, support for six or more new OpenXR extensions and a multiview single-swapchain renderer that is both simpler and more performant than the old one.
VR seems to be in a good place right now, no further work is required at this time, but I will continue to repair it as changes to the system cause it to break and new OpenXR extensions come out making new functionality accessible.
Other
At some point the lambdamod.org
system that supported lambdamod://
join URLs broke due to changes I made to the backend server. This has been fixed.
Conclusion
This may have taken longer than I hoped but I'm proud of the large body of work that was achieved and I'm particularly glad I'm writing "no further major work seems necessary" under four different categories, that seems like a good sign that LMOD is moving steadily towards completion. I hope I'll have more good news in the next update post, perhaps about a new animation system, and that it will come out more quickly than this one did. Until next time!