There are currently 39 players online.
 
Warsow


 
 

backWarsow network protocol and/or bots documentation?

Forum index
Modifications / Coding
Warsow network protocol and/or bots documentation?
Posted by
Post Scroll to bottom
Springbok
Member
(11 posts)

I'm wondering whether there is any good documentation on Warsow's network protocol, without having to dive straight into the source code. I'd like to try writing bot clients for local practice.

I'm toying with the idea (yes, crazy ambitious) of improving bots for Warsow, and first off I'm looking into the possibility of writing them as standalone clients that connect to the server. If that seems impractical, I could try modifying bots in the wsw source.

IMO the aiming algorithm of wsw bots sucks immensely even though the pathing is quite OK. Their aiming is extremely primitive and mechanical, like most FPS bot aiming algorithms are. As someone living in a country (RSA) where warsow is virtually unknown and which is seperated with a lot of distance from all online public wsw servers (read: very high irreducable lag) I like to practice with bots before LAN, but their aiming and general 'reasoning' is too un-humanlike to even be fun. When I was a total noob, bots DM with bots and easy racesow maps were a great way to help me build my skills. I know there isn't much that can be done about bots primitive movement accross the map (except they could do with a little strafe jumping on straights) but their aiming sucks and their efficiency with different weapons is horribly inconsistent.

MagusZero
Chaotician
(1858 posts)

Even their movement isn't great; as soon as they see a player, they dodge randomly, and when they lose sight of a player they tend to walk against walls for a while. They also have a tendency to repeatedly jump on a single jump pad.

I'd suggest that if you plan to do this, either mod the bots themselves, or help me create simple bots with gametype scripting. I'm having some trouble starting at the moment, because someone decided that angelscript, a nice OO language, would be a nice place to pretend they were writing C, so nothing is remotely modular or easy to extend. Still, I'll keep trying.

Springbok
Member
(11 posts)

Ah, sorry for taking so long to reply.


Even their movement isn't great; as soon as they see a player, they dodge randomly, and when they lose sight of a player they tend to walk against walls for a while.

Ah yes, that! Their movement is indeed 'not great', but I'd say it's a lot more acceptable than their jerky, random aiming.


I'd suggest that if you plan to do this, either mod the bots themselves, or help me create simple bots with gametype scripting.

Very interesting; so is it then actually possible to modify bots in an advanced way using only angelscript? I thought that their aim algorithm and such would be hardcoded in Warsow (which seems to be the typical annoying thing FPS devs tend to do) although I admit I haven't investigated very much (the whole angelscript wrapping part, especially classes, in wsw source still puzzles me).

How do you plan on creating bots with gametype scripting alone?

What do you mean by "mod the bots themselves"?

EDIT: I've checked again, and it seems that the main body of bot code is stored in wsw source directory wsw_0.62/game/ai. Apparently ai_class_dmbot.c is the only place where the aiming algorithm is actually implemented. While I'd compliment the code's neatness and a few interesting special cases it handles, it all reeks of hardcoded constants and oversimplification. Sad; a coder spends a lot of trouble on hundreds of lines of code relating to bot movement, goals and such, and then dedicates only a handful of lines to the aiming algorithm, which is as important as any of the other parts.


I'm having some trouble starting at the moment, because someone decided that angelscript, a nice OO language, would be a nice place to pretend they were writing C, so nothing is remotely modular or easy to extend. Still, I'll keep trying.

Meh :( Glad that you'll keep trying though, and I'd like to help if I could.
(updated 2012-05-31 00:59:25)

MagusZero
Chaotician
(1858 posts)

The thing is, the current bots are totally separate from AS, but can be implemented from scratch there with much more robust possibilities. You can make bots that aren't anything like players for instance: flying bots or bots which protect certain goals and such.

Currently, there are only turrets in AS.

The engine based bots also aim a bit oddly. They're more likely to hit you at high speeds than slow speeds. You can stand still in front of one and have it miss frequently, and yet at 800+ ups, they usually hit you.

toukkapoukka

Has-been developer
(282 posts)

MagusZero wrote:
The thing is, the current bots are totally separate from AS, but can be implemented from scratch there with much more robust possibilities. You can make bots that aren't anything like players for instance: flying bots or bots which protect certain goals and such.

Any decent AI needs lots of processing and AS don't provide lots of horsepower for that. Sure you can make a mod and offload complex computations to the engine, but I bet that you can't write a decent AI in 100% AS. Unless you just keep in the context of improving aiming but you will have to do some kind of interface with the engine anyway.

MagusZero
Chaotician
(1858 posts)

Well, the kind of bots I'm thinking of would be more single purpose. I'll stress that I don't expect them to be like players. Moving and shooting are the most important features. Individual variations of bots would act differently, without so much muck to wade through in AI searches. I don't think AS is the place for bots with really complex AI, but that'll take some substantial modding of the source code.


Scroll to top



RSSRSSRSSRSS

Copyright © 2013 Chasseur De Bots

Warsow in social media



Warsow is an indie game developed by group of hobbyists. Please consider giving us a small donation: