libgdx / gdx-ai

Artificial Intelligence framework for games based on libGDX or not. Features: Steering Behaviors, Formation Motion, Pathfinding, Behavior Trees and Finite State Machines
Apache License 2.0
1.18k stars 241 forks source link

Wander.java default timepiece #80

Open FainTMako opened 7 years ago

FainTMako commented 7 years ago

Please ensure you have given all the following requested information in your report.

Issue details

Wander.java uses the default timepiece which limits its usage.

Reproduction steps/code

Run 2 agents in a wandering simulation separately and concurrently. Assume they need their own timepiece due to different simulation parameters

Both agents use the same timepiece which may be an unwanted behavior.

Version of gdx-ai and/or relevant dependencies

Current

Solution: Allow users to pass in a timepiece reference during construction or set it later on.

davebaol commented 7 years ago

Just curious, what's your use case?

FainTMako commented 7 years ago

I'm running a few different agents in a game. Each agent has their own timepiece because each agent runs on their own update loop and they do not depend on one another. The use case could be that there is a world that runs on a timepiece and then two agents that run on their own faster or slower timepieces. I'd imagine being able to have multiple timepieces would be essential in simulations.