Newsgroups: comp.ai.games
Path: cantaloupe.srv.cs.cmu.edu!das-news2.harvard.edu!news2.near.net!news.mathworks.com!hookup!caen!msunews!harbinger.cc.monash.edu.au!bruce.cs.monash.edu.au!alanf
From: alanf@cs.monash.edu.au (Alan Finlay)
Subject: Re: A good path to move
Message-ID: <alanf.795412178@bruce.cs.monash.edu.au>
Sender: news@bruce.cs.monash.edu.au (USENET News System)
Organization: Computer Science, Monash University, Australia
References: <3k6p6i$pi6@lastactionhero.rs.itd.umich.edu>
Date: Fri, 17 Mar 1995 03:49:38 GMT
Lines: 21

leighton@med.umich.edu (Jason E. Leighton) writes:


>  I'm currently designing the logic for the enemies in my tile-based
>...
>30 times per second).  The basic idea is this:  Every enemy has an enemy    
>(usually the player), and this guy will move to the place where their enemy was
>last seen, and when reaching there, will look towards the direction their
>enemy was walking.  Repeat until close enough to fire/swing.  Of course I'll
>have to have some sort of line-of-sight routine, but that won't be too
>bad.

Surely one better would be to estimate the enemy's velocity and attempt to
collide with it.  You can speed up the calculation using approximate formula
and/or lookup tables.  Also, I would add a little random perturbation or else
your pieces are too predictable.
--
,-------Alan Finlay, email: alanf@bruce.cs.monash.edu.au, phone: (03)565-5225.
|	World Wide Web URL: 	http://www.cs.monash.edu.au:80/~alanf/
`-------Computer Science Dept., Monash University, CLAYTON 3168, Australia.
	========== FRAUDULANT THIRD WORLD DEBT SHOULD BE WRITTEN OFF ========
