It's not ready for a public release and the code is still in flux (400+ commits of refactoring and cleanup on top of Half-Life Updated) so i'm keeping that private for now.
The purpose of EHL is to do the following:
- Provide an updated SDK that uses modern source control principles, including a proper directory structure and use of CMake to generate the project files
- Third party dependencies are included instead of requiring manual setup by programmers (i'm looking at you, HLE's XercesC dependency)
- Ease of use: can make a new mod in ~5 minutes by cloning the repository, configuring the CMake project to install to a mod directory, generating the files and building the INSTALL target. Also installs liblist.gam and delta.lst (part of the source code repository) to ensure smooth setup
- Uses C++20, requires Visual Studio 2019 or newer. No Windows XP support.
- Cleaned up codebase to ensure source code is the highest quality:
- Obsolete files and APIs have been removed
- Documentation has been upgraded to use Doxygen style annotations
- Include guards have been converted to #pragma once and headers now always use #pragma once unless they need to be included multiple times
- #define has been mostly replaced with constexpr constants
- Global variables removed whenever possible
- Duplicate code merged
- Cleaned up C-style code to use C++ style, use const correctness, Vector instead of float
- Fixed old hacks needed because of backwards compatibility
- Routed all filesystem access through IFileSystem, all references to the game directory name removed
- Safer strings functions used to avoid buffer overflows
- string_view used to make for better code (works well with non-terminated strings and substrings)
- Defined constants for many magic numbers
- Converted many constants to enum class which helps to catch invalid conversions
- Lots of other stuff that's still in progress
- The overall goal is to make the smallest SDK possible while maintaining full functionality, and even expanding on features by using newer language/library features, and using code generation to help eliminate redundancy in things like save game code
- All of HLEnhanced features should eventually be re-implemented in this project, along with merging the unique features from Opposing Force Updated (weapons, NPCs, game modes) and Blue Shift Updated (handful of entities). This should make EHL the one-stop-shop for making a mod that mimics any of these 3 games, aside from the issue of Op4 weapons having grunt hands only
- The UI should be replaced entirely with a VGUI2 version. The code for that exists in HLEnhanced and will be ported over later on when i tackle that task. Eliminating the use of VGUI1 entirely will help to simplify things.
- All files loaded by the game codebase are to be converted to XML for consistency and to eliminate issues with invalid parsing, error handling, memory leaks, etc. I considered a few different formats (INI, TOML, JSON, and others) but XML is the format that provides everything needed, though i haven't yet started upgrading the codebase to use it yet. I'm planning to use RapidXML for parsing so the heavyweight XercesC dependency won't be a problem this time
- Backwards compatibility with existing maps/models will likely be broken to improve entity keyvalue APIs and internal logic. For example some models made for barney and scientist NPCs will likely break due to changes in how submodels are changed (now done correctly). This will help to remove some of the cruft from the codebase that was needed due to Half-Life's maps having older keyvalues still in use. Breaking compatibility now in a big way can help avoid breaking changes later on
Compare this: https://github.com/ValveSoftware/halflife/blob/c7240b965743a53a29491dd49320c88eecf6257b/engine/APIProxy.h
To this: https://i.imgur.com/FVeCt0n.png
(that header was split in 2 so the client API part is only included by files that need to know about it)
I'd like to show something i finished up today. I improved the health and hev chargers: Features:
- Fixed dmdelay keyvalue not working and renamed it to recharge_delay, and allowed the use of floating point values
- Allows instant recharging (warning: sound spam)
- Allows mappers to control initial capacity, total capacity, charge per use and sounds to play
- Allows chargers to start out of charge (initial capacity of 0)
- Allows infinite capacity (initial/total capacity of -1)
- Allows changing charge interval(time between charge uses, basically how quickly it gives you health or armor)
- Prevents chargers from jamming up if they are constantly +used while recharging
- Custom sounds
- Sound to play on recharge (similar to sound played when items respawn in multiplayer)
- Custom sound pitch setting (100 == default, 0 == minimum, 255 == maximum)
recharge_delay(string) : "Recharge delay"
charge_per_use(integer) : "Charge per use"
charge_interval(string) : "Interval between charges"
initial_capacity(integer) : "Initial charger capacity (-1 == unlimited)"
total_capacity(integer) : "Total charger capacity (-1 == unlimited)"
sound_pitch(integer) : "Sound pitch"
charge_on_sound(sound) : "Charge start sound"
charge_loop_sound(sound) : "Charge loop sound"
refuse_charge_sound(sound) : "Charge refuse sound"
recharge_sound(sound) : "Recharge sound"
Making chargers that never run out and/or give tons of health/armor in an instant. Useful for co-op spawn areas, bunkers, etc.
Making chargers that start off empty but recharge after a long time to have some charge (or unlimited).
Making chargers that have little charge, but recharge quickly.
Chargers that look and sound alien.
Silent chargers (use common/null.wav).
Making chargers that give players their entire charge at once, or however much the player can take (health always expends charge_per_use, armor is conservative and only gives what the player can take). Like Condition Zero Deleted Scenes health stations.
Making chargers that charge really slowly, but charge a lot (forces player to expose themselves).
I'm still working on code cleanup so new features are few and far between. I decided to update the chargers because i was merging the code for both and i wound up adding a bunch of stuff.
Feedback and ideas are always welcome.