Friday 25 August 2017

Sources of HyperRogue, part V

This is the fifth post in the series, describing new lands in versions 9.x. We will start with the three lands added in 9.0, all of which have a significant Norse theme.

If you are learning about hyperbolic geometry from popular mathematical sources, one of the first things you learn is how the sum of the angles of the triangle is less than 180 degrees. This affects the gameplay -- in fact, this is the reason why the world is often rotated differently when you return to the same location -- but for a long time I wanted to create a land which requires a bit more understanding of this phenomenon, where the player has to learn how to calculate the defect quickly. Burial Grounds is such a land. The original inspiration for the theme was the Barrows from Lord of the Rings; however, we have read that the Barrow Wights here were inspired by Draugar from the Norse mythology, and we have decided to use Draugar directly. Draugar were also one of the interesting monsters in Ragnarok/Valhalla.

One more ingredient is missing here -- since the land requires Orb of the Sword, how does one obtain it in the first place? This is solved by another land, the Kraken Depths. The idea of an underwater land where Orb of the Fish is necessary to do anything comes from the ideas thread (Fulgur14's post, I think there were also similar ideas by other people). The Kraken appears to be the widest creature that can move in the hyperbolic plane in a reasonable way, and its movement foreshadows the Orb of the Sword. Krakens come from the Norse legends, thus making the Living Fjord, Kraken Depths, and Burial Grounds a sequence of lands which are different, but yet thematically and mechanically related.

It was previously said how the Elemental Planes were designed because there were already several Elementals of various kinds. Trollheim is the same, but for Trolls. Some time in the future we might see a land of birds, a land of canines, or a land of sharks. :) In many lands, the Trolls are monsters which aim to hurt the player, but they usually end up actually helping them; again in Trollheim, you have to use the Trolls' special wall-creation property to your favor. The name Trollheim is made to sound typical to Norse mythology (like Jotunheim, the land of giants). We have been searching for an appropriate "troll treasure" but we could not find anything too exciting -- one weird idea was to have "golden crowns", inspired by a popular Polish song which says "twelve heavy crowns of pure gold adorn my head" -- ultimately we have chosen the "golden eggs", referring to the first troll treasure you find (Gold); people who have played Colossal Cave Adventure should also notice and understand another reference.

Some time after version 9.0 has released, I have received an information from Steam about the Halloween sale event, aimed at the games with Halloween-like themes. At first, I did not want to participate in this -- HyperRogue had some monsters which fit the theme, but this was not the general theme of the game; adding a Halloween land would be redundant and probably not that exciting from the event's point of view. However, I was working on the spherical geometry mode at the time. Spherical geometry is very different from hyperbolic -- it is bounded, which allows interesting resource management -- and I thought that a new land specific for this geometry would be great; and Halloween fit perfectly, with the natural motivation for being played on a sphere (surface of a jack'o'lantern).

The Dungeon is based on a post of wonderfullizardofoz, to get more mileage of the new 3D perspective in the gravity lands. It takes the general idea of a gravity trap land, skeletons, and ghosts; also Slime Molds as a treasure (a reference to a food item in Rogue -- I had no other ideas for treasure anyway). Banshees were replaced by my own idea (bats, which I have invented some time earlier as a weaker version of Eagles, but I had no good idea where to put them). Since Skeletons were there, this made sense as an extension of the Palace (with some influence from an earlier idea of Fulgur14) -- especially that the mechanics of pressure plates from the Palace could make an interesting return in a gravity land. The Orb of Recall comes from the first post in the Orb idea thread, by wonderfullizardofoz and Fulgur14. (Ideas for new orbs and enemies are welcome, not only for lands!) As a fan of Steven Universe, Fulgur14 expected Amethysts in HyperRogue since Pearls and Garnets were there -- but gem names are just gem names, mostly.

The general idea for the Mountain comes from the same post of wonderfullizardofoz. Before implementing these two lands, I have already implemented the Orb of Nature, and I wanted to put it in some land. Since wonderfullizardofoz's idea already included the Eagles, I have decided to include Ivy too (and make it possible to use the dormant Ivies to climb the mountain), and make it a subzone of the Jungle.

Long time ago, tricosahedron posted his idea of a land inspired by Reptiles by M.C. Escher. The idea was very interesting, but I did not believe that Escher's pattern could be adapted to hyperbolic geometry -- it seemed that something had to have a threefold or sevenfold symmetry, and thus look nothing like a reptile. Some time later, tehora said she wants a land where reptiles rise from the floor as in Escher's work, and I have decided to try harder -- and obtained quite a nice reptile tesselation -- with some gaps with threefold symmetry as expected, but still, they did not make the tesselation bad. To the surprise of tehora, the release post listed this as based on an idea of tricosahedron (I thought she was referring to tricosahedron's idea, but apparently she had the same idea independently). Reptiles by M.C.Escher depicts not only the Reptiles themselves, but also many other interesting things; probably the most interesting one is a dodecahedron, so it has been chosen as the treasure of this land. (We also collect dice -- from the standard ones based on Platonic solids, to more exotic ones -- so collecting dodecahedra feels very nice to us.)

Contrary to HyperRogue, David Madore's hyperbolic maze does not take place in the full infinite hyperbolic plane, but rather a finite part of it (of size of 88110 tiles) whose edges has been stitched together, to make a space without boundaries; stitching is done in a very regular way, based on matrices over a finite field. For 9.4 I have decided to implement something similar to Madore's method -- even though the most unique things about HyperRogue is its infinite and exponentially expanding world, a special geometry where the world is actually finite could make for an interesting educational feature, and it could be also used as a pattern -- similar to the existing Vineyard, Zebra and Palace patterns, but very huge compared to them (huge, yet highly regular, though in a rather incomprehensible way). The pattern of 5676 heptagons (18920 cells in total) was big enough to fit large circles and multiple non-crossing straight lines -- so for the first land based on this pattern I have decided to use wonderfullizardofoz's idea of Amazon River, where you have to cross a river without touching the crocodiles in it, who just go with the current without pursuing you, unless you are on adjacent cell; however, I have decided that a river land with objects moving with the current felt too similar to the Whirlpool, so I have rethemed it as the Prairie, where you have to get on the other side of a herd of charging beasts. Of course, both ideas -- crossing a road filled with cars, and a river filled with crocodiles -- have been used in the classic game Frogger (hotdogPi also had a similar idea, but when Prairie was already there.) Previously I was thinking to do this not on a bundle of straight lines/equidistants, but on a bundle of randomly generated adjacent curves -- maybe such a land will be added in the future. The regular pattern turned out to have one more interesting property: after placing the charging paths and the Great Walls (also incorporated in the pattern), it allowed yet another straight line, which was far away from both the charging paths and the Great Walls. I have tried to put another charging path there at first, but this did not work well because of a different structure of the central straight line; thus, since this line was separate from everything, I have decided to make it a "safe spot", with no monsters appearing, an alternate source of Orbs of Safety, and an interesting property that these Orbs of Safety throw you into a location which looks exactly the same. And what kind of treasure could one find in the prairie, on the other side (of the herd of bulls)? Of course, the grass is always greener on the other side.

Yet another idea that many different people came up with independently was a land based on the Boulder Dash game from 1984 (some readers might know newer games heavily inspired by Boulder Dash, such as Emerald Mine or Supaplex, or their open source combination, Rocks'n'Diamonds). Like roguelikes, Boulder Dash is grid based and turn based -- however, turns happened automatically and very quickly, making it more about timing the keypresses precisely (like a very fast version of Crypt of the NecroDancer...). One of the iconic features of Boulder Dash were Butterflies, who did not pursue the player -- they simply moved along the walls -- and turned into a 3x3 square of Diamonds when killed by a falling boulder; I thought that an interesting HyperRogue land could be based on this, and so thought CtrlAltDestroy and Simon Clarkstone. However, it was not clear how should the gravity be implemented (like in Ivory Tower or like in Dungeon? where should the boulders fall if there are multiple choices? how should this work in the HyperRogue grid in general?), so I have decided to replace gravity with charging bulls -- together with the Prairie, the 9.4 update was all about Bulls. A later update added a special tiling, heavily inspired by Butterfly (No. 70) by M. C. Escher, and its hyperbolic version by Doug Dunham -- however, the butterflies had to be "broken" a bit to make the lines separating tiles clear. Since "diamonds" were already taken, another gem name had to be chosen -- the name spinel comes from the Latin spina (arrow), but sounds a bit like the English word spin too, so spinels are appropriate for gems obtained by shooting bulls at the spinning butterflies.

The Crossroads V are also based on an old idea -- this time an idea of Fulgur14, so old that it was called Crossroads III at the time. :) Not sure why this was not used immediately.

Some people consider HyperRogue to be a hard game. I think that HyperRogue is as hard as it needs to be -- if it was easier, it would not force the player to learn. When Ptolemy I asked Euclid if there was a shorter road to learning geometry than reading Euclid's Elements, he replied that There is no royal road in geometry; I believe the same is true not only with mathematics, but also with games such as Chess, Go, or HyperRogue. Furthermore, just as most players of Chess or Go player do not have hope to every beat the grand master, many people play difficult roguelikes without caring about whether they will ever win -- this is because the point of roguelikes is not necessarily to win, but to have fun while playing a complex game, and getting better and better in it. This is similar to what Carl Friedrich Gauss said in a letter to Farkas Bolyai: It is not knowledge, but the act of learning, not possession but the act of getting there, which grants the greatest enjoyment. Gauss and Bolyai have been discussing the nature of parallellness, and whether it is possible ot prove Euclid's fifth axiom from the other ones, for a long time without success; many years later, Bolyai's son, János, has discovered the hyperbolic geometry, and then they learned that Gauss has discovered the same things on its own, but he did not publish the results. Hyperbolic geometry was also independently discovered by Nikolai Lobachevsky, who is quoted to write There is no branch of mathematics, however abstract, which may not some day be applied to phenomena of the real world -- and indeed, non-euclidean geometry has found many applications, for example in physics, and more recently in art (M.C. Escher), game design, data visualization and social network analysis; and even HyperRogue itself can be applied as a powerful engine to work with applied hyperbolic geometry (see RogueViz). Speaking of M.C. Escher, here is a quote of him: We live in a beautiful and orderly world, not in a chaos without norms, as we sometimes seem to, which is also relevant to HyperRogue -- as an important thing that sets it apart from other geometrically weird games, such as Antichamber or Monument Valley, is that HyperRogue's geometry, although weird, is completely logical, and can be reasoned about; and gaining a deep understanding of this geometry is important for the game, and why it needs to be hard. In our opinion, Monument Valley is very easy compared to HyperRogue, but also it is more shallow mathematically, which does not prevent Monument Valley and Escher's works it is based on to be great works of art. Which brings us back to the start of this long paragraph.

Since all these classic quotes not only come from people whose work was very important for the development of HyperRogue, but are also very relevant to the game itself, they have been added as the Knights of Camelot's lines in HyperRogue 9.1. (Interestingly, if you want to get from A to B in the world of HyperRogue, there is a "royal road", one such that every other path is significantly longer than it...) It was not mentioned in the last part, but since 8.3, the Knights end their speech in the way similar to one used by Sprite Guard in his YouTube channel. It is not known what new features will be added in versions 10.x and described in the next post in this series. So, until then, thank you very much for reading, and have a great rest of your day!