Thursday, February 11, 2016

@Play 83: HyperRogue

This article is one of the new pieces from the book @Play: Exploring Roguelike Games.  Another article from it, on Zelda Randomizer, is due to go up shortly on Kotaku.  The book is available as part of the current Mega Game Bundle, on StoryBundle.

One of the most interesting roguelikes to come around lately, a game that is obviously close to the lineage (down to having "Rogue" in the title) and yet brings new clever and amazing ideas to the table is a little thing called HyperRogue. You can download some versions of it for free from creator Zeno Rogue's site, or you can download the newest version for just $3. It's also available on Steam, and for Android on the Google Play store, either free or paid.

HyperRogue (in one of its weirder locations)

Lessons in Non-Euclidean Travel

At first it seems like a fairly simple game, and at the beginning it kind of is, but the difficulty ramps up wonderfully smooth. The most immediately interesting thing about HyperRogue is that your guy, lost in a weirdly geometric world surrounded by spaces and thick, clumpy, apparently-irregular walls, has only one hit point: if you take even a single hit from any source, you immediately lose. Fortunately, most enemies are likewise restricted, so the result to the gameplay is that you have to get the first hit on any enemy or you immediately lose the game. If you manage to strike first, although you use up your turn doing it, you'll always kill the foe; there is no miss chance in combat. There are exceptions to this rule (some very interesting!), but those're the basics.

One consequence of this is that Zeno Rogue has moved the strategy window (see the article elsewhere "Interface Aids and the Strategy Window") up a little, and the game won't even allow you to make moves that result in immediate death. Effectively it works like "check" does in chess. The game will simply ignore moves that would be fatal on the next turn, explaining its refusal with a warning message. To drag out another previous coinage, it guards against immediate critical moments.  It doesn't prevent you from making moves that might result in certain death more than one turn in the future. You still have to be on the lookout for those, although they are rarer.

The one hit point limitation forces you to adopt some interesting tactics to survive. If you are hemmed in by walls and have an adjacent enemy, the only move you can make is to attack it. In the same situation, if the enemy is one space away the only thing you can do is pass a turn and let it approach you. For the most part your opponents only act to approach and attack you, which helps the player to anticipate trouble spots and plan ahead to escape them. There is no experience system in HyperRogue, so for the most part you're better off avoiding enemies if you can, although sometimes it's good to turn around and confront a horde of pursuers in a controlled fashion rather than let them corner you in a dead-end.

If two enemies are adjacent to you, you cannot attack either of them because his friend would attack and kill you. In that case you must flee, and if you have nowhere to flee to the game ends immediately, and suddenly. Your rogue has effectively been checkmated, and the game doesn't even let you make a move in that case. So the basis of combat strategy is to get enemies to line up so you only face one at a time. Even if you are facing 20 enemies in a row, so long as you kill each one as it approaches you, you'll survive. But if even one additional enemy comes in and doesn't queue up with the others you'll have to flee, and if an enemy approaches from behind, so there's an enemy in both directions and you can't escape both in on turn, then it's all over.  Most dangerous is when enemies approach from the same distance in opposite directions; you're better off approaching one of them at an angle before they get too close.

(The one hit point model of roguelike design was described in greater detail, making these points and more, in an excellent presentation given at IRDC 2012 by prolific roguelike designer Darren Grey, which can be watched on YouTube here then here.)

Most enemies behave this way. Some are slower than others, but they usually have some visual indication that they're about to move. A few enemies cannot be killed immediately through melee, but your attacks stun them, and often after a certain number of stuns it'll be finished off for good.  Other enemies are completely invulnerable unless defeated through special means.

Ice Caves

Your Passport Is Printed on a Mobius Strip
At the start of each of the game's "lands," which are like dungeon branches, enemies are very low in number. So when you enter a new zone, you probably won't have to worry much, and can easily take out the single foe that harasses you occasionally. Throughout each land you'll randomly find treasures. Treasures don't give you abilities themselves, but each land has a different type. Nearly all the treasures in all the lands are worth just one point towards your score (the game scores very low), but collecting treasure opens up the way to more advanced areas. At the start there are only a few lands you can visit, but once you get a total of 30 points a new set of lands becomes available to find in addition to the ones you started in. At 60 and 90 yet more lands open up. There are over 30 lands in all, but some of the last ones have special requirements for entry, like having killed a minimum number of foes.

The thing about collecting treasures is that collecting them is what increases the enemy encounter rate. Every treasure you get in a land increases the frequency with which monsters are generated, but only in that land.

The minimum to enter Hell, where the primary objective the Orb of Yendor is kept (there's that name again), you have to have gotten 10 treasures from each of nine lands.  It doesn't matter which lands, so the easiest way to go about it is to get 10 treasures from the easier regions, then vamoose, exploring wildly until you find a Great Wall that signals a border into a different zone.  Of course, collecting more treasures than that helps your score, and as a special bonus, once you get 10 treasures of a type, a particular type of orb starts generating in that land.

Each land has its own kind of orbs that give you special temporary powers if collected.  If you get all the way up to 25 treasures you can unlock those orbs to appear in some other lands too, which can help you out in tight spots later... but by the time you get to 25 points from a single land, you'll be harassed by foes frequently.  It's the age-old decision, you can play more daringly now to make the later game easier, or you can get by with the bare minimum and take your chances in the end-game.  Neither decision is necessarily better than the other.

There Are No Snake Enemies On the Hyperbolic Plane (okay, there's one)
The one hit point system is interesting, but there's another, even cooler, aspect about HyperRogue.  It doesn't take place in a "Cartesian" space, but on a kind of geometric construct called a hyperbolic plane.  Like Jeff Lait's amazing, brain-bending 7DRL game Jacob's Matrix, HyperRogue takes place in a "non-Euclidean" space, which has strange properties.  For one thing, "parallel lines," which on an ordinary place stay the same distance from each other forever regardless of how far you go, actually diverge in HyperRogue.  Take for example those "Great Walls" between lands that you see frequently in special zones like the Crossroads, like here:

The Crossroads (version 1)

The red spaces in the above screenshot are the Crossroads land, which connects many other lands.  The orange star spaces are pieces of the Great Walls, and the colored regions they border are the other lands.  The weird thing is, although they look curved, all the Great Walls are straight lines in the game's topology, a fact that gets more obvious the closer you get to crossing over into a new land.  Although they're not parallel, they never intersect with the other walls, but actually diverge from them as they go on instead of eventually crossing at some point.

It's a strange place, and a little confusing.  You can't see it in these images, but as you move through adjoining spaces the world in the direction you're traveling sort of broadens, appearing to distort around you, and the area behind you sort of shrinks.  The effect is most visible near the horizon.  The bizarre topography of the hyperbolic plane makes it very difficult to return to places you've already explored and have passed out of sight unless you closely retrace your steps.  Try watching some landmark while walking around in a circle; you'll find that your view rotates as you turn.  You tend to keep missing places to try to go back to unless they're still in vision range.  Fortunately, there's an infinite number of lands and of all things in those lands, or else you might end up searching a long time to get back to an essential place you had once been.

Other consequences of the hyperbolic plane are that circles are much larger than you might expect.  There are other interesting shapes, and consequences of those shapes, too.  Zeno Rogue posted on his site an excellent light math description of some of the shapes that can be encountered, written by Fulgur14, many of which serve as the basis of terrain generation in the advanced lands.

To Show Your Vacation Slides You'll Have to Use a Poincaré Projector
The soul of HyperRogue are the many varied and intriguing lands there are to find and explore.  Each land has its own kind of treasure to collect, and tracks your best score even for that area.

Here are a selection of the earlier lands and their rules, to give you a taste for what's to come.  If you're ever confused as to what rules are in effect in a given region, you can get reminded in-game by pressing V (to go to the menu), then O (to go to the world overview screen), then clicking on one of the region names on the left side of the screen.

Icy Land: This is always your starting area.  Nearby walls will melt away from your body heat if you stand close to them for too long.  The Bonfires you find here can be activated, which will both melt close walls and attract some of your enemies.

Crossroads: There are three different versions of this land, which can be distinguished from each other by the ground color.  Most areas are bordered by one of the three types of Crossroads. As I said before, the walls here separating other areas from you are actually straight lines: they just appear curved due to hyperbolic geometry.


Jungle: This place is full of vines that grow and grow out from a central point.  The center of each plant is cyan; the vines growing out from it are green.  Each vine surrounding a plant takes turns growing, each one space at a time, clockwise around the plant.  A vine turns yellow the turn before it moves, and is dangerous when it does so.  However, you can prune a vine back by attacking it.  If you manage to hack your way to and destroy the center, all its vines die at once and you get a ruby as a reward.

Land of Eternal Motion: You can't rest! Every turn must move to another spot, and every space you move from falls away into the void. All your enemies here do the same thing.  Since enemies cannot follow directly behind you, they must adopt a parallel course to follow, and as we learned earlier parallel lines diverge on a hyperbolic plane, so it's relatively easy to leave pursuers in the dust here.  The only problem is that new chasers will get generated over the horizon in front of you, so you're constantly having to steer away from them too.

Living Cave: The walls in this area grow and shrink according to cellular automation rules.  Collectible treasures push close-by walls back until picked up, and the corpses of killed Rock Troll enemies in this zone will tend to draw nearby walls in to "bury" it within their surface.  If you get entombed in rock your automatically lose!


Minefield: Not all the areas you explore rely on special properties of hyperbolic planes.  This entertaining zone is full of invisible mines you must avoid, natch, by playing minesweeper.  The number of mines on adjacent spaces is clued by messages and colored dots: blue dots are adjacent to one mine, green dots to two, and red to three.  Ground enemies lured in from other lands can set mines off too, but that can be a bad thing: exploded mines erupt in spaces of permanent fire, and if you get surrounded by impassible walls you immediately lose.  Because the spaces you pass through are marked as you travel, it's easier to retrace your steps in this land than most others.  The enemies here, "bombirds," are rare but create new mines when killed!

Mirror Land: There are lots of mirrors here, which double as the treasures you collect.  If you break one by running into it, allies that move relative to your movements appear around you, and help you fight approaching attackers.  Your helpers tend to be fragile, but are of so much help that this seems to be one of the easier lands.

Alchemist's Lab: All the ground is either red or blue. If you're on blue ground, you can only move to another blue ground spot, and vice versa. Colored slime enemies appear, moving on and matching one of the colors. When a slime is killed, it makes a big splat that overwrites the other color around it, including the spot you're standing on.

Desert: Here are sandworms that slowly (every other turn) grow bigger over time, and can only be killed by trapping their head so they can't grow further.


Zebra: The terrain in this whimsical area looks very much like a zebra's stripes.  You can step on the light stripes okay, but the black stripes will crumble beneath your feet like in the Land of Eternal Motion.

Ivory Tower: This clever area has "gravity."  When you enter, the camera rotates to pick the direction of the Great Wall you entered from as "down."  The way the game's description describes it, there are "stable" and "unstable" spaces.  Stable spaces have walls beneath them, or are "platform" spaces.  You can go any adjacent space from a stable space, but unstable spaces you can only leave by going in a "down" direction, unless it's to a stable space.  Depending on how you move, gravity can change direction. Moving up from stable into unstable spaces feels kind of like "jumping," like in a platformer, and going from unstable to stable spaces above you is like grabbing hold of a ledge.  Because your movements are unusually limited here, be careful around enemy gargoyles.  It's easy to get caught in inescapable situations.

Further reading:
HyperRogue's website. Also from that site, the game's FAQ, and a light math description of some of the shapes that can be encountered. Creator Zeno Rogue has a blog, a list of other projects, and is on Twitter.

(Edit 2/13/2016: Corrections sent in by HyperRogue's creator, Zeno.  One was the spelling of Darren Grey's name.  Oops!  Thanks, guy!)