Thursday, July 11, 2013

Now with less bumping


That screenshot is from a debug build with shooting turned off - ordinarily, tanks wouldn't crowd around like that and let you live.

I've added in a test to see if the place the tank wants to move is "free", and if it is, complete the move. If it isn't, and the tank is patrolling, the tank just selects the next patrol point, which seems OK for simple patrolling. If the tank is pursuing you, then there's some hacky code that gets the tank to jockey away from the colliding objects. 

I think real pathfinding would make both of these better, but as it is, having tanks that don't poke through each other is an improvement.

Next up:
  • collision: projectile/object - will actually be really easy, and will make static objects tactically interesting to duck behind.
  • pathfinding - will make enemy tanks a lot smarter
  • HUD - radar, damage display

No comments:

Post a Comment