[HN Gopher] How to create a game using hyperbolic geometry? (2020)
       ___________________________________________________________________
        
       How to create a game using hyperbolic geometry? (2020)
        
       Author : bumbledraven
       Score  : 78 points
       Date   : 2023-06-23 15:31 UTC (7 hours ago)
        
 (HTM) web link (roguetemple.com)
 (TXT) w3m dump (roguetemple.com)
        
       | hyperlogic wrote:
       | In 2010 I released an iPhone game that uses hyperbolic geometry
       | in a similar way. It's a match 3 game inspired by the work of M.
       | C. Escher. A few years back I ported it to javascript using
       | emscripten. You can play it for free here.
       | 
       | https://hyperlogic.github.io/circull/circull.html
        
         | spencerflem wrote:
         | This is beautiful!
        
         | zenorogue wrote:
         | Thanks for sharing! I thought that Circull was a game that once
         | existed for iOS and then was lost, did not know about the web
         | version. (Esfera Chess was another iOS game that was non-
         | Euclidean in some sense and is lost.)
        
         | djsavvy wrote:
         | This was really fun to play!
         | 
         | I wish there was a way to request hints on my own time instead
         | of getting the flashing after a few seconds. In my experience
         | the flashing hints were coming too quickly for me to even look
         | through the whole board, let alone choose an optimal switch.
         | 
         | Nevertheless, great game! Thanks for sharing.
        
         | goddtriffin wrote:
         | This is very fun! Thanks for linking!
        
       | juped wrote:
       | The trick with why HyperRogue works as a game does in fact come
       | down to hyperbolic geometry; it's not a gimmick.
       | 
       | Hyperbolic space has a lot more space in it than flat space. The
       | circumference of a circle grows linearly with the radius in flat
       | space, but exponentially in hyperbolic space. There's a huge
       | amount of room even just a short distance away from some given
       | point.
       | 
       | HyperRogue is based around this property; one wanders the tiles
       | of the hyperbolic plane in arbitrary directions, visiting various
       | biomes with their own mechanics. Switching biomes is as simple as
       | walking in an arbitrary direction until you see a biome wall, but
       | at the same time every biome is endless in all* directions. This
       | wouldn't actually fit in a Euclidean plane.
       | 
       | There's also some mechanics that make use of the properties of
       | the space, like the very difficult late game puzzle of "walk 100
       | paces, then return to your starting point" or the tricky "find
       | the center of this circle".
       | 
       | *pedant repelling asterisk
        
         | [deleted]
        
         | LanceH wrote:
         | > find the center of this circle
         | 
         | That damned holy grail. It's only something like 21 steps from
         | the edge of the circle. How hard can that be, right?
        
         | immibis wrote:
         | Well, it's also easy to imagine a Euclidean variation of
         | HyperRogue that would use portals (line segments) as biome
         | bondaries, instead of lines.
        
       | b33j0r wrote:
       | Once I understood non-linear vector spaces and coordinate
       | transformations... wait what am I saying?
       | 
       | One day, I realized you can do cool stuff if you have geometry
       | data as x, y, z:
       | 
       | t = x + y;
       | 
       | xt = sin(t);
       | 
       | yt = cos(t);
       | 
       | zt = sqrt(xt**2 + yt**2);
       | 
       | You'd only do it that way explicitly in a vertex shader--but
       | congratulations, that's a coordinate transformation!
       | 
       | Now do it with more xyzwqp's, then, profit!
       | 
       | In my example, I compressed x+y down to one parameter. You'll be
       | combining 4 spacial dimensions into combinations of xyz for use
       | with a rendering pipeline.
       | 
       | Or, alternatively projecting straight to xy. Not sure which is
       | preferable.
        
         | immibis wrote:
         | In hyperbolic geometry it's hard to even have x,y coordinates
         | at all. Once upon a time I looked at the source code of a
         | hyperbolic 2D game; can't remember if it was HyperRogue or
         | something else. It recorded your position as something like a
         | binary representation of a path down a tree from the origin
         | point.
        
           | zenorogue wrote:
           | More precisely -- you can have x,y coordinates, or (easier to
           | work with) x,y,z coordinates, but you would quickly run into
           | numerical precision issues, and that binary representation
           | prevents that. (Probably it was HyperRogue, other hyperbolic
           | games are wrapped or small enough to work without it. David
           | Madore's hyperbolic maze has a wrapped world so it uses a
           | totally different system. I think Sokyokuban also has tree-
           | based representation of the map, even if the world is small.
           | It could also be Hypermine by Ralith, it is also open world
           | and open source.)
        
       | thrownblown wrote:
       | HyperRouge! i've got it on my phone!
        
       | dang wrote:
       | I put 2014 on this because of
       | https://web.archive.org/web/20141214000216/http://roguetempl...
       | but it looks like most of the content wasn't there yet. Anybody
       | want to figure out a better year?
        
         | wincy wrote:
         | Looks like the current version with the really deep dive is
         | from somewhere between 2020-2021 based on manually clicking
         | through archive.org.
         | 
         | 2020 would probably be more a appropriate tag?
        
           | dang wrote:
           | Done - thanks! Pretty cool to work on a piece like that for 7
           | years
        
             | zenorogue wrote:
             | Yeah, it is updated from time to time. Mostly small
             | changes, but the version from 2014 was much less detailed,
             | so better to list it as newer.
             | 
             | Currently working on a more detailed "book" on this :)
        
       | avmich wrote:
       | https://sokyokuban.com/#1
       | 
       | Another nice and small hyperbolic geometrical game.
        
       | daniel-thompson wrote:
       | This is really cool! But unfortunately for me, it gives me
       | vertigo after a minute or two. Anyone else have that sensation
       | and/or any pointers to resolve? I'd like to keep playing with
       | this if possible.
        
       | swayvil wrote:
       | I too have delved into a variety of fancy geometries for
       | roguelike, rts, etc. And still do.
       | 
       | My friends tell me, "no. Just use square grids. Nobody's brain
       | wants to process that stuff. It's too complicated".
       | 
       | But I'm still looking. Maybe the hyperbolic. There are definitely
       | advantages. It beautifully combines the efficiencies of top down
       | view and wide-view perspective.
       | 
       | Maybe it could be rendered more prettily.
        
         | immibis wrote:
         | Hyperbolic is fundamentally different geometry. The
         | circumference of a hyperbolic circle is exponential in the
         | radius. Yeah that's right - add one unit (or at least, a fixed
         | number of units) to the radius, and the circumference
         | *doubles*. If you're thinking about using this geometry you
         | should go and play HyperRogue to get a feel for it.
        
       | vslira wrote:
       | Slightly off topic: does anyone have good intros to hyperbolic
       | geometry? I was imitating drawn by applications related to
       | hyperbolic embeddings in NLP, but I'm having a hard time
       | understanding why, in what ways and how it could be "better" than
       | euclidean etc
       | 
       | Fun fact: just this week I asked gpt3.5 examples of concrete
       | applications of hyperbolic geometry and it suggested designing
       | transportation networks. When I asked how so, the explanation was
       | that subway lines could make sharper turns in hyperbolic
       | geometry.
        
       | platz wrote:
       | Now what you should _really_ do to make this more interesting
       | that just a concept demo of what amounts to an immediately
       | obvious gimmick, is to use the underlying hyperbolic geometry,
       | but instead of making that the obvious focal point of the game
       | /ui, make that geometry a _hidden component_ of the game and
       | force the user to deal with it indirectly or as hidden
       | information.
        
         | zenorogue wrote:
         | Regarding making geometry a hidden component: it, kind of, is a
         | hidden component in HyperRogue. I mean, yeah, it is in the
         | name. But people play HyperRogue without understanding what
         | hyperbolic geometry is. They think it is a game taking place on
         | a sphere, or a normal Euclidean map with some kind of fish-eye
         | projection. On the other hand, I do not think it is really
         | possible to hide it from someone who knows how these things
         | work, as the perspective works very different in hyperbolic
         | geometry.
         | 
         | Which is actually quite cool: while so-called "non-Euclidean"
         | games do all they can to show how weird they are, the actual
         | non-Euclidean geometry pretends to be normal (but actually it
         | is way more weird).
        
         | jere wrote:
         | I have to point out that Hyperrogue is far from a tech demo.
         | Though the controls are simple, there's some 60 lands each with
         | fascinating rules and emergent complexities.
         | https://www.roguetemple.com/z/hyper/gallery.php
        
       | jerf wrote:
       | If you are interested in this, see also
       | https://www.youtube.com/watch?v=pXWRYpdYc7Q&list=PLh9DXIT3m6... ,
       | in particular the ones labelled "Devlog". The two complement each
       | other nicely; the HN link is heavy on the math, the Hyperbolica
       | devlog focuses a lot on the practical considerations, though
       | there's overlap in both directions of course.
        
         | TwentyPosts wrote:
         | Ah, Hyperbolica. I just wish it had more going for it. It feels
         | a lot like the sort of cute educational tech-demo game which
         | you'd show school children/teenagers if you (for whatever
         | reason) wanted to teach them about hyperbolic geometry.
         | 
         | Don't get me wrong, I'm glad that it exists and hope that it
         | inspires some more hyperbolic games (and makes it easier for
         | other people to get started), but game-wise it's incredibly
         | thin, and doesn't have much (if anything) going for it apart
         | from some hyperbolic geometry (which makes some things slightly
         | weird or quirky).
         | 
         | Hyperrogue is much more of a game. It's arguably not a great
         | game (it has a bunch of oddities, and I'd argue some pretty
         | severe flaws), but it does much, _much_ more with the concept,
         | and some of the worlds are genuinely quite compelling.
        
           | zenorogue wrote:
           | What would you consider a severe flaw? I see severe flaws
           | even in very popular games :)
        
         | owenpalmer wrote:
         | Ah yes, Hyperbolica. Good stuff.
        
       ___________________________________________________________________
       (page generated 2023-06-23 23:00 UTC)