Sign in to follow this  

Trying to figure out AI in Battle City

This topic is 3316 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: http://www.youtube.com/watch?v=hXKmZ8R-ebk 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

This topic is 3316 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.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this