Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Steering Behaviours #65

Open
1 of 9 tasks
thombruce opened this issue Oct 24, 2023 · 0 comments
Open
1 of 9 tasks

Steering Behaviours #65

thombruce opened this issue Oct 24, 2023 · 0 comments
Labels
ai Artificial Intelligence

Comments

@thombruce
Copy link
Owner

Recently implemented the beginnings of an AI system for enemies in the game, but all it does right now is aggressively turn and fly towards the player. The inevitable result of this is that if the enemy aligns perfectly with the player, they will collide with and push the player (their desired state is to be precisely where the player is). Since high-speed collisions should be, y'know, dangerous, we should prefer that they steer to avoid the player and strafe during combat instead.

That's just one behaviour from a list of steering behaviours not yet implemented:

  • Seek (00bf90d)
  • Flee and Arrival
  • Wander
  • Pursuit and Evade
  • "Movement Manager"
  • Collision Avoidance
  • Path Following
  • Leader Following
  • Queue

This list adopted from here: https://code.tutsplus.com/series/understanding-steering-behaviors--gamedev-12732 "Movement Manager" quoted and emphasised because it isn't really a steering behaviour, but a way to combine steering behaviours.

The guide linked above is very old and was written for Flash (so there are some demonstrations missing) but I did reference it when writing the initial seek behaviour, and I think it offers clear advice even if I do have to adapt it heavily.

We don't need to implement these behaviours all at once, though some do clearly follow from one another ("Leader Following" and "Queue"). The list is also incomplete, and we might well consider adding advanced behaviours like flocking, flanking or pincering, advanced routing or pathfinding, etc.

A more detailed and more advanced discussion of steering behaviours can be found here: https://www.red3d.com/cwr/steer/gdc99/


An ideal implementation would be comprised of several smaller code submodules which could be swapped between using a tag or marker system (change behaviour at the toggle of a component). This would make it more manageable, more reusable and more compatible with higher-level AI implementations like big-brain.

@thombruce thombruce added core New feature or request ai Artificial Intelligence and removed core New feature or request labels Oct 24, 2023
@thombruce thombruce pinned this issue Nov 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ai Artificial Intelligence
Projects
Status: In Progress
Development

No branches or pull requests

1 participant