Halflife: Provide access to the engine for community support

Created on 22 Jun 2016  ·  228Comments  ·  Source: ValveSoftware/halflife

As suggested by @Stenudd, this is a new issue to cover discussion about engine access and upgrades.

Original discussion here: #1685

So far, the following users have shown interest in providing support for engine access:
@tschumann
@johnstt
@Stenudd
@SamVanheer

To summarize: we would like to request access to the engine so we can provide support to the GoldSource community. This would involve both bug fixes and new features to improve functionality.

I can speak from experience here, given that i used to have access when i was on the Sven Co-op team.
Valve requires the engine to be stored in a secure manner, so if access were given it would require a secure repository. They also require the signing of an NDA, meaning no information found in the engine can be disclosed publicly.

Personally i'd like to see the following issues dealt with:

  • Increase engine limits (max entities/models/sounds/events/etc)
  • Bulk data transfer support (similar to Source's network string tables and entity networking, would solve large map cycle issues, late precaching, etc)
  • Elimination of sys_error and host_error causes (e.g. missing files, late precache, host_error triggers a longjmp which can corrupt and leak memory)
  • Fix known issues (e.g. resource lists too large to send all at once cause overflows)
  • Provide features previously limited to Valve games to mods ( e.g. VGUI2, chrome HTML renderer, GameUI)
  • Improved graphical performance (immediate mode support is pretty poor in some driver implementations)
  • New game interfaces to allow the server and client to be notified of events (e.g. map started loading on client and server, changing map, etc)
  • Improved string pool (currently allocates new block of memory for each call to enginefuncs_t::pfnAllocString, can run out easily for larger mods)
  • Unified memory allocator so everything uses the same memory pool (currently malloc/new don't use the engine's heap set by the -heapsize parameter)

There's more, but i can't think of it right now.

If you support this endeavor, and/or want to assist in the event that access is provided, please post your thoughts.
If you have any ideas as to what could be done to improve the engine, please post them as well.

Most helpful comment

As the current lead maintainer of Science & Industry, I have a strong interest in this.

  • I have (many times) settled for unsatisfactory solutions to problems because I cannot change the engine or HLDS source code used by my mod

For example, I recently spent a lot of time trying to improve the shotgun in our game, which involved a few performance bottlenecks and engine limits. As far as I can tell, many of these are simple #defines in the engine source code which ought to be reconsidered almost 20 years after Half-Life was developed and released.

In that same thread, I pointed out how the Half-Life engine and HLDS have open-source competition. However, I would prefer the official Half-Life binaries be kept up-to-date and transparent by the people contributing fixes on this Github repo. I cannot in good conscience ask my players to use an 'alternative engine' when the official engine is a closed-source paid product on Steam.

I also tried to learn how sv_clienttrace works as part of some investigation into hit registration and netcode issues in my mod. Unfortunately, I could not find much information in the official channels. Which brings me to my next point..

  • I often look at the Xash3D and reHLDS code to get ideas when debugging these issues, even though I do not use (or trust) those projects.

If the engine and HLDS code were available as open source, I could make better decisions for my mod and contribute improvements to the code powering the official Steam distribution of Half-Life. For example, I investigated and fixed a very strange bug with tripmines (documented here ). My fix applies to the SDK code, but I would be just as willing to share fixes I make to the other components if I had access to them.

There are many more stories like mine, but all the improvements being made are limited to the mods under which they are developed (since this repository is inactive and the Steam distribution of Half-Life is not being regularly updated).

  • I have seen how beneficial a _complete_ open source ecosystem can be with games such as Quakeworld and Quake 3 Arena.

As I explained here, the Quake games are fully available as open source (client, server and engine code). These games are still sold on Steam and elsewhere, but the people purchasing them today are able to benefit from improvements made by open source developers in the many years since their original release. Many successful arena FPS game projects have grown out of the Quake 2/3 source code (OpenArena, ioquake3, Warsow etc) and the most commonly used Quakeworld client/server distributions are all in active development on Github.

I believe that, with only a small investment of management and support from Valve, the people posting on this repo could contribute positively to an open source Half-Life (including access to the engine and HLDS source code).

All 228 comments

As the current lead maintainer of Science & Industry, I have a strong interest in this.

  • I have (many times) settled for unsatisfactory solutions to problems because I cannot change the engine or HLDS source code used by my mod

For example, I recently spent a lot of time trying to improve the shotgun in our game, which involved a few performance bottlenecks and engine limits. As far as I can tell, many of these are simple #defines in the engine source code which ought to be reconsidered almost 20 years after Half-Life was developed and released.

In that same thread, I pointed out how the Half-Life engine and HLDS have open-source competition. However, I would prefer the official Half-Life binaries be kept up-to-date and transparent by the people contributing fixes on this Github repo. I cannot in good conscience ask my players to use an 'alternative engine' when the official engine is a closed-source paid product on Steam.

I also tried to learn how sv_clienttrace works as part of some investigation into hit registration and netcode issues in my mod. Unfortunately, I could not find much information in the official channels. Which brings me to my next point..

  • I often look at the Xash3D and reHLDS code to get ideas when debugging these issues, even though I do not use (or trust) those projects.

If the engine and HLDS code were available as open source, I could make better decisions for my mod and contribute improvements to the code powering the official Steam distribution of Half-Life. For example, I investigated and fixed a very strange bug with tripmines (documented here ). My fix applies to the SDK code, but I would be just as willing to share fixes I make to the other components if I had access to them.

There are many more stories like mine, but all the improvements being made are limited to the mods under which they are developed (since this repository is inactive and the Steam distribution of Half-Life is not being regularly updated).

  • I have seen how beneficial a _complete_ open source ecosystem can be with games such as Quakeworld and Quake 3 Arena.

As I explained here, the Quake games are fully available as open source (client, server and engine code). These games are still sold on Steam and elsewhere, but the people purchasing them today are able to benefit from improvements made by open source developers in the many years since their original release. Many successful arena FPS game projects have grown out of the Quake 2/3 source code (OpenArena, ioquake3, Warsow etc) and the most commonly used Quakeworld client/server distributions are all in active development on Github.

I believe that, with only a small investment of management and support from Valve, the people posting on this repo could contribute positively to an open source Half-Life (including access to the engine and HLDS source code).

I'm quite interested too. I made and continue to develop Sandpit: http://www.moddb.com/mods/sandpit/
The biggest hassle is the model precache limit of course, but also the inconsistency of it crashing when developer is 1 but silently failing when developer is 0.
The engine's selective ability to load Blue Shift maps is also a bit annoying - it only seems to do it if the game is Blue Shift, otherwise the game freezes.
GameUI being closed source is something I can live with but the inconvenience of not being able to filter what maps show for multiplayer remains - it seems like filters for Half-Life and Opposing Force are hard-coded, and the only alternative is the mp_filter key in liblist.gam which is quite limited. There is also the bug-based alternative of putting single-player maps a .pak file because GameUI doesn't look in .pak files but it's not the best.
Another thing I'd like to do is add support for Dreamcast and PlayStation 2 models, which may be possible but difficult just from client.dll
Also, better community access to the engine would be nice just to see how some things actually work. It's great that with the Linux update for Half-Life a whole lot more of the SDK got documented and released, but as almost none of it is used by vanilla Half-Life it's not entirely clear how to properly use some of the new features. I've been tinkering with IFileSystem009 but some of it doesn't work like you think it should. The ability to better debug some crashes would be nice too - unitialized sizebuf_t doesn't tell me what I'm doing wrong in my mod.

The engine is full of checks that see if the game/mod dir is a particular one, like czero or cstrike, bshift, etc. That's why it's so inconsistent. The filesystem is actually somewhat buggy. I used it in a separate project to load content and it crashed after removing search paths. I should report that one when i've reproduced it.

Do you know to use AddSearchPath properly? I'm trying to load Opposing Force content and I can't figure it out. I can get it to work but I don't want to change all the models paths to gearbox/models/whatever.mdl when models/whatever.mdl should work.

AddSearchPath takes 2 parameters: the relative directory and a path ID.
The directory is used to form file paths, while the path ID is used to determine which operations the path is used in.

The path is formed like this:
"<search path/><filename>"

Assuming you're using the file system in a mod, adding the path "gearbox" will work.

The path ID will have to match one used in the engine for it to be used though.

The following path IDs are in use from what i can tell:
ROOT: Half-Life/
BASE: Half-Life/
DEFAULT: a bunch of default paths, not really used directly
PLATFORM: <game dir>/platform
GAME: Game directories, including localization and _addon
GAMECONFIG: Contains game configurations, meaning <mod dir>
GAMEDOWNLOAD: The <mod dir>_downloads directory

It will use the "valve" directory as well to fall back to original content, unless a -basedir command line parameter is specified, in which case the given parameter is used.
The mod dir is determined by using the value for -game. If none is given, it uses -basedir or valve.

If "fallback_dir" is defined in liblist.gam, it also defines GAME_FALLBACK.

If you want to add the Opposing Force directory, you'll have to add its search path. Ideally, adding it to "GAME" should be done since that's where it gets everything else from.

Note that you'll be adding it to the end of the list, so the mod dir and game dir are checked first. Worst case scenario you'll have to wipe all paths and add them again. That's difficult to do given that some are added conditionally based on things like low violence settings and command line parameters.

The engine will search for files by either passing null as the path ID, meaning all paths are searched, or by specifying a specific path ID, in which case only paths with that ID are considered. Whenever you're dealing with content that can be in _downloads, the null path ID should be used, since searching each path ID separately is a major hassle.

Because it searches every path when using null, it will produce duplicate results. That's why the map command and the Options menu models list have duplicates. The same paths are searched multiple times because they're defined in multiple path IDs.

Avoid calling RemoveSearchPath. That's the method that caused crashes for me. I don't know why, but i'm sure that if ran using a debug build or using pdbs the problem should be discovered easily.

Disclaimer: all of this information was determined through reverse engineering. No official documentation exists, so there's no alternative.

Hm, I'll try "GAME" - I think I was using "MOD" based on a VDC article...

Also, to add to the list - crashing due to missing .wad files probably shouldn't happen - the engine can certainly handle missing textures; r_shadows could be exposed again (even if only when cheats are enabled) and if you want to print to the console from from some engine callbacks in client.dll then it won't work unless you use GameConsole003.

I made the same mistake at first. GoldSource and Source use different path IDs for some reason.

I agree with those issues.

Another reason to provide access: i've built a prototype shader based BSP renderer. It's not complete yet, but it can load and display maps. Because it uses VBOs and shaders, its performance is much better than the engine's immediate mode based renderer.

Repository can be found here: https://github.com/SamVanheer/BSPViewer

If this were integrated into the engine, it could boost graphics performance by a considerable amount. Further improvements in the future could lead to complete support for all rendered objects, including studio models, sprites and particles. This should eliminate any performance issues caused by poor driver support (e.g. AMD drivers).
It shouldn't be too difficult to provide a shader based OpenGL renderer alongside the immediate mode version, though the codebase would be an even bigger mess than it is now.

I've created a VDC page for GoldSource's IFileSystem interface. You can find it here.

+1

I am strongly in favor of open sourcing Goldsource. The fact this engine powers some of the best games of all time and that modders are still working with it 20 years after its release are proves of the quality of the gaming and development experience with it.
The only reason why I'm reluctant to work more with the Goldsource engine is because it is closed source.

+1 for open-sourcing the engine, a lot of wonderful enhancements, bug-fixes while keeping the legacy of Half-Life is something I wish to see in the future. I agree with the ideas of @Loulimi @tschumann @johnstt and @SamVanheer.

+1 I support this idea.

This will be a great step forward for GoldSrc mods if it happens.
It's really about time this happens.

+1, this idea is great.
It would help us, modders, and people who would like to help to improve the game (since the game is a bit too old now and needs some serious tweaks) and increase its lifespan a bit more :)
:+1:

+1

+1

+1

FYI, you can now thumbs up OP message. That way we aren't annoyed by a ton of notifications for all that +1...

+1, It would help us develope the servers we always wanted to create, and decrease limitations in the engine, fix bugs and performance issues. Even add features such as map instead of radar, HD water and more.

Hope they listen this time, even though in reality i doubt it.

Maybe if you guys listed some reasons to support this instead of saying +1...

I could add a new triangle API that actually works in Software and lets you draw sprites with different scales properly. pfnDrawGeneric actually crashes Software mode...

+1 as one of the developers of Earth's special forces (esforces.com) I strongly agree that this would help mod developers a lot.

+1 but does Valve read this repository anymore?

Something tells me they don't.

@lamiX do u think valve reads anything at all from their clients?

@di57inct They have been active in this repository before, no need for a cocky attitude

yeah, been active in 2013, breaking entire counter-strike.
anyway, nexon has source code and I'm sure they didn't get it for free. It's sad but Valve won't probably give source code of even almost 20 years old engine.

+1

+1

+1

+1 !!!

+1

+1

+1

+1

Just stopping by to thank everyone for the +1s. It really helped.

Really? Valve contacted you? What is going to happen?

I'm pretty sure that was sarcasm.

So after 2 months this thread suddenly came to his mind and he thought it would be great idea to troll? I dont think so

@SamVanheer sent dozen of e-mails about this issue to multiple Valve e-mail addresses that you can find on the Internet, he has received 0 replies since then. So I highly doubt that anyone has access to the full engine (with the exception of Sven Co-op and some others).

I wouldn't say dozens but i did send it to multiple addresses that Valve should be monitoring. I've received no response, neither to my requests nor to my notifying them that i'm porting Source SDK code to the HL1 SDK (VGUI2 code). Seems that they don't respond either way.

I did however manage to retrieve a message that the SC team got from them once:

It does not matter but I find it a little amazing that you are on GoldSrc. You know that we cannot make that code available anymore if you need an update.

I suppose they ended support for GoldSource. (The "it does not matter" part is in response to a question, not related to what they said about the engine)

I can't believe how stupid valve is...

Hey, its still developer with best approach to community when you compare it with other devs like ea or ubisoft

So after 2 months this thread suddenly came to his mind and he thought it would be great idea to troll? I dont think so

Sorry, that's actually the truth. If they're the best developer for this kind of thing, why do we even have to ask for this? All the shooter games Half-Life is based on have been fully open sourced since before HL2 existed.

Well, i can think of one reason why they can't release it, aside from third party library licensing.
The engine is designed to authenticate with Steam in order to let you play it, if they open source it that requirement can be removed.

Not that there's anything stopping them from turning the engine into a mod of its own, but it's a terrible terrible mess.

Well, i can think of one reason why they can't release it, aside from third party library licensing.
The engine is designed to authenticate with Steam in order to let you play it, if they open source it that requirement can be removed.
Not that there's anything stopping them from turning the engine into a mod of its own, but it's a terrible terrible mess.

Can't really agree with that, there's dozens of non-steam clients and steam emulators available, two major dual protocol solutions for HLDS as well as one for reHLDS.

Steam only servers should still work properly (what I mean by this is that the whole steam auth system won't be trashed, allowing players to roam freely like they are on non-steam). Trust me that nobody playing non-steam is happy with the way it works.

At this very moment there are way, way more non-steam servers online, and more non-steam players online than legit steam users.

Talking about reHLDS, it's already way ahead HLDS. It's still incomplete but good enough for basic servers and light metamod / amxmodx. It has way better resource usage than HLDS. It's actively maintained (not beating a dead horse like here). If there are people like the reHLDS developers willing to donate their time to do this, I can't see any reason for not making the engine open source.

It's like they're willing to hold on to this game to it's death rather than letting it go and maybe live on other people's passion. The game would've been dead a very long time ago hadn't it been for the community building on top of it.

Isn't the non-steam stuff illegal?

Part of what we're trying to achieve here is honesty and transparency. I could have ported my mod to xash and run it on rehlds servers, but I have a problem with doing that. As I mentioned at the start of this, there is already a precedent for community members working with (not against or in spite of) game developers.

If there are technical challenges to doing this (as Sam alluded to), further discussion can sort it out. The games I cited for their great open source policies existed before anything like Steam, and didn't have to deal with these issues.

At the same time, though, Half Life is 20 years old and it seems cruel to hold up development so you can sell a few $5 keys. Not sure where I'm going with this so I'll stop writing.

Isn't the non-steam stuff illegal?

It is, but nobody is enforcing it. I'm sure it's not economically viable for them to sue 15 year old kids.

Part of what we're trying to achieve here is honesty and transparency. I could have ported my mod to xash and run it on rehlds servers, but I have a problem with doing that. As I mentioned at the start of this, there is already a precedent for community members working with (not against or in spite of) game developers.

I agree, I never said the opposite. I was just saying that making the game open source will not enable bypassing steam, or rather that it will but who really cares, it's already been done dozens of times, it can't change anything for the worse.

If there are technical challenges to doing this (as Sam alluded to), further discussion can sort it out.

Possibly, if not probably. To be honest I'd rather have one leap of effort from Valve to make it open source and then just stop working on it, rather than broken updates every couple of years, then dead silence in between. There are people putting hundreds of hours into disassembling HLDS either for reverse engineered binaries or just to get information and make modifications to the game. Have a look at the amxmodx git, a couple of people are keeping such an old and complex project going, and their job would be much easier had they access to the code.

Also, all these people working on amxmodx / reHLDS / mods, or at least some of them would love to help out with HLDS. All there is needed is somebody to manage the project. I'm sure there's enough keys being sold to pay for one guy's salary.

At the same time, though, Half Life is 20 years old and it seems cruel to hold up development so you can sell a few $5 keys.

Like I said above, all it takes to crack the game is to google a download link. Counter strike has been available "for free" as long as I can remember playing.
Speaking from the perspective of someone who operates a server that accepts cracked clients, but also from someone who plays on steam-only servers, I can tell you that nobody likes playing non steam. The people who don't own the game either can't afford it, are kids and parents won't buy it or are cheaters who don't want to get banned.

Making the game open source would in no way decrease the sales in keys. If you ask me, it would increase them. I personally own around 30 keys with the intent of giving them away on my non-steam servers and slowly but steadily "equipping" my community with steam. People are willing to pay for the game as long as the steam auth system is maintained, as long as you can ban people by steamID and they have to purchase the game again. If the game becomes free then steamid bans become useless.

I'm just saying this because we're having instances of hackers returning after dozens of IP bans just to mess with the server. I would love to one day have steam-only servers and players but if I disable dual protocol my server will stay empty.

I agree, it doesn't take much effort on Valve's part to make this happen.
I just got VGUI2 to work in my mod, having had to work with no documentation on how all of this works, what _does_ actually work and how to work around what's broken. It seems that they tried to prevent it from being used by any games other than Counter-Strike and Condition Zero, which makes very little sense.
I've had to reverse engineer import libraries, interfaces and constants to make this work.

If i'd had the source code this could very well have been a single afternoon pulling CS specific code out of a fully functional implementation. At least i was able to get some newer stuff from Source 2013 in it, that's always good to have.

I'd also like to point out that the only hope we had was Sven Co-op's new engine, but they have stated that they don't support third party mods (including Metamod) so we can't even rely on that.

To put it bluntly, we are fucked unless Valve decides to help.

I sent another email to Valve and i got a response:

Hi Sam, we are in a maintenance mode for the GoldSrc engine at this time, only fixing critical vulnerabilities when reported.

  • Alfred

Well I would argue that clients still being vulnerable to slowhacking is quite critical, among other things.

Looks like their "critical" bar is quite high then, since they ignored stuff like buffer overflows in demos or slowhacking.

"Slowhacking" sounds like something that only affects the gameplay experience. Not critical and probably not even a vulnerability.

Buffer overflows, on the other hand, probably represent some kind of vulnerability. But I bet there are thousands of that type of issue in the game, that either nobody is exploiting or nobody has even found yet.

Maybe somebody needs to make a Half-Life mod that's a moba with microtransactions to get this moving? I'm out of ideas and frankly I'd rather play quakeworld than keep fighting against this shitty codebase to make my mod better. Peace out!

+1

Maybe this would sound stupid, but can't you guys reverse-engineer it just like the guys at ReHLDS did with HLDS?

That's illegal and still wouldn't let us use the engine like we would use the vanilla version. You need full Steamworks support for that, which you can never accomplish with reverse engineering.

I got this email from one of the Valve employees yesterday.

Hello Ben,

We no longer make the Gold Source engine available.  It has been man years since the team has touched that code base so they have no interest in supporting anyone using it.  You really should be considering an engine like Unity for your project.

Kind regards,

Mike

I dont know what i expected.

Nobody's asking for Valve to support teams that use it, just open source it and let us use it.

@SamVanheer I asked them and Mike actually replied lol

I am not totally sure, could be due to third party licensing issues or it was just never considered back when the engine was activity being used by our teams. Doing it now would require some engineering time to pull it together which is in short supply. Remember Gold Source can from Quake which is actually open source now so maybe you have an option there.

Mike

Well, if they can license it out to the Sven Co-op team they can license it out to a group of developers that can do just that. _Then_ they can open source the whole thing. Sounds like a plan to me.

They probably have external dependencies or something which they would have to buy or something like that.

It was also licensed to Team Psyskallar (Cry of Fear) as well.

As for the external dependencies, AFAIK, there is only Miles which can be either replaced by SDL_mixer or just removed if Valve don't have the time.

Either know the right people to bug at valve or go through greenlight and cross your fingers, sounds like a great time!

I've worked with the engine's source a bit so i can shed some light on this, though this can be deduced by looking at the dlls in the Half-Life directory:

  • Miles
  • Direct3D (shouldn't cost any money AFAIK, only used by Software renderer)
  • DirectSound (code was disabled iirc, easily removed)
  • Voice codecs (conditions at startup exclude all codecs other than Steam codec, personally verified that one)
  • Bink codec? (binkawin.asi in the Half-Life directory)
  • avcodec (some kind of mpeg codec, not sure if it needs a license, can probably be replaced with free alternative)
  • CEF1 (open source, if the game were open sourced it wouldn't be an issue)
  • ICU (completely free afaik)

Then there's the Steam auth that the engine handles and would be tricky to keep in place with the engine being open sourced, packet encryption to counter cheating, and client <-> server communication during establishing connection phase which is designed to be hard to spoof.

IMO this isn't that hard to deal with. The licenses can be sorted out by either open sourcing (use open source license) or by replacing the library with a free one (FMOD/OpenAL for audio playback), video codecs can probably be replaced too.

The Steam auth issues are simple to resolve: you need to authenticate to connect to Steam's servers, so it's singleplayer only without that.

Anti-cheat measures are harder to deal with, i don't know about that.

It's not as if open sourcing it would cost them so much, you can get all game content with SteamCMD anyway, including client libraries. With Sven Co-op being completely free you can use their install to fill in the missing libraries and play games for free anyway.

@SamVanheer I think you should email Mike Dunkle because you seem to maybe able to reason with him.

I would if i had his email address. I checked Valve's site but it wasn't listed.

I sent him an email, hopefully i'll get a response.

I received a response:

Hello Sam,

Gold Source has not been touched for several years and in not in an easy form to make available to individuals or open source. This will not even be considered until there is an engineering team in Valve interested in doing the work and that is not going to happen anytime soon.

Kind regards,

Mike

Yeah that's what I kinda recieved but we don't need them cleaning up the code or anything.

I sent another email pointing out that the SC team did get access, because this argument makes no sense. If they're going to arbitrarily entrust people with access and deny others for reasons like this then they should just say that they don't want to do it.

I received a response:

Hello Sam,

A while back Valve a partner perforce server that had depots of the source files for both gold source and source that were shared with development partners and some mod teams. This server had a major meltdown and those depots were lost. At the time there was no requests and no activity around gold source development. Resources to rebuild the depots did not exist and still don't so that code is just not available. Once a year someone talks about maybe pulling it together to open source it but once again there are not resources to do the actual work need to package it up. The Sven Co-op team was luck in that there was a package and someone to make it available to them, that does not exist today.

Gold Source is a version of Quake and Quake is open source so maybe that is an option for you.

Kind regards,

Mike

Maybe they can let some team (like SC) who might have the original code release it to the public? Or just send them back so they can do it?

That's what i told him. I know for a fact that the SC team has the complete original source code for both the engine and Hammer.

Sure we could consider doing that but it would still require engineering and planning work to put it in a form that could be redistributed, basically the same work to pull the code together here. There are currently no resources for that type of work and no one really interested in doing it. Sure, your life would be a tiny bit better but we have no interest in licensing the code or supporting it going forward.

Someday it might become something we want to do but at the moment it is not on the list.

Mike

brb porting SI to unity or quake 1

They lost the source code. And no one wants to fix this.
M E R I T O C R A C Y
E
R
I
T
O
C
R
A
C
Y

Didn't think Valve could still surprise me. I was mistaken.

I guess the SC team themselves need to contact Valve about this question, since I don't think they'll do anything else otherwise.

They are legally obliged to give it to Valve (accoring to the NDA) so not really we just need to reason them somehow.

Or Valve can just legalize any third party GoldSource implementations, like ReHLDS, Xash3D or some private implementations built on top of hl2beta source code.

avcodec (some kind of mpeg codec, not sure if it needs a license, can probably be replaced with free alternative)

@SamVanheer you mean libavcodec/ffmpeg? It's a free.

What do you mean legalize? No one is stopping you from using them.

@YaLTeR

"You may, free of charge, download and use the SDK to develop a modified Valve game running on the Half-Life engine." from README.txt in this repo.

ReHLDS or Xash3D are not Half-Life Engine. Loading libraries built from HLSDK is forbidden for other engines than GoldSource.

And this just approves Valve's position about "GoldSRC clones".

We should do a thing where everyone interested emails every email from valve asking them to do something.

It'd probably just be considered spam and ignored. Valve is just not interested in something that doesn't get them money. So unless any of you have some pretty impressive amount to give them it won't happen.

Probably a better idea would be to try and found out who the person is that talks about open-sourcing it and point them at this thread.

There are currently no resources for that type of work and no one really interested in doing it.

If they were willing to speak numbers we could try to crowdfund open sourcing GoldSrc.
I have no idea how something like this would be coordinated or if they would even consider the idea but what I know is that with a nice video explaining how open sourcing the game could help everyone (imo mostly aimed at cstrike players) a lot of people would throw in a couple of bucks. I know a lot of people who would gladly pay for something like this but don't have the technical background to understand the implications. "It would allow the community to fix vulnerabilities and bugs as well as modernize the code (bringing hosting costs down) and removing limitations that are nonsense on today's machine specs" are 3 very solid reasons anyone can easily understand. MODs and such are a bit more niche.

The people who deeply care about these games are all 'of age' anyways so most have income and 10-20$ wouldn't be much for them, then there's hundreds of people like me who still pay to keep servers alive and generate revenue from the game, so paying whatever I pay for a month or a couple of months of hosting isn't a big deal.

Obviously Valve wouldn't make mad stacks out of this but I think the PR of working with the community to the extent of open sourcing a game is worth way more than the effort needed to do this. I also believe if the right person reads or considers this they would agree.

It might just be blissful ignorance but I really think there's enough people left to pull something like this together. Maybe I'm underestimating the costs. I can't do much more than help with ideas and throw in a couple of bucks.

As a newbie to the HL game engine, can someone explain what the HL SDK is, and why it would be illegal to use the SDK with a non GoldSrc engine?

Usually if you reverse engineer a game engine, you use the game's content/artwork and nothing else, which would then be 100% legal.

they still didn't add func_vehicle and you expect them to make goldsrc opensource lol

func_vehicle 2017

As a newbie to the HL game engine, can someone explain what the HL SDK is, and why it would be illegal to use the SDK with a non GoldSrc engine?

The code on this repo is the SDK. It plugs into the engine to add all the game mechanics (players, guns, monsters) using the rules from the engine (geometry, physics, networking, graphics, ... ).

The SDK is open source - it is provided so that modders can use it as a reference point for their projects.

The engine is not open source (it is closed source). Valve does not provide the code for the engine, so it is expected that mods built using the SDK are always run 'on top of' the engine provided by Valve. In essence, this is what you are buying when you purchase Half-Life on steam.

As a Half-Life mod developer, I can tell you this open/closed split has been a huge pain in the ass. I can't do what I want with my mod because of decisions people made 20 years ago (about which code is in the engine, and which code is in the SDK side). I can't fix really simple things in this game because they fall on the wrong side of the dividing line. Nobody seems to gain from this arrangement - if we could see the Half-Life sales numbers I have to assume they're not big enough to justify the level of silliness. It's even more of a tragedy that Valve can't keep track of their own source code (see Mike's perforce story) for the game that put them on the map.

Xash3d, for example, is an attempt to get around this. They "somehow" have code that very accurately mimics what the engine does (with e.g. @SamVanheer confirming identical bits given his prior access to the engine code while working on Sven Co-op). If their code was obtained through legal and honest means, you would have heard about them the way Sven Co-op, Cry of Fear and others have been discussed. Valve would acknowledge them in some way. If I had to guess, Valve would rather make money hand over fist with games like DOTA 2 than spend time suing a bunch of github hacks.. but that doesn't mean they wouldn't win such a case.

reHLDS is another example - when I said that buying Half-Life equates with buying the engine, that was half the story. The other half is that you also buy access to the _server_ code. When you join a Half-Life server, the program _hlds_ is running the server. It runs some of the mod code (which can be from the open source SDK), but _hlds_ itself is closed source (like the engine it uses). reHLDS has been reverse-engineered from a closed source (effectively _paid_ ) product. It boasts lots of improvements over _hlds_ , but I doubt Valve would come to anyone's defense if it created a problem for its users.

Usually if you reverse engineer a game engine, you use the game's content/artwork and nothing else, which would then be 100% legal.

The artwork is in a weird grey area that's separate from all this. Pick a texture, sound or model in Half-Life or any of its mods and trace it to its origin. You won't find a clean story along the way!

What's at stake here is the intellectual property contained in the engine. Which is funny because most of it was aped from better games with better open source.

Looks like Gabe Newell will be doing an AMA on Reddit's r/The_Gaben on January 17.

https://www.reddit.com/r/The_Gaben/comments/5o8fsy/gabe_l_newell_will_be_joining_us_tuesday_the_17th/

The artwork is in a weird grey area that's separate from all this. Pick a texture, sound or model in Half-Life or any of its mods and trace it to its origin. You won't find a clean story along the way!

Ironically SteamCMD lets you get all of the game content for free without even having a Steam account.

Looks like Gabe Newell will be doing an AMA on Reddit's r/The_Gaben on January 17.

Quite a coincidence, but i'm on the fence as to what this means. We should definitely ask him about this.

@johnstt @SamVanheer why you link Xash3DLinux? It's dead fork of Xash3D and very old. You and other people maybe should know that Xash3D is alive and growing fast. As Uncle Mike, main developer of Xash3D engine, publish code only in ZIP archives, I made a git-repository, which keeps latest release -- github.com/a1batross/Xash3D_original

There is an also a fork of Xash3D -- Xash3D FWGS. Crossplatform, some new features and bugfixes(and new bugs) are added -- github.com/FWGS/xash3d. Uncle Mike sometimes takes patches from fork into the original engine.

I think it's clear from my post why I linked it. I was explaining how it's one of the things that poisoned the well for the people developing actual Half-Life stuff.

Thanks for advertising here though. Really appreciate it. Just like all the +1s.

also lol at a community that publishes their code in zips

Looks like Gabe Newell will be doing an AMA on Reddit's r/The_Gaben on January 17.

So? It's not going to be about this. There are less than 50 people in the world who care about this, and only like 10 of us can write and think coherently. It will be a bunch of questions about MOBAs, microtranscations and behavioural psychology.

@johnstt why not? %)
GoldSource is a good for one developer or small team games. But working with it is hard, because many things are hardcoded into engine. Xash3D itself solves this problem. For example, Xash3D gives you a possibility to replace engine's implementation of physics, render, some server stuff. Example of replaced physics is available in XashXT(toolkit mod), it's uses PhysX. Paranoia 2 uses it's own custom render. Xash3D FWGS is also have it's own APIs. Mostly for mobile(Android, iOS) stuff, like vibration or touchscreen control and advanced gamepad support.

What's wrong with publishing code in archives? I don't think that it must be funny if developer don't want to show his VCS history.

The SDK is open source - it is provided so that modders can use it as a reference point for their projects.

The engine is not open source (it is closed source). Valve does not provide the code for the engine, so it is expected that mods built using the SDK are always run 'on top of' the engine provided by Valve. In essence, this is what you are buying when you purchase Half-Life on steam.

Thanks for the overview. They're not likely to change their minds, IMO. What about requesting the SDK to use a license that is more user-freedom centric? for example MIT or GPL, thereby allowing the SDK to be used on top of other HL engine clones. For example, if someone wanted to bring up the quake source code to work with the SDK.

I'm going to ask Gabe Newell about this when he starts his AMA in about 20 minutes, will update with a link when it's started. I hope he sees it and seriously considers what we're asking.

EDIT:
The AMA: https://www.reddit.com/r/The_Gaben/comments/5olhj4/hi_im_gabe_newell_ama/?st=iy24n5jh&sh=12c79039

My question regarding open sourcing: https://www.reddit.com/r/The_Gaben/comments/5olhj4/hi_im_gabe_newell_ama/dck75pk/?context=3&st=iy24rsne&sh=17c7f2c5

What about requesting the SDK to use a license that is more user-freedom centric? for example MIT or GPL, thereby allowing the SDK to be used on top of other HL engine clones.

Then you're leaning harder on the people who reverse-engineered Valve's code and share their changes in zip files. It's better to work with people who know what they're doing and have good intentions (not the people trying to carry out a power grab on the Half-Life modding community).

Not only that, but Valve would be fools to allow this. It sets a really weird precedent (that they would sooner allow some Russian warez kids to supply my hl.exe than open source it themselves).

For example, if someone wanted to bring up the quake source code to work with the SDK.

This isn't really a realistic goal, given how the Half-Life code has been written. It would be easier to rewrite the SDK bits you want from scratch with the appropriate engine hooks for Quake or whatever else. Not that this would be _easy_ either.

There are tons of examples where the Half-Life codebase even fails to properly steal from Quake. Here's one I wasted time figuring out. This is an example of code that has probably been wrong since 1997, but nobody noticed because there are no Half-Life mods where people expect good rocket hitreg like in Quake. The HLDM rocket launcher is a joke, and all the popular mods were slow hitscan bullshit like DoD and CS, so this never came up.

This would basically mean going backwards. As an example, think of TFC. It was made because Valve supported the people who had already made Quake TF. It would seem crazy to go and reimplement TFC on the Quake engine now just to get around the bad state Half-Life is in, right?

Xash3D itself solves this problem.

While introducing bigger problems (like how it's extremely shady).

What's wrong with publishing code in archives? I don't think that it must be funny if developer don't want to show his VCS history.

It's funny, shameful and a huge tell all at the same time.

I've implemented an FMOD Studio based CD Audio player: https://github.com/SamVanheer/CDAudioPlayer

This should completely replace the engine's Miles based audio player.
One fewer dependency, and one fewer excuse.

EDIT: Because the Windows version uses either DirectSound or Waveform, and the Linux version uses SDL Audio. Neither use Miles for anything other than MP3 playback, hence the dependency is no longer needed.

From one proprietary software to another proprietary software.

20 янв. 2017 г. 0:59 пользователь "Sam" notifications@github.com написал:

I've implemented an FMOD Studio based CD Audio player:
https://github.com/SamVanheer/CDAudioPlayer

This should completely replace the engine's Miles based audio player.
One fewer dependency, and one fewer excuse.


You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/ValveSoftware/halflife/issues/1712#issuecomment-273912123,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ADEJgYfAhkbLcWz_3tl-hc6bEAXYTt8Mks5rT9zagaJpZM4I74q2
.

Miles doesn't have a free license for open source projects, FMOD does. Unless you want to pay $4000 for every mod that uses the engine.

EDIT: i sent a mail to Valve, i also pointed out that they can just disable the MP3 player if they can't work around the licensing issues. We have an FMOD version now, albeit a C++11 one. Modders can just integrate it themselves after the engine is open source.

Miles doesn't have a free license for open source projects, FMOD does. Unless you want to pay $4000 for every mod that uses the engine.

FMOD isn't open source...

All commercial use of FMOD requires a Commercial License (even with free Indie license). contact Sales for more information. (quoted from their wensite)

Open source means you can use it for commercial purpose. So switching from MILES to FMOD isn't a viable solution.

I didn't say FMOD was open source, i said it's free for open source projects, specifically non-commercial projects.

Excludes any Commercial Use specified under the terms of a Commercial License, FMOD may be used free of charge.
FMOD is free for use by teachers and students in both public and private education institutions.
Non Commercial use requires attribution in the form of a Credit Line.
Non Commercial use is subject to the terms of the EULA included with FMOD download package.

It may not apply to the engine as it would be released by Valve given it's currently still being sold, but once open sourced modders should be able to add an FMOD based version without having to pay for a license. Hence why i suggested simply disabling that so it can be replaced later on.

a free license for open source projects, FMOD does.

So you mean free as in freeware in that sentence. If so, that sentence doesn't make sense at all. If you use FMOD you aren't an open source project anymore.

Anyways, i'm not judging your choice. I just think it's a waste of time to implement an other proprietary software when we try to have a full open source engine from Valve

I picked FMOD because i've worked with it before, but you can substitute it for any other audio library that provides mp3 playback. They provide a license that lets you use it for free, that's all.

The hardest part about writing that implementation was making sure it covered the existing API used by the engine, so replacing that with say SDL isn't hard. As i told them, the existing implementation can just be disabled and dealt with later. You can pick whichever one you want.

@dannycolin89 So according to you, if I make an engine/game that uses FMOD (or Unity or PhysX), I wouldn't be allowed to open source it ?

@JoelTroch That's not what I said. I didn't say you wouldn't be able to release your source code under a free and open source licence. But, you wouldn't be able to distribute the entire engine (with FMOD in it) under a FOSS licence. That means that you will force your users to use a proprietary software if they want to run your game and that's against the Free Software ideology.

Anyways, in his last reply @SamVanheer mention that :

As i told them, the existing implementation can just be disabled and dealt with later. You can pick whichever one you want.

I think that's a better solution.

@dannycolin89 If you wish Gold Source to be under a FOSS licence, you would have to rewrite huge parts of the engine (like Steam and VGUI).

If you wish Gold Source to be under a FOSS licence, you would have to rewrite huge parts of the engine (like Steam and VGUI).

@JoelTroch I just wish that we don't do the same mistake twice by forcing people to use an other software with a restrictive licence. I know that using the HL engine isn't perfect but we don't need to make it worst than it is already.

@dannycolin89 I see your concern, we should be fine licensing wise with FMOD. If that's an issue, we can switch to something else more appropriate like @Solokiller mentionned.

After a quick search, I've found a candidate if that really happen: SDL_mixer. It's an "addon" to SDL2 (Gold Source is using it) and they've added MP3 support (so no need to decode the MP3 data ourselves).

I got a reply, they only acknowledged the exploit i reported, nothing else. I have no idea what they're going to do.

what was the question?

The only thing I didn't like about doom source ports is that they used FMOD for so many years, until recently it could finally be fully Free software when they replaced it with OpenAL. Id nay to the FMOD, but I'm not developing it.

Is the point of this to be free as in beard, or to fix bullshit in the engine?
Not like it matters either way, but it would be good to get some priorities in order.

what was the question?

I asked several things. First i asked if there was any way to get the engine open sourced by proposing several ways to handle the removal of licensed code (disabling the MP3 player if its licensing issues could not be resolved).
I proposed letting me handle those issues, i provided the contract that i signed for SC just in case that would help. Failing that, providing a list of issues so we could reverse engineer it and provide the solutions that way, or providing the list to the SC team and letting them do it.
I also proposed open sourcing the actual games.

I also pointed out that you can reverse engineer the entire engine and every game using the debug info that they added, meaning that combined with the exploit that i told them about they pretty much open sourced their games already.

I pointed them to this discussion, pointed out that the Source SDK is also a mess, paraphrased Shattered Heart Lynx's comment from the AlliedModders forums about telling us to switch engines being a middle finger, stressed that i'm trying to help people, not mess things up.

I also told them that tying our hands behind our backs and expecting us to deal with it is unacceptable, and that i hoped they would reconsider their approach to the engine.

Basically i didn't beat around the bush and just said what needed to be said. I also thanked them in advance for any efforts they may choose to make to help us, but that i expect only silence on this matter. Seems that that's going to be the case once again.

I really don't get this. Without mod support Valve wouldn't be nearly as popular or large as they are today. Their cash cow franchises all came from mods: TFC (made to show how easily you can make mods), CS, DoD, Dota 2 (based on a mod for another game, but still).

Without mod support they wouldn't be anywhere close to where they are now, and yet they choose to abandon modders. Even if their plan is to make Source² a better modding platform, it shouldn't come at the cost of GoldSource and Source mods. There's no telling how long it'll take before Source² is in a state where it can even be modded to the same extent as these engines, or if that will ever actually be the case.

I'm afraid that without attaching serious consequences to not helping us, they won't do anything to help.

Is the point of this to be free as in beard, or to fix bullshit in the engine?
Not like it matters either way, but it would be good to get some priorities in order.

I'd start with getting the engine open sourced since fixing problems is easy after that, but i'm ok with doing it the other way around if that gets it to a point where it can be open sourced.

;_;7 godspeed, prince of source code, hero of modders across the land

somebody should port sven co-op to quake, and along the way they can realize how much more interesting every other mod is

what a joke

I don't get what the plan is. Why wouldn't everyone just continue ignoring this and not caring?

We need something official. Not just some side project. I, personally, mainly mod CS & CZ. If open-sourcing the engine won't result in some updates for those games and HLDS then I don't see the point.

Yeah i know it needs to be official, i was just hoping that they'd work with Valve to make this happen. Too bad...

I think getting the engine open sourced would go a long way to open sourcing the rest of their GoldSource stuff.

CS is such a basic game that you could write the whole mod from scratch in like a day. It doesn't even have real bugs or technical limitations unless you're obsessed with bunnyhopping in games that aren't Quake.

@johnstt ever heard of the 512 precache limit?

Did the Cry of Fear team get the engine? Maybe they'd be interested in helping?

They did iirc, i don't know if anybody has asked though.

The CoF team did such a great job with the visuals.
Their world flashlight effect for example exceeds any of Valve's.
Would be awesome if they could help.

Anyway, I think one more reason why Valve doesn't want to share the GoldSrc code is because of their contract with Nexon(Counter-Strike Online & Counter-Strike Nexon: Zombies).

ever heard of the 512 precache limit?

yeah, it doesn't affect anything in the official version of cs does it?

there are official SI maps older than github that I can't play in the new builds of SI because of the precache limit, so I'm definitely familiar with it :)

Anyway, I think one more reason why Valve doesn't want to share the GoldSrc code is because of their contract with Nexon

Korean ripoff games are definitely a high priority these days

@tschumann Yes, Team Psyskallar did get their hands on the engine. Cry of Fear uses it's own version of Gold Source pre-SteamPipe update. Are they going to help? I don't know, they have finished with CoF for years, I can still try to send a PM to Minuit and rumpel but I'll think they'll tell me "NDA" or "ask Valve".

@di57inct Cry of Fear uses the renderer (and it's hacked "opengl32.dll") from PARANOIA, a popular russian mod based on Spirit of Half-Life, that's why the flashlight and phone lights are better and why you can see normal maps on the textures.

Also just because Valve has given the whole Gold Source engine to Gearbox (Blue Shift/Opposing Force/007: Nightfire), Sven Co-op, Team Psyskallar (Cry of Fear), Rewolf Entertainment (Gunman Chronicles) and Nexon (Counter-Strike: Online, Counter-Strike: Nexon Zombies) doesn't mean that they can't open source it to anyone.

If the Cry of Fear people are still into GoldSource modding it's probably worth asking.
Didn't think of the Nexon games, but as has been said before, the engine's internal workings seem to be something of an open secret anyway.

@JoelTroch don't forget about cheaters.

Opensourcing GoldSource just gives new way of cheating. VAC itself is a really dumb anti-cheat system(on Linux/Mac systems it's even don't work, lol). It will break everything, starting from CS1.6, which is forgotten by Valve, to f2p Nexon games and SvenCoop.

Engine just don't have any mechanisms to check replaced hw.dll/sw.dll libraries.

@a1batross You are right, but I think there are solutions to counter that problem.

@a1batross Security through obscurity never works. Especially when the only thing obscuring the code is that you need a (readily available) tool to reverse engineer the code.

@JoelTroch any solution is not applicable when developer just don't want to do anything.

@SamVanheer I agree. But Valve think differently. Maybe because, as I said above, they don't want to change anything in working(as they think) system.

it's almost like the open sourced version of the engine could be updated to include cheat detection that works, written by people capable of more than developing cs zombie mods and maps with a shitload of entities in them

wow #woah

@johnstt
Developing CS zombie mod? Is this a form of brain disease?

Another reason to provide access: http://twhl.info/forums.php?thread=19225&page=last

We need to be able to fix these issues.

We need to fix these bugs from GOLDSRC games like cs 1.6 perform bad.. like not smooth! :/

https://github.com/ValveSoftware/halflife/issues/387

@SamVanheer Valve just don't give a fuck man. Support for this is probaly huge if some of the big YouTubers made it but it just wont happen. Valve made those errors on porpouse so players could't switch to CS:GO!

I didn't realize they were planning to make CS:GO back in 1998.

Just switch to Xash3D.

No jokes here, I'm serious. Xash3D develops amazingly fast, both by Uncle Mike and FWGS.

Xash3D itself is written really better than GoldSource.
Last year I worked on restoring some features from GS to Xash3D, like client-side weapon prediction, player interpolation, sound DSP and many undocumented things in client interface. And what I want to say: GoldSource is a complete mess now. Bunch of global variables, mess from C and C++ code, strange magic integers EVERYWHERE, complete absence of any architecture. It's very hard to work with it, because it's ugly.

If you still want it, better ask Valve about opensourcing WON version of Half-Life Engine.

But I think, it would be better if Valve "accepts" Xash3D as alternative Half-Life Engine, so it will be more legal in terms of HLSDK license. If it requires removing some code from the engine, I will work hard on removing and rewriting it from scratch.

But I think, it would be better if Valve "accepts" Xash3D as alternative Half-Life Engine, so it will be more legal in terms of HLSDK license.

Yes, they would need to accept it to make it 'more legal'. Because right now it's not very legal at all.

Pick another place to do self-promotion, maybe?

Something that I don't understand is that we were told that "Quake was an option" and Xash is just Quake with HL compatibility stuff. But Xash itself is considered "illegal" by Valve (see HL Update mod on Steam Greenlight story).

Also, how Xash would replace Steam in terms of networking (servers, Steam ID...) ?

Also, how Xash would replace Steam in terms of networking (servers, Steam ID...) ?

The Steam API is publicly open and developers can use it to integrate Steam into their applications, including Steam authentication.

@rsKliPPy Wouldn't that require a Steam AppID issued by Valve ?

Not sure how the system actually works, but generally yes - if Valve doesn't like Xash then I am afraid we can't have Steam in it.

@johnstt Whoa, make yourself a cup of green tea. It'll calm you down.

I'm just suggesting an option. When you're saying "not legal at all", don't forget that another countries are exist, where it's can be considered as legal.

The funny thing is that everyone looks to the Xash3D source code to fix their bugs in mods. (Reminder for boring people: this is not "self-promotion", because I'm not talking about the fork.) And what they do after? They are scared of somethimg, which I don't understand. Steam is not the only place for your Not Borinng As Hell Super Half-Life mod. If Valve want to see new advanced mods, they need to accept Xash as alternative Half-Life Engine. If they don't want to do it... so... why we should care about Vavle, who don't care about the developers and players? (Yet another reminder for really boring people: I'm not self-promoting, as I don't talk about the fork, and I'm just suggesting an option).

Funny, in one sentence you say Valve needs to, and in another that you're just suggesting an option. We just want opensource engine and not some better alternative, do you get it? Nexon made some wonders with this engine, and I would like to see some in HL too.

@rsKliPPy @JoelTroch You can run your own engine under vanilla GoldSource to obtain Steamworks access permission.

Xash3D is illegal in part because it uses illegally obtained code from the Source engine leak if i'm not mistaken. We need to convince Valve to open source the engine or make reverse engineering legal, not enabling the use of stolen code.

EDIT: i've sent out another email asking to open source the engine, will report back what i get.

What improvements have Nexon made?

Well, they definitely pushed limits, some maps cant be used in 1.6 due to model limit. A lot of interesting weps and advanced functions in HUD (second camera etc.), simply something I've never seen in HL or CS

This might be a dumb idea, or a bad one, but as a community member, I cannot really suggest anything better.

Perhaps a petition or some kind of community event gathering people in favor of GoldSrc turning open-source would help?

@s0r00t This is the purpose of this issue.

Oh yeah. My bad. But is that enough to manifest interest to Valve?

+1 I hope it will be reality

+1, I'm waiting for this

1+

The SvenCoop team has engine access now.
I'm surprised Valve gave in and let them do it. Obviously somebody there has some interest if they set that up for them.

But I still don't see it ever becoming a thing for the general community. Valve isn't into the modding community like in their early days.

I also kinda assume it's a security issue doing so, wouldn't they have to strip out how they authenticate alot of stuff? And it'd make GoldSrc hacks even worse..

They got the engine 4 years ago, and the stuff they got isn't available anymore.

Security wise the authentication code can be accessed by mods already, and you can override the engine's Steamworks code as well if you want. Whatever security issues there may be, they can be bypassed.

By the way, i've been rebuilding the engine: https://github.com/SamVanheer/GoldSourceRebuild
I got tired of waiting.

They got the engine 4 years ago, and the stuff they got isn't available anymore.

Security wise the authentication code can be accessed by mods already, and you can override the engine's Steamworks code as well if you want. Whatever security issues there may be, they can be bypassed.

By the way, i've been rebuilding the engine: https://github.com/SamVanheer/GoldSourceRebuild
I got tired of waiting.

This works?

It's nowhere near complete but parts of it are working.

It's a third complete GS(not HLDS) implementation(except GS itself) I seen.
The two other are working, but this just makes me smile.

Sorry for being rude.

15 июня 2017 г. 14:38 пользователь "Sam" notifications@github.com написал:

It's nowhere near complete but parts of it are working.


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/ValveSoftware/halflife/issues/1712#issuecomment-308706053,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ADEJgdDbGk4EjZ27Ja9FB3WOYKeaa1jUks5sERekgaJpZM4I74q2
.

It's nowhere near complete but parts of it are working.

I can help you with software renderer, if needed.

why not port to c# would be easyer ?

monogame engine cross platform easy to program.
Dudes c# is easy lang. if u know c or c++ u dont need to learn anything.
Now people uses Xamarin, and so on NET framework now can be used in cross-platform, and u dont need to change anything.

Rebuilding the engine is hard enough without also having to port it to another language at the same time.

@peon501 : why not port to c# would be easyer ?

I don't think C# would be easier if you want to rebuild a cross-platform engine...

maybe you should use ruby then

PHP is clearly the best language for this project.

Any esotheric language is best choice. Maybe it will also explain Valve's
logic.

I sent a mail to Mike Dunkle saying that i was rebuilding the engine, got this as a reply:

Hello Sam, 

Valve isn't able to offer the GoldSrc source code to the public under open source or other licenses.  We aren't going to give you permission to do this project. 

You are violating the Steam Subscriber Agreement by reverse engineering the code.  You are also violating rights of Id Software and other licensors that are embodied in GoldSrc.  

Please confirm back to me in email that you have removed the reverse engineered code from GitHub, and have ceased reverse engineering the code.

-Mike

I'm going to try to convince them not to shut it down, but you know how this goes.

Well. Thanks, Sam. You've fucked up also some other projects, not only your never be completed and useless engine.

Do it anyway Sam. As long as they don't care about it and we do I don't see why not. Fuck those incompetent and greedy bastards.

@a1batross They are talking about Sam's project (not Xash)

@a1batross Yeah how dare he tries to come up with a legal OpenSource alternative actually authorized by Valve that will do wonders to the modding community. Literally Hitler.

@JoelTroch I'm about ReHLDS(and related) too.

@LucesEnBabel It's quite naive, anyway.

you guys know you're saying all this on Valve's github page right?

@johnstt Saying this here or anywhere else wouldn't make a difference.

if they kill reHLDS the game will officially be dead
it's the best thing to happen to this game since the great redirect purge

https://youtu.be/SRyUpR4qOxU?t=16m30s Embracing User Generated Content (Steam Dev Days 2014)
See around 16:30, when the guy starts talking about reverse engineering and how it can be a good thing

Dear Valve,

Can you please embrace GoldSource engine improvements and enhancements? Many of us old mod players are not very interested in new games or game engines. I appreciate GoldSource for the low hardware requirements to play the game, and also the large amount of mods content that has been developed over the years. I could choose to play and develop for Source engine or another game engine, but I would rather play and develop for GoldSource Engine! I have invested enough time into the GoldSource engine with mod development that I would rather not have to learn a new system, and I probably won't be able to invest that time in learning a different game engine anyways. Learning GoldSource engine functionality is hard as it is, because there is a lot of lacking documentation. Much of this information was lost when GameSpy and PlanetHalfLife went down years ago. Mod developers have to dig through archives and web pages like http://www.sourcemodding.com, and sometimes even resort to methods like reverse engineering just to figure out how the GoldSource engine works. The lacking documentation issue for GoldSource alone is pretty frustrating and discouraging in itself.

The GoldSource engine is what made Valve great in the first place, so why not embrace (rather than neglect) this cause, Valve? There could be an entirely separate project for creating something based on the content of GoldSource if Valve really wanted. An alternative engine variation could be a branch of the original GoldSource engine while the original branch could be left intact as it is. The Sven Co-op Engine variation of GoldSource is not an optional alternative, and unfortunately even if it was optional it is still no where near as stable as the original GoldSource engine. I know you don't have to validate your reasoning, Valve, but please do understand that many of us prefer the GoldSource engine over all other game engines, and quite a few of us are people who played or developed on Sierra WON.net before Steam. I, myself, have played Half-Life and 3rd party mods since 2000, and I am still here. Valve really does not have an older or more dedicated community than the Half-Life 1 mod community, considering that it was this game engine which propelled Valve into what it has become today. Quite a few of us still really want to work on GoldSource modding (not modding on other game engines). All I personally really want is to be able to play and develop for the 3rd party mods and not so much the official Valve mods.

Thank you, Valve, for at least supporting this community as much as you have so far. It could be worse, but it could also be better in some ways.

An idea of mine: Maybe Valve could do some special "20th anniversary" thing for Half-Life 1/GoldSource, seeing as it was released in 1998. This could possibly "revive" interest in GoldSource, and there seems to be enough time to try to make something happen. It would be pretty neat to see anything related to celebrating the 20th Anniversary of Half-Life 1.

"Why not embrace it?" Because Valve is a for-profit company!

Somebody at Valve would need to use paid working hours to do any of what we're suggesting, and the return on that (in their view) is basically guaranteed to be zero. You could point out how all their IP came from modders, or how many people entered the industry by hacking on Quake 3 or whatever... but in the time they would spend reading that, they could have made more money hand over fist through Steam/DOTA/whatever.

The fact that they've been so resistive about open sourcing a 20 year old game tells you everything you need to know. No amount of posting conference talks or 'open source rhetoric' is going to change it. The best thing is to take whatever game idea you have, and go implement it in a newer engine that doesn't live and die by unbelievably amateur code like #define entity_limit 512 .

@johnstt : Because Valve is a for-profit company!

How do you explain that Id Software has open sourced their old game engines then?

That's easy - they were nicer and more helpful to modders than "Valve circa 2017".

On the other hand, id basically doesn't exist anymore and the new Quake/Doom games are a total sham.
The guy responsible for the majority of the work on the open-sourced games (including open sourcing their code) works for Facebook now. Not sure what to make of that except that the games industry has moved on from stuff like this.

How many people here actually maintain a Half-Life mod and honestly know just how little interest there is in this game?

Also, it's really funny if you read this thread from the top down. I used to think this idea was worth pursuing too, Sam didn't want to reverse engineer the engine, etc..

With the right kind of reasoning, Valve may choose to consider some of our ideas. Perhaps we could spend time trying to give Valve some incentive ideas that could allow them to continue making a profit while also trying to support our ideas (i.e. Steam Worskhop and DLC). Being openly rude and negative towards Valve will likely go nowhere. I do maintain a Half-Life mod and am aware of how little interest there is in the game. This is all the more reason for me to try to reason with Valve, so my own efforts might be more worthwhile. No offense, @johnstt , but your comments make it seem like you are more interested in this idea dying out rather than actually going somewhere. I do comprehend the amount of frustration and sympathize with the efforts made to continue supporting this game engine. I think there might be some persuading we can do with Valve regarding the 20th Anniversary of Half-Life, as it could increase the player base once again as well as possibly increase Valve's profits even further. The outlook does seem grim for the future of the GoldSource engine, but with some positive discourse it _could_ improve (even if just slightly).

Sam why u killed your github project GoldSourceRebuild ??

I fought the law and the law won.

Do it anyway. They don't care enough to do something about it.

I'd rather not find out.

Again, do you guys realize you're on the Valve github page? Unless you really want to see Sam lose in the world's shortest court case, I don't get the motivation here.

How is poking Valve over and over going to help any of us?

Fuck Valve. All their games are broken and they don't give a shit about it or about the clients and community. All they care about is making money.
As for GoldSource it's the worst. Currently there are methods to hack the client even in the Steam version. Non-Steam versions of the games usually have better protection and the community does a better job with everything than Valve.
HLDS is full of security issues too and they don't give a shit about that either.
And when the community offers to help keep it alive they just throw it away like they usually do.
They probably purposely want it to die so that everyone will move onto CSGO and Dota2(which are both broken af) and feed them through buying skins. I'm sick of them and their greedy and incompetent asses.

Let's be honest, and try to look into the future.

The interest in the engine has grown since the day Valve stopped supporting it. This has mostly been done in the underground scene, behind Valve's back. It shows no decline but rather an increase in activity. This thread tries to communicate with Valve in a sane way, and we seem to fail miserably.

I don't think the community will ever cease to reverse the engine, the only thing that happens when Valve threatening taking people to court is that the reversing happens in underground places instead. This is bad for a lot of other modders too. Doing reverse engineering​ on the underground scene becomes easier for every day as the internet grows more and more anonymised. This is the only way the future points to.

Let's see if they want to throw time and money away trying to protect an unsupported game or if they want to be sane to themselves ​and the community and do the only right thing and stop threatening​ taking people to court.

I think the best thing for everyone is if Valve makes a public statement that they won't make any protection of any of their IP of GoldSource in any court and that Id Software also makes the same thing.

This isn't their biggest cash cow anymore, and one day it will become nothing but an expense for Valve. This day will come, it is undeniable, in which way and shape it comes is up to Valve. We are maybe just too early with this thread.

Good luck Valve, we believe in you.

@di57inct Fuck Valve. All their games are broken and they don't give a shit about it or about the clients and community. All they care about is making money.

Welcome to Capitalism City XD !

Valve updated the beta branch today, and updated it again to include the fix for this: https://github.com/ValveSoftware/halflife/issues/1815

They're working on something.

Hello my dear Sam, you are really good coder. I am sorry for miss understanding because i have readden facepunch with your ex team. That i don't know that. I am shy because i thought you are liar. My insult is not for you. My dear! Oh why Valve forces your law. I really miss GoldSourceBuild because I want translate to C# because net or mono has not problem to use any os. I imagine that If I write whole C# from HL Sdk with engine and hl-launch. Than with Mono or Unity whole maps convert to C# like many souls and textures are assigned like real mappings

Like example unity generates cube from C# youtube

That is truth. I will work and release PowerHammer and it will generate to Unity support. You know Unreal Engine already use with HammUEr. I find sad for Unity. That is why we would like to develop together with Unity and can release and Valve Software will be surprised to us. Because Valve strikes to their why i cannot understand why Valve Software disallows that is very trolling. I saw any forums are like died example SC Forum ( 70 % ) and Twhl ( magbe died 10 % ) or Snarkpit ( 80 % ) and other ....
Thanks

So, when they repeatedly tell you to just go use Quake... is that implicit permission to take all their maps, models, textures, voice clips, gamecode, etc and port and redistribute them, in a way that Valve has no control over? If their solution for Half-Life mods is to use some other engine, it'd have to be, wouldn't it?

So they're giving up the one part we don't want them to to avoid giving up the part we actually want... ironic.

@keiyakins : So, when they repeatedly tell you to just go use Quake... is that implicit permission to take all their maps, models, textures, voice clips, gamecode, etc and port and redistribute them, in a way that Valve has no control over?

There's no such thing as implicit permission. You can't reuse copyrighted stuff without an explicit permission... You just learn a lesson in why you shouldn't use copyrighted stuff from other people/company. Sorry for you.

@keiyakins : If their solution for Half-Life mods is to use some other engine, it'd have to be, wouldn't it?

I strongly recommand you to port your game to an other engine like ioquake3. It's, graphically speaking, look and feel almost like HL and it's free and open source so you don't have to worry about dumb company who keep their engine closed source even 20 years after it's initial release.

"Just go and use Quake, that's what we did in 1997 before it was open sourced" - smart advice from dedicated professionals

They didn't lose the sources, it was just haphazardly put together. The design of the various interfaces shows this.

Anybody that isn't Valve or the Sven Co-op team is not allowed to make such an engine, that's illegal. You may be sued for that if you do so.

That's still illegal. Anything that loads GoldSource files (bsp, mdl, spr, etc) or can support mods is illegal.
There is no version of this where this is possible, i know because i've tried everything, and they've said no every time.

Quake can't load mdl files and only happens to be able to load some of the other files. That doesn't make it legal. Even if that were legal it'd still be illegal as soon as you loaded in assets from Half-Life.

Basically if you make an engine that lets you load Half-Life mods or games, it's illegal. No matter how you twist it or turn it.

I'm no expert on copyright but that sounds like it could still be illegal. I think you're better off using another engine or making your own instead of continuing to work with this one, because you're never going to get permission to do something like this anyway.

I know it sucks to hear that, but i've tried everything i can think of and Valve does not allow it at all. At this time they have no intention of supporting GoldSource modders, directly or indirectly, unless you find a critical issue that needs fixing (exploits, crashing clients/servers remotely, etc).

Forget about FreemanValve, they don't care a lot until you don't annoy them(like someone did) or don't trying to sell their code.

That's why ReHLDS and Xash3D still lives.

It isn't about what the employees want to do, this is a legal issue. The engine is their property, reproducing it is a violation of their trademark. It also contains licensed code and third party dependencies, including Steamworks whose license forbids its inclusion in open source projects.

It would cost them money to open source it, license it or allow you to make your own version, so it won't be allowed to happen. If you're lucky they won't shut you down, but that is a risk that you will choose to make. I won't tell you to do so, and i won't do it myself either.

Does anyone else find it funny that you guys are discussing all this on Valve's github page ?

If you're really curious, go read some of the law related to computer crimes. Especially in the US, some of it is so broad and vague that just sneezing near a computer can get you jail time. Reimplementing a closed-source commercial product that's still being sold on the world's most popular game marketplace is a bit different, I'd wager..

@johnstt Does anyone else find it funny that you guys are discussing all this on Valve's github page ?

Yep. People still amaze me...

You don't understand what you're doing. It's still illegal to do this even if you're not using SDK or reverse engineered code.

Plus, you don't know where the GSR code came from. VGUI2 is not a wrapper around VGUI1, it's an entirely different GUI system. It's largely reverse engineered so it's not legal to use.

Xash has questionable status as well, some parts may be derived from leaked code, we don't know that for sure but it seems likely. Valve considers it to be illegal.

If you don't want to do anything illegal then you have to stop working on this now and remove the repositories containing the code.

In any case, you should stop discussing it here. We've established that this will not happen and trying to do it ourselves is illegal, so Valve is well within its rights to lock this discussion. If you continue to discuss it i'll have to lock this issue myself.
I'd rather leave it open in case any meaningful discussion ever takes place however.

I think, count of word "illegal" here will soon overflow a 32-bit integer.

Meanwhile, reverse engineering is allowed in some countries. US problems is
only US problems. :)

That's still illegal.

The main thing is that he revealed his motive: he needs 'helpers' because there's an absolute deadline on this wacky half life github project.

If you're convinced this is all legal, go ask Valve's legal department to stamp it.

'helpers' because there's an absolute deadline

Unpaid Internship: Patsy

Why do you not develop Openfl/Lime or C# with Half-Life? Because generator can from source into more end of binary like static and all platforms

OpenFL / Lime has many platforms like Windows, Linux, MacOS, Android, iOS and more more.

Why not we wait longer longer until we have gray hairs. Stop I will kick your butts. If you love Half-Life than you can try to create Haxe OpenFL/Lime or NME etc... It has OpenGL ES3 It works all platforms.

Please wake up VALVE SOFTWARE! Please check good platform generators like Haxe or Mono

Haxe:
OpenFL/Lime or NME generates to all platforms COMPLETED.

Mono:
Bundled and protect executable into native executable
MonoDroid / Xamarin.Android for Android
Xamarin.iOS for iOS Tablets and Phones
Xamarin.Watch for WatchTV
and more ...

Please supervise that!

I argue time because I feel they don't know and force time until very late.

If they won't develop than I will create own or I learn more advanced development.....

We already know they'll say no, i suggest you act accordingly.

Let's do a thinking exercise for a moment.

  • Imagine you're Alfred.
  • You have a day job, and work to do at Valve
  • Some person on github asks you to review their entire repo, and it seems to be a legal matter
  • You have no incentive to help them reimplement your game that your company makes money from selling
  • You have a legal team you can forward these things to in less time than it takes to reply on the github thread

What happens next?

It also contains licensed code and third party dependencies, including Steamworks whose license forbids its inclusion in open source projects.

I know this doesn't matter for this discussion because there are other legal matters in question, but are you sure that's true? If my understanding of the SDK Access Agreement is right, you are not allowed to distribute the source code, but you are free to use it wherever you want (be it open source software or anything else). Your open-source software doesn't have to have SteamWorks SDK code in the source tree.

I suggest some another way of thinking:

  • Imagine some guys periodically asks you about legality, when you intentionally released non-
    encrypted
    DLLs on Windows and Linux builds with full debuginfo.

As I said before: While you doing it just for fun, no one cares a lot, unless you everytime distract some busy people from Valve.

Let's think why GoldSource is great? It's great because it's easy for indie developer to create high-quality game. Why there is no good Source-based indie games? Because it's too complex.

If you want to create a game, you maybe don't need GoldSource at all. You need it's game development flow, where you can create quality game by yourself or really small team. Unkle Mike already tried to make an engine with "Goldsource-like" game development flow, but without GS compability. And he went to situation, where he have a game engine without a game itself. That's why he made partial GS compability. [fat-joke]When some current GoldSourceRebuild-ers just born[/fat-joke]

P. S. While you all here discuss about legality, some people already completely reverse-engineered GoldSource from debuginfo and NetQuake source. I will not post who are these people, because they have GitHub accounts and they will post their project by themselves, when it will be ready enough.

https://partner.steamgames.com/doc/sdk/uploading/distributing_opensource

It doesn't explicitly cover open source applications that don't have a license, but i would assume that any open source applications cannot contain such code. Maybe i'm wrong about this, but i'd rather be wrong than to get sued.

Making your own copy of GoldSource with Steamworks code in it to authenticate could be used to bypass anti-cheat measures, though i would consider mods accessing Steamworks APIs to be legal since Source mods do just that.

@SamVanheer Warsow is opensource game and it's is intended to have SteamWorks support in Steam release. It's game engine QFusion have some highlights of SteamWorks support(link).

Warsow isn't released on Steam yet, because they don't have developers for Steam release. It's sad.

The Steamworks SDK is incompatible with some open source licenses, which may affect your ability to distribute open source software via Steam.

The key word here is "some". That's because some open-source licenses forbid you from linking to a closed-source object. As far as I know you are allowed to add exceptions to GPL-3.0 that would allow your work and derivatives of your work to link to specific closed-source software. That's what AMXX and SourceMod do. However there are other licenses that would allow you to do it with no additional exceptions, I believe LGPL is one of them.

Btw I'm honestly just interested in what actually is allowed and I'm open to discussion, not trying to be a jerk or correct someone as I myself don't precisely know the entirety of this.

  • GPL allows you to link FROM free software TO proprietary, but not otherwise. Like from free & open game to steamworks. Complete solution here is to allow recompile game with or without SteamWorks SDK and allow to use it on Steam release, thus allowing cheats too, lol. :)
  • LGPL itself omits this restriction.
  • AGPL forbids everything than free & open source.
  • BSD-like... it doesn't have such restrictions at all.

@BlackPhrase THANK YOU FOR SHARING FILES. I miss that - Why Valve Software forces me longer time wow. Thanks I will use with Stream I will replace to Haxe or C# I will tell how do I protect again bad hackers.

As has been said before you should not discuss this here, this is Valve's issue tracker and what you're doing is not permitted by Valve. We've tried long and hard enough, it isn't going to happen.

I'm closing this issue now, and i hope you will not discuss this any further on any of Valve's issue trackers.

@BlackPhrase congrats...

@BlackPhrase do me a favour: go up to the top of this issue and read the first few posts.
Do you see the difference?

Thanks for ruining this thread! (although it was already a waste of time to begin with, I suppose)

Good night, trolling thread.

26 февр. 2018 г. 8:10 ПП пользователь "aaaaaaaaa" notifications@github.com
написал:

@BlackPhrase https://github.com/blackphrase do me a favour: go up to
the top of this issue and read the first few points.
Do you see the difference?

Thanks for ruining this thread! (although it was already a waste of time
to begin with, I suppose)


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/ValveSoftware/halflife/issues/1712#issuecomment-368575225,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ADEJgcfKQp_YWnLwl_w42rPky0xJPT1Mks5tYuWMgaJpZM4I74q2
.

Alright, so for all this time since February I've been working on reimplementing the GoldSrc engine using the original GPL Id Tech 2 Engine (NetQuake/QuakeWorld/Quake2). It's still rough and ugly as hell, but partially works. The codebase is fully clean and consists only of GPL (or other open GPL-compatible licenses) code. SDK code is also partially reimplemented using the original code (some pieces were manually retyped). Can't say for sure, but the game code will probably also end up being reimplemented (but it either will be ported Quake (QC progs) code or reimplemented HL Alpha level functionality). I will release it on November 8 this year

What will be provided in the initial release:

  • Authentic C code with a lot of wrappers to C++ - one of the goals was to make the codebase look the same as the original GS, by looking at some trace logs it's possible to extrapolate and say that all original Quake code is still in C, all 1998-2002 era code (game interfaces) are also in C and all wrappers are in C++;
  • GameDLL support - support to the point of dlls being playable;
  • ClientDLL support - partial support to be usable;
  • GameUI support - will support original menu code (= HL Alpha) moved to gameui dll;
  • Reimplemented fs module - filesystem code was moved to a filesystem_stdio module (VFileSystem009) and a wrapper for it was added at the engine level;
  • GL Render improvements - QGL integration (gl exports are loaded dynamically, the same as GS does), transparent textures support and such;
  • Reimplemented interface factory code with virtual destructor removed from the IBaseInterface which make modules ABI-compatible between various compilers (but no compatibility with original GS modules);
  • Reimplemented listenserver/dedicated launchers - the code was modified to use IEngineAPI and IDedicatedServerAPI interfaces;
  • vguiwrap - custom intermediate level module to optionally support original vgui1 library (compatibility with original client dlls);
  • Reimplemented pm_shared module - mostly will contain pmove code moved from the engine without any bunnyhop fixes and/or such;
  • User Messages system reimplementation - to add custom game messages;
  • Studio models support;
  • WAD3, SPRITE_VERSION 2, BSP format 30 support - mostly tweaked constants. It probably will temporarily support 29 format again to load the HL Alpha techdemo map later;
  • Partially reimplemented protocol 48 support (excluding resource sending and delta encoding);
  • "SOMETHING ELSE, WILL BE ADDED LATER"

I doubt that I will be working on it after that, so it would be nice if someone could provide some help with stuff, it would be sad if this thing ends up nowhere after all the effort put in it
If the community needs an open-source GoldSrc engine this is pretty much the chance to make it real IMO. As guys at Valve said, they might open-source the engine, but not interested in that, and I'm not interested in making them interested

Stop posting in this issue, and stop referencing it elsewhere.

Let's all review some material to avoid getting taken for a ride by this guy!

https://www.merriam-webster.com/dictionary/pied%20piper

https://en.wikipedia.org/wiki/Comparison_of_free_and_open-source_software_licenses

https://github.com/ValveSoftware/halflife/blob/master/LICENSE

https://en.wikipedia.org/wiki/Power_vacuum

http://opentranscripts.org/transcript/fascism-fauxpen-source/

Things to note:

  • Saying "I will release it on November 8 this year" - building hype, or putting the cart before the horse?
  • Code is not already available in a public repo, and yet this project is ostensibly meant for the public
  • Everything is partially implemented and he needs _your_ help (cult leader / con artist behaviour)

This is the type of garbage you encourage by not open-sourcing the engine, and leaving this repo/issue open to rot.

I can't lock this issue, only people with administrative access to this repository can do that.

@kisak-valve and @Nephyrin if possible please lock this issue.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

perforatorRU picture perforatorRU  ·  3Comments

magister4813 picture magister4813  ·  3Comments

DreaDk picture DreaDk  ·  4Comments

BlackShadow picture BlackShadow  ·  3Comments

twisterniq picture twisterniq  ·  4Comments