Questions about portal limits
Quote from Doomaflatchi on July 9, 2014, 10:18 pmI am currently working on a mod for Portal 2 using the Authoring Tools, and have run into problems with the linked_portal_door entities. Specifically, if I place more than 132 of these entities in a single level, the game crashes at the loading screen with no error message. For the specific level I am building, I need 240 linked_portal_door entities in the level.
Is this apparent limit of 132 linked_portal_doors something that anyone else has run into before? Is there a way to bypass this limit? Can anyone offer any suggestions that might help me fix this crash?
The only alternative that I can think of that would work within the bounds of this project would be if anyone knew how to change the direction of gravity, as that would allow me to use fewer portals. Does anyone know if that can be done, and if so, how?
I really need some help on this one, so any input would be appreciated. Thanks!
I am currently working on a mod for Portal 2 using the Authoring Tools, and have run into problems with the linked_portal_door entities. Specifically, if I place more than 132 of these entities in a single level, the game crashes at the loading screen with no error message. For the specific level I am building, I need 240 linked_portal_door entities in the level.
Is this apparent limit of 132 linked_portal_doors something that anyone else has run into before? Is there a way to bypass this limit? Can anyone offer any suggestions that might help me fix this crash?
The only alternative that I can think of that would work within the bounds of this project would be if anyone knew how to change the direction of gravity, as that would allow me to use fewer portals. Does anyone know if that can be done, and if so, how?
I really need some help on this one, so any input would be appreciated. Thanks!
Quote from Ultiman9711 on July 9, 2014, 11:05 pmDoomaflatchi wrote:Specifically, if I place more than 132 of these entities in a single level, the game crashes at the loading screen with no error message.You're kidding, or at least making a typo there, right? You DID say "one-hundred and thirty-two?" Why would you need that many?
You're kidding, or at least making a typo there, right? You DID say "one-hundred and thirty-two?" Why would you need that many?
Quote from Doomaflatchi on July 9, 2014, 11:57 pmUltiman9711 wrote:You're kidding, or at least making a typo there, right? You DID say "one-hundred and thirty-two?" Why would you need that many?Unfortunately, no typo. It crashes with any more than one hundred and thirty two... and I actually need two hundred and forty.
The high number has to do with the intricacies of how the multiple spaces are set up and connected - I'm joining six sides of a cube together (so that the player walks along the exterior surface of each side, flipping along the edges), and then connecting eight of those areas together on their open faces so the player can jump between them. ((4 portals per cube side * 6 sides per cube * 8 cubes) + (1 portal per open face * 6 faces * 8 cubes)) Mathematically, there's no fewer number I can use unless I can find new ways to wrap the players movement around the cube's exterior, like changing gravity (which I can't find how to do in a vector orientation).
But I've never even been able to find anyone else talking about hitting this limit at all, perhaps unsurprisingly, which has left me in something of a hole with regards to finding a solution.
Unfortunately, no typo. It crashes with any more than one hundred and thirty two... and I actually need two hundred and forty.
The high number has to do with the intricacies of how the multiple spaces are set up and connected - I'm joining six sides of a cube together (so that the player walks along the exterior surface of each side, flipping along the edges), and then connecting eight of those areas together on their open faces so the player can jump between them. ((4 portals per cube side * 6 sides per cube * 8 cubes) + (1 portal per open face * 6 faces * 8 cubes)) Mathematically, there's no fewer number I can use unless I can find new ways to wrap the players movement around the cube's exterior, like changing gravity (which I can't find how to do in a vector orientation).
But I've never even been able to find anyone else talking about hitting this limit at all, perhaps unsurprisingly, which has left me in something of a hole with regards to finding a solution.
Quote from TeamSpen210 on July 10, 2014, 12:05 amYou'd want to talk to either Felix Griffin to get a copy of his Adhesion Gel scripts, that basically lets you walk up gel-painted walls (the gel itself wouldn't be needed). Then the player could actually jump between the sides, without any worldportals. Sicklebrick also has an Adhesion gel mod, but it works very differently and would likely be harder to adapt to your specific circumstance. It'd work better though, since he modified the game dolls to allow the perspective and gravity shift.
You'd want to talk to either Felix Griffin to get a copy of his Adhesion Gel scripts, that basically lets you walk up gel-painted walls (the gel itself wouldn't be needed). Then the player could actually jump between the sides, without any worldportals. Sicklebrick also has an Adhesion gel mod, but it works very differently and would likely be harder to adapt to your specific circumstance. It'd work better though, since he modified the game dolls to allow the perspective and gravity shift.
[spoiler]- BEE2 Addons | (BEE2)
- Hammer Addons
Maps:
- Crushed Gel
- Gel is Not Always Helpful[/spoiler]
Quote from Doomaflatchi on July 10, 2014, 12:45 amTeamSpen210 wrote:You'd want to talk to either Felix Griffin to get a copy of his Adhesion Gel scripts, that basically lets you walk up gel-painted walls (the gel itself wouldn't be needed). Then the player could actually jump between the sides, without any worldportals. Sicklebrick also has an Adhesion gel mod, but it works very differently and would likely be harder to adapt to your specific circumstance. It'd work better though, since he modified the game dolls to allow the perspective and gravity shift.Thanks for the idea! I'll definitely look into that. I'm slightly concerned that the presence of the engine's gravity might mess up how the player jumps, pulling them in odd directions, but I think it's definitely worth investigating.
I also just recently had the idea of rotating an entire cube underneath the player, rather than connecting the sides together via linked_portal_doors, but I'm not familiar with a few of the complications. Can linked_portal_door actors be parented to a rotating object? Can the player?
Thanks for the idea! I'll definitely look into that. I'm slightly concerned that the presence of the engine's gravity might mess up how the player jumps, pulling them in odd directions, but I think it's definitely worth investigating.
I also just recently had the idea of rotating an entire cube underneath the player, rather than connecting the sides together via linked_portal_doors, but I'm not familiar with a few of the complications. Can linked_portal_door actors be parented to a rotating object? Can the player?
Quote from Doomaflatchi on July 10, 2014, 5:32 pmSo, it doesn't seem like linked_portal_doors can be moved. I tried parenting them to a func_tracktrain as a test, but it didn't work. If anyone knows of a way to get linked_portal_door entities to move with a rotating actor, please let me know, but it's looking more and more to me like it isn't possible.
This shoots down the only two new workarounds that I could come up with at this point, so I seem to be back to "fix the portal limit" or "find a new engine". It's quite frustrating.
So, it doesn't seem like linked_portal_doors can be moved. I tried parenting them to a func_tracktrain as a test, but it didn't work. If anyone knows of a way to get linked_portal_door entities to move with a rotating actor, please let me know, but it's looking more and more to me like it isn't possible.
This shoots down the only two new workarounds that I could come up with at this point, so I seem to be back to "fix the portal limit" or "find a new engine". It's quite frustrating.
Quote from Arachnaphob on July 10, 2014, 5:52 pmSadly, the doors cannot be moved while they're open. You can rotate them if they're closed, however.
Sadly, the doors cannot be moved while they're open. You can rotate them if they're closed, however.
Musical website Moddb
Quote from Doomaflatchi on July 10, 2014, 6:22 pmArachnaphob wrote:Sadly, the doors cannot be moved while they're open. You can rotate them if they're closed, however.Thanks very much for the confirmation. That means I can't use rotation to reduce the physical number of linked_portal_doors in my level.
Thanks very much for the confirmation. That means I can't use rotation to reduce the physical number of linked_portal_doors in my level.
Quote from Doomaflatchi on July 11, 2014, 12:19 amA quick update, just in case anyone else runs into this problem in the future: I actually got in touch with Valve about this issue and spoke with one of the game's programmers. He seemed unaware of the limit specifically, as they never pushed the engine that far, but we did some additional testing to confirm the nature of the problem. It appears to be a hard-coded limit inherent in the engine code - it doesn't matter if the portals don't even render anything (ie, even with r_portal_stencil_depth set to 0), simply having any more than 132 linked_portal_doors active in one level simultaneously will cause an immediate crash, and there seems to be no direct solution.
So basically, turn back. Here there be dragons.
As for my own project, I'll have to investigate other ways of reducing the number of portals in the level. Perhaps a new movement type...
A quick update, just in case anyone else runs into this problem in the future: I actually got in touch with Valve about this issue and spoke with one of the game's programmers. He seemed unaware of the limit specifically, as they never pushed the engine that far, but we did some additional testing to confirm the nature of the problem. It appears to be a hard-coded limit inherent in the engine code - it doesn't matter if the portals don't even render anything (ie, even with r_portal_stencil_depth set to 0), simply having any more than 132 linked_portal_doors active in one level simultaneously will cause an immediate crash, and there seems to be no direct solution.
So basically, turn back. Here there be dragons.
As for my own project, I'll have to investigate other ways of reducing the number of portals in the level. Perhaps a new movement type...
Quote from FelixGriffin on July 11, 2014, 10:53 pmI can think of two alternatives: either rotate the map under the player (PM me if you want a copy of the Adhesion Gel script, which rotates the map without glitching projectors (light bridges, lasers, funnels) and doors (portal and otherwise)) or deactivate portals which are not in the player's line of sight (should be straightforward, except that the convenient entities for this don't take into account looking through portals ).
I can think of two alternatives: either rotate the map under the player (PM me if you want a copy of the Adhesion Gel script, which rotates the map without glitching projectors (light bridges, lasers, funnels) and doors (portal and otherwise)) or deactivate portals which are not in the player's line of sight (should be straightforward, except that the convenient entities for this don't take into account looking through portals ).