MODULE: SteeringBehaviors v1.00

Started by jerakeen, Sat 14/02/2009 19:52:20

Previous topic - Next topic

jerakeen

Do you want to put schools of fish, flocks of birds or herds of animals
in your game?

This module will allow you by creating flocks and setting behavior rules to
flocks members (boids).

There are different rules: to move boid towards its neighbours, to follow a
leader, to avoid obstacles, to perching, to form a group and so on.

But by now this is non-interactive and you can only draw them on the background
of your room.

You can define another gorups of things too: a swarm o bees, a group of
ships ... Almost any kind of group where members obbey rules like the previous
ones.

This module is based on Conrad Parker and Craig W. Reynolds documents:

    http://www.vergenet.net/~conrad/boids/pseudocode.html
    http://www.red3d.com/cwr/steer/gdc99/

So i suggest you to read both of them for a better understanding on what this
module does.


Requires AGS V3.0.0 or later

Screenshots





Here is the module:
 
  Module SteeringBehaviors
 

And a demo (in AGS v3.1.1)

  SteeringBehaviors Demo Sourcecode

  SteeringBehaviors Demo  Exe


Remember that too many boids will slow down the game.


If you found bugs, errors or don't understand something, let me know.

I hope this will be useful.

Enjoy it

Dualnames

Man, I want to marry you..so you can have the modules of my dreams!
Worked on Strangeland, Primordia, Hob's Barrow, The Cat Lady, Mage's Initiation, Until I Have You, Downfall, Hunie Pop, and every game in the Wadjet Eye Games catalogue (porting)

Trent R

Dude, this is excellent looking. Now all we need is that Displacement plugin to come along so we can make the perfect underwater AGS game... :D


~Trent
To give back to the AGS community, I can get you free, full versions of commercial software. Recently, Paint Shop Pro X, and eXPert PDF Pro 6. Please PM me for details.


Current Project: The Wanderer
On Hold: Hero of the Rune

jerakeen

Uooo, thanks. But this module is not perfect. There are some erroes ill try to fix.

The creature

Does anyone still have this module and example ags file? The download links are missing the files?

That would be great.

TC


The creature

Does anyone have an experience working with this module?

As I don't have the example demo project I'm not sure how to initialise the function. I essentially want to create shoals of fish and have my test fish spite (350) but thats about it.

In my Room Load I created my initial variable: SteeringBehaviors Fish();  but I'm not sure what I need to do, the documentation is quite scary that comes with the script files.

I know there is this function:
Code: ags
function boid_set_boid (int flock, int boid, enBoidType type, float mass,  int graphic = -1,
                          int view = -1, enViewType view_type = vtNone, bool rotate = false);


But, the predictive text for the code soesnt seem to find the function so I'm not sure what I'm really doing.

Any help is greatly appreciated :(

TC

SMF spam blocked by CleanTalk