Anyone have experience coding multiplayer bots ?

Community Forums/General Help/Anyone have experience coding multiplayer bots ?

RifRaf(Posted 2011) [#1]
Hi,

im wanting to make an "afk bot" for the Tiny Tanks Client but im not real sure where to begin. Does anyone know how the pros attack this type of thing?

My maps at the moment are simply created my a main map model, scenery drop models, and data points that indicate special areas and items.

My priorities are

*Map navigation
*Combat decisions

If anyone can shed some light on popular methods or point me to some easy to understand material on the subject I would be most appreciative.


I've updated Tiny Tanks, and it is needing some stress testing. If anyone wants to jump in that would be great.
http://tinytanks.empowergames.com


Thanks


Yasha(Posted 2011) [#2]
Valve's developer wiki is a nice source of information?

http://developer.valvesoftware.com/wiki/Decision_Making_Overview


RifRaf(Posted 2011) [#3]
ill take a look at that, thanks


_JIM(Posted 2011) [#4]
You will probably have to process the map in some way that the AI can understand. One way is to divide it into sections. For example you can have rooms A, B, C on the first floor and D, E, F on the second floor. To make an AI "walk" from room A to F, you have to set up "portals" between the rooms. Those can be doors/stairways/elevators.

Usually this requires some structure similar to Graphs, except the links have more data attached.

You can mark all kinds of stuff for each room. Like the shape/size of the floor, what powerups are in there (useful for decision making), you can even set a "traversal cost" for each room (useful when trying to find the shortest way between 2 spots).

Overall, AI should be split into 2 big parts (that ultimately are really dependant on each other, but should be seen as separate for better understanding): Pathfinding and Decisions.

I'm not sure if Tiny Tanks has all the maps simple enough for 2d pathfinding to be viable (like A*). That's why my previous suggestion might be a better approach, while using some simple pathfinding (even A*) INSIDE each room.

As for decision making, Yasha provided a good link.

Good luck ;)


Yasha(Posted 2011) [#5]
I'm not sure if Tiny Tanks has all the maps simple enough for 2d pathfinding to be viable (like A*).


Note that A* pathfinding isn't inherently 2D: there is no requirement for the nodes to be evenly arranged or in only two dimensions; implementing it is a little more complex but the same algorithm works with any number of dimensions and irregular placement of and connection between nodes. Other algorithms may be more appropriate though for particular layouts.

http://developer.valvesoftware.com/wiki/Nodegraph

Valve's wiki has a few articles on pathfinding too - the method used by Counterstrike seems like it might be pretty efficient for online use (especially because it sounds easier to automate the construction):

http://developer.valvesoftware.com/wiki/Navigation_Meshes


RifRaf(Posted 2011) [#6]
Nodegraphs look promising, thanks