The positions of the rooms should be random within the grid however, it’s best if they are weighted so that the majority spawn near to the middle whilst fewer spawn close to the edges. Then we need to generate some rooms, these should also have a random width and height however, they should not be square. This should have a random width and height. To start we have to create a grid in which to put all of our map items in. In between screenshots I will be needing to restart the map generation so the example maps that are built are always going to look different, however, you should still be able to see what is happening. The creator of Tiny Keep, Phi Dinh, explains this algorithm much better than me in a post on reddit.
![tinykeep reddit tinykeep reddit](https://media.moddb.com/images/articles/1/170/169024/preview_2.png)
Map Generationīefore I start explaining this section I would like to state that my map generation is heavily inspired, and is very similar to, another dungeon generation algorithm from the game ‘Tiny Keep’.
Tinykeep reddit full#
I won’t be explaining the full algorithm here as there are plenty of better resources for that. From this it can extrapolate a path of nodes (usually just positions on the grid) that lead you from the source to the destination. This A* pathfinding algorithm operates on a grid (it doesn’t always have to), it first picks one position as a starting point and one position as a destination. This is the completed path from a source to a destination on this grid.
Tinykeep reddit series#
You can also see a series of smaller black squares with black lines connecting them. The grey squares are walkable and the red squares cannot be traversed. The squares represent a grid on which the A* algorithm can operate. In this image you can see a few things going on, let me explain. Especially since the maze is built on a grid structure.īelow is an image depicting the visual representation of the pathfinding in the mini-game. With almost the same efficiency of Greedy Best First Search (GBFS) and the reliability of Dijkstra’s algorithm it is clearly the best choice for pathfinding through this maze.
![tinykeep reddit tinykeep reddit](https://www.androidsis.com/wp-content/uploads/2015/04/tinykeep-android.jpg)
The pathfinding algorithm is a basic implementation of the A* pathfinding algorithm that is so popular in game development. The first is the map generation script and the second is pathfinding so that the enemy can find the player. In the creation of this maze mini-game there are two main systems.
![tinykeep reddit tinykeep reddit](https://64.media.tumblr.com/c68b15c4e11d9b954808828359f26d65/tumblr_piq02kZMNH1so6ygh_400.jpg)
Morgan worked on the other two games and together we worked on the rest of the games code. My contribution to the project was mainly the 3D dungeon crawling game. Since there were so many members working on the same project we had to split up the work. I was the first programmer and Morgan james was the other. In my team for this project we had two designers and two programmers. This project requires 3 separate monitors and 3 separate windows compatible controllers to be played.