Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Steering behaviors implemented in Ruby

branch: master

Fetching latest commit…

Octocat-spinner-32-eaf2f5

Cannot retrieve the latest commit at this time

Octocat-spinner-32 lib
Octocat-spinner-32 media
Octocat-spinner-32 spec
Octocat-spinner-32 README.rdoc
Octocat-spinner-32 main.rb
README.rdoc

Ruby steering behaviors

This is an implementation of the steering behaviors as seen in: www.red3d.com/cwr/steer/

There is a basic app, with 5 behaviors implemented:

  • Seek

  • Flee

  • Arrive

  • Pursuit

  • Wander

More to come!

Requirements

  • Gosu gem

code.google.com/p/gosu/wiki/GettingStartedOnLinux

code.google.com/p/gosu/wiki/GettingStartedOnOsx

code.google.com/p/gosu/wiki/GettingStartedOnWindows

Operation

This is a showcase of the different behaviors implemented. Right now I have 2 viewports, I will implement more as I have more steering behaviors.

One viewport has 4 agents, one will arrive to whichever point you pick with your mouse. One is pursuing and one is evading the last one, who's wandering around.

The other viewport has three wandering vehicles.

Press D to hide the text. Esc to leave the demo.

What's new

Finally implemented the max turn rate restriction. No more crazy-spinning for my little agents. :) I also improved how to show debug data. Now the targets are color-related (targets for arriving at a location, the wandering circle, predicted positions [for pursuit and evading]).

Next plans

I'm between adding flocking behaviors and implement a bit of my next game code. That's because I already have enough steering behaviors to implement the game logic. Hmmm, what should I do? :)

Something went wrong with that request. Please try again.