goblin-maze/README.md

36 lines
1.5 KiB
Markdown

# Goblin Maze
Goblin maze is a toy project to learn pathfinding algorithms, maze generation, and c++.
## The game
The game is to direct your goblin, from the start of the maze where it has left its cart to find the chest of gold within. Your goblin cannot hold all the gold present in the chest, so you will also need to go back to your cart to store the gold, then collect more!
**BEWARE**
The roof of the maze will collapse, so get the gold quick! Otherwise your goblin will be smashed and the gold lost.(There is a time limit.)
NOTE: The more gold your goblin is carrying, the slower it can move, so be sure to only grab what you can get out with.
## The interface
The goblin is controlled through a rest interface. Since this is a timed run, you will need to make your command before 250ms has elapsed, otherwise your goblin will stand there with nothing to do.
## Visualization
While it is a secondary objective, I do plan to make a browser based interface with tiles and such so a player can visually recap a round.
## State
The state of the maze is as follows:
- Maze: a 2d array consisting of 5 values:
- 0: Unexplored
- 1: Path
- 2: Wall
- 3: Chest
- 4: Cart
- Goblin: A tuple consisting of 3 values:
- X: X value in the maze
- Y: Y value in the maze
- Gold: Current amount of carried gold. Cannot be above 10
- Cart: a value representing the amount of gold saved
- Clock: The remaining time left in the run
## Replay
The state will be saved for every "frame". This allows each run to be played back and analyzed.