Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: strings or projectiles?  (Read 3896 times)

0 Members and 1 Guest are viewing this topic.

Jarwulf

  • Newbie
  • *
  • Posts: 37
    • View Profile
strings or projectiles?
« on: September 23, 2009, 09:00:57 pm »
I currently have a bot that wanders around until the player gets close enough then it moves toward the player. This is problematic in an area full of obstacles so I've come up with two main options.

I can draw a string to connect both objects that prevents the bot from 'seeing' the player if it intersects with the maze.

I can shoot out an invisible projectile sprite from the bot every game loop which prevents the bot from 'seeing' the player if it intersects with the maze.

If I do the first I'll have to figure out how to adapt the wiki's collision detection to Shapes but the second might be increased overhead. I want to eventually adapt whatever method I use for bots that 'see' the normal way instead of through simple proximity

Which one is the best use of resources? Or is there a better way?

 

anything