The Daily Click ::. Projects ::. TAHC2
 

Project: TAHC2
Project Started: 20th October, 2009 Last Update: 8th April, 2012
Project Owner: 3kliksphilip Project Members: Mr_Tom James Luke
Project Type: Secret Project Progress:

The AI
Posted 20th Oct 09, by 3kliksphilip  
I always knew that AI for this game would be a problem. I'll sum up how the AI behaves in this game-

There are 14 separate levels, each with their own number of zombies and people when the game starts. However, they aren't static, and they will move from area to area. If they happen to stumble/shuffle into the area you're in, you'll see them walking into view from the side of the level you're playing on. Once on your level, the battle commences between you and the zombies. Other people will aid you in the fight with their guns, but don't expect them to help much- especially if they become infected.

And this is how it works...

The AI is all stored in a huge array, 26 blocks across and hundreds down, and it stores every player's stats, from their name to their speed and strength, as well as their infected status and location within the game.

Every 00:01 seconds, the game randomly selects some one from the list and chooses what to do with them. They're likely to move from area to area. I have altered how likely each area is for them to stumble into, so the zombies will probably remain in the lower areas of the map where the deserted, destroyed town is.

On the level you're playing on, every character fires out sight objects in the direction that they're looking. If this touches an enemy, it reports back to them and they shoot it. That's about it really, but it's a way of simulating large battles and with a little bit of tweaking they should be quite clever.

All in all the game engine takes up about 1200 events and it's growing with every build of the game.

No comments have been posted for this post.


 



Project Forums


Favourite

Advertisement

Worth A Click