Re: [A82: monster ai]


[Prev][Next][Index][Thread]

Re: [A82: monster ai]




Think about the range of coordinate values in each of those possible 
spaces, as well as the location of the origin etc.
Most likely an object at (x,y) in tilemap space, is not going to be at
(x,y) in screen space; the x and y axes in screen space may not even run
in the same direction as the axes in tilemap space. So you obviously need
to have some way to transform coordinates between spaces. Most likely such
transformations will involve subtractions and integer divisions.
As simple as this may sound, it will certainly make your life a lot easier
down the track if you've got this already clearly figured out.

-Jeremy


On Thu, 2 Dec 1999, Roger Levy wrote:

> 
> ok, i got the part about tilemap, level, and screen space
> but what do u mean by coordinate systems? transformations?
> 
> >Just as a general comment regarding this style of game; "ai" or no "ai".
> >Be sure to fully define all coordinate systems that you'll be using, and
> >always make sure that you're absolutely confident that you know which one
> >you're in.
> >Otherwise you'll go nuts trying to figure out what kinds of
> >transformations to apply at any given time.
> >For example, you might be dealing with data in: a tilemap space, a level
> >space and a screen space. As far as monsters go, you'd want them to live
> >in level space, so that they're aware of offscreen elements, and only
> >translate their coordiantes to screen space when you need to see them.
> >
> >-Jeremy
> >
> >
> >
> >
> 
> ______________________________________________________
> Get Your Private, Free Email at http://www.hotmail.com
> 



References: