Portal Multiplayer, Maybe

[Update – there’s a follow-up video purporting to show limited multiplay here. The Portal gun isn’t actually used in this video however, so I’m not sure what to take from it yet.]

Well, not officially, but fans are working out how to make it happen without Valvian blessing. Thinking about exactly how having your opponents suddenly disappear on you and pop into existence on the other side of the map will work makes my head asplode, nevertheless: Woo!

Matt Malesky sends the below short tutorial video he’s made of how to get the Portal gun up and running in Half-Life 2 Deathmatch maps. No actual multiplay yet (update – some commentators on this piece hold that this may not ultimately be possible. Ooh, I just don’t know who to believe), but this is already waaaay beyond proof of concept, so fingers crossed for the real party soon. Before you watch, a warning: it has got a Radiohead song playing throughout, I’m afraid. I’m not sure why this clearly otherwise excellent fellow felt Oxford’s droniest sons were necessary to get the point across, but never mind – just press mute or, as I did, drown it out with your own screaming. Thanks for the tip-off though Matt, and, indeed, thanks for working out how to do this.


  1. Ryan says:

    I’m not really sure this is proof of concept, unless the concept is “you can port Source maps into Portal”- much more useful would be loading a fully functioning portal gun into HL2 deathmatch. Some of the new code described in Portal’s commentary track (for simplifying physics when interacting with objects through portals, for example) could provide a pretty significant challenge for netcode.

  2. Monkfish says:

    This is the amazing thing about Valve and their Source engine – the Portal stuff will just work in maps that predate Portal. If the client/server code copes with Portals in any way at all, multiplayer portal is just around the corner, which can only be a good thing. A Very Good Thing.

  3. The Sombrero Kid says:

    this is absolutely impossible for modders, only someone with access to the full source sdk could get either net code into portal or portal making code into half life 2, sorry to disappoint + it’d be a physical impossibility on modern systems they are already pushing your gfx card to the limits with portal and yeah there’s some pretty intensive specific physics in there to only a developer with future hardware could get this up & running without serious compromises.

  4. Andrew says:

    Not to mention the simple business of proofing the maps so you can’t portal out of them.

    They’d all have to be indoor.

  5. Andrew says:

    Which isn’t to say that this is still pretty cool.

  6. roBurky says:

    As people have pointed out, this isn’t a step towards multiplayer at all. It’s just a deathmatch map loaded in portal.

    I don’t know what Sombrero kid’s saying about graphics card limitations, though. From the sounds of the commentary, Portal simplifies its physics around portals anyway.

  7. roBurky says:

    Although yes, this is still cool. Title’s just misleading.

  8. Bozzley says:

    Dear People On The Internets,

    Please stop being all whiny and nay-saying, and just get it done. I know you want to, you know you want to. Less of the typing smart-arsed comments, more of the flinging toilets through multiplayer portals at multiplayer peoples.

    If this post inspires you to actually getting it all working, then I will send you a nice cake.



  9. Kwan says:

    Re: Andrew;

    Portals seem to work on specific surfaces, he tried to stick a portal in a window and it fizzled, so it looks like all the surface boundaries are already in place, in which case, cool!

  10. Tobias says:

    I love that you hate Radiohead. I felt so alone sometimes with my hatred.

  11. Alexander says:

    link to exitemod.com


  12. spirit7 says:

    I too detest Radiohead. Most overrated band ever?

    I should really finish Ep2 so I can get on with portal.

  13. Prophetik says:

    Radiohead >>>>>> Most other in-game videos we see with the same crappy death rock music.

    In other news, multiplayer Portal? YES PLZ.

  14. Mr. Bunny says:

    This proves nothing. Loading a HL2DM map inside Portal does nothing in the way of showing Portal’s multiplayer abilities. At the most, this shows that the portal gun does not require additional data in maps to function. If the Portal gun were working in HL2DM, this would be a release announcement.

  15. Ging says:

    Yeah, no – this gets us no closer to “true” Portal based DM – it was a given that Portal could load HL2DM maps. Now, it’s possible that valve will release some of the Portal code in the SDK update due in a month or so that will allow modders to start to use the new engine functionality (Ep 2 shadows etc), but there’s been no talk of whether or not it will actually include any of the Portal code.

    Of course, if it does, there’s no guarantee that MP mods made with it integrated will be anywhere near playable for quite a while – it’s taken years for teams to start making good progress on “network nice” vehicles in Source mods and the mods they’re in still aren’t out yet! So access to Portal code doesn’t even guarantee playable Portal DM.

    About the maps already being set up for Portal – ‘fraid not, it just means that the Portal weapon checks viable surfaces when fired and the glass surface type isn’t on the list. It’ll probably also fizzle against the skybox (as that’s a fairly standard check) and maybe even some grates.

    So, basically, the video doesn’t really show how to get the Portal gun up and running in HL2DM maps, just HL2DM maps running in the Portal game – which isn’t surprising.

  16. Cody says:

    I will consider this experiment a success under one, and only one condition: my opponent throws one port, I stand in front of it, he throws a second one in front of him, and I can shoot him through the one I’m standing by. Anything else is insufficient.

    Correct me if I’m wrong, but it seems like each person beyond the first would seriously compound the processing time. When I’m playing Portal, I’m walking around in 3 identical maps. The main map, and then two identical maps that exist only when I walk through one of the portals. Introduce a second player, and all the sudden we’re playing in at least 5 identical maps, and that’s assuming we’re always in the same layer. If I’m not in the same layer as my opponent, and I create a new port, then we’re up to 6 maps. And this will obviously increase exponentially in normal playing conditions. I’m just not sure that the technology that drives Portal is capable of holding multiplayer matches on modern computers. Maybe someday, but I mean in 2 minutes we’d already have exhausted modern resources.

  17. Ging says:

    Cody – where did you get the idea that it’s creating extra maps?

    The wiki has some more info on portal rendering (link to en.wikipedia.org). Within the realm of Portal, it’s quite possible that the portals aren’t even that complicated and are instead just a pair of spruced up teleportation entities with a fancy render to texture effect (though I doubt that some what).

  18. Thiefsie says:

    radiohead > every other band from oxford


  19. Chis says:

    I suppose there are worse choices than Radiohead, personally I would have gone for some Burial: link to youtube.com

    I would love to see some sort of co-operative multi-player Portal. But after two portals, which ones go where? Can one player go through the other’s portals? I’d assume that you’d be able to place the usual two each?

  20. Thiefsie says:

    my prediction is deathmatch with portal (and would only allow absolute max 4 player) would be shitty and boring.

    Portal multiplayer would only be good if you had to solve puzzles together or had races or something etc. Deathmatch = boringggggg

  21. Frohman says:

    Someone made a basic portal gun that worked in Garry’s Mod ages ago, after the original Portal trailer came out. They were basically teleporter entities with camera attached to them, so it appeared you were looking through them. They were a little rough but they worked in multiplayer.

  22. CrashT says:

    If Prey can do portals in multi-player then, so can Portal. The Sombrero Kid has a point, it’ll depend on how the Portal code was implemented as to whether Modders will be able to get it to work. If it’s now a core feature of the Source Engine then it’ll be easy, if it’s a specific feature for Portal itself then it’ll be a lot harder.

  23. The Sombrero Kid says:

    my point is even with 4 player death match the engines limited to 9 render targets for portals so you’d have an entrance & an exit each with no recursive visability on the best graphics cards, lesser cards wouldn’t even be able to see whats beyond some of the portals was my point

  24. Cargo Cult says:

    The render targets excuse would be nice if Portal actually rendered anything to a texture – judging by the commentary, it uses the stencil buffer to limit conventional rendering to just the area covered by the portals. This probably explains why early screenshots of the portals had them with ‘hard’ edges – which are now covered up by some glowing transparent stuff. Doom 3 uses the stencil buffer for its shadowing, for example. There’s no real limit as to how many layers can be rendered, except for it taking a very long time…

    I’m sure the engine must have been modified to get all this new rendering and physics stuff in – I doubt it’ll be possible to fully reimplement on the basic Source engine using just the usual game DLL route used by mods. I’ve no idea if these putative engine changes will be accessible with the upcoming updated Source SDK – currently scheduled to be in ‘beta by the end of the month’. But it could be interesting to find out!

    People are already getting custom maps into Portal, but updated tools like Hammer are due ‘this week or early next’. I think someone’s already reverse-engineered a portal.fgd for all the editor entity definitions, but an official one might be made available soon too, I imagine.

    Loading a HL2DM map in Portal is pretty irrelevant, to be honest – a map .BSP is just a large, properly formatted data-file. Portal’s presumably reusing material properties like ‘glass’ in order to decide where to allow portal placement. The real ‘multiplayer’ stuff is done in the game DLLs – Source is inherently client-server (like its long-lost Quake ancestor), so it would probably be easy-peasy to make a basic multiplayer version of Portal. It’s about 90% there already.

    If you had the appropriate source code, that is.

    So the options:

    * Manage to hack or patch in the missing multiplayer stuff into the single-player Portal game DLLs (awkward, and unlikely).
    * Hope the relevant game DLL source code for Portal gets released (easy, but fairly unlikely – HL2 and HL2DM were released for modders, but I think that’s it).
    * Hope any engine changes get documented, so the game DLL stuff for Portal can be reimplemented (most likely, but I wonder what form it’ll take!)

  25. phuzz says:

    With some of the speculation about the plots of Ep2 and Portal coming together, perhaps we’ll be seeing portals in Ep3, in which case they might have been integrated into Source already, or will be down the line.

    Or maybe not, what would I know?

  26. Ging says:

    The new video shows some interesting bits – like the fact that the Portal player model isn’t setup for anything but the portal weapon (the weapon is part of the player model). It would’ve been preferable for them to actually show the portal weapon in use – rather than just saying it sort of works at the end.

    CrashT – The doom 3 engine is based around portals, it was built from the ground up using them as part of it’s spatial partitioning, the Source engine is not – the portal tech has been added at a later date so may not be quite as ready for MP as the portals in Prey.

  27. Iain says:

    Portal deathmatch would only be cool if you didn’t have guns.

    Being restricted to the portal gun and killing people either by dropping Weighted Companion Cubes on their heads, putting a portal at another player’s feet so they drop into a pool of acid, or into a room full of turrets would be far more interesting.

  28. MPK says:

    “Portal deathmatch would only be cool if you didn’t have guns.”

    Leading to a brand new form of greifing, wherein you place a portal above and below a player, leaving them in an unescapable momentum loop until they reach terminal velocity, break the speed of light and vanish from the game! (or, y’know, log).

  29. Iain says:

    I accidentally did that in one of the levels. I ended up moving so fast that I couldn’t even orientate myself to which way was up or down.

    It was ace.

  30. Theory says:

    The doom 3 engine is based around portals, it was built from the ground up using them as part of it’s spatial partitioning, the Source engine is not

    So what are areaportals?

  31. Ian Dorsch says:

    “Leading to a brand new form of greifing, wherein you place a portal above and below a player, leaving them in an unescapable momentum loop until they reach terminal velocity, break the speed of light and vanish from the game! (or, y’know, log).”

    Wow, yeah, they wouldn’t even have to spawn camp anymore! Portal gun FTW!

  32. Tom says:

    “Thinking about exactly how having your opponents suddenly disappear on you and pop into existence on the other side of the map will work makes my head asplode”

    Umm, perhaps like UT’s translocator?

  33. The Sombrero Kid says:

    theres a fixed terminal velicity in portal thats pretty managable thats how you can do the 30,000 foot fall

    & BTW they only use the stencil buffer to copy the portal image ontop of it’s self this simulating more render targets technique would only work with at least one render target in place already & only be effective with more than 1 more than 8 portals on screen at the same time is impossible in the current incarnation of portal for a reason it’s graphically intensive, if they do get multiplayer working it’ll be 4 player max (mybe 9 player cause they’re not actually clear whether it’s 9 render targets per portal for everything) and only on the best grpahics cards the physics issues can pretty much be forgotten about assuming you design the map correctly and allow for the odd falling out of the world.

  34. CrashT says:

    Well somebody’s got the Portal gun working in Half Life 2 Single-Player, link to primotechnology.com

  35. Winterborn says:

    That Radiohead tag is my new favourite RPS tag. Though for the sake of all our ears I hope it never needs to be used again.

  36. Possiblities says:

    I have gotten multiple people (2) in a portal LAN game, however it’s usually buggy and tends to crash a lot, here’s how I’ve done it so far:

    Start portal and open developer window
    Type in
    sv_lan 0
    maxplayers 5
    map (whatever map you want here)

    once in game, you need to let your friends know your game’s ip address in order to connect (again, this works for lan only) todo this type in the console: status
    and then the console will give a list of stuff about your server/game. just send the IP address number to your friends and then have your friends type in console:

    connect (ip address here)

    don’t forget to turn on sv_cheats, and I also noticed the game tends to crash if both of you bring out your portal, which sucks. But atleast you can shoot at each other.

  37. Tricky says:

    Possibilities: I think there’s a way around that.

    I’m not sure if you need sv_cheats 1 for this, but here:

    In console:
    change_portalgun_linkage_id # (0, 1, 2, 3)

    Have one person use Linkage ID 1 and one use Linkage ID 2. Maybe that’ll work.

    Add in Impulse 101, and Portal = win! :D

  38. MayTricks says:

    Portal is an amazing game, conceptually, and I think we just need to wait until valve releases future versions, including multiplayer. It’s obvious this game isn’t going to go unnoticed and it’s just a matter of time before valve gets to it. We could spend time modding it for MP, but personally i’d rather just wait for a MP sequel to be officially released, then focus development on mapping and whatnot [leave the coding to those who seem to have already done so well with it – valve staff themselves].

  39. AKAmezcalsoakedboy says:

    Although, I may be pissed, I get the dreaded feeling of deja vu that some of you sad fucks are potential columbine style outsiders; get a life and chill to Radiohead.

  40. Andrew Doull says:

    I’ve put up a suggestion for Co-op Portal on my blog if that’s any help, which should be feasible using the current Half-Life Death Match engine.

  41. 23232 says:

    LOL WUT?

  42. Portal Deathmatch says:

    and you need the full portal
    not first slice

  43. URL says:

    … [Trackback]…

    […] Informations on that Topic: rockpapershotgun.com/2007/10/16/portal-multiplayer-kinda/ […]…