Possibility of Portal 1 Code Inclusion

Author: vrad-exeCreated Feb 19, 2025Updated Sep 5, 2026

Edit: I have now made a separate request for a Portal 2 SDK, which would be preferred over Portal 1 in the event that one of the two has to be chosen/prioritized. A Portal 1 SDK, as described in this issue, would still be greatly appreciated if it did happen though.

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. 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).

Portal 1, however, 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. Alternatively, it could be added to the old singleplayer version of the SDK, though the fact that that was relegated to a separate Git branch seems to imply that the intent going forward is to only support the "multiplayer" version, including for singleplayer mods.

All other 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.

Source: ValveSoftware/source-sdk-2013