Labyrinth Game

Started: 05 Apr 2023

✨you can click on the image to see it in full size

Important links:

Description:

This project is a Labyrinth Game implemented in C# using Windows Forms. It allows players to navigate through a maze and reach the finish point while avoiding walls. The game provides various difficulty levels and a custom mode where the maze size can be adjusted.

Features

  • Maze generation: The game generates a random maze using a recursive algorithm.

  • Maze sizes: Different maze sizes are available, including easy, medium, hard, and custom.

  • Player movement: Players can navigate through the maze using the arrow keys or WASD keys.

  • Timer: The game tracks the time taken by the player to complete the maze.

  • Move counter: The game keeps track of the number of moves made by the player.

  • Reset: Players can reset the game to the initial state.

  • Exit: Players can exit the game.

How to Play

  • Use the arrow keys or WASD keys to navigate through the maze.
  • Reach the finish point while avoiding walls.
  • The timer will start as soon as you make the first move.
  • The move counter keeps track of the number of moves made.
  • You can reset the game or exit at any time.

Project Structure

The project consists of the following files:

  • 'MainForm.cs': Contains the main form class that represents the game window and handles user interactions.
  • 'EditMazeSize.cs': Contains a form class for editing the maze size in custom mode.
  • 'Cell.cs': Defines a custom control class for representing individual cells in the maze.
  • 'Enums.cs': Defines an enum for representing movement directions.
  • 'PathPoint.cs': Defines a class for representing a point in the path taken during maze generation.

Usage

To run the Labyrinth Game, follow these steps:

  1. Ensure that you have a compatible development environment for running C# Windows Forms applications.
  2. Open the project in your preferred development environment.
  3. Build the project to compile the executable file.
  4. Run the executable file to start the game.
  5. Use the arrow keys or WASD keys to navigate through the maze.
  6. Reach the finish point to complete the game.

Acknowledgements

This project was assigned to me as a task designated for the highest-achieving students within my high school.

Feel free to modify and extend the project according to your needs. Enjoy playing my Labyrinth Game!

Special Technologies:

WinForms

WinForms proves reliable for crafting desktop interfaces like this labyrinth game. It was slightly underdeveloped for this project since I didn't want my game to look like it was from the 90's so I had to do a lot of work to make it look better.

Technologies used:

✨you can click one to see all projects made using it