Page 2 of 2

Re: My first game I actually want to finish

Posted: Sun May 20, 2012 2:11 pm
by LeiterJakab
I have a new update. I'm trying to work out how to handle equilibria. I'm doing this on the agent behaviour level and not in the steering behaviours. A new demo up too that is showcasing this.
http://onetinyleap.wordpress.com/

Re: My first game I actually want to finish

Posted: Sun Jun 03, 2012 11:20 am
by LeiterJakab
If there is anyone around here who likes working or playing with the Ubity game engine, I have put up the current version of my steering library. It's free , but there's no documentation yet. I'll be working on that in the future. Anyway hope you anjoy!
http://onetinyleap.wordpress.com/simplesteer/

Re: My first game I actually want to finish

Posted: Tue Jun 19, 2012 10:09 am
by LeiterJakab
SimpleSteer_v0.6 had a bug that made spherical avoidance and separation behaviours unusable. It was a really silly one, I fixed it. I appologize to any Unity users who had to deal with this annoyance.
http://onetinyleap.wordpress.com/simplesteer/download/
v0.61 can be downloaded here and is closer to the intended behaviour. I still appreciate any bug reports.

Re: My first game I actually want to finish

Posted: Tue Jun 19, 2012 12:05 pm
by Korban3
Cool. So, the steering is driven by your A* algorithm?

Are you still having issues with equilibria? My first thought would be to find a pair of agents involved and get the vector between the two. Moving them in opposite directions along that normal would unstick them, hopefully.
If more than two are involved I would either get the movement vectors relevant to all of them, causing them to sort of pulse outward I imagine, or try to use relaxation by working individual pairs over and over. I think the relaxation technique would probably work best.

If you've already solved it or this stuff didn't work, ignore it.

Re: My first game I actually want to finish

Posted: Tue Jun 19, 2012 5:47 pm
by LeiterJakab
Thanks for the ideas! For some reason I don't get feedback anywhere exept for Dan, who reported the bug, something I'm very thankful for.
As for the first question, I heavily rely on pathfinding to perform any kind of movement. I plan on using persue and evade in certain situations without pathfinding though. But these behaviours combined with wall avoidance wouldn't be able to navigate agents around obstacles. So far I haven't read bout a wall avoidance behaviours that could steer the agent intelligently enough to do so. I'd also like to point out that the A* project I use is not my work, but that of Aron Granberg. It works great and I can only recommend both the free and the paid version to any Unity user.
I'm afraid equilibria will allways be a problem, though my steering behaviours are really not state of the art and there are most likely more sophisticated solutions being used in the industry. When to agents get stuck on each other I actually use these steps:
  • turn off steering behaviours
    get the collison normal (it probably returns the same vector as the relative position)
    get the cross product of the collison normal and the global up vector(0, 1, 0)
    apply acceleration in this direction for a short time (this causes both agents to sidestep to the right)
    turn steering back on

Re: My first game I actually want to finish

Posted: Wed Jun 20, 2012 1:48 pm
by Korban3
Mm, that sounds like a good implementation of it. Does it work, often enough?
The other thing you could have the two do is, if they continue to encounter equilibrium is to have them separate a bit and try moving around each other.