As promised, here is all the stuff I've done for AI. It contains the following:
- A Skyline Plugin that allows you to create various types of AI files; and
- Several files that allow you to include the AI files you created in the Plugin in your Skyline game; and
- A couple of files that you can use to integrate AI Behaviours on your Entities.
It also includes a mostly completed manual on how to use all of the various files!
The AI types that can be created in the Plugin are:
- Behaviour Trees
- Decision Trees
- Finite State Machines
The behaviours available in the Steering Scripts files are:
- Seek – this Behaviour steers an Entity towards a target Entity, using the current position of the target Entity as its goal.
- Flee – this is the opposite of Seek, and steers an Entity away from the target Entity.
- Pursue – this is similar to Seek, but uses an estimate of the future position of the target Entity as its goal.
- Evade – this is the opposite of Pursue.
- Wander – this makes an Entity move in a way that appears almost random. It is updated in such a way that each update is related to the previous one, so the Entity won't make any sudden changes of direction.
- Arrive – this makes an Entity slow down when it is within a certain distance of the target Entity. It MUST be used with Seek or Pursue.
- Follow – this is similar to Seek, but once the Entity gets within a certain distance of its goal, it will attempt to match the movements of the target Entity.
- Obstacle Avoidance – this is a simple system that allows an Entity to steer around any obstacles in its path. It uses a simple 3 feeler approach with one feeler at -45 degrees, one at 0 degrees and one at +45 degrees to its current direction of travel.
As I stated in a previous post, I simply don't have time to finish this off to a standard where I could actually sell it on the store, so decided not to waste all the effort I put in, and release it free to the community
I will try to provide as much support as I can (if needed), but, hopefully, with the manual it should be relatively straightforward to implement these in your games.
Shando