News Features Download GitLab Back

LambdaMod: State of the Game, June 13 2023

I recently realized the most recent news post on the LambdaMod website is over a year old and I thought that might be confusing for some people so I decided I'd write a little update. Good news, the project is quite active and still receiving daily patches! To go over the main parts of the project:

Core & Networking

The core is now very stable. Shortly after the last version release the project entered a period of substantial turmoil as I tried to figure out how to get make networking work. This culminated in the entire project being taken apart and the core layout rebuilt. This changed the client from a thin client to almost a full copy of the server complete with its own scripting execution environment. This enables the client to simulate the entire game world internally providing automatic client-side prediction of every action when attached and instantaneous reaction to editing inputs. This, when combined with a delta-based rollback networking system, allows the client to integrate updates from the server almost invisibly to the user. Rollback is also performed automatically on the server to eliminate apparent lag further (e.g. compensating for lag experienced when shooting at a moving target using a ranged weapon).

Scripting

The scripting subsystem is very stable and hasn't needed any significant work in a long time. The node editor is partially developed but I ran into difficulty with some elements of the design, mostly how to handle the scripting language's heavy dependence on syntax macros, both real and builtin, which don't translate very well to nodes.

User Interface & Input

The user interface and input system has been completely overhauled. This was necessary to improve code quality, increase maintainability and allow for all inputs to be rebound across the entire program, which is now possible. It now uses a complex system of nested "input scopes" containing the input events a specific widget or interaction mode supports and "interface views" which group common UI elements together.

Render

The render engine is in the process of being upgraded. It now supports high dynamic range visuals (e.g. the sun can be a hundred thousand times brighter than a flashlight and the exposure on the camera will adapt to the average brightness of the scene) and lighting: the sky and light sources will cast light onto objects which is rendered with a cel shading style. Currently under development are a suite of post-process effects like bloom and depth of field, alongside an occlusion system which will be able to cast shadows and shield indoor areas from sunlight. Some render primitives have been developed including a text primitive, a symbol primitive and basic shapes (e.g. cube, cylinder, sphere) but some of these are untested and much more work in this area is still required.

Sound

The sound engine was overhauled to provide a full suite of advanced sound features. It now supports a head-related transfer function for 3D audio when using headphones or a VR headset. It also supports Doppler shifting, an inter-aural time delay, a time delay due to distance from the sound source and high dynamic range audio (e.g. a cricket chirping can be a hundred thousand times quieter than an explosion and the exposure on the microphone will adapt to the average volume of the scene). Not all of these features have been tested, but all have been written and basic sound output is working. Sound primitives, sound post processing and sound editing are still to come, as is sound occlusion.

Physics

Physics and animation are stable with animation now using a physically-based inverse kinematics system where collision with the environment or other actors can knock animating bodies off of their intended track and they will try to return, exerting force on the world around them as they do so. This system is however untested. Animation editing is currently unfinished and will need significant work in the future.

Platform Support

Platform support has been proceeding slowly, we now have support for Wayland as a windowing backend on Linux. Most of the work to support PipeWire as an audio backend on Linux and for a version of LambdaMod that runs in the web browser has been done, but neither is fully complete. Windows and FreeBSD support are both theoretically complete, but untested. Touch support for future ports to mobile devices and other devices with touch screen is implemented but untested.

VR

VR is one point of weakness, all updates have been written so that they should also support VR mode, but VR mode itself has not been tested in a long of time and there are probably several outstanding problems in that area which I hope to get to soon. Tested or not I have been keeping up with OpenXR extensions and we have support for all sorts of new input modes (e.g. Meta face & body tracking).

Conclusion

You might notice a lot of the things listed above are untested. I tend to develop things in a "wave" approach, first I create a large amount of functionality all at once without testing it, and then I come back and test later. This is not software development best practice by any means, but I find it's much more efficient when I'm working alone than constantly switching modes and building scaffolding code to allow for early testing, only to have to replace it with better code later. LambdaMod is currently in a transitional phase, reaching the end of a year or more long creation phase and moving into a testing phase where all the features are brought together, polished and finalized. I think the project will see a rapid increase in functionality in the next few months and I'm really excited for that. See you there!

Created by Amini Allight on amini-allight.org