/Sokoban-Game

This Project was assigned for the development and testing of my assembly programming skills, for my Computer Science course, Organization of Computers. In which we developed programs and algorithms in MIPS32 & x86 architecture

Primary LanguageAssemblyMIT LicenseMIT

Sokoban-Game

Sokoban is a puzzle video game genre in which the player pushes crates or boxes around in a warehouse, trying to get them to storage locations. The game winning condition is reached when all the storage locations have been filled with a box.

The game is played on a board of squares, where each square is a floor or a wall. Some floor squares contain boxes, and some floor squares are marked as storage locations.

The player is confined to the board and may move horizontally or vertically onto empty squares (never through walls or boxes). The player can move a box by walking up to it and push it to the square beyond. Boxes cannot be pulled, and they cannot be pushed to squares with walls or other boxes. The number of boxes equals the number of storage locations. The puzzle is solved when all boxes are placed at storage locations.

Screenshot from 2021-03-27 10-23-14

Development Tools

This game is developed using EasyASM, a simulator for a subset of MIPS32 and x86 ISAs by Ideras(https://github.com/ideras/EasyASM) with the help of a syscall-handling library and also rlutil library by Tapio(https://github.com/tapio/rlutil). The reach of this game's development is to at least fully create three playable levels.

  • Update: Final game has ten playable Games

Usage & Installation

Steps to run Sokoban Game in your system

  1. Make sure you have EasyASM project installed (Link provided Above), with set environment variable

  2. To be able to make use of syscall library provided in the project you'll need to make sure to have cmake installed in your system

  3. Download zip file or Clone project to your local file system using repository's .git file(https://github.com/merino22/Sokoban-Game.git)

$ git clone https://github.com/merino22/Sokoban-Game.git
  1. Once you've cloned the project successfully, locate yourself inside project dir and create build folder
$ cd /home/user/Desktop/Sokoban-Game
$ sudo mkdir build
  1. Locate yourself inside build dir and run CMake command
$ cd build
$ cmake ../

Output:

Sokoban (2)

  1. Right after run make command:
$ make

Output:

Sokoban (3)

  1. Go back to Sokoban-Game dir, and run the following in your terminal in full screen mode:
$ EasyASM --sc-handler ./build/libsc-plugin.so --run ./SokobanGame/Sokoban.asm ./SokobanGame/Maps.asm SokobanGame/Figures.asm
  1. Sokoban Game should be up and running! Have fun!

Recommendations

Running Sokoban on VSCode terminal will give the game an overall better aesthetic Running Sokoban with your terminal in full screen mode will give the game an overall better aesthetic

Checking for EasyASM & CMake Installations

To check EasyASM type following command in terminal

$ EasyASM

If EasyASM is installed in your system, the next ouput will be prompted: Screenshot from 2021-03-27 10-40-05

To check CMake type following command in terminal

$ cmake --version

If CMake is installed in your system, the next ouput will be prompted: Screenshot 2021-03-27 114331

Level Preview

SOK