Progress on the Unified SDK
A new pre-alpha build is available:
https://github.com/SamVanheer/halflife-unified-sdk/releases/tag/dev-2023-06-16
Note: pre-alpha builds are not intended for general testing. As the wiki article on software life cycles explains the first versions intended for this kind of testing are alpha builds. Pre-alpha builds are for testing specific features by request to verify that they work as expected based on bug reports and feature requests.
Since this project is still in the midst of development (essentially this is the game engine development part of the project) it's expected that there are bugs and features not working as expected (or at all). Once all required features have been implemented the project can move to the alpha testing stage where verifying the proper behavior is the main goal.
SDK Changes
- Added
cl_custom_message_text
cvar to display a custom message on-screen, along with cl_custom_message_x
and cl_custom_message_y
to control the position on-screen (works like game_text
)
- Fixed ropes breaking at high framerates
- Added documentation to the engine's server interface
- Marked a few more engine functions as deprecated
- Fixed code analysis warnings
- Reworked the music system to use a separate OpenAL device to prevent the HRTF setting from affecting music playback
- Added option to use Link-time optimizations (C++ compiler setting)
- Reworked HEV suit sentence playback to no longer store group and sentence indices in save games (indices are not guaranteed to be stable)
- Reworked sentence groups to allow sentences to be non-sequential, removed bad sentence group index diagnostic message
- Redesigned sentences system to use JSON instead
- Removed
sv_snd_openal
and cl_snd_openal
cvars (sound is played through the OpenAL sound system only now)
- Disabled follower logic for
(ai)scripted_sequence
to prevent players from activating them with +USE (scripts share code with NPCs, including follower code)
- Converted documentation for server and client interfaces to Doxygen format, fixed swapped documentation for
HUD_Init
and HUD_VidInit
C# Changes
- Added Sentences2Json: tool to convert
sentences.txt
to sentences.json
Asset Changes
- Replaced
sentences.txt
with sentences.json
- Removed sentence groups that aren't actual groups
- Fixed bad sentence replacements used in the Opposing Force & Blue Shift replacement files
- Reworked sentences so game-specific sentences replace originals
Framerate-independent rope physics
Ropes in Opposing Force don't account for the framerate so higher framerates cause players to apply more force to ropes, and ropes will eventually stop moving if the framerate gets high enough.
This has been fixed. Rope physics has been reworked to behave as it did at 30 FPS.
Sentences changes
The HEV suit's playback list used to store group and sentence names using their index which can change between maps in this mod because it supports custom sentences files. The list now stores the names instead. This also simplifies the API used to play sounds since it can deduce what is being played using the name. It previously required you to tell it whether it was a sentence or a group.
The switch to JSON means the engine can no longer load the mod's sentences files so support for using the engine's sound system has been removed. The OpenAL sound system handles everything just fine with the sole exception of the bell sound in the Hazard Course map. That single case can be fixed by manually adjusting the sound to play as it does under the original sound system.
The new file syntax looks like this:
{
"Sentences": [
// Grenade Warning
"HG_GREN0 hgrunt/clik(p120) grenade! clik",
"HG_GREN1 hgrunt/(t30) clik take!(e75) cover!(s5) clik",
"HG_GREN2 hgrunt/clik clik oh! shit! clik",
"HG_GREN3 hgrunt/(p110 t40) clik(p120) get!(e78) down!(t30) clik",
"HG_GREN4 hgrunt/clik(p110) (t40) of!(e75) god! clik(p110)",
"HG_GREN5 hgrunt/clik no! clik",
"HG_GREN6 hgrunt/clik move! clik(p120)"
],
"Groups": {
"HG_GREN": [
"HG_GREN0",
"HG_GREN1",
"HG_GREN2",
"HG_GREN3",
"HG_GREN4",
"HG_GREN5",
"HG_GREN6"
]
}
}
Sentences
is a list of strings containing the sentences, just like before.
Groups
is an object of group names to lists of sentences that are in that group.
It is no longer required for sentences to start with the group name and it doesn't have to end with a digit either.
This allows another sentences file to replace groups and arbitrarily combine sentences.
A tool called
Sentences2Json
has been added that can convert the old format to the new. It also prints warnings if invalid or duplicate sentences are encountered. The default file has a few of those.
Here's an example of the
BA_POK
group being replaced, which is played when you +USE a pre-disaster Barney, as well as the scripted sentence
BA_SEC2_NOPASS
which plays when trying to continue in the
Insecurity
chapter before you've got your armor:
{
"Sentences": [
"BA_POK0 hgrunt/clik(p110) (t40) freeman you are lay!(e90) team!(e20) clik(p120) clik",
"BA_SEC2_NOPASS barney/c2a4_ba_longnite"
],
"Groups": {
"BA_POK": [
"BA_POK0"
]
}
}
This becomes:
Note that you can reload the map to test changes as opposed to the original game which requires a full restart.
Remaining work to be done
- Update changelog to include all changes (partially complete)
- Write documentation for all new features (partially complete)
- Implement as much of the work scheduled on the issue tracker as possible (done)
- Review all changes
- First alpha build
- Stress test the four campaigns and fix issues that show up (first test done)
- First beta build
These changes represent the last programming work that had to be completed for V1.0.0. Code-wise this project is now feature complete, which means it's now time to test it and finish the documentation.
This also includes testing the 3 Updated projects independently to make sure they work on their own. That means 7 full campaign playthroughs are required to verify that they work as intended: once in each Updated project and once in the Unified SDK.
New beta builds for the Updated projects will be made available once i've done these tests.
That's about it for now, until next time.