Daily news, dev blogs, and stories from Game Developer straight to your inbox
Q&A: The mind-bending geometry of non-Euclidean experiment Hyperbolica
We speak with the developer known as CodeParade about the experimental Hyperbolica, a game set in a non-Euclidean world where geometry contorts your brain.
November 1, 2021
11 Min Read
There's still something of a sense that it's a new field, but commercial video games are nearing 50 years old (Pong came out in 1972), and while there have been a lot of new ideas in that time, it's increasingly rare that a game comes along that's so unique it makes you stop what you're doing and take notice. Hyperbolica is one of those games.
A game where you explore non-Euclidean worlds, Hyperbolica gives you an experience you simply cannot have outside of a video game. It's difficult to even imagine the kinds of sights you commonly see in Hyperbolica. While there are a couple of other similar concepts out there, there's really nothing else like it.
We spoke to its creator CodeParade, who is also a prominent game dev YouTuber, about his amazing, wonderful, and slightly horrifying project. You might also be interested in his videos on the making of Hyperbolica.
Who are you, and what is Hyperbolica?
I'm Kevin, known as "CodeParade" online. I have a YouTube channel about interesting topics related to programming, machine learning, math, fractals, and games. While my channel and game development have both been hobby projects for a long time, I recently jumped into full-time game development with my first full-game project Hyperbolica.
Hyperbolica is a first-person exploration and adventure game to experience what it's like to live in a non-Euclidean space. In particular, it explores hyperbolic and spherical geometries, which have very interesting gameplay consequences. While the mathematics are intimidating (even to me), Hyperbolica makes it easy to discover and learn about everything through fun minigames and interactions so that everyone can build intuition and understand what's going on. It will be available for desktop PC and VR at launch, and may have console ports in the future.
Over the nearly 50 years that video games have been available, there have been new ideas and dominant trends, but Hyperbolica is one of those few games that feels unique. The closest I can think of are Manifold Garden, on which we did a Q&A with creator William Chyr last year, and ZenoRogue's excellent one-HP roguelike HyperRogue. Have you gotten any inspiration from those projects?
It's certainly a unique game, and the lack of anything else like it was definitely the driving force that made me want to turn it into a full game rather than just a proof of concept. My own curiosity about what it would be like to walk in or fly around a hyperbolic world was definitely the main inspiration.
HyperRogue as you mentioned is the only other truly non-Euclidean game out right now but it differs significantly with the type of experience it creates. It is a roguelike at its core, and it utilizes the geometry really well in it's turn-based gameplay. But I'm much more interested in an immersive exploration, a narrative-driven adventure, and seeing how more genres are affected by non-Euclidean geometry in an easily accessible way.
How has development been going?
Development has been going well so far and my target is still a December/Christmas release date. However, it's been really tough developing a game while raising two young kids during the pandemic. With schools and childcare constantly closing and outbreaks going on, I've had to take a lot of time off to provide childcare. Hopefully this will be less frequent as the cases continue to fall in my area, but it's the main worry I have with regards to an unexpected delay.
The dev videos you've released show the game engine off, and it looks great. Watching play footage, the way it overturns your assumptions of how 3D spaces work contorts the brain in pleasant ways. But so far you're the only one who's had the chance to play it, so, what is it like exploring a hyperbolic space? Can one form an intuitive sense of such spaces?
It's interesting. I play the game a lot while developing it, and you very quickly get used to hyperbolic geometry, that is, until you start really paying attention and realize "Wait... huh?" For example, walking on a square with four 60 degree angles feels natural and normal. It's easy to miss, even if you know that it shouldn't normally be possible!
It's difficult to design, edit, or preview these levels since you can't see them all at once in any editor.
Navigation over larger areas on the other hand is more difficult to adapt to. There's no way to visualize a map in your head anymore. In fact, it's mathematically impossible to even draw a map on flat paper, the map would have to curve it on itself making it unusable anyway. Instead, you generally just navigate based on remembering landmarks, like "Oh, C is next to B and B was near A, so I'll head to A and then find my way to B and then C." This comes kind of naturally since this is what humans do when wandering around anyway.
Spherical geometry is another beast entirely. It's easier to conceptualize what's going on, but visually it's much trippier.
Since hyperbolic space is bigger than regular space, does that force you to do more content creation? How do you even measure the size of a hyperbolic spatial area?
It does make it hard to design large spaces because 3D modeling happens in a Euclidean editor, and the bigger the model is, the more distortion is required to stretch it back into hyperbolic space. That's why I'm using a tile-mapping strategy so that no part of the level needs to be designed larger than the tile size, minimizing distortion. Tile-mapping is also great because I can fill in less important areas of the level procedurally. So overall it actually minimizes content creation since many tiles can be reused or repurposed.
You mention in one of your videos that one of the reasons Hyperbolica is taking a while to finish is the need to build your own tools. What are they like? How do you construct a hyperbolic 3D model? What's the UI for your editor like, how does one even construct a non-Euclidean model?
I generally avoid building tools if I don't have to, so most of the tools I create are more like add-ons or plugins for existing editors so that I can leverage them as much as possible. For example, the tiles I mentioned are just built in Blender without any special tools. Unity is the one responsible for arranging and stretching them into the space which happens behind the scenes with some scripts. The only differences in model design are small things like controlling subdivision and avoiding intersecting geometry.
One of the difficulties with making a spatially-hyperbolic game is, you can't use a normal X/Y coordinate system for the world. You've already gone over this in one of your videos for a casual audience, but if you'd care to explain it for an audience of game devs, how do you lay out your world? What are the difficulties in world representation and tracking location?
There are several coordinate systems that have to be wrangled together to make things work, namely a discrete coordinate system for the tiles, a hyperbolic coordinate system, and Unity's coordinate system.
The tile coordinate system is explained in one of my videos, but as a quick recap, the level layout is a hyperbolic grid, rather than a Euclidean one. So there aren't any practical X,Y,Z systems for mapping tiles. That's because, for example, the Up-Left tile is different from the Left-Up tile. Instead I use a string of steps from the origin in the six cardinal directions (or four for flat tilemaps).
Still, it's difficult to design, edit, or preview these levels since you can't see them all at once in any editor. So most of the level design happens in-game, where I can move around and preview things real-time.
You're using Unity as your rendering engine. Did you have to build onto it much?
Yes, the entire rendering pipeline is custom-built (by necessity) and is quite complicated to pull off in a performant way. I recently made a video about this in my 6th devlog.
You mention gyrovectors in your videos, I think our audience would appreciate a quick description of those and the math behind them? How did you learn about them?
Just like in regular 3D games, there are multiple ways to represent an object's transformation. For example, quaternions and matrices are two different common ways to describe a rotation. Gyrovectors, in the context that I use, are basically a vector and quaternion to represent an object's hyperbolic transform. But there's also Minkowski coordinates which are more analogous to 4x4 matrix transforms, and this is actually a more common approach for mathematicians. However, I find gyrovectors easier to work with in the context of game development for the same reason that most game engines use quaternions instead of matrices for their rotations. It's just conceptually easier to edit, animate, and understand what's going on. They also nicely extend to spherical and Euclidean geometry with just a simple sign change.
I happened to stumble upon them by accident when I was trying to figure out the math for how rotations would be induced by a hyperbolic translation. In the paper I saw one of the exact formulas I had already derived, along with a bunch of other identities and formulas I was missing. I was able to use these to fill in the gaps and make things much cleaner.
Hyperbolica also will allow users to explore curved spaces, which are mind-twisting in a similar way. For example, objects in the distance increase in size rather than decrease. What are some fun counterintuitive things about this?
Spherical geometry is quite counter-intuitive, because like you said, there's a reverse perspective with farther objects appearing larger than closer ones. However, even though things seem to constantly warp around you as you move, nothing is ever perceived to curve or bend. All lines and objects remain straight throughout your entire view with only angles appearing to change. Another interesting fact is that in VR, objects about halfway to the other side of the world have a depth perception infinitely far away. And objects even farther, the ones that appear really large, are actually past infinity in terms of depth perception! Strangely (and luckily), your eyes don't notice very much and seem to compensate for this, so you're still able to focus normally in VR.
We've talked about the tech and feel of Hyperbolica, would you like to tell us a bit about its game-like structures? What kinds of things do you have planned for the player to do in all these neat spaces?
There are many games within Hyperbolica to let you explore how non-Euclidean geometry affects different types of gameplay. For example there are racing games, platforming, flying, navigation, and puzzles that all feel very different and have different strategies compared to similar games in Euclidean space.
After a long period of time eking out time to work on the game here and there, you recently made the decision to quit your job and work on Hyperbolica full time, which has got to be scary. How did you make that decision, what precautions have you taken, and is there any advice you can offer other single-person and small-team indie devs thinking about making this plunge?
I'm very lucky to have the opportunity to do this, because my situation is really unique. At the time I took the plunge, I had about 300K subscribers on YouTube, with my devlogs being very popular. Since I have such a large built-in audience, I'm able to self-publish since I have a solid base for free marketing already. Those videos plus the Steam wishlist give me a really good estimate for what I would expect for a worst-case or average-case scenario in terms of sales. Once that was about the same or higher than my current salary, that was when I made the decision.
That said, there's still a lot of risk. The game still has to be finished, and any delay becomes more time without a regular income. But the most important thing is that the game is fun and exceeds expectations, and I would always rather delay than release something I wasn't completely proud of. Hopefully things will go well, and we'll see if this becomes a long term career move or just a passion project detour.
You May Also Like
Exploring the 2024 State of the Game Industry report - Game Developer Podcast ep. 39Feb 2, 2024
Phantom inspiration and the ethical auteur with Xalavier Nelson Jr.Dec 8, 2023
Designing Killer Queen: from playground experiment to modern arcade sensationOct 18, 2023
Rod Humble and King Choi illustrate the ambition of Life By YouSep 22, 2023
Get daily news, dev blogs, and stories from Game Developer straight to your inbox
Subscribe to Game Developer Newsletters to stay caught up with the latest news, design insights, marketing tips, and more