[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4787: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3922)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4789: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3922)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4790: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3922)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4791: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3922)
InsideQC Forums • View topic - OrionBots - 1st release

OrionBots - 1st release

Discuss Artificial Intelligence and Bot programming.

Moderator: InsideQC Admins

OrionBots - 1st release

Postby Orion » Tue Mar 27, 2007 11:56 pm

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!
[/b]
User avatar
Orion
 
Posts: 476
Joined: Fri Jan 12, 2007 6:32 pm
Location: Brazil

Postby scar3crow » Wed Mar 28, 2007 2:59 am

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? ; )
User avatar
scar3crow
InsideQC Staff
 
Posts: 1054
Joined: Tue Jan 18, 2005 8:54 pm
Location: Alabama

Postby Orion » Wed Mar 28, 2007 4:39 am

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...
User avatar
Orion
 
Posts: 476
Joined: Fri Jan 12, 2007 6:32 pm
Location: Brazil

Postby Orion » Wed Mar 28, 2007 4:27 pm

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.
User avatar
Orion
 
Posts: 476
Joined: Fri Jan 12, 2007 6:32 pm
Location: Brazil

Postby venomus » Wed Mar 28, 2007 10:07 pm

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)
venomus
 
Posts: 41
Joined: Tue May 24, 2005 4:54 pm

Postby Orion » Wed Mar 28, 2007 10:16 pm

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

Postby scar3crow » Wed Mar 28, 2007 11:26 pm

User avatar
scar3crow
InsideQC Staff
 
Posts: 1054
Joined: Tue Jan 18, 2005 8:54 pm
Location: Alabama

Postby frag.machine » Wed Mar 28, 2007 11:30 pm

I know FrikaC made a cgi-bin version of the quakec interpreter once and wrote part of his website in QuakeC :) (LordHavoc)
User avatar
frag.machine
 
Posts: 2120
Joined: Sat Nov 25, 2006 1:49 pm

Postby scar3crow » Wed Mar 28, 2007 11:35 pm

User avatar
scar3crow
InsideQC Staff
 
Posts: 1054
Joined: Tue Jan 18, 2005 8:54 pm
Location: Alabama

Postby frag.machine » Wed Mar 28, 2007 11:44 pm

I know FrikaC made a cgi-bin version of the quakec interpreter once and wrote part of his website in QuakeC :) (LordHavoc)
User avatar
frag.machine
 
Posts: 2120
Joined: Sat Nov 25, 2006 1:49 pm

Postby Orion » Thu Mar 29, 2007 12:27 am

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

Postby scar3crow » Thu Mar 29, 2007 12:34 am

User avatar
scar3crow
InsideQC Staff
 
Posts: 1054
Joined: Tue Jan 18, 2005 8:54 pm
Location: Alabama

Postby Orion » Thu Mar 29, 2007 2:18 am

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

Postby scar3crow » Thu Mar 29, 2007 4:27 am

User avatar
scar3crow
InsideQC Staff
 
Posts: 1054
Joined: Tue Jan 18, 2005 8:54 pm
Location: Alabama

Postby Urre » Thu Mar 29, 2007 8:33 am

I was once a Quake modder
User avatar
Urre
 
Posts: 1109
Joined: Fri Nov 05, 2004 2:36 am
Location: Moon

Next

Return to Artificial Intelligence

Who is online

Users browsing this forum: No registered users and 2 guests