Saturday, 19 March 2016

Sources of HyperRogue: part I

This is the first post in the series which attempts to list all the cultural references and sources of ideas in HyperRogue. I always want to read such things, so I write one myself too :) (especially for historical fiction, which I often find somewhat annoying because I don't know what is history and what is fiction)

Starting from the basics: HyperRogue is a roguelike set in a hyperbolic world. I wanted to create a hyperbolic game since I have learned about it, like 20 years ago. First it was supposed to be some kind of a shooter, then I got involved with roguelikes, but I was unable to find a grid which could work well (each grid works only with one specific size of tiles, and all of them appeared too large for a roguelike). Then, I have found the "hyperbolic football" pattern, and that just was what I needed!

HyperRogue started as a weird mathematical experiment, I have implemented the hyperbolic grid, some wall/treasure/monster generation, and the simplest combat system. I had some rough ideas for a quest (coming to think of it, maybe a good idea for a new land...), but this simple thing already turned out to be surprisingly good when moved to hyperbolic geometry! But one thing I did not like about the combat system: the player could just camp in a place with just one passable adjacent cell, and destroy all the enemies easily. So, inspired by the theme of Frozen Depths somewhat, I have introduced the heat mechanics, and yet another enemy which tracked its prey by heat. That was the first version of Hyperbolic Rogue, and also that's why the game always starts in the Icy Lands.

For the 7DRL challenge (version 2.0), I have decided to extend the game, and create more lands...

A desert with huge worms is referred to in JRR Tolkien's Hobbit, but Thumpers, Spice and Sandworms are a reference to Frank Herbert's Dune. Mechanically, Sandworms come from the popular "snake" games (most famous one is the Nokia, but the concept is older), and more directly, from DROD. Also, they work as an anti-camping mechanism -- every land attempts to have one. In the earlier versions, sandworms were not allowed to leave the Desert.

I also wanted some cavernous region, and I got the idea that a cellular automaton might generate nice caves. Trolls and Goblins are typical fantasy monsters living in the caves, and Seeps come from DROD again. Translators always seem to ask what a Seep is...

The roguelike Ragnarok (aka Valhalla) has a monster called the ivy creeper. All other monsters in Ragnarok took just one cell, but the ivy creeper could grow. Sadly, it was extremely rare, and thus not very prominent. Shame for such an interesting idea -- but the Jungle in HyperRogue brings Ivies back their deserved glory. In the early versions, Ivies were rarer (you would usually see just one), and thus it did not look much like a Jungle. This was changed in the later versions (4.x?), also making the Jungle the hardest early land -- although some of the hardness was apparently caused by creating Eagles more frequently than intended due to a bug on MS Windows. Later (8.x?), this was somewhat toned down again, by not generating double Ivies (two adjacent roots -- much harder than the normal ones) if the player has not yet collected many Rubies.

Ragnarok also had a level called the Crossroads, which allowed travelling between the different places quickly. Hyperbolic geometry makes this work better :)

Slimes are typical RPG monsters, and the elixir of life is the typical objective of alchemy. So, nothing really special about the Alchemist Lab, but note that HyperRogue was still an ASCII only game at that point (there were only graphical effects for Orbs, and Sandworm/Ivy segments were connected with lines). If I recall correctly, the reason why we have a rule that cells containing Elixirs of Life (or other items) are considered to belong to both colors is because it was impossible to show the color of slime beneath the item in the typical roguelike ASCII display. HyperRogue still has an ASCII option, but I no longer care much about tailoring the rules so that the ASCII display is 100% playable.

DROD also has Mimics, which try to repeat your moves, leading to quite interesting puzzles. I wanted to see how this mechanics works in the hyperbolic grid, and that's how the Mirror Land was born.

This was the last land in the 7DRL version of HyperRogue. Later came Version 3.0, which introduced graphics, and some new lands. The graphics are inspired by M.C. Escher, most notably the Circle Limit series, which are based on hyperbolic geometry.

Graveyard was the first land with a regular pattern, and Ghosts move through walls, as everyone knows. Zombies come from the Haitian folklore, and are everywhere in the fantasy works nowadays. It always felt strange for me in e.g. ADOM that a necromancer can turn a dead body either into a ghost or a zombie -- shouldn't creating a ghost require just the soul, leaving the soulless body to create a zombie? So, in HyperRogue, Necromancers are able to create both a ghost and a zombie from a single grave. Graveyard also features an invincible Shadow who follows you everywhere, somewhat inspired by Darren Grey's 2DRL, Run from the Shadow. However, the Shadow turned out to be not very interesting, just creepy. Some time later (around 5.0), Ghosts have started to appear whenever the player stopped exploring the world -- this was originally intended as a way to force the game to actually end when the player is stuck in the Living Cave, but it also brings some new interesting tactical insights of its own.

People playing the early versions of HyperRogue said that the non-Euclidean geometry reminds them of works of H. P. Lovecraft. I have not yet actually read anything by Lovecraft at that time (other than playing a RPG session in the Call of Cthulhu system long ago, which somehow turned into a math joke and had nothing to do with the actual Cthulhu mythos...), so I have read the Call of Cthulhu: swallowed up by an angle of masonry which shouldn’t have been there; an angle which was acute, but behaved as if it were obtuse. (Well, in HyperRogue and hyperbolic geometry in general, an acute angle is always acute, no matter how you look at it.... I guess Lovecraft's geometry was even stranger, or maybe he did not know how hyperbolic geometry works). Anyway, I have added R'Lyeh, with Cultists, tentacles and statues, typical things from the Cthulhu mythos (I am not an expert in these mythos --- the Call of Cthulhu remains the only book by Lovecraft I have read --- but it is hard to not know about the tentacles and cultists of Cthulhu, or the Necronomicon). IMHO R'Lyeh was the most boring land for a long time, but this changed when the Temples of Cthulhu were introduced.

Many RPGs use a rather weird system: on one hand, getting experience or powerful items makes you stronger, but on the other hand, it also brings stronger enemies. In the end, getting stronger does not actually make you more able to fight the enemies you meet, and in some cases, it is actually much better to avoid getting powerful (for example, in IVAN items which increase your hitpoints are believed to be actually counterproductive, since they attract powerful enemies, and the rest of your equipment is not sufficient for handling them). Hell's demon fighting mechanics parody that. Orb of Yendor obviously comes from the Amulet of Yendor, which is what you have to collect in many roguelikes (such as Rogue itself, NetHack, and Brogue). And the Demon Daisy was a nasty herb in ADOM, I liked the name, so it became the treasure in Hell. The pavement in Hell is somewhat inspired with M. C. Escher's Circle Limit IV (although, according to the Polish proverb, the Hell is paved with good intentions).

Disappearing floors appear in many games, DROD is again the most direct reference here. The Land of Eternal Motion was the last land added to pre-Steam HyperRogue. Feathers were chosen for the treasure, since something which would not disrupt the land was required. Phoenix feather is a powerful material in IVAN, possibly the best thing to have your legs made of.

Versions 4.x did not introduce any new lands, but they introduced music by Shawn Parrotte (4.0) and an improved graphics engine (4.2 -- it turned out that OpenGL works with the Minkowski hyperboloid model very well). There were two cases when I have asked Shawn for a somewhat specific type of music -- since Escher's art is an inspiration for the graphics in HyperRogue, I wanted music based on similar ideas of paradox and repetition, inspired by Douglas Hofstadter's Gödel, Escher, Bach: the Eternal Golden Braid somewhat. One of them was a variant of the crab canon for the Mirror Land -- a canon that is the same forward and backward, very appropriate for this place. The other one was a variant of the Shepard tone, used for R'Lyeh -- a tone which seems to get lower and lower infinitely (very appropriate for the Temple of Cthulhu which came later). Both crab canons and Shepard tones can be understood as musical counterparts of Escher's art.

That's all the lands and important features that were there before HyperRogue got accepted for Steam. To be continued!


  1. In English we also have a saying that the road to Hell is paved with good intentions.

  2. Great post! I love reading about these kinds of references too. HyperRogue does a fantastic job bringing together so many varied references from different places but it all works so seamlessly together, great job!