I did this type of thing by having the collision detection separate
from visual elements (each tile had a collision rect) so that the
tiles need not be displayed to have the AI interact with them. This
allowed their off screen position to be updated, and it was pretty low
CPU hit - the biggest hit usually comes from graphics rendering.

Regards,
Hudson

On 4/27/07, James Marsden <[EMAIL PROTECTED]> wrote:
Hello all,

When building a game where collision detection for enemies is important
(such as a scrolling tile game), how do you create persistent AI for an
enemy when it's off-screen?

For example, walking away from the enemy causes it to be removed from
the game area, but the enemy needs to keep wandering around the world in
virtual terms, so the player can't easily tell where the enemy is going
to be when returning to the same area. How do you maintain that
interaction for the enemy, or is it not done like that because it's too
processor intensive?

Any tips or pointers to resources would be much appreciated.

Thanks!

James
_______________________________________________
[email protected]
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com

_______________________________________________
[email protected]
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com

Reply via email to