DigiDigger - 2020-08-24
I'm a professional programmer who works on games, web and VR/AR applications. With my videos I like to share the wonderful world of programming with everyone! What are "non-euclidean" games and how do they work? We'll discuss the inner workings of games like Antichamber and Superliminal as well as discussing the theory behind non-euclidean geometry. References HyperRogue trailer https://www.youtube.com/watch?v=xAFrKKApHTY Zeno Rogue https://twitter.com/ZenoRogue/status/1245367263936512001 Unity stencil buffer tutorial https://www.alanzucconi.com/2015/12/09/3873/ No! Euclid! GPY Ray Tracer game https://www.youtube.com/watch?v=tl40xidKF-4 Channel CNLohr https://www.youtube.com/channel/UCG7yIWtVwcENg_ZS-nahg5g Hyperbolica trailer https://www.youtube.com/watch?v=EMKLeS-Uq_8 Hyperbolica devlog #1 https://www.youtube.com/watch?v=zQo_S3yNa2w Channel CodeParade https://www.youtube.com/channel/UCrv269YwJzuZL3dH5PCgxUw Antichamber https://store.steampowered.com/app/219890/Antichamber/ Superliminal https://store.steampowered.com/app/1049410/Superliminal/ Hyperbolica https://store.steampowered.com/app/1256230/Hyperbolica/ HyperRogue https://store.steampowered.com/app/342610/HyperRogue/ Music in in outro: Besus y Abrazor - Rolemusic: https://freemusicarchive.org/music/Rolemusic available under a Creative Commons Attribution license https://creativecommons.org/licenses/by/4.0/
The original non euclidean space is the infinite staircase in Mario 64
@Christopher Savignon Of all the comments that I would “flagbot,” why wouldn’t I have your first one taken down? The one where you THOUGHT you sounded smart and was so proud of? 😂 😂 😂 😂
I just went back and took a snapshot of it and reread it as I did so.
In the context of your subsequent comments, I can understand just how desperate you want people to think u r smrt!!! 😂 😂 😂
@Joseph Coon
Man, you really need the attention, do you.
@Christopher Savignon Says the guy trying to flaunt his superior spatial relationships understanding. 😂 😂 😂
It’s also ironic that you HAVE to respond to me while claiming that I need the attention.
Further irony...claiming that I am deleting YOUR comments while also claiming that I seek attention. What kind of attention is it if I look like I’m talking to nobody?
Actually, YOUR responses look stupid after I show you how little you understand, so you THINK deleting your comments will just make ME look crazy. When, in fact, I have screenshots of your comments, and can easily prove how stupid you actually are. Being embarrassed at your stupidity is a good sign. Hiding it is not. Embrace the fact that you are ignorant and motivate yourself to rectify it. 😂 😂 😂
Zelda on NES had a non euclidean forest, no?
The original "Asteroids" had a circular space. You can wrap around the screen edges
Dude, if my geometry teacher explained it like this, I wouldn't have done summer school
@Tyee Elu if it is not a meme you are very wrong
But then you wouldn't be as jaded, and where's the fun in that?
@Sure Lock I don't know why he says that is teacher's fault but anyway
yeah because he skipped most of the math, which is what you need to learn to get more than a surface level grasp on it
Liar. You didn't learn noneuclid in geometry. You learned EUCLIDEAN geometry. Non-euclidean geometry is used in physics and satellite tracking etc.
Before portal 2, valve experimented with a concept called "f-stop" it basically had the same rules as the game seen near the end. You had a "magic" camera that takes pictures, take a picture of an object and suddenly you can place a much larger or smaller version of that object by just using the portrait.
It was an interesting concept that never saw the light of day but at least its idea exists in many games today.
A bit off topic but Portal 2 is an amazing game
Seems a lot like Superliminal, definitely a head trip of a game.
@Julia Li sadly, no
@Vindextra Viewfinder.
@zarrowthenorse i got the game today, and its amazing, im very late to the party but still
Q: How can games be non-Euclidian?
A: It’s software. It doesn’t have to model the real world.
Real world is not euclidean
it's like: ok I need you to make it this long, and this wide, and this tall, and then make it this size in the fourth dimension
Computer: aight.
Person... But how did you do that the universe isn't like that!
Computer: what's a universe?
Sometimes, developers try very hard to actually simulate the world you perceive through their game. Sometimes, they use 'cheap tricks' to manipulate your perception. In either case, the end result tends to be enrapturing and mind-blowing.
Exactly
I'm sorry I just reread your comment and am now thinking of the bee movie script
"the software of course, is non-Euclidean anyway, because computers don't care what humans think is impossible"
It's funny how so many people imagine weird, eldritch stuff when hearing "non-euclidean"... Scared of a term they don't know, like with chemicals. Not realising they encounter non-euclidean geometry on a daily basis. Drew a face on a balloon? Had a tattoo? Congratulations, you made non-euclidian geometry.
I guess we partly have to blame Lovecraft for that.
@Masketta Man the importance of a knowledge really depends on the environment you live in
@Anders Naugle damn bro, become a historian well done lmao
Same with getting their minds blown when it comes to numerical notation in non-standard bases, forgetting that time is (mostly) described in base-60!
Best example i can think of is dihydrogen monoxide
The mathematics of Euclidean geometry is far simpler than the non-euclidean. That's why it is not taught in schools. You need to have an understanding of vectors, matrices and more importantly tensors besides other things.
Hyperbolica is an actual true Non-Euclidean game with curved space instead of a locally Euclidean game which occasionally breaks it's own space
There's multiple ways of being non-Euclidean. Portal and Antichamber are mostly flat and Euclidean as long as you aren't close to a portal, but globally are not simply connected and so the axioms don't hold. But hyperbolic and spherical spaces are curved, and so the axioms don't hold. I wouldn't say one is more truly non-Euclidean. But the former are not even smooth manifolds, having sharp edges where space breaks down. If you were to stand in a Portal portal and move sideways, would you be sliced in half by the sharp edges of space?
@pyropulse "Euclidean space" usually means this specific thing: https://en.wikipedia.org/wiki/Euclidean_space
However, "non-Euclidean" means "Riemannian manifold which is not an Euclidean manifold" i.e. "Riemannian manifold whose geometry is not Euclidean". So Portal is an Euclidean manifold, but not the three-dimensional Euclidean space, and it is not non-Euclidean.
@zzasdfwas
perfect
@Kitulous Gamedev Channel Just touching it should be hard enough though. I mean knives can cut and they're many atoms thick
Einstein is that you?
yeah. that's what he said in the video.
I love the way these "impossible" things are happening in a world that has taken decades to tune so that it didn't routinely do these kinds of reality-breaking things.
Yeah it would be quite fun if these things actually did happen IRL though.
2:51 - Actually... a straight line is still the shortest in the curved space shown (sphere). The curve you see is extra-dimensional and is not an actual curve within the curved space.
Agreed.
If you want to get really technical, the line postulate being violated in spherical geometry is about there being exactly one shortest line between two points
@Bugsydor Because some points have infinite lines that are all the shortest?
@Matthew Doucette
Yes, if I recall correctly. Though I'm having trouble recalling whether it's exactly two lines, or an infinite number.
@Bugsydor Well I was thinking north pole to south pole, and all other such examples.
What a great video, just like the other of the bitwise series, I always love to see and understand how these games mechanics works with a great explanation and plenty of examples
4:34 So my early 3d drawing program wasn't faulty, it was just simulating spherical space
Such a great introduction of how physical geometry could work in game engine. Inspiring and fantastic, appreciate your work:)
Anti-Chamber was so fun.
My favorite mechanic is finding out that you are expected to break the game.
Set aside proper notions and see how often you have to do the exact opposite of what you think.
This is one trick where explaining the magic has only made it cooler. Simple, yet extremely effective.
actually, it was disappointing to know that non-euclidean games are actually euclidean lol
Hyperbolica would be an exception
Its developer also shows off the differences between Euclidean, non-Euclidean hyperbolic, and non-Euclidean spherical spaces
hyperbolica
they can't break the laws of physics y know
@𝗧𝗛𝗘 𝗙𝗢𝗨𝗡𝗗𝗔𝗧𝗜𝗢𝗡
They can check out Hyperbolica, though
My god, dummy. Please get a life. These aren't Euclidean
You mentioned Zeno Rogue! He's awesome, and his game Hyperrogue is a way to help wrap your head around what hyperbolic planes are like interactively.
This was so fascinating!! Plus I can't wait to try some of these games, they seem really trippy.
Great video! You teach people by using an unusual and most importantly an interesting example - games. As a 15 year old student, I am VERY interesting to watch this, thanks. I played Antichamber almost 5 year old, but still remember that masterpiece, i should play it again!
Their teleportation had to be on point, literally. They make sure that you teleport not only to the hallway but to the corresponding position in the destination hallway. I love these games!
That first game is a masterpiece. It gets a bit repetitive at the end when the block tools are the only remaining puzzles to solve but its still amazing.
I was really impressed with superliminal when it came out. Literally didn't know how it was achieved. Now it looks so simple, but it's great.
Your content is truly amazing. I wish there was more of it.
Really interesting games. Highly recommend Monument Valley as well. It uses isometric perspective with Escher-like tricks, where things that look connected are corrected.
Bro you're giving us hope like this, making amazing videos and whatnot
Dont leave again? Deal.
Really? Your hope lies in computer games? Welcome to the simulation, sir.
I'm honestly blown away that I haven't found this channel before - combining two of my favourite topics. Just excellent content. Bless the algorithm, for once. Earned a sub.
Fun fact: when antichamber first released, something was bugged in that hypercube room. It looked almost like a multi-monitor setup with a video stretched between each screen, only it was just a partial match to each side of the cube. While the method you showed off is cool, I think they just used render targets. Hopefully a dev can correct me though
I'm sure some are looking for this and were disappointed that it's not provided in the video. So:
Use Möbius transformations of quaternions. (Look it up if it's new to you. I won't give full explanations here.)
Quaternion rotations are represented as Möbius transformations of the form
q 0
0 q
A parallel transport (translation) of distance s in the direction of unit vector v is...
in a flat Euclidean space:
1 sv
0 1
in a spherical space of curvature 1:
cos(s) sin(s)v
sin(s)v cos(s)
in a hyperblic space of curvature -1:
cosh(s) sinh(s)v
-sinh(s)v cosh(s)
This works with coordinates in a polar projection for spherical and a Poincaré disk for hyperbolic space. Geodesic surfaces are represented as surfaces of constant curvature (spheres and planes). If you want to use standard Z-buffer based 3d graphics, then for rendering you need to transform the hyperbolic coordinates to the Beltrami-Klein model and the spherical coordinates to a central projection. The central projection can only map half of the sphere, and that's ignoring limits of floating point precision. So you'd need think about how you can slice and dice your frustrum to render beyond that.
In all of this we use the imaginary space of the quaternions as our three-dimensional world. But we're using four-dimensional quaternions internally. So this can easily be expanded to a four-dimensional world by allowing rotations into the real-valued axis of the form
q 0
0 q*
(where q* is the conjugate of q)
and allowing v to have non-zero real values.
Great video! I definitely think the in engine examples you show put your vid a step above other explanations that I've seen of antichamber.
This reminds me of the old days with Unreal 1 Zone portals and Serious Sam 1. I love games that do this sort of thing.
Unreal 1 (UE1) Zone portals were so fascinating, wish they became more popular again. You could design some seriously cool levels with them.
I found this video very well explained and the examples were very helpful!
I always thought that those cubes in antichamber were made via a creative use of "projection" tech. Alot of screens in video games will have a room with a virtual camera pointed somewhere within them, and then "project" the view of that virtual camera onto the "screen." In those games, however, the screens appear flat (as they should) because the viewpoint of the virtual camera is static. If you were to take the player's camera and the character movement into account, you can replicate the appearance of a space behind the "projection" and it becomes believable because, even though the surface is flat, our brains believe it because of the accurate parallax. It's a similar idea to how the "looking glass" worked in prey 2017.
HyperRogue was my first introduction to non-euclidean geometry in a game. Exploring a hyperbolic world is quite fun.
I think another interpretation is that it's a 2D representation of a 3D or 4D space, much the same as how Asteroids can technically be mapped onto a torus based on the rules of the program. So rather than trickery, I would say it's simulated.
this is actually very helpful, thanks for the great explanation!!
Hey, around 1:35, perspective geometry claims that parallel lines intersect at infinity. On another note, there is another game similar to those showcased in which the player has a camera that takes photos, then can put the picture anywhere, and the picture becomes physical.
I still think that super liminal was one of the most mind boggling games to date. I wonder if you have played the entire game yet
Recommend checking out Hyperbolica for some fun non-Euclidean hyperbolic spaces
Its developer also shows off the differences between Euclidean, non-Euclidean hyperbolic, and non-Euclidean spherical spaces
Trippyyyy!!
I kinda did that effect in Unreal Tournament long time ago, when they had "portal" zoning mechanics.
It did exactly that by a geometry plane displaying the other geometry plane in another part of the map. So you could literally walk from one part of the map to the other without noticing space bending.
When dealing with parallel lines example, the issue is you transformed it through a second dimension, the three dimensional sphere is irrelevant. Same with the shortest distance from a to b, you only arbitrarily chose to make it wrap around a two dimensional part of the sphere.
Nice video. Few things remained unexplained. Such as "making" of the objects in Superliminal. You have a painting, clearly. Then you reach a way point, and there is no more paint or wall, there is only that object. Or how portals in Antichamber change where they lead when you're not looking at them. Keep creating.
I love this content man, incredible work.
This was a very interesting topic to cover. You always deliver with your videos!
I love non-euclidean puzzle games. Working out something that breaks everything you're meant to know is immensely satisfying.
i remember back in the day unreal tournament had mirrors, and portal zones. you could do stuff like the stuff in antichamber! my favorite being CTF-FinalFace where the base only had one level inside but 3 outside. you could even shoot thru the openings.
ayyy, glad to know you're back dude!! hope you continue with your work in these videos, they are really great. Have fun making them, 'cause we're sure having fun watching 'em
We were discussing the basic Euclidian Geometry in class, and I mentioned how some video games use their platform in creative ways to bend those Euclidian rules. I shared this video with the teacher, and made a 10 point extra credit assignment for the class if we could give a 150 word reaction of this video, discussing the stuff you went over.
Thanks ! I wanted more infos after watching Huperbolica devlog and this was amazing. Nice examples and explanations !
dude you earned a sub from me. wow! what a compelling breakdown and stellar explanation
I love these concepts a lot more fun than being stranded with physics
ZenoTheRogue - 2020-08-26
Thanks for the shout-out! Here are some comments:
* you say that "the shortest line on a sphere is not necessarily a straight line" but what is a straight line? It is a kind of meaningless concept until you define it. In my opinion a straight line is one that is (locally) shortest, making this "axiom" a definition. For a creature actually living in a non-Euclidean world, the shortest lines are indeed straight. If you are a creature living in a (two-dimensional) spherical geometry, the third dimension simply does not exist for you, and the great circles are perfectly straight lines, because they curve neither to the left nor to the right.
Also, if you try a computer simulation of a spherical or hyperbolic three-dimensional space, the shortest lines will look straight (this is not the case in non-isotropic geometries though).
* I definitely agree that all the games are just tricks. However, it does not matter! It is the effect which is important, not how it was achieved.
The problem with games such as Antichamber or Superliminal is that they do not give a feeling of being in a non-Euclidean space at all. You do not see the visual or geometric effects typical for non-Euclidean geometry when playing these games. The effects you see have nothing to do with non-Euclidean geometry.
* you sound as if non-Euclidean geometry was something accessible only to geniuses, and game development was easy. Most people are born with great math skills, which then deteriorate because of bad teaching. The math of non-Euclidean geometry is not really much more difficult than the Pythagorean theorem or trigonometry. The bigger problem is conceptual, not mathematical: people have their Euclidean intuitions so deeply ingrained that if you show them that they are wrong, they will not believe you and make the same Euclidean assumption again.
* Also it is the best to just play a true non-Euclidean game and see for yourself. That is way better than watching videos or reading books. Everything can be experienced in HyperRogue.
happinesstan - 2021-05-29
@Christopher Savignon But the earth isn't flat, and the car doesn't go straight.
Joseph Coon - 2021-05-30
@Christopher Savignon “Stalin” 😂
Calm down kid. 😂
Savage van wizardwitch - 2021-07-13
⚓
𝔃𝓱 - 2021-08-09
a straight line is a line that is defined by two points..... not hard to define at all....
Maselek - 2021-09-13
It feels weird seeing people from the hypermine discrod (so totemica and that's basically it)