Skip to content

muhammadrafayasif/the-maze

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 

Repository files navigation

The Maze

Programming Fundamentals (PF) Semester Project (CT-24141) - NEDUET - CSIT

The Maze is a basic game where you start off at the entrance of the maze, your goal is to reach the end of the maze where there is an opening available.

Title Screen Image of The Maze

Controls

  • WASD
  • Arrow Keys

Use can use both the WASD and the Arrow Keys to move the character, the character cannot move through walls.

The entire game is playable with just these keys, with the exception of the main screen, which allows any key to be pressed to begin.

Functionality

The maze utilizes the use of a Two-dimensional array, the two dimensional array is used to draw the maze onto the screen, furthermore, it also tracks the movement of the player, so that it is unable to phase through walls.

The program also uses ASCII codes like

ASCII Function
\033[?25l Hides the cursor highlighting
\033[col;rowH Points cursor to specific row and column
\033[?25h Reactivates cursor highlighting

These ASCII codes may not work on every system, as the application is specifically targeted towards Windows systems and is meant to run on the terminal.

Since these ASCII values directly alter the players position by erasing the players character and drawing it to the next position based on user input, the maze is only drawn once. This prevents the jittery effect that occurs when constantly refreshing the screen, so the movement appears smooth.

Drawbacks

  • Since the program directly tracks the X and Y coordinates of the terminal, it is dependent upon it, therefore resizing the window of the terminal may cause unexpected issues on the player position being drawn.

Dependencies

  • Standard Input/Output (stdio.h)
  • Console Input/Output (conio.h)
  • Standard Boolean (stdbool.h)
  • Standard Library (stdlib.h)

About

The Maze is a simple game where the player enters a maze and is tasked to find the exit. The Maze is available currently with 3 levels with a detailed summary of your moves at the end

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages