help needed with vehicle movement algorithm/code

demon at desire.wright.edu demon at desire.wright.edu
Fri Nov 30 04:43:12 AEST 1990


	Hi, I need an algorithm (or code) for the following:

given n vehicles (tanks) moving towards m vehicles (tanks)
given x obsticles (buildings, hills, etc.)

a way of moving the tanks towards each other without running into obsticles or
ending up in a dead end.

	Although this is similiar to a maze moving algorithm, the solution is
not the same, as the goals are also moving, and new obsticles are being added.

	The problem I get stuck at is encountering a hill (vehicles can not go
over them, only around).  I could simply pick a direction and go around, but
run the risk of simply circling the hill forever.

	I start with each vehicle at a specific x,y coordinate and move towards
an opposing vehicle (the closest observable).  However, if a hill or building
gets in the way, I need to move around it.  But, which direction is best?  How
about getting trapped in a "canyon" of projecting hills?
	This is for a real time system so speed is critical.  I can't spend all
day doing travelling salesmen routines.

	If anyone has done this type of thing before, let me know!

	I'll take algorithms, code, or suggestions!

	Thanx in advance.

Brett



More information about the Comp.lang.c mailing list