Gaming System: How it Works
Previous Top Next

The following is an overview of how the gaming system works.

Coding, Testing, and Debugging

First, in the development phase, you use Visual Studio® (or a similar development tool) to develop your AI program(s), which are special classes that make use of the Bots AI Library. You work inside a solution that contains two projects, one for your AI programs (classes) and one for testing those programs. The first project outputs a library assembly (.dll) file that contains your AI classes; we call this the "AI project". The other project outputs an application (.exe) that runs your AI code in the debugging environment; we call this the "AI Runner" project and it's the "startup" project for the solution.

You generally have the Game Viewer up and running as you develop your AI in Visual Studio®. When you're ready to test, you set up a game in the Viewer that includes a bot to use for testing. You build and run the solution in Visual Studio® (which runs the AI Runner project) to execute your AI code in the debugger, where you can set breakpoints, inspect variables, make changes, etc. You can watch your bot's actions in the Viewer and immediately see the results of any changes you make while debugging.


Production/Release

When you're done testing and your AI program(s) are ready for general use ("release"), you copy the AI library (.dll) file to your My Documents\Bots\AI folder. Now, when you set up games in the Game Viewer, your AI programs are available for selection and assignment to the bot(s). Visual Studio® isn't involved at this point -- the Viewer manages the execution of the AI.

Later on you can return to the development phase as necessary and continue coding, testing, and debugging. When done, you can copy the resulting library (.dll) file over the old one in your My Documents\Bots\AI folder to "release" your updated AI.

You can share your AI library with a friend (assuming he has Bots: AI Battlefront installed, too). He simply puts the .dll file into his My Documents\Bots\AI folder. Then your AI classes that are inside that library are available for him to select when he sets up a game. If you want (and he allows it), you can connect your Viewer to his so you can both watch the games play out. Both you and your friend can develop AI independently; your bots can compete against his, or your bots can collaborate with his for team play against other bots.


Recommended Topics
Browsing the Samples
Solution Guidelines