# 双曲番

SOKYOKUBAN

Sokyokuban is a variation of Sokoban, an iconic Japanese puzzle game from 1982. Rather than using the normal square tiling, Sokyokuban takes place on a hyperbolic plane. 双曲番 (sōkyoku-ban) is a pun on hyperbolic (双曲, sōkyoku) and Sokoban (倉庫番, sōko-ban).

The game is written in PureScript. We render the hyperbolic plane on a HTML canvas 2D context using a Poincaré disk model. Since Poincaré coordinates are inconvenient to work with, we mostly use a Minkowski hyperboloid model internally.

All puzzles use a {4,5} tesselation of the hyperbolic plane. We also implemented other tesselations and although there are some interesting properties to be explored, we found {4,5} to be vastly more fun to play.

In this tesselation, we represent a tile on the board as a series of primitive reflections a, b and c. These form a group and canonical representations can be obtained using a string rewrite system generated using the Knuth-Bendix algorithm. The approach is discussed in detail in Martin von Gagern's PhD thesis.

We wanted the hyperbolic geometry to be an integral part of the game rather than just a gimmick. One of the most interesting aspects is holonomy: in this case, the fact that moving in straight lines can result in rotations. After playing with different ways to integrate this into Sokoban, we settled on giving the boxes and targets an orientation.

We would like to thank the following people for giving us valuable feedback:

The soundtrack is pool water blue by glaciære, under the Creative Commons Attribution license.

Some graphics were adapted from Public Domain images released by the MET: terracotta psykter, marble head of a goddess, the Death of Aeschylus.

# 双曲番

SOKYOKUBAN

The goal of the game is to push the blue boxes on top of the pink moon-shaped targets. The boxes have a moon shape on them as well, and this must align with the target. If this is done correctly, the box will turn green. If the moon shape on the box does not match the orientation of the the target, the box will turn orange. When all boxes are green, you win the level.

Boxes cannot be pushed into other boxes, and it is not possible to pull boxes.

On a touch device, you can control the game by swiping or tapping.

On a computer, use the mouse to click, or the following keyboard controls:

• Arrow keys / WASD / HJKL: Move around
• R: Reset the current level
• Z: Undo your last move
• P / PageUp: Go to the previous level
• N / PageDown: Go to the next level