By the way, we are now less framerate dependent, even somewhat stable at insane (and totally unsupported, mind you) frametime of a less of millisecond!
thanks me, LevShisterov and @snmetamorph for solution
Really like how remapping palette indices worked out, this way it's theoretically possible to draw anything right from UI, not only horizontal stripes.
@fraggle ~4 years back I ordered a cheap lightning to 3,5mm adapter on amzn because I l lost mine. It turned out to do exactly the same blouetooth trickery. I never used it.
I can't get over how condescending this person is towards a group of people who just use whatever they can. Like if they did or didn't know what PrOpEr Bluetooth is, matters in their lives.
While I was restoring PHS generation in Xash, I tried, in the most stupid way, to parallelize it with OpenMP.
Good news: it's faster by 4.2x~5x times on my 6-core machine in -O3 build. And of course, data matches.
Without it, it takes like 80ms on map with 4k leafs. Considering hard-coded 8k limit in GoldSrc, it isn't much by itself, and probably only worth it for large multiplayer maps with 32k leafs.
Worst news: it still takes a lot of RAM, PVS is a matrix and uncompressed worst case with 32k leafs for HLBSP format would take 128 MB of memory. It might make sense to compress it back and decompress only requested leaves.
While I was restoring PHS generation in Xash, I tried, in the most stupid way, to parallelize it with OpenMP.
Good news: it's faster by 4.2x~5x times on my 6-core machine in -O3 build. And of course, data matches.
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.
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.
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.
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.
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:
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.
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...