Re: A83: tracking and moving many objects
[Next][Index][Thread]
Re: A83: tracking and moving many objects
--- Man on the Moon <apparatus@mediaone.net> wrote:
>
> What is a good method or algorithm to keep track of
> many objects, such as
> the coordinates of bullets in a game, and move these
> objects as well? I did
> come up with a method of storing each in a user
> defined varible but that was
> a pain in the neck, or code.
>
> From: Chris (Man on the Moon)
> e-mail: apparatus@mediaone.net
The best way I can see to do it would be to just make
a table/database of them in a safe ram area.
.db objectcode, x, y, xdir(0,1 or 255), ydir(0,1 or
255)
xdir and ydir is just the direction, just add this to
the x/y coordinates everytime you want it to move.
0=dont move on that plain, 1=right,255=left
Its fairly simple. Then you just have to write a few
routines to add new things to the table, and to
replace old ones that have expired (bullets off screen
ect...).
Jimmy
=====
»»»»»»»»»»»»»»»«««««««««««««««
» TIMagic@goatse.cx «
» http://www.zed80asm.org «
» http://www.timagic.cjb.net «
»»»»»»»»»»»»»»»«««««««««««««««
__________________________________________________
Do You Yahoo!?
Kick off your party with Yahoo! Invites.
http://invites.yahoo.com/