Sokoban

Sokoban: player pushes boxes to target storage locations.

This game is played on a 8x8 board viewed from above. Tiles on the board may contain walls, boxes and targets. The player uses arrow keys to move. If there is one and only one box ahead of the player, without no walls in the path, player can push the box. Once all the boxes are placed in the target storage locations, a new challenge is randomly generated. As the the number of walls and boxes changes, the game level changes.

Gameplay

Start: At the start of the game, the player is placed in a random square and a level is randomly generated. The process of level generation is: 1) creating an empty board 2) placing several walls, boxes and targets 3) placing player at the start point. The generation needs to make sure that the puzzle is solvable.

Movement: Player can press arrow keys to indicate movement direction. If there is no walls or boxes in the next square, player can move freely. If there is one box next to the player, no walls or boxes next to the box, player can push the box to the next square. It is possible that the player will reach an unwinnable state.

Finish: Once all the boxes are placed in the target locations, player wins and the next level begins. If the box cannot be pushed to the target, player gets into an unwinnable state and the game may be reset.

Drawing: The board is drawn in a flat view. All object colors are randomly generated.

Assets

sokoban pack