Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Code Snippets / Motion Planning

Author
Message
D Man
22
Years of Service
User Offline
Joined: 3rd Oct 2002
Location: Germany
Posted: 26th Sep 2003 01:00 Edited at: 26th Sep 2003 18:30
Hi,
I wrote a tutorial about motion planning using potential fields, an extremely fast pathfinding routine, which was of my interest a certain time.
Naturally it is written in english with sources etc.
Feel free to comment.
http://www.thequest03.de/Tutorial%20-%20Pathfinding(english).doc

God is real, unless declared integer.
D Man
22
Years of Service
User Offline
Joined: 3rd Oct 2002
Location: Germany
Posted: 27th Sep 2003 12:53
Come on, guys...
At least give it a try.

God is real, unless declared integer.
Hamish McHaggis
21
Years of Service
User Offline
Joined: 13th Dec 2002
Location: Modgnik Detinu
Posted: 27th Sep 2003 16:30
It's a very good tutorial, I didn't have time to read it all but I'm sure anyone who is doing a RTS game will find it invaluble.

Brains are for idiots.

Athelon XP 1400 Plus - Nvidia Geforce MX400 - 256mb RAM
D Man
22
Years of Service
User Offline
Joined: 3rd Oct 2002
Location: Germany
Posted: 28th Sep 2003 02:32
At least someone says something .
I will upload a screen tomorrow.

God is real, unless declared integer.
D Man
22
Years of Service
User Offline
Joined: 3rd Oct 2002
Location: Germany
Posted: 28th Sep 2003 20:35
Here's a screenshot:


God is real, unless declared integer.
David T
Retired Moderator
22
Years of Service
User Offline
Joined: 27th Aug 2002
Location: England
Posted: 28th Sep 2003 20:46
I'll have a read

hmm, I have seen your signature quatoe before...

c:/dos
c:/dos run
run dos run
David T
Retired Moderator
22
Years of Service
User Offline
Joined: 27th Aug 2002
Location: England
Posted: 28th Sep 2003 20:51
From a short read this looks really interesting. Thanks )

c:/dos
c:/dos run
run dos run
D Man
22
Years of Service
User Offline
Joined: 3rd Oct 2002
Location: Germany
Posted: 29th Sep 2003 00:14
It should be interesting for you, as you are making an rts ...

God is real, unless declared integer.
M00NSHiNE
21
Years of Service
User Offline
Joined: 4th Aug 2003
Location: England, UK
Posted: 29th Sep 2003 11:39
I wonder if theres some way of combining both this and a* to produce the ultimate pathfinding algorithm?

"It's amazin' what you can do with a computer and access to t'internet"
D Man
22
Years of Service
User Offline
Joined: 3rd Oct 2002
Location: Germany
Posted: 29th Sep 2003 23:21
You could try
One possibility would be, to precalculate the whole field, with a type of waypoint system and then to calculate the way how to dynamically switch on and off attractors with a*.
For the local pathfinding, the algorithm posted by me would fit.

God is real, unless declared integer.
M00NSHiNE
21
Years of Service
User Offline
Joined: 4th Aug 2003
Location: England, UK
Posted: 29th Sep 2003 23:24
Well the fact that youve said its a possibility is a good start, now it just needs coding.....

Not really my area of expertise this pathfinding lark. Ho hum.

"It's amazin' what you can do with a computer and access to t'internet"
D Man
22
Years of Service
User Offline
Joined: 3rd Oct 2002
Location: Germany
Posted: 29th Sep 2003 23:29
Well, at the moment I'm trying to solve the local minima problem with a completely new and more complex approach based on the idea of potential fields(for optimal results).
But I think, I'll need a while .

God is real, unless declared integer.
M00NSHiNE
21
Years of Service
User Offline
Joined: 4th Aug 2003
Location: England, UK
Posted: 29th Sep 2003 23:33
Yep, suppose the local minima thing is the only thing stopping this technique being useful for RTS, which is what im planning to do. Good luck with it anyways

"It's amazin' what you can do with a computer and access to t'internet"
deckard
21
Years of Service
User Offline
Joined: 11th Apr 2003
Location:
Posted: 30th Sep 2003 11:41
Absolutely brillant idea ! I suppose, there is no need to calculate
sum (big greek E) including all objects, but only for some nearest
objects. You can also experiment with other functions such as
v#=k1#*2.0^(-distance#^2)
v#=k2#*(distance#+.1)^(-1.3)
if distance#<1 then v#=1-distance# else v#=0
and other simple functions with lim->0 when distance->infinity
D Man
22
Years of Service
User Offline
Joined: 3rd Oct 2002
Location: Germany
Posted: 30th Sep 2003 12:26
You're right; you do not have to calculate all the influences for one agent(because the influences are nearly 0 in a certain distance).
Another formula would be:

alpha*e^(-gamma/2*((x-a.x)^2/s+(y-a.y)^2/o))

You would have more control on the shape of the repulsor.
s and o could be used to define the length and height of the ellipse.

God is real, unless declared integer.
KamaKase
22
Years of Service
User Offline
Joined: 29th Oct 2002
Location:
Posted: 27th Oct 2003 20:16
What's an algorythm.....
Aaaaw, why is everything so complicated.
D Man
22
Years of Service
User Offline
Joined: 3rd Oct 2002
Location: Germany
Posted: 27th Oct 2003 21:17
Thats the price for the speed .

God is real, unless declared integer.
rob p
21
Years of Service
User Offline
Joined: 24th Sep 2003
Location: Philly, PA, USA
Posted: 28th Oct 2003 17:46
Excellen tutorial! This will definitly come in handy. Thank you

Login to post a reply

Server time is: 2024-11-23 23:15:46
Your offset time is: 2024-11-23 23:15:46