XSpire AI

Top  Previous  Next

Q: How much time did it take you to write the code for your AI system?

A: The core components did not take all that long to write, maybe 2 months. But I have gained some experience with a shooter-ai before, as I made the COSH Demo last Summer. The current approach uses some of the old parts, and many new and improved things.

 

Q: What was the most complicated part of the script?

A: The most complicated parts is always to combine everything to a running game. The pathfinding is surely a core part of the AI, but it is relatively simple when compared to my old RTS pathfinding. There are some tricky issues with the weapon-code too. But the part that will grow to be most complex is the state machine for the actual AI decision making. The bots have to analyse their situation and act accordingly, who to attack, which item to get, or to defend a certain position. I am working currently to support also simpler creatures for single player missions. This has got to run with the same code, being a bit tricky. It is very complicated to make everything expandable for future changes to the code, and configurable for many types of FPS games.

 

Q: What is, in your opinion, the maximum number of opponents that can run around in a level using your path finding code?

A: There is no real limit given by the pathfinding. The pathfinding is extremely fast as it uses pre-calculated data. The performance is rather linked to the amount of bots that move, and have to adapt their height using traces. But I am sure that 30 bots can run at a decent speed at one time. In single player missions, not all creatures must follow their path at one time, so this number is expandable.

 

Q: What tricks did you use in order to make the bots feel more like humans?

A: They feel like humans? No, not really. No Bot-AI will feel like a real human in the next future. But we can simulate more and more human "actions". The most simple fact contributing to it is that they can move around quickly without getting stuck. Pathfinfing is an absolute core part of modern games. Other things are, that they have to stand to aim and shoot in the simpler modes, and that they have the movement a bit smoothed, when running along the waypoints. The decisions, that the AI state machine makes (get the closest item, pick up the flag) make them feel smart too. But there are still some features that could make the feel more human. Like animations when winning a match, or giving commands and taunts.

 

Q: What advice would you give to a newbie who wants to create his / her own AI system?

A: Learn how pathfinding works! Learn what a state machine should do. Use pen and paper at first. 90% of development is done on paper or in your head. If you can't explain how the pathfinding works on a piece of paper with some waypoints drawn on it, you can't program and understand it. Don't try to implement parts into the AI, that the player will not notice (like super advanced fuzzy decision making). Only things that support the gameplay should be implemented. Often an AI looks good already, if it just moves around to random waypoints, and attacks everything on sight. After all, it is a game that centers around the player, and not a virtual life-sim.

 

Q: What improvements do you plan to add to the AI in the future?

A: The portability to different kinds of game settings and configurability by the user. It should be useful in a typical "HalfLife" type of game after all. It does not make much sense to try to improve it to a level of Unreal-Tournament bots. I have to improve the node-editor, so that others can use it too. The goal is, to have a set of scripts, tools, documentation and dummy objects, so that a newbee can make his own single player campaign. And enough configurability that more advanced users can make a personalized FPS. There are some tests with graphical tools too, as the shadow-baker for the terrain and a decent script for grass and vegetation.

 

Q: If you would start redesigning your AI code, what would you change to it? What would you do in a different way?

A: I have rewritten the complete code 3 times. It is actually in a quite structured status. The main goal is to have the script as modular as possible. I probably have to redesign lots of the code in the future anyhow. But as the code is not in a "final" state, I can't really say what I would have done differently.

 

Q: Please give us some tips for the beginners in game development out there.

A: Concentrate on the gameplay! Don't be fooled by screenhots of others and the wish to have the best graphics, shaders and features. The game must run fast, have a good interface and most importantly a fun gameplay. I will not say again to start with the smallest game possible. Why not try to make the biggest, and most advanced game to begin with... you will probably never finish it, but you will learn what it takes to approach, and make such a game. Either try to specialize in your main field of interest (modelers, level designers, scripters, musicians) and join a team, or be a jack of all trades (like me) and have the fun to explore the many parts of game design (and then get together with more specialized members). It is about fun after all, if it gets to be a business for living, it will lose a lot of the fun that a hobby game-maker can experience.

 

Thank you a lot, Damocles.