It almost seems like the enemy moves in a randon fashion. Here is what i am trying to do at the moment
1. At start position, get available map cells to move to around the specific cell that the hero's on.
2. Pick random map cell from the list in step 1.
3. Get the direction of that cell (left/right/top/down) and move into that direction until we run into a wall or intersection. Change direction on each intersection (random pick just like in step 2) If we run into a wall, we check if it's destructible (again, random pick), decide whether to break it and move through or change direction. If the wall is not destructible, change direction.
My enemy just wonders around, which is what i was expecting. Just looks like the enemy in the game actually has a target? Err.. i'm confused. Thanks for any suggestions.
Trying to figure out AI in Battle City
Hey guys. I'm remaking old NES game called Battle City in XNA. It's for a project at school. I've got most of it completed, but i can't seem to figure out how to tackle the enemy AI. I've tried implementing A* pathfinding algorithm, which worked great except that i thought it's a real overkill for the game and makes it harder to play.
Here is what the original looks like:
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement