Sokoban Game

Project Details

Sokoban Game is a puzzle-solving game implemented in Assembly code on Ripes, a RISC-V simulator. The game is based on the classic Japanese puzzle, Sokoban, where players navigate a character to push boxes onto target locations. The project utilizes low-level programming techniques to create an engaging gaming experience, featuring randomized puzzles, multiplayer mode, and a visually appealing LED-Matrix interface.

Key Features
  • LED-Matrix Interface: Utilizes an 8×8 LED-Matrix to provide a visual representation of the game board, with different colors representing walls, player, box, target, and empty spaces.
  • Randomized Puzzles: Implements a random puzzle generator using the Linear Congruential Generator (LCG) formula, ensuring each game presents a unique challenge.
  • Multiplayer Mode: Supports multiplayer gameplay, allowing multiple players to compete in solving the same puzzle. Player standings are tracked and displayed after each round.
  • D-Pad Input: Allows players to navigate the character using the WASD keys linked to arrow buttons on a D-Pad, providing intuitive control over character movement.
  • Interactive Gameplay: Implements a turn-based gameplay system where players take turns navigating the character and pushing boxes. Special situations, such as pushing a box into a corner, prompt players to restart or exit the game.
Technologies Used
  • RISC-V Assembly: Low-level programming language used to implement game logic and control flow on the Ripes simulator.
  • LED-Matrix: Visual interface for displaying the game board and game elements, controlled using Assembly code.
  • Linear Congruential Generator (LCG): Algorithm used for generating random puzzles with randomized box and target positions.
  • D-Pad Input: Enables user interaction with the game, translating WASD key presses to character movement on the LED-Matrix.
Main Takeaways
  • Through this project, I gained experience in low-level programming concepts, including static/dynamic memory management, bitwise operations, and control flow optimization in Assembly code.
  • I developed a deep understanding of game development principles, including puzzle-solving mechanics, turn-based gameplay, and user interface design for embedded systems.
  • Faced and solved various technical challenges, such as implementing randomized puzzle generation, handling user input, and optimizing game performance on resource-constrained platforms.
Project Gallery