how can i write a game like this...(using mouse)

it is a top-view game. The map include
blocks(be able to walk through/ not able) and characters.

i want the character whom is under control walks to anyplace i need, and he avoids the blocks that unable to walk through, reachs the goal.

Have you played games such as Command&Conquer, StarCraft or Commandos?
you just point dest with mouse then he runs and avoids the things.

thank you
RkMkAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

RkMkAuthor Commented:
Edited text of question.
0
HypoCommented:
As I said... If you want an example... I'll send it to yer Email!
0
brainwareCommented:
Hypo: if you have such written in good old Pascal/asm i would really like to check it out.. i know how to write games like that and 3d but thats under win32.. not seen much Pascal last years and would be nice to see some graphix coding in dos again..

brainware@cyberjunkie.dk
0
Upgrade your Question Security!

Your question, your audience. Choose who sees your identity—and your question—with question security.

RkMkAuthor Commented:
dear Hypo,
this is my email addr:
rkmk@usa.net
0
jack_p50Commented:
wow, crap
why are you talking so mysterious about pathfinding???
you need pathfinding, aren't you???
0
RkMkAuthor Commented:
yes yes i need pathfinding
i am sure you can help me ,jack, right?
0
yairyCommented:
Hi,

if there are no blocks between
the enter and exit point:

I would calculate each step the Length
from the immidiate neighbour points to me to the exit point.
I would choose the shortest length each time.


If there might be block, it isn't as simple:
one should can use Backtracking
to find the path.

heres a recurse "rough" definition:

f(location, matrix)
{
  if you are at the enter pos and have
  nowhere to go - quit, failer.
  else
  if you are in the Exit point -
  quit, Success.
  else
  if you don't have any place to go
  (all is block (except the from where
  you came)) mark the place as DeadEnd.
  <do nothing, the recurse will pop you
  to the prev. position>
  else
  call f(Location, matrix) for all
  free places that aren't blocked or a dead end.
}


Any questions ....

Yair

0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
RkMkAuthor Commented:
thank you. ill try.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Pascal

From novice to tech pro — start learning today.