By pressing s, the path of the mediumAI is shown. Note: By pressing g during survival, the map’s graph is displayed. The MediumAI has two health and will lose part of its armor when hit by an arrow.
![secrets of grindea map secrets of grindea map](https://static.wikia.nocookie.net/secretsofgrindea/images/7/77/South-Evergrind50.png)
Avoiding danger takes priority over pursuing the player and attacking and will be done first. If it is, then the MediumAI will do its best to dodge the arrow by moving out of the way. First the “dangerDetector” determines if the arrow is headed towards the mediumAI. The MediumAI has a set of rectangles that lie in all 4 directions that will detect a player’s arrow if it intersects with one of them. The only break in this process is when the player shoots an arrow towards the MediumAI.
![secrets of grindea map secrets of grindea map](https://static.wikia.nocookie.net/secretsofgrindea/images/8/87/Mapa.png)
It repeats this process of movement and attack until the player is dead. Through this graph the MediumAI can use the player’s position on the graph and then its own position to determine the best path and make a move. Additionally, edges are formed between nodes that are adjacent to each other in the x and y direction. Nodes are placed in a regular order and are not placed when they lie within a obstacle. This is accomplished by generating a graph that has repeated nodes layered over the map. The BFS method uses graph theory to determine the shortest route to the player while also considering obstacles. If it is not in range, then it follows the path set up by the BFS method. In this process the MediumAI first sees if it can attack the player, using the same rectangle process as the EasyAI. The MediumAI, rather than wandering around aimlessly, uses a generated graph and Breadth First Search to seek out the player. The EasyAI has one health and will die when hit by an arrow Graphs To avoid shooting unnecessarily, the AI checks to see if there is a wall in between itself and the player. In this way the EasyAI wanders around the map randomly until, by a similar process using rectangles, finds the player and begins shooting arrows. When such an intersection occurs, the EasyAI skips the timer and changes direction. In order for the EasyAI to avoid running into obstacles, it has a rectangle created in front of it that detects an intersection with a wall.
![secrets of grindea map secrets of grindea map](https://img.itch.zone/aW1nLzI1MzgxOTkuZ2lm/original/NuQgPB.gif)
For movement it relies on a timer that changes the AI’s direction ever couple seconds. The EasyAI’s functionality relies mostly on timers and rectangle intersections. In the game there are two different sets of enemies, which are defined in their own classes, though both inheriting from a parent AI class. With this new setup, active and completed quests only need one menu, and whether a quest is active or finished will depend on whether they’re gold or silver colored, just like in the Trophy section! I also upgraded each of the quest indicator images while I was at it.My term project is a 2.5d shooter where the player fights against waves of computer enemies.
![secrets of grindea map secrets of grindea map](https://hardcore-gamer.s3.amazonaws.com/uploads/2015/05/Screenshot071-747x309.png)
SECRETS OF GRINDEA MAP UPGRADE
Now it’s time to upgrade another interface! Let’s take a look at the good old quest part of the journal and see how we can improve it: Give it more of a map-y feel, doesn’t it? :) We’re also adding a different way of showing the maps, namely a pop out function which shows you the map on a piece of paper! This is what it’ll look like: This is a bit more streamlined, and allows you to see more maps on each page! Next, we’ll be upgrading the look of the map interface, seeing as we’ve been adding a bunch of new maps recently! Let’s take a look: We’ll be adding more book covers as well! By the time the game is finished, I would like to have more variations, but for now the main difference will be the color:
SECRETS OF GRINDEA MAP UPDATE
Over on the very small super early betas, the next update is already up and running now, featuring the new books! One thing we decided to add is proper book fronts, which look something like this:Īnd here we have some of the text with some of the color variations: