I've written a "copy"-ish of opensteer.
I didn't care for the coding style they were using, and am trying to stick with a much cleaner code system with pluggable behaviors and summation systems and etc.
This is still in a very new stage, but I'm open to criticisms and ideas, I still have to implement the flocking behaviors and a few others, but I would really like ideas on steering behaviors people would like to have "pre-built".
The source code is at https://github.com/DropechoStudios/desteer
and if you need any help getting it to work, just lemme know.
Steering Library with Irrlicht Demo
-
- Posts: 115
- Joined: Mon May 17, 2010 7:42 am
I looked at the code and it seems good, anyway the "stacking" feature can be optimized A LOT.
every steering behaviour has a main data wich is important and is :
"Destination"
Destination has not to be computed every frame (except for certain special purposes). So that the only real steering needed is a steering that make a motion from actual destination to target destination using some parameters like inertial, propulsion type. Wich can be easy adapted to a phisics engine using for example force impulse or continuos force
(for example a man can run also on his left/right and can walk back, while a rocket before going somewhere need also to turn its head).
The "move to Destination" becomes the only things that need to be computed every frame while other things can be updated at a lower rate.
every steering behaviour has a main data wich is important and is :
"Destination"
Destination has not to be computed every frame (except for certain special purposes). So that the only real steering needed is a steering that make a motion from actual destination to target destination using some parameters like inertial, propulsion type. Wich can be easy adapted to a phisics engine using for example force impulse or continuos force
(for example a man can run also on his left/right and can walk back, while a rocket before going somewhere need also to turn its head).
The "move to Destination" becomes the only things that need to be computed every frame while other things can be updated at a lower rate.
Yea, this is just the very first release. I'm working on a few things right at the moment for this. I'm adding a fluent interface for both the simple steering behavior and the modular behavior.
The next "big step" will be defining an API that allows you to create a custom summing/priority system so that you can use just basic summing or something like prioritized dithering(where you only calculate some of the behaviors but sum them over time based on priority).
Another API layer I want to build eventually is a facade on top of the irrlicht connection do desteer, so it would look something like
And in the main loop, instead of updating each entity, you would just update the facade.
And for the thrust thing, technically you could pull the given force apart and use that for a vectored thrust type vehicle.
Finally, if you guys would be so kind as to log any issues you have on the github issues list, that would be super.
The next "big step" will be defining an API that allows you to create a custom summing/priority system so that you can use just basic summing or something like prioritized dithering(where you only calculate some of the behaviors but sum them over time based on priority).
Another API layer I want to build eventually is a facade on top of the irrlicht connection do desteer, so it would look something like
Code: Select all
MobileEntity * ent = DESteerIrrlichtFacade
.WrapEntity(irrlichtSceneNode)
.WithController(
new FluentSimpleSteeringController()
.WithSeek(target)
.WithObstacles(obList)
);
MobileEntity * ent = DESteerIrrlichtFacade
.WrapEntity(irrlichtSceneNode)
.WithController(
new FluentModularSteeringController()
.WithBehavior(new SeekBehavior())
.WithObstacles(obList)
);
And for the thrust thing, technically you could pull the given force apart and use that for a vectored thrust type vehicle.
Finally, if you guys would be so kind as to log any issues you have on the github issues list, that would be super.