Skip to content

lunacys/SteeringBehaviorsNez

Repository files navigation

SteeringBehaviorsNez

A sample project that demonstrates steering behaviors in action. Written in C# using MonoGame and Nez.

All the behaviors are adapted from the articles written by Fernando Bevilacqua at tutplus.com: Understanding Steering Behaviors. Huge thanks to him.

The list of currently implemented behaviors:

  • Seek
  • Flee
  • Arrival
  • Wander
  • Pursuit
  • Evade
  • Collision Avoidance
  • Path Following
  • Leader Following
  • Separation
  • Queue

How to build & run

You'll need to install .NET Core 3.1 SDK or higher. Then clone this repo and don't forget about submodules:

git clone https://github.com/lunacys/SteeringBehaviorsNez.git --recursive

Then go to SteeringBehaviorsNez directory and run

dotnet run

That's it.

Portability

Although this project currently uses some of awesome Nez features (ImGui debug layout, Entity-Component System, Scenes, etc.), it should be as portable as possible. Currently it is a bit harder than it should be.

Notes

Please note that this project is heavily under development and there may be some huge API changes. Take code with care.

Screenshots

Screenshot1 Screenshot2