Hacker News Comments on
Non-Euclidean Worlds Engine
CodeParade
·
Youtube
·
277
HN points
·
2
HN comments
- This course is unranked · view top recommended courses
Hacker News Stories and Comments
All the comments and stories posted to Hacker News that reference this video.Code Parade on Youtube has some nice tech demo for non-euclidean 3D game engine."Non-Euclidean Worlds Engine" - https://www.youtube.com/watch?v=kEB11PQ9Eo8
"Spherical Geometry Is Stranger Than Hyperbolic" - https://www.youtube.com/watch?v=yY9GAyJtuJ0
⬐ zenorogueThe first one of these videos is not about non-Euclidean geometry, though.There are many cool 2D and 3D non-Euclidean games already existing and several cool new projects in development, see: https://medium.com/@ZenoRogue/non-euclidean-geometry-and-gam...
⬐ techplexThe potential uses for this to solve the problem when the space in RL is limited but the space in VR is infinite.⬐ rini17But you never walk in perfect circles(nor rectangles) and so you end up hitting the meatspace wall sooner or later. Perhaps VR itself could steer you away from walls as needed. Not sure if it's doable without the odd and moving angles creeping the user out.
⬐ temppsychonautI'm wondering how the engine was engineered. Specifically does it just consist of a series of custom hacks, or perhaps is there something more principled going on?
⬐ harperleeNow someone please do a House of Leaves VR game on top of this!⬐ FubarCoderWhat about Spellbound Spire? Maybe it's something for you.
This one was among the suggested videos. I could only dream of a game engine based on that.
⬐ failrateThat's very cool. Thanks for sharing. Manifold Garden and Antichamber non Euclidean 3D games. Antichamber is quite good.
⬐ modelessI've played a couple of games that use these concepts for gameplay. They are both very cheap and totally worth the money:Antichamber [1] is a first person puzzle game. Mind-bending. Overwhelmingly positive reviews on Steam.
Unseen Diplomacy [2] is a room-scale VR game using this technique to allow free walking (or crawling) around a much larger area than your room.
[1] https://store.steampowered.com/app/219890/Antichamber/
[2] https://store.steampowered.com/app/429830/Unseen_Diplomacy/
⬐ 32bitkidI'm glad to see other people working on this kind of stuff. The old Descent games had a related—although more primitive—rendering engine that could be (ab)used to similar effect that was a lot of fun back in the mid-90's. Some of the home-brew levels back in the day exploited this for some pretty mind-bending overlapping non-euclidian level design.As for myself, I've been working on a 2d-space combat game set on the surface of a Poincaré Disk as a hobby over the past few years, not sure i'll ever do anything with it for real, but it's fun.
⬐ the8472⬐ EamonnMRYeah, that was amazing. It couldn't do scale-variations but nested volumes and one-sided portals could make the 6DoF navigation even more complicated and it was also possible to build interesting ambushes with that.⬐ lshDuke Nukem 3D/Shadow Warrior and the Build engine also achieved a number of their effects and mechanisms similar to the video. In fact, the very first level in the first episode of Duke Nukem 3D where you're on a rooftop, pick up the pistol, shoot the fan and drop down the shaft is a perfect example - that rooftop and the street level you drop into are connected seamlessly by a short tunnel that transports you. Water surfaces were also used in this effect and the 'underwater' parts were often entirely other parts of the map.I always thought of them of as pre 'true' 3D engine hacks, but it was so cool to see them again in that video. Cooler still that it's essentially the same trick being used in Portal and I never tweaked to it
The Marathon engine could sort of do this. It was similar to the doom engine in that maps where laid out as polygons on a flat plane, but different in that you could have overlapping polygons, which allowed the devs to do something like this: https://www.youtube.com/watch?v=9WxeeiqWrn4⬐ abricot⬐ meyIn the Duke Nukem 3D level editor you could also put two rooms in the same space, making the same effect.Prey (2006) modified a version of the Doom 3 engine to add portals as well as shifting gravity for similar effects. I don't recall if it did size changes as well.Demo/trailer https://www.youtube.com/watch?v=zpQRePtEpRw
https://en.wikipedia.org/wiki/Prey_(2006_video_game)
https://en.wikipedia.org/wiki/Id_Tech_4
This tech predates Valve's Portal, although I doubt it is the first attempt at this.
⬐ lsh⬐ vinkelhakeif you look closely at the second portal demo where the character is crawling through boxes, you can see the recursive rendering (that happens in the demo and Portal the game) isn't occurring.⬐ TeMPOraL> I don't recall if it did size changes as well.AFAIR it did; there was one point at which you emerged inside a semi-transparent container, at ~1/10 of your original size, and a full-sized alien was looking at you.
> This tech predates Valve's Portal, although I doubt it is the first attempt at this.
Portal was inspired by Narbacular Drop (2005).
The old Unreal engine was based on portal rendering. The game itself didn't use too much in the ways of non-euclidian geometry, but there were plenty of custom maps and demos of it. Most, if not all, of the stuff in this video could probably be recreated in that old tech.Not meant as a middlebrow dismissal, this is neat stuff and I wished it was explored more in games!
⬐ TazeTSchnitzel⬐ knolanAs was Duke Nukem 3D. Here's a video about making a simple demo engine based around the concept, which shows off a little non-Euclidean geometry: https://youtube.com/watch?v=HQYsFshbkYwThis was also used in a part of the Stanley Parable. The narrator growing impatient at your insubordination draws a yellow line for you to follow but as it winds down a cluttered office corridor strange things happen.⬐ jostmeyThe author outlines a compelling use case at the end of the video definitely worth listening to! VR is limited to the space in your bedroom, so how can you compress an entire level into just one room?⬐ boardwaalkI'd like to see something like this used in MMORPG or similar, where non-Euclidean spaces are used to expand and shrink spaces to solve problems like overcrowding/undercrowding/travel times, as opposed to using instancing and fast travel.I've always thought the "go to" solutions of instancing and fast travel were such immersion breakers for actually feeling you're in a virtual world rather than a glorified lobby.
Although, perhaps a non-Euclidean space would have downsides. It would be an interesting experiment at least. Playing with non-linear time (and not just "bullet time") in a multiplayer scenario would be interesting too.
⬐ wcoenenOne transition option I was still missing: a tunnel with parity transformation, like stepping through a mirror where you would end up as your mirror self.⬐ snazzThe code, for all who are interested: https://github.com/HackerPoet/NonEuclideanIt unfortunately seems to be Windows-only, though.
⬐ goldenkey⬐ iawShouldn't be hard to port since it uses cross-platform GLFW for most of the input/windowing stuff.The only Windows-specific stuff is a bunch of MessageBox and other minor calls
The effect of the room demo was pretty remarkable.⬐ scrumper⬐ DoctorOetkerYes! I was a bit disappointed when he explained it was just portals and a clever rendering hack rather than actually modeling non-Euclidean space natively, then I was delighted when he showed the room-scale VR example.⬐ codeparadeI did find this video which attempts 'continuous' non-euclidean spaces but the results are really disorienting: https://youtu.be/tl40xidKF-4?t=4m6sInstead, the goal my engine was to make the effect as subtle as possible, even unnoticeable.
⬐ taneqWhat would count as "modeling non-Euclidean space natively"? I mean, these spaces are basically just piecewise-Euclidean spaces and the portals define how the pieces connect. Or did you mean smoothly curved space with wormholes (which I imagine would be confusing as heck)?⬐ SiempreViernes⬐ wcoenenIs there much point in using weird geometries if you don't make confusing levels?Surely the point of using weird geometries is to expose the player to weird effects that aren't achievable by simple euclidean planes and a bit of trickery with perspective or colours?
⬐ taneq⬐ potiuperThere's a much more pragmatic use: Folding a large game level into the walkable area of a VR setup. There are a few people investigating games using this technique and apparently it's quite effective (eg. https://void-room.itch.io/tea-for-god - I haven't tried it yet though.)"modeling non-Euclidean space natively" could be done with something as simple as hyperbolic geometry. For "Piecewise-Euclidean spaces" see https://en.wikipedia.org/wiki/Piecewise_linear_manifold, https://en.wikipedia.org/wiki/PDIFF (splines), and more generally https://en.wikipedia.org/wiki/Surgery_theory.> rather than actually modeling non-Euclidean space nativelyIn mathematics such non-Euclidean spaces are called manifolds. A manifold is defined as a set of Euclidean-like regions that are connected by transition map functions. That formalism is basically the same thing as these portals.
⬐ DanielRibeiroThere is a game in development that uses these ideas too, and is aptly called Manifold Garden:⬐ NoneNone⬐ thfuranExcept that that method wouldn't let you have, for example, a hyperbolic plane that could be traversed without obstruction.⬐ wcoenenI think you could actually approximate an unobstructed hyperbolic plane to arbitrary precision with portals. In this game, the hyperbolic plane is represented as a tiling of hexagons and heptagons: https://www.youtube.com/watch?v=lX5eCfRSCKY&t=742sIf you take this model but upgrade each cell to a little 3D euclidean region, then you could completely surround it by portals that connect it to the neighbouring cells. The edges of the portals wouldn't be visible. The smaller the euclidean cells, the better the approximation to the hyperbolic plane.
⬐ zenorogueFor easy computations assume octagonal cells. Their vertices will have 135 degrees each. The edges of the portal will be visible because the left and right images do not match (since 3*135 ≠ 360). And a object (as long as it is modelled as an Euclidean 3D object, not a point) will not be able to go through such a vertex.There's a short segment where CNLohr shows how he recompiles the code on the fly by using TCC (Tiny C Compiler). That seems rather useful to me, but I don't fully understand what determines which variables of state are persistent across recompilation. I have never used TCC before, but from a rudimentary search I learn you can pass a flag to compile & execute such that C can be used as if it was a scripting language. He mentions storing the environment in environment variables. Is he literally storing the position and orientation of the camera in the shell environment variables? or am I missing some other way to choose what parts of the state are persistent across on-the-fly recompilation?⬐ xashor⬐ evdevHere is an example level [0]. You can see some scripts in there enclosed by InitScript { … }, RunScript { … }. This gets parsed, compiled and called in [1]. In [2] you have your scripthelpers.h, defining what parts of the engine the script can see. On a first glance I don't see support for persistence across recompilation for scripting variables, and things like position/orientation of the camera are simply stored in the engine and not recompiled.For a similar approach, see e.g. Interactive Programming in C [3], which relies on re-loading a shared (recompiled) library. But this step could also be done by recompiling via tcc. There the persistent data lives just in the heap and pointers to it get passed to the next version of the library.
[0] https://github.com/cnlohr/noeuclid/blob/0831b9ce21620704257a... [1] https://github.com/cnlohr/noeuclid/blob/0831b9ce21620704257a... [2] https://github.com/cnlohr/noeuclid/blob/a8e1e038829686f39d48... [3] https://nullprogram.com/blog/2014/12/23/
You could do the overlapping space part of this in the game Descent/Descent 2 since building the levels involved actually directly creating the space partition data structure. I always thought it was incredibly cool and underused.⬐ NoneNone⬐ remramThis is simply multiple Euclidian regions stiched together by portals. Seems very limited compared to actual non-Euclidian renderers like https://www.youtube.com/watch?v=0pmSPlYHxoY⬐ traklWhile it can be useful (or not) on the applications described, this is not non-euclidean. It is pure euclidean, but defined in steps.I agree that is visually exciting and all that jazz, but this has nothing to do with Non-Euclidean Geometry... My surprise is that I though this video will give some 3D intuition on this topic, but nay.
⬐ adrusi⬐ natestemenThis is noneuclidean, in that it violates the axioms of euclidean geometry.1. A straight line may be drawn between any two points.
2. Any terminated straight line may be extended indefinitely.
3. A circle may be drawn with any given point as center and any given radius.
4. All right angles are equal.
5. If two straight lines in a plane are met by another line, and if the sum of the internal angles on one side is less than two right angles, then the straight lines will meet if extended sufficiently on the side on which the sum of the angles is less than two right angles.
It follows from those axioms that the sum of the angles of any triangle is 180°, but in that 3-room house, for instance, you could draw a triangle with 3 right angles, so it must violate the axioms.
⬐ zenorogueThe phrase "non-euclidean geometry" does not mean "any geometry that violates the Euclid axioms" but specifically that the parallel postulate is replaced. traki is right.⬐ traklI've got to reconsider given adrusi's comment, I think he's actually right. The parallel postulate is what makes the sum of angles of any triangle to be 180º.⬐ zenorogueOther Euclid's axioms should still hold in non-Euclidean geometry, but with portals and walls, they do not. Mathematicians who are experts in non-Euclidean geometry would agree that portals do not yield non-Euclidean geometry, e.g. Henry Segerman http://twitter.com/henryseg/status/970797060369846273 (see also http://twitter.com/marctenbosch/status/301331439725719552 ).I could imagine something like this being an amazing tool for teaching people about non-euclidean geometries and how things like distance can be so contorted in other spaces. In particular I'm thinking teaching people about special and general relativity where things can very quickly become very hard to visualize.Really cool.
⬐ SiempreViernes⬐ NoneCheck out "a slower speed of light", relativistic open source game demo made in unity: http://gamelab.mit.edu/games/a-slower-speed-of-light/Unfortunately the movement is rather hard on the eyes, relativistic motion is not what you are used to after all.
None⬐ karrotwaltzThe first time I ever seen this portal gimmick in a game was in the Wheel of Time game (released in 99), although it was used only once in the whole game my mind was blown.⬐ user982What game is the black and white clip at 04:13 from?⬐ anonova⬐ yzhFragments of Euclid: https://nusan.itch.io/fragments-of-euclid⬐ user982Thanks. The crosshatch shader threw me off, but it looks like that can be toggled.I have a feeling that Jonathan Blow will enjoy playing with engine and work something brilliant on top of it.⬐ tobr⬐ orblivionConsidering that all of Blow’s games have used his own engine, and he’s actively building a new engine using his own programming language, it seems rather unlikely that he would suddenly scrap all that work and use this engine instead.That pillar is like a validation of my OCD.⬐ rskI wonder if there is 3d render for 4d space. 4d space can give such wormholes for free in 3d, same as 2d space can be folded in 3d.⬐ davidwI spend too much time with urban politics: I see Euclidean and think of zoning.⬐ AntonyGarandI researched a similar effect few years ago when I was trying to replicate part of the game `AntiChamber` in Unity.At the time, I found out about Stencil Buffers, which did let us create a cube with various different rooms on the different faces: https://www.youtube.com/watch?v=5DKIP9N-OB4
Since then, there has been more "Portals" technique released, among which this blog post which seems to achieve a similar result: http://tomhulton.blogspot.com/2015/08/portal-rendering-with-...
Another game which uses a different type of geometry is HyperRogue: https://www.youtube.com/watch?v=2DtUJ_x_2Hc
It has a hyperbolic plane instead of a regular rectangular one.