From: Brown J. L <Bro...@Jo...> - 2002-06-06 20:56:47
|
I started working on a design for the AI engine and find myself so confussed I can't even right a question to ask what I'm wondering, but I'm going to ask some generic questions about how the game works and maybe that will be enough :\ What type of AI do we want: Do we want an AI engine that iterates over a vector of enemies and calculates their next action, and then calls a method in the enemy to do that? If this is the case the game engine would be required to call the AI engine and the AI engine would update each enemies? OOORRRR Do we want an AI engine that gets queried by enemies and gives them the best action to perform. And in this case the game engine would iterate over each enemy and the enemy would query the AI for what to do. OOOORRRRRR There is one final reasonable simple way to do AI. You can have each enemy periodically register his current state with the AI engine and the AI engine just gives him the best order by calling one of his methods - walk, shoot, etc. This makes it really easy to fine tune a game because in order to make an enemy appear smarter you just call the register function more frequently. and the register function just looks like: register(){ if I can I see my enimy shoot him if I can't find the shortest path to his current position go there. } My suggestion would be the first senario. It allows for a much less coupled system and that way our enemy object is a lot more simple. So assuming we want the first option then, where will the AI query for info from the game. Will the AI engine be able to query the world and get the positions of each non-static object along with all static objects that are part of the map, or will the AI engine have to query each non-static object seperately to find it's current position. Finally I need to talk to chad about terrain generation, and how that is going to impact pathfinding. Well I hope this finds you all well and that you are as pumped for turning this thing out in 2 1/2 months as I am. cheers Josh Brown |