ucsb-cs56-projects / cs56-games-maze

-
3 stars 9 forks source link

cs56-games-maze

CS56 W16 Note:

A program that generates a solvable rectangular maze at random.

Before W14:

After W14:

F16 Final Remarks

W16 Final Remarks

project history

 W14 | jstaahl 4pm | loganortega, richardwang94 | A program that generates at random a solvable rectangular maze

User View

Maze Generation

The game creates a maze slower than the actual maze-generation time, so that you can watch it grow. It is the user's job to then solve it. The algorithm used to generate the maze is based off of the recursive back-tracker algorithm. If the user changes maze settings, the generation of the maze responds appropriately.

Gameplay

To launch the game simply use the command: ant run

Navigation

The player always starts in the top left corner, and must always traverse to the lower right corner, unless specified otherwise by the user, by using WASD keys to move the player marker (bold square).

New Button

The user can abandon a maze in progress and start a new maze by pressing the New Button.

Solve Button

If at any time the player is stumped and is interested in the maze's solution, the player has the option to click the solve button to see a highlighted path of solution. Below is an example of the Solve feature.

How to Button

The user has the option to display text involving an explanation of relevant gameplay keys.

Menu Bar

Multi Chain, Alt Step, New Step Generators

Each of these options represents a different method of random maze generation.

Progressive Reveal

In Progressive Reveal mode, only a small portion of the maze is revealed to the player at a time and all visited cells are retained as visible.

Settings

The user has the ability to change maze dimensions, via number of rows and columns, maze cell thickness, end maze location, and Progressive Reveal radius.

Save

The user has the option to save an in-progress game at any point during gameplay.

Load

The user has the option to load any previously saved game with the same position and time as when saved.

Sharing

Upon winning a maze, players can save the maze, along with their name and time. If this file is then loaded by another player, they will be prompted to beat the previous best time and save their name and time to the maze.

Gameplay Demonstration

Developers View

More Info on Maze Generation

The maze generating algorithm is modified from the recursive back-tracker algorithm. It is set to run first off of the newest added cell, then the oldest added cell in each iteration. This form of the algorithm generates a sort of branching effect from the point of origin. In addition, the modified algorithm has the ability to randomly spawn new points of origin at a certain specified frequency, either from command line arguments or default values, as the algorithm runs. This creates a sort of "bushy", more complex maze with more frequent path branching.

Notable Files (Buried Useful Content)

Future Enhancements