Progress on the Unified SDK
A new pre-alpha build is available:
https://github.com/SamVanheer/halflife-unified-sdk/releases/tag/dev-2023-06-03
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
- The name of the renderer (Software or OpenGL) is now shown in the debug overlay. It also recognizes Direct3D but the engine does not support it anymore and does not include the code for it to work
- The weapon deploy animation is now always sent to clients when calling EquipWeapon to ensure it plays when the player stops using
func_tank
entities
- Renamed
allow_weapon_dropping
skill var to allow_player_weapon_dropping
, added allow_npc_item_dropping
to globally control whether NPCs can drop items on death
- Added null check to scientist fear task to prevent potential crashes
- Stop
func_train
move sound when triggered off (fixes sound looping issue in c1a0c
(first Unforeseen Consequences map))
- Fixed Desert Eagle laser position not updating when holding down reload button
- Fixed Voltigore beams created on death connecting to the wrong entity, causing them to appear to connect to the world origin
- Fixed being able to break
scripted_sequence
by +using friendly NPCs to make them follow player
- Fixed potential incorrect facing in
scripted_sequence
- Fixed female assassin footsteps always playing every 0.2 seconds when walking and running (now uses the same intervals as player, but may differ somewhat because NPCs only think 10 times a second)
- Fixed female assassins not resetting their movetype if they jump and land while not in combat (resulted in stuttering movement because they were considered to still be in the air)
- Added
ent.io
trace logging for multi_manager
start
- Precache
monstermaker
entities using provided keyvalues
- Added diagnostics to entity templates for classname key
- Simplified
trigger_changekeyvalue
logic
- Increased maximum number of
multi_manager
targets from 16 to 64
- Fixed
env_blowercannon
crashing if target does not exist, simplified spore creation
- Implemented
logic_random
: triggers a randomly selected target out of up to 16 targets
- Don't draw the beam sprite for the night vision HUD icon
- Reworked armor HUD to avoid depending on relative positions of the full and empty icons in the sprite sheet
- Increased maximum number of weapon slots to 10
- Reworked train control & pain sprites to use
hud.json
entry for name mapping to enable an Opposing Force-specific version to be used
- Added barebones bot system for multiplayer testing (see below)
- Implemented new temporary entity list; increased maximum number from 500 to 2048 (see below)
- Limited
Overflow 2048 temporary ents!
message to only print once per frame (excessive logging caused framerate drops to < 30 FPS)
- Reworked NPC-spawned gibs to be created as temporary entities to eliminate problems with
ED_Alloc: out of edicts
errors, crashes, entity rendering issues (see below)
C# Changes
- Fixed
c3a2b
(Lambda Core map 3) valves soft) locking if turned too quickly in succession. The second valve now locks until it is safe to use it
- Fixed game over text being cut off in
c3a2
(killing retinal scanner scientist in Lambda Core map 1)
- Fixed some sounds restarting on save load
- Fixed Nihilanth dialogue on
c4a2
(Gonarch's Lair map 1) not playing ("Win, you cannot win")
- Reworked upgrade tool classes to improve consistency in API design
- Renamed Installer to ContentInstaller
- Renamed executables to remove the
HalfLife.UnifiedSdk
prefix (the Map Decompiler executables have also been renamed)
- Added flag matching to KeyValueMatcher to filter results by spawnflags or other flag keyvalues
- Fixed
c2a5
(Surface Tension map 1) barrel not flying up if destroyed using radius damage attack
- Updated Sledge libraries to latest version
- Reworked
Entity
class to store keyvalues as lists instead of dictionaries (matches map compile tools behavior)
- Prune excess
multi_manager
keyvalues (affects retinal scanner scripts that had too many keys)
- Reworked Asset Synchronizer to minimize time spent in event handlers to avoid
Too many changes at once in directory
errors
Asset Changes
- Various updates to
zoo_npcs
to improve map performance, stability and behavior
- Added test maps for features and bug fixes
- FGD changes:
- Added
Contents
choices to func_train
(allows trains to be made out of water, slime or lava)
- Removed redundant and unused keyvalues
- Fixed incorrect uses of
target_source
keyvalue type
- Added missing
master
keyvalue to game_zone_player
- Added
ReplacementFiles
base class to entities that use sounds or sentences
- Added
logic_random
- Added HUD sprites for Half-Life & Opposing Force HUDs, updated HUD config files to use the new sprites
- Updated
hud.json
entries used by entities whose names have changed
- Added
hud.json
entries for the Blue Shift helmet & armor vest pickup items
- Removed
hud.json
entries for unused train icons, added train_controls
& pain_directions
entries to allow the HUD to locate the right files at runtime
- Hide
Change Game
button when launching the game directly (as opposed to launching through Steam)
- Updated
OpenAL
library name in the package manifest so the right file is packaged
Half-Life and Opposing Force HUDs
The HUD is now capable of being switched between the Half-Life and Opposing Force icons:
This was made possible by the creation of new HUD sprites by malortie. Many thanks for the great work you've done!
Bots
A barebones bot system has been added to enable testing multiplayer. These bots are capable only of spawning and respawning when killed and do not know how to select teams and classes so they can't be used in the Capture The Flag gamemode.
New temporary entity list
The client-side temporary entity list has been replaced with a new one that has a higher limit. The engine's list has a maximum of 500 entities, whereas this one has 2048.
This limit is pretty arbitrary. Technically it can even be made unlimited, but it won't increase the number of visible temporary entities because the engine can only render 512 entities in a single frame. Without raising that limit first increasing the temporary entity limit will not have much of an effect. This would require a custom renderer which is out of scope for this project.
A performance issue in the printing of
Overflow 2048 temporary ents!
has also been addressed.
Client-side gibs
Gibs spawned by NPCs are now handled on the client side. Previously gibs were server side, causing them to count towards the server-side entity limit. Spawning a lot of them could cause the game to shut down or crash, and often caused other entities to disappear because they also count towards the server-side visible entity limit (max 255).
Gibs are now temporary entities and can be spawned en masse without causing errors or crashes:
The cvars
cl_gibcount
,
cl_giblife
and
cl_gibvelscale
control how many are spawned, how long they exist once they stop moving and how much their velocity is affected (the settings in the video are
100
,
1
and
-10000
respectively).
Some NPCs override the gib count since they want to spawn a specific number of gibs but for most NPCs the cvar is taken into account.
The
gibshooter
entity still uses server-side gibs but this can be changed if necessary.
Project merging status
Project merging is complete. While there are still some useful changes that could be merged none of them are user-facing and are mostly about fixing minor bugs and making things a bit easier for programmers to use.
Remaining work to be done
- Update changelog to include all changes (partially complete)
- Write documentation for all new features (partially complete)
- Networking system (other immutable data) (done)
- Versions of Opposing Force-only HUD images that have the scanline effect removed (done)
- Merge in remaining useful functionality from other projects (done)
- Implement as much of the work scheduled on the issue tracker as possible (in progress)
- Review all changes
- First alpha build
- Stress test the four campaigns and fix issues that show up (first test done)
- First beta build
Quite a bit of work is completed now, most of what's left are open issues on the issue tracker and things on my TODO list.
Many thanks to malortie for making the new HUD sprites. With the completion of that feature this SDK can now be used to play all 4 campaigns with the look and feel of each game, which is the main goal for the project.
Thanks to Ronin4862, LambdaLuke87, Oxofemple, FreeSlave and Shepard for helping with bug reporting and fixing.
Special thanks to Penguinboy for updating the Sledge libraries to provide keyvalues as lists to allow for more accurate modification of maps using the map upgrade tool.
This project is in the home stretch now, now it's just a matter of wrapping up remaining work, testing everything and documenting it.