Greetings.
I have been working lately on an arcade-style game where the player controls a dragon who explores randomly-generated mazes that have treasure in the end. However, there are opponents, including a knight, that think that the dragon stole the treasure and pan on stopping. The idea is that, every stage, after the level number helps determine the size of the maze and the number of opponents, the opponents are randomly generated from 6 classes (excluding the knight, which is in every stage) that have their own way of patrolling and hunting the dragon.
I got stuck planning the logic here:
Unfinished Flowchart
More specifically, I don't know how to plan a route or walking plan for each opponent.
The source code is here, complete with not only the code itself, but also any notes that I had on how I plan the game to be run.
GitHub Project
I appreciate everyone's response.
I'd recommend using a target x,y to set the route. Move them to that x,y and then set the next closest waypoint as the new target as they reach the last one to get them moving in a route. Waypointing is a common method used to get AI moving along various paths. You can check out some of my carts and some of my articles on here about how to achieve something very similar to this (except I always have the target set to the player's location, however you can use a very similar method to make them, say, patrol around an area of the maze).
[Please log in to post a comment]