Xref: utzoo comp.lang.c:34379 comp.lang.c++:10617 comp.lang.pascal:4729 comp.lang.misc:6187 Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!tut.cis.ohio-state.edu!uoft02.utoledo.edu!desire.wright.edu!demon From: demon@desire.wright.edu Newsgroups: comp.lang.c,comp.lang.c++,comp.lang.pascal,comp.lang.misc Subject: help needed with vehicle movement algorithm/code Message-ID: <1990Nov29.124312.1924@desire.wright.edu> Date: 29 Nov 90 17:43:12 GMT Organization: University Computing Services, Wright State University Lines: 30 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