source-sdk-2013 icon indicating copy to clipboard operation
source-sdk-2013 copied to clipboard

Possibility of Portal 1 Code Inclusion

Open vrad-exe opened this issue 9 months ago • 15 comments

Hello,

I am opening this issue in order to ask about the inclusion of Portal (1)'s code in the updated Source SDK.

While the Portal series does have a decently active modding community, it has always been hampered by the fact that neither Portal game has source code available. While HL2 fans have been creating extensive forks and modding bases like Mapbase, and servers for multiplayer games like TF2 can run SourceMod plugins, Portal modders are left with almost no ability to customize the game beyond complex map logic, and in Portal 2's case, an extremely limited version of VScript. Other modders have attempted to use leaked versions of the code to create mods, but this sacrifices a Steam release and puts them at risk of takedowns.

Some projects with engine licenses like Portal 2: Community Edition have attempted to fill this void by providing enhanced scripting functionality, allowing modders more control over the game without having access to the code. Ultimately though, while I believe there is still a place for projects like P2:CE in the Portal modding scene, so far it has yet to get anywhere close to matching what would be possible with a proper SDK, and likely never truly will.

With this in mind, a Portal 2 SDK would be ideal, but due to Portal 2 running on its own branch of the engine, this would likely be more involved, as it would require the creation of a new SDK Base app on Steam (either that, or ensuring that all future Portal 2 updates forever don't break mods, which is unreasonable).

However, Portal 1 runs on the 2013 Singleplayer branch, the same as Half-Life 2. With that in mind, on a technical level, adding Portal 1 code to the SDK should be very straightforward. Small amounts of work and testing would be required to ensure it builds on top of the 2013 Multiplayer code that's now exclusively hosted on this repository, but the differences shouldn't be significant enough to require major rewrites or anything.

Otherwise, all reasons I can imagine for why Portal hasn't gotten an SDK yet seem to be moot, especially now that there is a TF2 SDK:

  • Portal is a singleplayer only game, so there is little concern for security, but regardless - given that we just got a TF2 SDK, there seems to be enough confidence in the engine for this to not even be a huge concern for multiplayer games, let alone singleplayer ones.
  • Perhaps at one point there was a desire to keep the details of the portal technology under wraps. At this point, the methods used to implement portals are well documented across the internet (including in official presentations hosted by Valve employees), so there's little point in trying to keep it secret anymore. (And that's not even mentioning the multiple code leaks that let you just view the code for the portals directly if you know where to find it.)
  • A lot of the original Portal devs no longer work at Valve, but the same can be said about a lot of other games including HL2 and TF2, and that hasn't stopped them from getting SDKs.
  • Portal is no longer actively updated, nor does Valve profit off of it beyond game sales (which an SDK would not detract from, since you'd still need to own the game to run mods). Once again, this would have been more of a concern for TF2 with the item economy, yet clearly that didn't stop it from getting an SDK, so I don't see why it should stop Portal.
  • The game doesn't make use of any third-party licensed libraries besides the ones already present in Source (Bink, Miles, Havok, etc.), and even some of those seem to be gone now in the latest versions of TF2.

Thus, I have to believe the only reason we haven't gotten a Portal code SDK at this point is just because no one at Valve has bothered to prepare/release one. All other reasons I can think of seem to be irrelevant or have easy solutions.

I hope that whoever reads this can consider trying to make this happen, as it would greatly benefit the Portal modding community, allowing for extensive code modding on the same level as HL2 projects like Mapbase. If it could happen for TF2, then I have reason to believe it could also happen for Portal. Thank you.

vrad-exe avatar Feb 19 '25 03:02 vrad-exe

Seconding. I would like to also mention that some Portal 2 mods, which are looking to be licensed to add important features, have been waiting for a license for a long time and have seemingly been forgotten. Making a Portal 1 SDK, while not the same engine as Portal 2, would at least provide an alternative for mods stuck in the licensing process since they would no longer require an NDA to modify the Portal code. Existing Portal 1 mods using leaked Portal 1 code would also be given a path to legality, just like the TF2 mods which run on leaked code today.

craftablescience avatar Feb 19 '25 04:02 craftablescience

I agree with above. I will say that the Singleplayer branch does still exist, its just on a separate git branch. So this would be even easier to do considering it doesn't have to be ported to Multiplayer. Though it looks like it wasn't updated. but a update for that branch is probably in order already since it doesn't have any of the 20th Anniversary improvements yet nor is it x64.

sheepy676 avatar Feb 19 '25 05:02 sheepy676

Also agreed.

Considering that the single player branch and multiplayer branches share a lot of code. As far as I know, the majority of the changes relates to anim and act states (minus the x86 -> amd64 changes). It would be decently easy to port Portal 1 code over to mp. That being said, I've never directly done it with source-sdk, and only have done parts of SP code on MP branches.

rwf93 avatar Feb 19 '25 06:02 rwf93

I can agree that Portal 1 or even Portal 2 code would be massive for the Portal community as license requests for these codebases have been desired by modders for over a decade. Making our own changes allows us to create infinite content for Portal and allow us to bring enjoyment to so many people. We grew up with these games. For a lot of people portal is our childhood. Allow us to bring this franchise to the modern era and make it another's childhood too.

Trico-Everfire avatar Feb 19 '25 06:02 Trico-Everfire

What I would like to be open-sourced for once is Hammer itself. We only have Hammers like H++ and P2CE Hammer, which Valve has licensed, but what if there was a Hammer SDK to add new features and be able to improve the editor to the biggest of extents to make map-making even better?

Especially in the modern day, where the software has aged, the current default Valve Hammer is meh, to say the least. For some people, its fine, for others, it has been constant crashes. Being able to bug fix, improve to a modern standard, and overall make Hammer more compatible would make it much better for any Source Engine branch game or mod. That way, you can add new content to the game itself and add custom mapping functionality or improve current ones to accompany the mod or game.

Also, if Valve is giving the update treatment to their older titles, making them 64bit versions would also be great because it allows the program to utilize more resources properly for modern systems. TF2 got it, and Portal 2 technically got one for the Switch (although its ARM not x86-x64), so why not the rest?

OrsellGit avatar Feb 19 '25 08:02 OrsellGit

If i may add, how about Half-Life 1: Source being added to the list of things added. I know this is a talk about adding Portal 1, but this topic has been brought up recently elsewhere, so i think it's a no brainer since the GoldSrc version has a SDK of its own, that the Source Version (for how buggy it may be) be released. I know the games not for sale on steam, but in reality, it just hooks into HL2, meaning a SDK would work for this game.

Zeldaboy14 avatar Feb 19 '25 09:02 Zeldaboy14

I know the games not for sale on steam

It is for sale on Steam. It is only hidden from search.

craftablescience avatar Feb 19 '25 09:02 craftablescience

A Portal 1 Code SDK release would be nothing but beneficial to the modding scene as a whole - obviously, both games getting proper Code SDKs would be the ideal dream scenario, but even just Portal 1 alone would change the landscape in a majorly beneficial manner.

A major bonus of a Portal 1 SDK release is that it would be fulfilling the wishes of Jeep Barnett, whom was a large part of the programming effort for the game and had expressed in a 2008 email exchange with a fan that he was hoping for the Portal SDK to release with the codebase for the game. (Instead, it had only released with mapping tools.)

Image

OssyFlawol avatar Feb 19 '25 09:02 OssyFlawol

Seconded

pivotman319-owo avatar Feb 19 '25 16:02 pivotman319-owo

Portal 2 VScript modder here. To vouch for the voice of the broader community, I get people asking me nearly every day for Portal 1 versions of some of the gameplay mods I make, but I can't even get a foot in the door since there's no VScript or SDK to make use of. The stuff I have done in Portal 1 has been so janky and hacky I can't realistically release it. All we've got are custom maps, plugins made by consulting the dark arts of blindly hooking mystical engine functions, or some external program that sends console commands.

An SDK would be great, an update with VScript support would add the cherry on top.

p2r3 avatar Feb 21 '25 14:02 p2r3

A few days ago (February 13th I believe) Portal actually did get an update which seemingly brought over many features from Half-Life 2's anniversary update, but it was rolled back just a day later due to some crashes that started popping up. It's possible that Valve is attempting to fix these issues and will then reupdate Portal. If so, maybe Valve will release a Portal SDK afterwards.

Bloody-Muffin avatar Feb 21 '25 19:02 Bloody-Muffin

Thirded

Brahillms avatar May 08 '25 12:05 Brahillms

Bump. I feel like considering the fact Team Fortress 2, an active multiplayer game, can get an SDK, that Portal 1 (and possibly Portal 2) should get an SDK as well.

benjaminpants avatar Jun 23 '25 08:06 benjaminpants

Hello! I’m the co-lead on Portal: Ambition, an upcoming P1 mod that will be releasing on Steam. Valve does not grant engine licenses anymore, and being on Steam, we are blocked from using leaked code, on top of our general desire not to use leaked work in general. We've done our best to modernize the engine without code access- improved models, textures, adding zoom via map logic and aliases, updating the ui, etc., but we're still limited. Currently we do everything via map logic, as any Source mod without VScript has to do. The amount of things that could be done with an SDK is so high I can't even list it all; being able to add VScript would make map logic so much easier and more reliable, being able to add the modern instance input/output system would eliminate the trouble of updating every prefab in a map manually, we could implement projected textures, and SO much more. It would benefit both our mod, and others' mods GREATLY.

Valve, please consider releasing an SDK for Portal. At least the first game, if not both. I know mods are still relevant within your offices, that employees have been talking about the recent Portal mods coming out. You guys know the possibilities an SDK would bring. Look at the crazy things PortalRunner is doing with P2 like turning the entire game into a website server, the things Portal: Cooperative has achieved with just leaked code, or the entire replacement and revival of the rendering and lighting system done by both Portal Desolation and Portal 2: Community Edition. There is so much potential here.

fifflesniffle avatar Jun 23 '25 23:06 fifflesniffle

Bump. Valve should release it eventually, and surely by the 20th Portal anniversary.

Buggem avatar Jun 26 '25 08:06 Buggem

Bump... three months later.. please valve. It would literally help everyone. And who would it hurt? No one. Please mr gabe, it's been decades.

ibblesdev avatar Sep 16 '25 02:09 ibblesdev