Jump to content
  • Advertisement
Sign in to follow this  

Trying to figure out AI in Battle City

This topic is 3677 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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:
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.

Share this post

Link to post
Share on other sites
Sign in to follow this  

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!