Unlocking core memories with GoldSrc engine
avatar
Posted by Daniel Brendel
5 months ago
As you might know, I'm a bit riding on the nostalgia train currently. That has led to the creation of a CS 1.6 Retroboard and playing CS:CZ occassionally. 

Then I told myself "Why not check out some old code stuff for the GoldSrc engine?". And so I did. 

I decided to go for my server-side hackbase, because it's the most easy part to verify its functionality, and you can also make some very funny stuff. It's very cool to see that this hackbase still works, given that it dates back to somewhere around 2014.

And suddenly, after installing the hackbase successfully, I got struck by a flash of nostalgia! So, I hyperfocused on creating a new server hack based on the hackbase. I added a good deal of functions, improved certain parts of the hackbase and fixed some annoying bugs. The result can be seen in the following video:


It's fun to toy around
I have to say, even tho the GoldSrc engine dates back to 1998, it's SO enjoyable to work with it. I mean, you can accomplish various cool and funny stuff pretty easy. Of course, I'm a senior software developer, but I find the engine to be with a very low entrance barrier. It's actually sad to see how old it is, no one really cares anymore. But I also realize how strongly it influenced me when I created my own games (or my client-server chat system).

//====================================================================== EXPORT_LIBRARY int NEWAPI GetNewDLLFunctions(NEW_DLL_FUNCTIONS *pNewFunctionTable, int*pinterfaceVersion) { //Called to recieve NEW_DLL_FUNCTIONS and Interface version pointers from engine if (!pNewFunctionTable) return 0; //Get address and call it from original module #ifdef __linux__ orig_GetNewDLLFunctions = (T_GetNewDLLFunctions)dlsym(hOrigModule, "GetNewDLLFunctions"); #else orig_GetNewDLLFunctions = (T_GetNewDLLFunctions)GetProcAddress((HMODULE)g_hOrigModule, "GetNewDLLFunctions"); #endif //Initialize hooking gNewDllTable.Initialize(pNewFunctionTable, sizeof(NEW_DLL_FUNCTIONS)); //Register aliases for (unsigned int i = 0; i < sizeof(paNewDllFuncs) / sizeof(unsigned int); i++) gNewDllTable.AddNewName(paNewDllFuncs[i], i); return orig_GetNewDLLFunctions(pNewFunctionTable, pinterfaceVersion); } //====================================================================== An example of a server game dll function hook
No wonder that the GoldSrc engine sparked an outstanding amount of modding possibilities! Game mods, maps, scripts, sprites, models... Back in the day, modding was an essential part of videogames. Almost all modern games can't claim this, with the exception of a few ones (like Minecraft).

//====================================================================== edict_s* SpawnEntity(const char* szClassName, float* pos) { //Spawn an entity if ((szClassName) && (pos)) { int ialloc = g_pEngFuncs->pfnAllocString(szClassName); //Allocate entity string if (ialloc) { edict_s* pEntity = g_pEngFuncs->pfnCreateNamedEntity(ialloc); //Create the entity by name if (pEntity) { g_pDllFuncs->pfnSpawn(pEntity); //Spawn item to world g_pEngFuncs->pfnSetOrigin(pEntity, pos); //Set desired position return pEntity; } } } return NULL; } //====================================================================== Easy entity creation
In conclusion, even tho the game engine is definitely past its prime, it was worth unlocking these core memories and re-create a server-side hack for GoldSrc CS/CZ. I had a lot of fun, I remembered all the good things from back then, and I enjoyed toying around with the project in production. So, if you want to check the project out, feel free to view it on GitHub. It's open-sourced under the MIT license. Please star the repository if you want to show support for this nostalgic endeavour. https://github.com/danielbrendel/dnyApocServ
Imprint
© 2026 by Daniel Brendel

Scientia potentia est

Visitors: 31.6K

Mastodon