top of page

Love Maze

A simple Unity game made all by myself.

The aim of the game is for the player (red square, boy) starting at the top right corner, to reach the goal (blue square, girl) in the bottom left corner. This can be done by opening pink coloured gates and the player goes through the maze automatically.

The grey rectangles are immovable walls.

To improve the automatic movement of the player through the maze, pathfinding is implemented and it is visualised in the second video.

The first video shows the current sample gameplay.

Videos

  • The first video shows the basic prototype gameplay.

  • The second video shows the new pathfinding algorithm working. It find the free paths

  • I am currrently working on it and will soon integrate this with the automatic player movement so as to get a better bug free player movement.

  • The below code snippet shows the class Cell, which has the information for one cell (see Fig 1) given in the second video.

  • The list of bool has the information for the openings in that cell.

  • The class object will be initialized with the openings list having all 4 entries as true. Meaning all 4 lanes are free at first.

OpeningsExample_main.png

Fig 1

  • The below code snippet shows a function which works on a particular cell like the one shown in Fig 1. 

  • This function will be called again and again in a for loop s as to loop over all the available walls and gates. 

  • For each wall or gate, we can see that it affects the openings of two cells near it. The position and index of these cells are found out.

  • Then, using that information we edit the visualisation helpers, given in helperController.helpers[x, y]

Project Gallery

< Previous Project
Next Project >
bottom of page