1

Topic: Bot code

Hello,

I am interested in creating better and funnier bots to play against, but I am not really familiar about how the code is structured.

Where is defined the code for the bots? Is it defined in the TeeWorlds GitHub repository or are there different versions for each server?

I am looking forward to hearing from you.

Best regards,Eduardo

2

Re: Bot code

eduardo.vilasboas.guerra wrote:

I am interested in creating better and funnier bots to play against, but I am not really familiar about how the code is structured.

Where is defined the code for the bots? Is it defined in the TeeWorlds GitHub repository or are there different versions for each server?

I don't think that there are open-source bots around.

3

Re: Bot code

There are those open-source 0.7 bots by rand: https://github.com/nheir/teeworlds/tree/server_bot0.7
LordSk's zombies do not behave like vanilla tees, but they are also bots: https://github.com/LordSk/teeworlds/tree/mod/zomb

They are not part of the official Teeworlds though, so each server will have its own bots.

Not Luck, Just Magic.

4

Re: Bot code

Bots might be a feature in next major version if some people implement it.
There is a github issue here : https://github.com/teeworlds/teeworlds/issues/1966 not to forget but nothing has been done (at least, on my side) about it.

The two fork quoted above present two ways of placing AI mechanics in the code.
- rand's (mine) considers bots as fake players (as in src/game/server/player.h) in server code (see src/game/server/bot(engine).{cpp,h})
- LordSk bots are entities controled by the gamecontroller (see src/game/server/gamemode/zomb.{h,cpp}) and becomes player only when communcating with a client.
Feel free to use the one that suits you the best or make another one. The more ideas we have, the best will outcomes.