Page 1 of 1

Widget that use interesting concept, please try! :)

Posted: 18 Sep 2011, 00:46
by msafwan
I learnt something on pathfinding last year that I decide to make this widget. This is soo cool! (IMO), it give unit an equivalent of a 'brain' that avoid enemy and at same time move to target, and it work with all numbers of enemy (left right, or front & back). The best thing is: it is not a pre-programmed behaviour but something of a 'crank & gears' that work and make unit behave in such way.

Try this: http://springfiles.com/spring/lua-scrip ... nce-widget
I made it for games because it is soo working! I hope everyone has it too because it is not intrusive and is really working.

Please try :P

P/S: If widget can read heatmap maybe it could even replace pathfinding! :wink: :lol:

Re: Widget that use interesting concept, please try! :)

Posted: 18 Sep 2011, 13:33
by Petah
Screenshots or it didnt happen

Re: Widget that use interesting concept, please try! :)

Posted: 18 Sep 2011, 13:42
by Google_Frog
This is quite interesting, I've wanted some smart enemy avoidance AI for cloaked units for a while.

Re: Widget that use interesting concept, please try! :)

Posted: 18 Sep 2011, 15:16
by msafwan
As you will see here: 50+ Sycthe move pass 3 bantha without any unit loss. Normally they will get shot because they bumped into one of the bantha... But here they avoided it.
Image
--Unit move onward, without knowing there's enemy waiting for them.
Image
--Unit steer away from enemy, maintain distance and cloaking ability.
Image
--Unit pass thru those bantha, some stuck at terrain.

This is the latest version, but there will be more feature I think.

Re: Widget that use interesting concept, please try! :)

Posted: 18 Sep 2011, 18:49
by luckywaldo7
That's pretty cool. :D

Re: Widget that use interesting concept, please try! :)

Posted: 18 Sep 2011, 22:23
by knorke
interessting indeed.
must try later :-)

Re: Widget that use interesting concept, please try! :)

Posted: 19 Sep 2011, 01:25
by knorke
interessting because enemy avoiding is something i was looking to add to the AI in spring tanks.
Playing around with the widget I noticed that it is almost an AI on its own, just needs iniative to go towards enemy flags.
The (neutral gaiea) butterflies seemed to confuse it though and sometimes it gives move orders onto unpassable terrain (cliffs)
Some units also get very off-target and end up someplace far away from their original destination. But I think that can be tweaked by the variables?

Re: Widget that use interesting concept, please try! :)

Posted: 19 Sep 2011, 01:59
by PicassoCT
Download and looking...


Sneaksy .. will unbalance most mods who have comando units though. Suddenly effectivness goes up like spiderman on roofies..

Re: Widget that use interesting concept, please try! :)

Posted: 19 Sep 2011, 09:04
by msafwan
interessting because enemy avoiding is something i was looking to add to the AI in spring tanks.
Playing around with the widget I noticed that it is almost an AI on its own, just needs iniative to go towards enemy flags.
The (neutral gaiea) butterflies seemed to confuse it though and sometimes it gives move orders onto unpassable terrain (cliffs)
Some units also get very off-target and end up someplace far away from their original destination. But I think that can be tweaked by the variables?
Nice game! :-)

Yes, the widget consider the butterflies as enemy, and those variables control how far the unit flees. All this can be fixed.

But the widget need some more work before are able to work with flag/enemy-base, cliff and butterflies. Currently it only avoid enemy.

But, I dunno... :|

Re: Widget that use interesting concept, please try! :)

Posted: 19 Sep 2011, 14:48
by knorke
But the widget need some more work before are able to work with flag/enemy-base, cliff and butterflies. Currently it only avoid enemy.
Would it be possible to give "negative repulsion" to enemy flags so that units are attracted by them?
Also set up some more rules like "try to stay near allies" and "do not avoid enemies if full health."
That would produce an AI that works similiar to boids (http://en.wikipedia.org/wiki/Boids)
Kind of "boids with a destination"

Re: Widget that use interesting concept, please try! :)

Posted: 21 Sep 2011, 05:07
by msafwan
Would it be possible to give "negative repulsion" to enemy flags so that units are attracted by them?
Also set up some more rules like "try to stay near allies" and "do not avoid enemies if full health."
Yes, this is do able. At this present moment I already use the move-command as the attractive point (this is why units move forward), and maybe it could work with multiple object too: like a flag and ally. I will try this...

I'll get back to you after I make it work...

Re: Widget that use interesting concept, please try! :)

Posted: 21 Sep 2011, 12:28
by PicassoCT
Ill tried it, it has some issues with terrain it can get stuck. Maybee if a unit gets stuck, it could place a virtual enemy there, thus warning its allys, and pushing itself out and away from the trap.