kylios / BeerRun

Deliver beer to the party as fast as you can without dying or blacking out!
1 stars 1 forks source link

Make the bum smarter #48

Open kylios opened 10 years ago

kylios commented 10 years ago

The bum character should run out of the way of cars. It should honor the "blocking" property of level tiles. It should stay within certain boundaries and adhere to configurable movement parameters. It should be able to chase the player.

kylios commented 10 years ago

In priority order:

  1. stay within boundaries
  2. avoid collisions
  3. avoid cars
  4. chase the player

Think about how this might work. There are other conditions where you can avoid one thing, but still account for a lower priority goal. Example: the player is southeast of the bum, but there is a wall directly south of the bum. In priority order, the bum has to avoid the wall first. However, we can use knowledge of the player's position to inform the decision of where to move. Move the bum to the east if it is not blocked. If it is, then more advanced pathfinding should be used.