Log In  

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.

P#38091 2017-03-07 22:34 ( Edited 2017-03-19 02:39)

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).

P#38220 2017-03-13 16:37 ( Edited 2017-03-13 20:40)

Thank you!

P#38388 2017-03-18 22:39 ( Edited 2017-03-19 02:39)

[Please log in to post a comment]

Follow Lexaloffle:          
Generated 2024-03-28 22:57:02 | 0.020s | Q:10