[WIP] Working on impossible geometry in Gmod

So it’s all kind of rough right now, but it’s meant to be a simple demonstration of impossible geometry using some clever LUA.

Aiming for a sort of space-build style map, but it has much more expansive interiors with the use of lua portals.

Have a look at ^
But the doorway is pretty cool I must say

Reminds me of Stanley Parable’s Adventure Line

Yeah I’m aware that my terrain is awfully bland right now… I will be doing a lot of displacement meshes before I finalize any of this stuff.

[editline]6th September 2016[/editline]

They probably had use of the actual portal tools though… the lua implementation is way more limited D;

try to find the old thread for the Gravity Hull Designator tool

it was pretty much the best portal-like code that could be made for this game in that it created movable zones that acted as 3D portals in an effort to enhance the game’s physics by trickery

the guy that made it either gave up or didn’t have time to maintain it anymore, and never simplified it to make a separate classical portal library

That add-on was amazing; it was written for a very different purpose… I’m trying to remember if it supported bullets passing through because if so it might be worth checking out. But it basically created a duplicate of your player model upon entering the ship, teleported you outside of the map to a duplicate of your ship (as far as I understand). Pretty buggy for some specific stuff but was amazing nonetheless. I will be doing something similar to the gravity hull code, but it’s hard-coded and not meant to adapt to any new shape- should be a lot easier on servers with a lot of players.

Antichamber is a much more appropriate example, to the extreme

If I remember it right, entities could pass through as well as SWEP bullets. This means that the crossbow was supposed to work, in addition to grenades and RPGs. I don’t think those features worked in any stable form, though. You could instead try hooking weapon firing and calculating the trajectory out of the portal to simulate damage against a player.

In that instance it’s easier to get SWEP bullets to work-- since the player model is literally duplicated the only thing you have to do is figure out how much damage was done to the duplicate model and apply it to the player. In this instance it’s a lot harder to get away with that because it literally moves the RPG entity… and since it’s based on mouse tracking it doesn’t exactly work as planned. Maybe it could be done but it’s non-essential to the game mode I’m developing. That being said, any objects with any sort of velocity work great, so a physics based SWEP that just fired forward should work fine…

The solution I’d probably need which would end up being slightly messy-- you’d have to figure out the local coordinates where the SWEP bullet hit on the player side portal, get the angle, then at the corresponding local coordinate at the exit portal you’d shoot the same SWEP bullet with the same relative angle. Could work and maybe I’ll look into it.

The final issue I’m having is carrying physics objects through the portal. The portal teleports the physics object, removing it from my grab and it simply drops to the floor… again with the way the game mode will be set up this shouldn’t be a huge problem.

You’d have to make your own custom gravity gun weapon.

You know… That’s not a horrible idea

i could never get those damn rock wall displacements down…