I saw an earlier version of this without the rooms, just the outdoor tunnels (which are easily done in any game engine). This is more impressive. I wonder what those rooms actually look like in the editor. (I.e. how much of this is fakery with portals, and how much is working on a different model from normal Euclidean 3d games entirely.)
Yeah, that was a common feature of “2 and a half D” game engines. (It was a default feature, in fact, that you had to work against to make levels that didn’t break your eyes.) Marathon had maps that deliberately made use of it - there was one multiplayer map where players could occupy the same location on the HUD map, hear each other as if they were close, but occupy different spaces because they had approached the point from different directions, just to mess with their heads.
For entirely different reasons, though. It worked in the old “2.5D games” because the maps were just a series of 2D polygons which could overlap, given height in the engine and extrapolated into fake 3D environments. Modern games do it by having apparently contiguous spaces be made up of entirely separate locations; the older games were actually contiguous (even when they didn’t seem to be).
Yes and no. I’ve been a professional game developer since 1986 and all different data models have been used in every era. Some have all the elements in one “map”, some load things in and out as needed, some overlay geometry in non-Euclidean ways with octrees or BSPs to occlude, etc. There are a lot of different methods, but one nearly universal truth is that the insides are almost always bigger than the outsides for reasons of camera logistics and simplified collision geometry.
(OK, this is a nod to George Gamow, a personal hero of mine: his Mr. Tompkins and 1,2,3…∞ books got me excited about physics and math, and he tried to defect from the Soviet Union by kayaking to Norway )
I want a game engine that has a speed of light that’s even slower than what we experience, and space-time curvature induced by mass…
I want enough Minecraft obsidian in one place to trigger a black hole…
Basically I want a game engine that can solve brutal partial differential equations in real time… no more falling back on general Euclidean space and Newton’s Handy Engineering Approximations of Physics…
At the end of the video they explain the technique. It’s all fakery with portals - in the case of the seamless rooms, the portal is just an entire invisible wall across the room.
This is a pretty old iteration of CodeParade’s interest in these kinds of game worlds. His current project is called “Hyperbolica”, video at https://www.youtube.com/watch?v=zQo_S3yNa2w.
This is non-euclidean in the mathematical sense, not just the computer games sense, meaning that space itself is curved (in the black holes and relativity sense), not just that you’ve got some euclidean space with portals.
Yeah, I saw the bit with the tunnels, but I assumed that, given the claims of non-Euclidean space and the inability to do this in standard game engines like Unity, that there must be more to it for the rooms, at least. Because this is totally Euclidean and I’ve seen identical work done in Unity. (Though it’s possible that the particular way some of this works is different from, and unachievable in, Unity.)
Now I’m wondering about how the rooms are set up in the data again. If it’s just portal trickery, presumably it’s something as simple as either having a number of distinct rooms that are spatially separated that the player teleports between, or the rooms all overlap and the player’s direction of movement determines what rooms get rendered.
Sure. I was just struck at the time, when 2.5d transitioned to 3d, how it was moving from a non-Euclidean space masquerading as a Euclidean space to a Euclidean space that sometimes pretended to be non-Euclidean. And I was just struck by how the 2.5d games were contiguous spaces (that sometimes pretended not to be) that gave way to a bunch of non-contiguous 3d spaces that pretended to be. Though over time it moved back to more contiguous spaces, as technical limitations eased, if nothing else.
All the 3d engines I’ve poked at, on the development side (which, granted, isn’t a whole lot, probably not even quite a dozen) all felt pretty thoroughly Euclidean to me, even if they engaged in a whole bunch of trickery regarding the player’s position in space and the objects around them. (That always struck me as fancy versions of a Disney ride - in particular the bits where a ride would replicate a particular view at different scales at different points to create the illusion of seeing the same thing from different vantage points.) I’ve never really thought much about how geometry that’s perfectly Euclidean in the editor and game is also being represented in non-Euclidean ways in various data structures.
I’ve implemented a very simple version of this in Unity (just a TARDIS). That’s pretty easy. What gets tricky is handling multiple portals - if you can see a portal through another portal you have to make two virtual cameras, and if you can see the first portal through the second one you have a loop…
I think the game Portal handles it by limiting the depth (after a few cycles the portal is rendered as opaque). The other challenge in Unity is making it perform acceptably: my version would render a whole scene at full resolution, once per portal, per frame. That works fine when your scene is simple and there’s only one portal, but doesn’t scale well. The challenge mentioned in the video, which the creator of this engine was not able to solve in Unity, is to only render the portion of the scene which is visible through the portal, instead of rendering everything behind the portal as if the portal filled the whole screen and then masking it to only the area where the portal is visible.
Looks like they’ve taken things a bit beyond the basic portals shown in that first video though:
I find it interesting that he went to the trouble of doing his own engine to accomplish these effects when he ran into trouble with Unity, while (as pointed out by above posters) existing engines can already do this. Of note is Valve’s Source Engine, which did both the Portal games and Stanley’s Parable:
I’ve also seen various implementations of this in UE4.
Seems like, with the given examples, at least, that there aren’t any Portal-style recursive loops*. That, in fact, it was carefully set up to avoid that. What’s shown seems pretty straightforward and perfectly possible in Unity. The Hyperbolica video, on the other hand, now that I can see requiring its own engine, but it also appears to be a completely unrelated project.
Well, all of the platonic solids are topologically spheres, so that’s a vote for spherical geometry. On the other hand the spheres are in Euclidean 3-space, so that’s a vote for Euclidean geometry. Still, it’s a discrete graph, so several of the geometric postulates don’t make much sense. e.g. You can define a straight line segment between two points to be a ‘locally shortest’ path, but what does it mean to extend it?
FWIW, the non-Euclidean world in the video is locally Euclidean. It seems to be a flat manifold.
I remember never being able to find my way around the maps in that game - even more than other games, I’m always bad at it. Wonder if that’s why?
@Shuck Thank you, I watched without sound and by the end was getting really confused about how they were rendering hyperbolic spaces so that the walls and floors still looked rectangular with straight edges no matter how far away they were or what angle you looked at them from.
For whatever it’s worth, my own first introduction to what it would be like to experience a non-Euclidean world was reading Flatterland, followed soon after with everything available by Ian Stewart.
Well in that case also every 2D JRPG where you are as big as a mountain in map-mode, then zap into a tiny detailed swamp. Or enter a town a humble single grid-square as big as your sprite, only to find a sprawling marketplace and an intricate palace inside.
Looks like everything in the video is actually quite Euclidean, but with “edges identified”, just like a flat torus (https://en.wikipedia.org/wiki/Torus#Flat_torus) is a zero-curvature space with the same topology as a regular torus, but locally Euclidean geometry. (Flat toruses aren’t new to video games either - see Pac Man.)
The distinctive feature of this world is that it’s not a Metric Space, at least in the sense that there are multiple geodesics between two points, and the distances along those geodesics also don’t obey the triangle inequality. But the geodesics themselves follow Euclidean paths.
EDIT: I should say - the first 10 seconds of the video do actually show some hyperbolic geometry, but those are aren’t showing the rendering engine’s world.
Technical note: You don’t need unique geodesics to have a metric space. For example, there are infinitely many geodesics (forming a kind of ‘equatorial circle’) connecting two points on a sphere. Similarly, on the torus there is a discrete infinity of paths connecting any two points. In each case, the metric is given by the length of the unique shortest geodesic. (You need something like completeness for this to exist, but that is easily achieved.)
Also, it’s possible in Unity, too. There may have been something specific about his particular approach that he couldn’t make work in Unity, or some non-obvious feature with the multiple room layout, or maybe this was just a first step towards making something else that wouldn’t work in Unity, but there’s literally “how to create ‘Portal’ in Unity” tutorials, and plenty of related projects that are doing exactly what he’s shown there, e.g.: