-=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- (c) WidthPadding Industries 1987 0|302|0 -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=-
SoCoder -> Article Home -> Advanced Techniques


 
Pixel_Outlaw
Created : 11 June 2025
 

Steering Behaviors - Level Up Your Movement



There have been a lot of tutorials on this but I feel it's something that most game programmers should learn at some point.

Essentially steering behaviors model autonomous agents that have different desires and goals but also have limitations on how they move. From this basic concept implementing arrival and departure behaviors as well as seeking and avoiding behaviors you can get very complex but easy to implement movement and a game. This looks much more organic than simply iterating through X and Y axes or working only at fixed angles. You can use this sort of thing to implement enemy path behavior, flocking behavior for things like birds, or crowd avoidance behavior for many people in a crowd.

I think Daniel explains it best and you can also get his book "The Nature of Code" for a fair price. A lot of these concepts you'll probably not learn by looking inward. The jump to vector math opened a lot of doors for me personally sometime ago. And for many algorithms, it becomes the cornerstone. Thankfully I see we have some coverage of that there but it is kind of a prerequisite to the steering behaviors.

The Nature of Code - Steering Behaviors

 

Comments


Wednesday, 11 June 2025, 22:15
realtime
nice article
Wednesday, 11 June 2025, 23:14
Pixel_Outlaw
I've got a bit of it implemented in BlitzMax for a current project ... but Daniel already has the book.
Thursday, 12 June 2025, 00:19
Kuron
@Pixel_Outlaw How is BlitzMax performing on modern versions if Windows?
Thursday, 12 June 2025, 00:36
Pixel_Outlaw
@Pixel_Outlaw How is BlitzMax performing on modern versions if Windows?


I'm actually using BlitzMax NG...

One thing to note is some of the modules got moved around and now the vector module is in the math module. They've also gone from vector types to structs and the vectors are now annoyingly immutable. I believe the matrices and quaternion stuff also got moved to math.

I use it on Linux, most of my friends use Linux too so I've not had to test on Windows yet. Seems to run pretty well. It compiles to C or C++? then compiles that to an executable.

I will say that we found some bounds checking is enabled in the debug build and building the release mode will make things substantially faster. This did come into play with my toy Lisp project in BlitzMax. Build your game in debug mode but make sure you release in release mode.