HyperRogue
Elliptic geometry: could it work for a game like this?
I've been thinking about how a game like HyperRogue would work if it took place in elliptic geometry instead. But before I can really imagine mechanics or anything like that, I want to fully wrap my head around the nature of the elliptic plane.

Priority-one question: Is it necessary that the world be periodic, in that if you pick an arbitrary direction and follow a straight line, you'll return to where you were? This would mean there's a finite area for the entire plane, right?

The spherical model of elliptic geometry does, of course, have this property. But (if I understand correctly), the spherical model is only one possible model; is it possible that the periodicity is an artifact of embedding elliptic geometry in Euclidean space, or something like that? Or does spherical geometry merely inherit its periodicity from elliptic?

If this is all true (which seems like it would be unfortunate for a game), then of course you could keep the curvature low to get an arbitrary large linear period (like an arbitrarily large great circle on a sphere), mitigating the effect. But of course, as the curvature approaches 0, the unique properties of elliptic geometry become suppressed, and the plane becomes more qualitatively Euclidean. This seems like the reason this periodicity would make for a poor game, if that game is about exploration: you want the curvature to be big enough for the effects to be appreciable, but you don't want to decrease the radius so much that the player runs out of unexplored territory!

Of course, either way, there are numerous problems with directly importing HR mechanics into this plane; the very handy fact that enemies have to line up to keep up with you is completely inverted (right?), with all enemies rapidly converging on your position. Also, I have no idea how a Crossroads-style area could possibly be done, since any two lines intersect at some point. Maybe the Great Walls become a Great Wall, a circular one, with zones branching away from the perimeter. But that throws the random generation right out (doesn't it?); the wall has finite length and thus generating newly-unlocked areas becomes problematic (unless you throw away parts of the wall as you move away from them, which feels like cheating). I suppose (the entrances to) the Tier-2+ areas could be generated in advance, to be returned to when unlocked. In general, returning to the same area (a near impossibility in hyperbolic) becomes considerably more feasible. In fact, depending on the curvature, elliptical's certainty to return may even be as strong as hyperbolic's certainty *not* to, in an "all roads lead to Rome" dynamic. That also doesn't complement a roguelike much, although if that area is the Crossroads-analogue, it might not work out terribly.

To me, it doesn't really seem like a game mechanically similar to HR would be feasible (i.e. fun) in this type of space, but I'm very shaky in my thinking about all this and I'd like others' input (because it's also really cool, anyway). And anyway, I think zeno is pretty darn clever, and could probably get *something* out of the idea, if they were interested.

(As a side note: I think it's very funny that I've played so much HR that I intuit hyperbolic geometry better than elliptic, when the latter is so much more accessible.)
< >
Showing 1-8 of 8 comments
zeno  [developer] Mar 16, 2015 @ 5:02am 
I am not up to date with differential geometry, but my intuitions are as follows:

First, suppose that the player is allowed to move freely on the map. Also assume that the curvature K is fixed.

Then there is always a function f(x) from the basic surface of curvature K (sphere, plane, or hyperbolic plane) to the game world. To find f(x), just connect the starting point 0 on the basic surface and x with a line, and make the player follow exactly the same line in the game world. The result does not depend on the choice of the line (0-x) -- since the curvature is the same on both maps, homotopic lines will end in the same point (at least that's my intuition), and since all the basic surfaces are simple connected, all lines are homotopic.

If the function f is a bijection, we are basically playing on the basic surface. If it is not, then one point of the game world corresponds to many points of the basic surface. This happens if we wrap the world in some way. (Imagine a square, connect top and bottom edges with portals, and connect left and right edges with portals -- then you would get a different world with Euclidean geometry, a torus, or a Klein bottle, if you connect them weirdly. Some deep levels in my my other game (Hydra Slayer) have a torus or Klein bottle topology. The same can be obtained in hyperbolic geometry, for example by placing portals around a single chamber in the Emerald Mines.)

We could do such wrapping with a sphere too, but we will only get even more restricted world. One interesting example is the projective plane, which is obtained by making each point the same as its antipode. If you went around the globe to your antipode, everything would look just as your home location, but mirrored (this happens in Hydra Slayer too, on the Klein bottle levels).

It changes if we remove the assumption that the player is allowed to move freely. For example, if we remove a point of the plane, the surface stops being simple connected, so a path which circles around the removed point on the plane could actually lead to a different point in the game world. It would like as if the world had a pillar in the center, that you could walk around to get to a different place. The same if we remove two points of a sphere: if we do not allow moving to a pole, we could get into a completely new location by going around the world, and to infinitely more locations by moving around the world more times. But I think that forbidding the player to move on the poles defeats the point...
Fulgur14 Mar 16, 2015 @ 8:47am 
Basically, you could get something like a planet that has "more" than 360 degrees of meridians but while this can be imagined simply enough as a surface, it becomes troublesome when you try to put such a planet in bigger universe.

But spherical geometry is "too small" for a proper game if you want to keep a simple grid. Even (5,6,6), closest analogue to Euclidean (6,6,6) and HyperRogue (6,6,7) has only 32 tiles on the whole sphere. You'd have to subdivide those tiles.
tricosahedron Mar 17, 2015 @ 1:04pm 
FWIW, here are some games that I can think of which incorporate elliptic geometry, or something similar:
  • In Asteroids and Pac Man, the play area is periodic. There even was a 3D implementation of Asteroids, which can be found here[www.grassgames.com].
  • In the Super Mario Galaxy games, you could move on the surface of spheres. However, you could move in 3D, and you were not limited to one sphere, but you could travel between them.
  • I didn't play it, but I saw a video of Katamari Forever, where you grow larger and larger. At the beginning, it seemed the plane was Euclidean, but when you reached a certain size you could see that you're on the surface of a planet. Not sure if the world was always spherical, or only in the end, but this is an interesting feature of elliptic geometry: If you're small, the world is almost Euclidean, but the larger you are, the more "elliptic" it becomes relative to you.
  • In Tetrisphere, you have a sphere consisting of multiple layers of tetrominos.
  • In F-Zero X (and probably several other SciFi racing games), you could drive on the surface of something similar to a Cylinder or Donut. The track I remember was called "Space Plant". That's probably not elliptic geometry, but I think there are similar properties.

Also, there's an interesting concept in Tolkien's Silmarillion; see Straight Road[www.glyphweb.com]. ;)
Last edited by tricosahedron; Mar 17, 2015 @ 1:09pm
zeno  [developer] Mar 17, 2015 @ 2:40pm 
I do not know about F-Zero X, but Asteroids and Pac-Man (and some deep levels of Hydra Slayer) are played on a torus. This is finite, but still Euclidean -- it has curvature 0, and even Euclid's fifth axiom is satisfied (if we have a straight line L and a point A not on this line, there is exactly one straight line which goes through A and does not cross L).
Last edited by zeno; Mar 17, 2015 @ 2:42pm
Fulgur14 Mar 17, 2015 @ 3:26pm 
On the other hand, there are also configurations which are hyperbolic but finite. One way to build such things would be to start with regular tesselation of hyperbolic plane, put a specified (chiral) image on each cell (for example red arrow pointing at an edge and blue arrow pointing at adjacent edge) and make it so the whole image is uniform (from each cell it looks the same, or at most like a mirror image). Such arrangement defines where you will appear after leaving through an edge.
tricosahedron Mar 18, 2015 @ 2:33pm 
I thought of the torus stuff as "something similar" to elliptic geometry, due to the periodic nature. But now that you mention parallels and curvature ... well, never mind. ;)
Mader Mar 29, 2015 @ 5:27am 
Am I right thinking elliptic plane would be opposite of hyperbolic plane, at least as far as game is concerned?
For example, smallest tile would be in center, and tiles surrounding it would be larger.
Well, then I do not think game would be very playable. For example, any escape against two monsters would soon end up in your death.
tricosahedron Mar 29, 2015 @ 6:49am 
Originally posted by Mader:
For example, smallest tile would be in center, and tiles surrounding it would be larger.
That's what I think, too.

Here[www.korthalsaltes.com] you can see the net of a dodecahedron. The circumference of the circle with radius 1 has some small gaps. The circumference of the circle with radius 2 has large gaps, because it has the same number of tiles as the one with radius 1. The circumference of the circle with radius 3 consists only of a single tile, so it has a huge gap. One could fill those gaps by stretching the tiles.

The smaller the sphere, the stronger the distortion, and the larger the sphere, the more it resembles the Euclidean plane.
Last edited by tricosahedron; Mar 29, 2015 @ 6:53am
< >
Showing 1-8 of 8 comments
Per page: 1530 50