Group: Administrator
Location: Scotland
UK modem old-timer, 15 year break, now spends more time coding than playing.
Mods  /  8 Nov 2016, 19:42
Dev progress: Frogbots & KTX
I didn't even know I could write blog articles on here, I might as well put it to use.

Feels like slow progress on the development front recently, have been working on lots of things but not really getting them finished. The one that's been taking up most of my time is creating a version of KTX that also includes the frogbots. This has taken up far more of my life than I'd like to admit, but is finally getting into a much better state.
The frogbot mod has had a long history - first written by Robert 'Frog' Field in 1997, it has had sporadic development over the years, the current version by ParboiL combining the KTeams mod & original Frogbot code. Newer editions have been released, generally adding support for more maps. They provide sufficient challenge to keep the movement/aim-challenged of us entertained, and considering how long ago they were written and the restrictions the original was under regarding CPU/memory etc, it's really quite impressive.

Play them often enough though and you'll start to notice patterns - for instance: spawning nailgun on frobodm2, they would always head up the stairs and go to secret RA, rather than down the stairs to pick up YA and high RL. This got me looking into their decision-making logic and path-finding, to see how they would work.

... I also had vague ideas about reading the demo files, interpret player positions as they moved round the map and essentially have the bots learn new maps/tactics by watching players. This turned out to be more difficult than I imagined (the bots use static routing, and half the fun of movement in QW is building up speed to make certain moves possible) but maybe in the end I'll get back to it.

Long story short... I've essentially done what ParboiL did, and ported the bots over into the standard KTX codebase, rather than KTeams. The bots are now 'proper' clients (rather than monsters that simply look like players) and so both follow the standard client physics and are antilagged as standard. This makes them more useful for offline practise as you can use cl_delay_packet and practise as usual.

I've tried to improve the bots teamplay messages - they now use weapon scripts, report when dropping backpacks, and have a very rudimentary safe/lost logic. KTX now loads .loc files to report locations, and mods can tell which players were sent to which clients, so %E can be reported correctly. (The players can generate the messages server-side now too, this could be used to implement up2's idea in the future)

Also, the routing no longer has to be compiled into the mod, it can be read from a .bot file. This will eventually make it easier for map authors to include bot support when releasing a new map. Eventually I'd like to put the waypoint editing of earlier frogbot mods back in (see Mick's guide here) but the basics are there just now - certainly easier to edit the file and reload the map in KTX than have to rebuild all the time.

Still a couple of bugs to work out, and a few things that are annoying me:
  • check through all the built-in maps and make sure the routes are spawning correctly. Due to some differences between KTeams & KTX regarding when items are spawned & placed, it's possible an entity that was left hanging around in KTeams is removed in KTX.
  • The jumping to YA on E1M2 is pretty terrible. They actually manage it better if they have an opponent nearby, as then they perform a 'combat jump', rather than a standard jump route. Need to look into this.
  • Move all the hardcoded maps to text files. There's some map specific logic littered around the code as well that could do with being removed, leave it to map authors/bot enthuasts to configure.
  • Convert Trinca's maps in .qc format to .bot files and double-check... I have run a small utility to do this but it has trouble with some maps. Also when it does work, some of the routing seems a little off. Need to fix up my utility and see if the other maps are affected, but for example see end, where teleports were linked to wrong destinations.
  • Not happy with the way I had to remove some code in order to get the bot to move correctly, especially with hitting obstructions and "ledge backup" code, which was firing too often.

Other things I'd like to add in the future but will leave for now:
  • Directional rocket jumps (currently just vertical)
  • Strafe jumping (newer maps would probably require this)
  • Better modelling of aim, perhaps based on actual players of different levels
  • General directions rather than waypoints (think falling in the lava on end)
  • Better teamplay (count strong/weak players in each zone, each zone has priority, powerup zones taking priority)

... I'm sure there's more. I'm going to try and draw a line under the first version and then get back to my other project, the demo/tournament archive website. That also grew arms and legs...

Now for the bad news: there will need to be work on ezquake required in order to run KTX, which it can't currently manage. (I have a version of ezquake that can manage this, but then we hit a really old 32 vs 64 bit PR2 problem which I also have code to change but others weren't happy with... gets a bit recursive). So when it is in releasable state I'll probably start a dev.badplace.eu server and people can play it there. I have started using it for 4v4 prac on frobodm2, and it makes a reasonable pov/end opponent, if not great.
Comments
2016-11-08, 23:46
Meag for President!
Looking forward to this up2date version. Filling up the rest of the spots on a FFA/4on4 server with bots could potential rise the activity level for newcomers.
Maybe its time to bring back the Omicron bots =]

It seems you need to delegate some workload, or else you will go all Ocoini on us and disappear. Let me know if there is anything I can help with on the demo archive.

Make QuakeWorld Great Again!
2016-11-09, 08:54
awesome work!
2016-11-10, 07:56
Thanks for sharing!
And as always; impressive work there.

Yeah, whatever happenee with ocoini? We need him back!
2016-11-12, 20:31
As a quite regular frogbot player this is great reading.
Looking forward to trying this out.
Thanks meag....
2016-11-13, 01:24
Instagib support please.
2016-11-16, 06:00
What if a map had several wavepoints files, (or .bot files) like 10, and the bot will randomly chose one before spawning, so when spawning at ng dm2, it would sometimes go low rl, or go tele, etc.
Would this even be possible?
2016-11-16, 06:24
fuck how did i miss this post?

All servers online should be updated to this version so you can warm up against a bot while you wait for an opponent

I often use frogbot for povdmm4 practice and my biggest complaint was always that there is no antilag so then when i go face a real opponent it would feel different... this solves that
2016-11-18, 12:25
Baresi: Hopefully the frogbots reporting messages better will help with practising for 4v4, can practise keeping track of item timings etc. If someone fancies recording variations of "red 10 late" etc maybe we could eventually add voice.

Sedicious: Instagib/midair/hoonymode should all work as standard, unless we can improve the bot's logic by making them aware of those modes (for instance in midair maybe they should be attempting to fire rockets lower and pop the opponent up in the air)

Repast: Currently the routing is all static, to do what you're suggesting we could randomise their path-finding - there's already a bit of this with skill levels, but there's lots to improve first of all. I'll do a "how the frogbots work" post at some point and we can take it from there.

Just double-checking some things just now, I should have first version up by start of next week.
2016-12-31, 11:24
We need LGC 2017
http://wiki.quakeworld.nu/LGC
2017-09-21, 10:46
Can I fork or contribute to your project?

You can get jumps from mvd demos, but you must clear them from dirty accelerations caused by walls, damage, teleports, death, two players collisions. So i take differentations from coordinates (1' - velosities vector V, 2 - accelerations vector A, 3' - jerks vector J)...

Frogbots had a variant with strafejumps, but they was always on so player was always aware of his presence and so bot sucked all the time. Silent mode is absolutely required in future FrogBot..
I thought about it once so i think that bot must have nearly 7 different patterns of behavoir, and change them when something happens (caught rocket, taken armor, positioned sound et cetera )

Patterns of behavior are the set of rules defined as a words of near_ to_natural language that uses the words quakers talk about game (attack|retreat|spam|run to|grab|camp at..). The first thing i'll do would be demo_storyteller which will use that word to describe what happend in demo.

(Edited 2017-09-22, 13:49)
2017-09-22, 13:02
^
|

(Edited 2017-09-22, 13:45)
2017-09-22, 13:28
-----------------------------------------deleted post too.
2017-11-17, 20:04
Apologies Samopal - the bots have been integrated with standard KTX so you can fork that and submit patches there. https://github.com/deurk/ktx
You have to be logged in to be able to post a comment.
Username:
Password: