I'm looking for some fresh insight as I feel I'm missing the obvious.
Here's the constraints I'm working with:
- The client and dedicated server both run the same gamecode
(there is only a dedicated server actually, no built-in)
- The gamecode is fully deterministic and implemented using behavior trees
- The gamecode resides in a separate library and will not link against a graphics library
Now this is where I mostly get stuck, behavior trees lend themselves really nice for including things like animation behavior and such.
But, as the same code runs on the dedicated server, I can not really put the graphical behavior in the gamecode library.
I could probably think of a thing or two if the structure of the gamecode was simpler.
But the tree structure of behavior trees seems to throw my mind off on deciding how to inject/observe the correct graphical state into/from the gamecode.
Any thoughts? (or requests for more information)
edit:
Some more information on the complexity of the animations.
Character animations are split into 2 parts, there's a good amount of blending going on on the lower body for movement.
Then there's 'actions' running on the upper body, possibly with cross-fades between different animations and the idle animation.
To sum up, lower part is probably easy to observe from the character's current movement, the upper part will require notifications of state changes (except a tree doesn't really have a 'state').
But I'd prefer to not have to flatten out the character behavior to suit the graphical behavior, nor require the graphical behavior to be highly aware of the possible state changes the character goes through.
I'm looking for an elegant way to inject/observe graphical behavior without risking a change to the deterministic behavior of the gamecode.
edit2:
As clarification because this is the AI forum, this doesn't really apply to AI exclusively.
Mostly posted here as behavior trees are a very common subject within AI.
This relates to actual game behavior. Although AI does become a part of this system, it's not directly related to my issue.
[Edited by - Azgur on November 4, 2010 4:46:40 AM]