OrionBots - 1st release

Discuss Artificial Intelligence and Bot programming.
Orion
Posts: 476
Joined: Fri Jan 12, 2007 6:32 pm
Location: Brazil

OrionBots - 1st release

Post by Orion »

Finally, I'm releasing my bots with source code included, and some bugfixes.
Type 'impulse 100' to add a bot.

Features:

Colors in GLQuake;
The bots are shown at the scoreboard;
The bots will select the best weapon at a certain moment;
The bots roam any level perfectly without needing waypoints;
They follow their enemies;
50 different names;
Rocket jumping;
Very fast thinking.


Tweaks:

Quad/Ring drop;
Deathmatch 3 - weapons stay, and ammo boxes respawns every 15 seconds instead of 30;
Powerup time adding - e.g. you find two quads side by side, when you get both, your quad will have 60 seconds of duration! This is so with the dropped ones;
Multi grenade explosions - 2 grenades side by side will explode at the same time;
Proper fall damage;
Improved obituary;
Improved gib velocities;
Dinamycally-sized bodyque;
Disconnecting will now gib.


Bugfixes:

Fixed incorrect settings of nextthink;
Doors, buttons and boxes won't bleed when shooting'em;
Corrected barrel explosion;
Fixed all compile warnings;
Fixed the bug that when you die with an active powerup, your palette is still shifted;



Here's the file, have fun!
http://rapidshare.com/files/23106684/or ... s.zip.html[/b]
scar3crow
InsideQC Staff
Posts: 1054
Joined: Tue Jan 18, 2005 8:54 pm
Location: Alabama

Post by scar3crow »

Hrmm, not bad at all, they do think fast, and the roaming seems fairly effective.

I like the diversity of names and the use of fun names as well as straight text. My main qualm though is their ridiculous aim, if Im killed by a rocket firing bot, and I respawn in his view, before I can see past the tfog particles, the rocket is only a few feet away. They should have slightly less perfect aim.

I noticed almost immediately in dm6 2 bots circlestrafing each other with nailguns, which looked quite cool.

A few things though - Ammo seems to be respawning every 25 or 30 seconds in deathmatch mode 3, not 15. I kept an eye on the clock, and it definitely wasnt 15.

After a few minutes of play in dm6, I couldnt find the bots anymore, they simply didnt respawn past a point. I tried to reproduce this on e1m2 but nothing happened.

On dm6 I would consistently get telefragged, with only a few times that I successfully made it through a slipgate. They telefragged each other a lot.

Nonetheless, theyre pretty fun to play, and good reflex training because of their aim and very quick movement.

And did I spot goldenboy as one of the bots? ; )
Orion
Posts: 476
Joined: Fri Jan 12, 2007 6:32 pm
Location: Brazil

Post by Orion »

Yeah, they're good. But no bot is perfect.
Yeah, and their ridiculous aim sucks... YOu can add and if (infront(self.enemy)) statement at GetEnemy() (bot.qc) after the if (visible(...)) statement. This should help.
And if you play with them in a map with liquids, they won't swim, they'll sink like a rock and make the splash noise when landing on the liquid's floor. They can swim up, but rarely, and they can jump out of water onto ledges. The swimming AI is the worst part to code, unfortunately. I'm doing some improvements here.

But are you sure that the ammo respawn every 25-30 seconds?
See items.qc, ammo_touch(). You'll see an if (deathmatch == 3) statement and its nextthink to 15.

And are you sure that at dm6 the bots don't respawn??
Here they worked correctly. But a possible cause for this is a bot respawning at the RL tunnel, in that small hole, sometimes they can't exit from it. And the other bot roaming like idiot around the map.

Tip: Try firing grenades or rockets at corners, because when a bot takes damage, he gets mad at the attacker and he'll try to hunt you.

But the rest is good...
Orion
Posts: 476
Joined: Fri Jan 12, 2007 6:32 pm
Location: Brazil

Post by Orion »

Oops...
Some mistakes in my reply. About the ammo respawning, that's right, they're respawning every 30 seconds. To fix that, scroll down to ammo_touch() in items.qc and you'll see a comment like this:
// Orion: deathmatch 3 -- halve the ammo respawn delay

The mistake is the if (deathmatch == 3) statement is before the if (deathmatch != 2) statement, and this sets its nextthink to 30.

You should comment out the two lines above the deathmatch != 2 statement and copy and paste the deathmatch == 3 statement before self.think = SUB_regen. Fixed.

About that you talked about the dm6 - in long games you can't see the bots anymore. Me too. And the ONLY possible cause is the telefrags. Have a bug in GibPlayer(). When a bot is telefragged, he won't respawn. Because the "telefrag" sound is called at GibPlayer() before the respawning code, making the bot inactive.

The way ti fix that is scrolling down to GibPlayer() at player.qc, comment out the last statement after the sounds, copy and paste the statement after self.deadflag = DEAD_DEAD.

And about the ridiculous aim, you should put an if (infront(head)) instead of self.enemy, OR at set_aim() (bot.qc) change the "howmuch" values to -2 and 2 and comment out the following statement:

if (self.weapon != IT_ROCKET_LAUNCHER)
{
dir_x = dir_x + crandom()*howmuch;
dir_y = dir_y + crandom()*howmuch;
dir_z = dir_z + crandom()*howmuch;
}

Only comment out the red lines.


Every first release is buggy... hehe

Thanks for reporting these bugs. If you find any more bugs, post here and I'll try to fix.
venomus
Posts: 41
Joined: Tue May 24, 2005 4:54 pm

Post by venomus »

Do try and package up your releases so that people don't need to create there own progs/sound/whatever folder. Its irritating to have the game crash on first load because of not knowing you had to fiddle around in Explorer.

Having got that out of the way this is a nice little bot for what at first glance looks like quite compact code. I'm impressed by how well they seem to navigate.

The strafing is a bit insane, is it even possible for a human player to do it that fast? Probably not, because they have to accelerate/decellerate (unless the server movement cvars are set to something weird) whereas the bot has there speed automatically set to maximum. Admittedly, it is quite tricky to get realistic bot movement unless you use client emulation like Frikbot does.

I noticed that the bots stopped respawning in one game after a few minutes, which was odd (EDIT: nvm bug already reported in previous post)
Orion
Posts: 476
Joined: Fri Jan 12, 2007 6:32 pm
Location: Brazil

Post by Orion »

This phrase should be mentioned once again:
No bot is perfect, and don't need to be.
Its unnecessary, client emulation gives a lot of work.
Their movements may be unrealistic but they don't need to be EXACTLY equal to a player.

A very irritating thing is the water splash sound being played often when the bot walk in liquids, and another is the thumping sound when landing on floor.

You should delete the "misc/h2ohit1.wav" and "demon/dland2.wav" and replace'em with the "misc/null.wav" by copying an renaming it.

Next release will have these bugfixes. Post here the bugs you have noticed, and I'll try to fix.


If you want to strafe as a bot, type sv_accelerate 300.

And I already mentioned the bug that in long games the bot stop respawning:

Orion wrote: About that you talked about the dm6 - in long games you can't see the bots anymore. Me too. And the ONLY possible cause is the telefrags. Have a bug in GibPlayer(). When a bot is telefragged, he won't respawn. Because the "telefrag" sound is called at GibPlayer() before the respawning code, making the bot inactive.

The way to fix that is scrolling down to GibPlayer() at player.qc, comment out the last statement after the sounds, copy and paste the statement after self.deadflag = DEAD_DEAD.
scar3crow
InsideQC Staff
Posts: 1054
Joined: Tue Jan 18, 2005 8:54 pm
Location: Alabama

Post by scar3crow »

venomous - what engine are you using? they never crashed in DarkPlaces - i just got a generic mesh because i didnt have things in their proper folders, just the progs.dat in the orionbots folder.

Due to the status of this release, it didnt get a news post, but I did make sure to address it to him on the forums - when he integrates these bugfixes and releases a more proper archive (folder structure with files in place, readme) then it will get a news post.

Orion - I recommend you upload to the shub-hub when you get a more formal release version of the bot, as I outlined earlier, much better than dealing with rapidshare, and its why Spirit created it =)
Its unnecessary, client emulation gives a lot of work.
Depends on what you need done - if I was going to do a serious Quake bot, I would honestly start with FBX as the base for its code due to that client emulation which makes them look so wonderful and go from there. For what you have, the movement isnt bad at all and is commendable at that.

You cant really compare the two bots anyways, for FBX client emulation was necessary and in fact the goal, to plug in to mods.

Keep up the good work Orion, Im glad to see bot work still being pursued in its myriad of ways =)
frag.machine
Posts: 2126
Joined: Sat Nov 25, 2006 1:49 pm

Post by frag.machine »

Orion wrote: And if you play with them in a map with liquids, they won't swim, they'll sink like a rock and make the splash noise when landing on the liquid's floor. They can swim up, but rarely, and they can jump out of water onto ledges. The swimming AI is the worst part to code, unfortunately. I'm doing some improvements here.
In my monster pack to QExpo 2005 I put some code to make monsters swim and even jump out of water (as long the map helps a bit with a ramp or small stair, of course). You may want to take a look in the code for "inspiration". In an off-topic note, I'm glad to see somebody else from Brazil in the Quake community. :P
I know FrikaC made a cgi-bin version of the quakec interpreter once and wrote part of his website in QuakeC :) (LordHavoc)
scar3crow
InsideQC Staff
Posts: 1054
Joined: Tue Jan 18, 2005 8:54 pm
Location: Alabama

Post by scar3crow »

In an off-topic note, I'm glad to see somebody else from Brazil in the Quake community.
From what I understand, theres a decent sized Quake community in Brazil, though mostly QW players as opposed to NQ or coders. However I dont speak Portugese, and many others dont speak English. I will say however that my favorite moment of QExpo2006 was when a Brazilian player came on to irc and pmed me to thank me for the Romero interview. I dare say it was touching.

I just had an essay exam on Brazil and Chile not 2 days ago however so blah, being put on the spot to write a large essay in a fixed time on any subject can put you off on it =)

Back to the bot discussion!
frag.machine
Posts: 2126
Joined: Sat Nov 25, 2006 1:49 pm

Post by frag.machine »

scar3crow wrote:
In an off-topic note, I'm glad to see somebody else from Brazil in the Quake community.
From what I understand, theres a decent sized Quake community in Brazil, though mostly QW players as opposed to NQ or coders. However I dont speak Portugese, and many others dont speak English. I will say however that my favorite moment of QExpo2006 was when a Brazilian player came on to irc and pmed me to thank me for the Romero interview. I dare say it was touching.

I just had an essay exam on Brazil and Chile not 2 days ago however so blah, being put on the spot to write a large essay in a fixed time on any subject can put you off on it =)

Back to the bot discussion!
Yes, there's a reasonable Quake community here, but mostly players, as you pointed out. Sometimes I suspect all brazilian Quake coders (engine and/or QuakeC) could fit together into a mini van :)
I know FrikaC made a cgi-bin version of the quakec interpreter once and wrote part of his website in QuakeC :) (LordHavoc)
Orion
Posts: 476
Joined: Fri Jan 12, 2007 6:32 pm
Location: Brazil

Post by Orion »

frag.machine wrote:In my monster pack to QExpo 2005 I put some code to make monsters swim and even jump out of water (as long the map helps a bit with a ramp or small stair, of course). You may want to take a look in the code for "inspiration".
Gimme the link of your booth.
Thanks!
scar3crow
InsideQC Staff
Posts: 1054
Joined: Tue Jan 18, 2005 8:54 pm
Location: Alabama

Post by scar3crow »

Orion
Posts: 476
Joined: Fri Jan 12, 2007 6:32 pm
Location: Brazil

Post by Orion »

How do I upload files to Shub-Hub?
scar3crow
InsideQC Staff
Posts: 1054
Joined: Tue Jan 18, 2005 8:54 pm
Location: Alabama

Post by scar3crow »

http://www.celephais.net/board/view_thr ... 6&start=20
Contains the basic info as that was the announcing post.

The password is ilovetheshubhub
It requires a password, but is openly stated so anyone who seriously follows the community will have no problem, but it wont become an ANY file dump, but rather stick to Quake.
Urre
Posts: 1109
Joined: Fri Nov 05, 2004 2:36 am
Location: Moon
Contact:

Post by Urre »

Hm, I've always thought I follow the community, but I've never heard of the shub hub. I've just tried using Quake Archives on QuakeDev, but it's been suffering from bad management.

Orion: haven't had a chance to try out the bots yet, but I glanced at the code at work yesterday. Quite cool, the navigation seems to use the same kind of mentality as movetogoal, but cooler. Try making the bots drop waypoints during the game, for smarter movement as the game progresses.

I was also surprised to see you duplicate a lot of code already specified in Quake, and first thought "bloat", but then I realized a lot of it is to allow the bot to exist in entirely one file, or may I have missed bot related changes in other files? If it only exists in bot.qc, then cool :)

I'll be trying it out at home later, hopefully today
I was once a Quake modder
Post Reply