Email or username:

Password:

Forgot your password?
118 posts total
a1batross
Combination of bloom effect and NaN somewhere in fragment shaders leads to pretty bizzare glitches. Epilepsy warning.
a1batross
In Half-Life, NPC mouth openness updates only once in a while, in original algorithm it collects 10 samples, picking only few sampling points per frame, resulting in updates each 5-6 frames in 60 FPS, thus 10 FPS.

Many years ago, I tried interpolating the mouth to make it smoother, but never showed it to anyone.

So... yay, or nay?
In Half-Life, NPC mouth openness updates only once in a while, in original algorithm it collects 10 samples, picking only few sampling points per frame, resulting in updates each 5-6 frames in 60 FPS, thus 10 FPS.

a1batross
quick test, no cheating please :)

which of these isn't a string.h standard __or__ a BSD/GNU/MS extension function?
Anonymous poll

Poll

strlcat
0
0%
memmem
0
0%
rawstrrchr
0
0%
stristr
0
0%
memfrob
1
0%
strxfrm
0
0%
rawmemchr
0
0%
strfry
1
0%
strrev
0
0%
memicmp
0
0%
strcoll
0
0%
strcasesep
0
0%
0 people voted.
Voting ended 29 April at 1:24.
a1batross

It sure took me long enough, but #ElegyEngine can now render textured models !!!

Also got a pretty colourful "missing texture" texture now. Should be very easy to notice and still look aesthetically pleasing

Admer the GoldSRC fox

This took a lot longer than I expected to say the least:

Loading glTF and PNG files was the easy part; most of the effort went into the material/shader system.

Typically when you write a renderer, you can define which resources (textures, matrices etc.) occupy which slots in the shader. E.g. view & proj matrix -> slot 0, model matrix -> slot 1, textures -> slot 2.

But here I wanted a more data-driven thing, where the shader & renderer agree on a few common slots, and the rest it figures out from the material file. So you can easily just write a new shader and use it! No need to touch the renderer code at all.

There were lots of little nuances to this, so it took a while.

I also realised, however, that my renderer plugin API is pretty inflexible and flawed. I'll need to redo that next month. Oops!

This took a lot longer than I expected to say the least:

Loading glTF and PNG files was the easy part; most of the effort went into the material/shader system.

Typically when you write a renderer, you can define which resources (textures, matrices etc.) occupy which slots in the shader. E.g. view & proj matrix -> slot 0, model matrix -> slot 1, textures -> slot 2.

a1batross
https://github.com/FWGS/hlsdk-portable/tree/decay-pc2

Rebased fan made Decay PC port on top of our hlsdk-portable tree, and also fixed a few bugs along the way.

Using this SDK tree means wider support for various operating systems, CPU architectures and game engines, and minor HL bug fixes, some of which are optional.

Thanks to Vyacheslav Dzhura for publishing original mod source code: https://github.com/hoaxer/Half-Life-Decay and to code.idtech.space for saving historic HLSDK versions, which made rebasing semi-automated. Took me a day ^^
https://github.com/FWGS/hlsdk-portable/tree/decay-pc2

Rebased fan made Decay PC port on top of our hlsdk-portable tree, and also fixed a few bugs along the way.
a1batross
Finally added a hotkey handlers to my mainui_cpp, featuring Half-Life WON menu.

However, behavior differs from WON launcher. WON handles it on key press, which makes navigation confusing, and sometimes it might react twice or more. Like if you're in main menu, pressing 'C' to open configuration menu, and it jumps straight to controls menu instead. This is probably due to mishandled button repeat, but I'm not sure.

Instead, I do it on key release, which allows in my opinion much smoother navigation.
Finally added a hotkey handlers to my mainui_cpp, featuring Half-Life WON menu.

However, behavior differs from WON launcher. WON handles it on key press, which makes navigation confusing, and sometimes it might react twice or more. Like if you're in main menu, pressing 'C' to open configuration menu, and it jumps straight to controls menu instead. This is probably due to mishandled button repeat, but I'm not sure.
a1batross
Did you report your status report to the administrator today?
a1batross

Not so fun facts about GoldSrc's version of Quake's ED_ParseEdict function:

1.

It first searches for classname key, and if it was found, immediately passes it to game DLL pfnKeyValue and after that uses the class name string from entvars_t::classname written by game DLL and NOT the actual value written in entities file. BECAUSE entities are exported as functions in DLL, it doesn't really allow scripting languages to add custom entities. This oversight (?) allowed scripting languages to replace the custom class name with something harmless like info_target to force the engine to create an entity. This is actually used in Custom Entities API for AMXModX by Hedgefog.


2.

However, VALVe knew that it might be not possible to export entity function and their solution was? Calling "custom" export in DLL and passing KeyValue to DLL with following parameters:

szClassName = "custom"
szKeyName = "customclass"
szValue = classname

The sad part is that it seemingly was undocumented and nobody ever used that engine feature.


3.

It has a hack to remove single trailing space in keys. Huh?


4.

It will not pass a KeyValue to a DLL if its value has the same value as the entity's class name. Do you think something missing here? Yes, it doesn't check for if the key is classname! It straight up rejects an entity pair that's value so happened to be an entity's class name.

The decompiled version from Ghidra: https://git.mentality.rip/a1batross/gist/src/branch/master/ed_parseedict.c

Not so fun facts about GoldSrc's version of Quake's ED_ParseEdict function:

1.

It first searches for classname key, and if it was found, immediately passes it to game DLL pfnKeyValue and after that uses the class name string from entvars_t::classname written by game DLL and NOT the actual value written in entities file. BECAUSE entities are exported as functions in DLL, it doesn't really allow scripting languages to add custom entities. This oversight (?) allowed scripting languages to replace the...

a1batross
Just realized that our VFS has the FS_Gets function, basically fgets but for virtual layered filesystem that we have.

The function was added by Uncle Mike back in 2007 and never again ever since.

By the way, our VFS implementation has its roots in DarkPlaces. It still resembles it, though we separated archive functions, added file names caching for case-insensitive FS emulation and implemented Valve's VFileSystem009 interface.
Just realized that our VFS has the FS_Gets function, basically fgets but for virtual layered filesystem that we have.

The function was added by Uncle Mike back in 2007 and never again ever since.
a1batross
By the way, one of the old Half-Life mods suddenly released a demo https://www.moddb.com/games/ionization/downloads/ionization-video-game-intro-demo-version-10 after years of radio silence.

And it uses our Xash3D FWGS, alongside with @snmetamorph 's PrimeXT
a1batross
https://github.com/TheOverfloater/pathos-public

Pathos Engine became open source, under MIT license.

Author seems took a lot of inspiration from Quake and GoldSrc.
a1batross
fun fact

did you know that this API interface: https://code.idtech.space/valve/halflife-sdk/src/tag/v2.0/common/engine_launcher_api.h

Was used in WON (pre-Steam) Half-Life not only to spawn a dedicated server but also by the iconic WON main menu?

Theoretically, mod developer could make their own EXE launcher with custom UI.
a1batross
https://snmetamorph.github.io/PrimeXT/docs/eng/modding_introduction/

absolutely b(i)ased introduction to Half-Life modding, calling Xash release "the most important event in modding history", by @snmetamorph

I honestly agree. Even if you have problems using Xash code, because of legal reasons, or because you're just Valve (I know my followers here ;)), it still explains the behavior of many GoldSrc API functions, that previously were barely documented.

Even if the modder don't want to support Xash, it's still possible to leverage the fact that the engine is completely buildable from the source code, meaning they can easily connect a debugger or add modern run-time instrumentation tools like AddressSantizer and UndefinedBehaviorSanitizer.
https://snmetamorph.github.io/PrimeXT/docs/eng/modding_introduction/

absolutely b(i)ased introduction to Half-Life modding, calling Xash release "the most important event in modding history", by @snmetamorph
a1batross
With opensourced Steam Audio...

...would it be possible to restore A3D to Half-Life 1? Of course not as the original but something that might sound very similar.
a1batross
https://www.youtube.com/watch?v=qB_A36wFLVE

Didn't know that Rebecca Heineman also worked on the cancelled HL1 MacOS port.
a1batross
The worst part of Quake I, II and GoldSrc is how the lightmap tied to texture scale. It completely breaks dynamic lights for a classic GL1/software renderer.
Go Up