Printable Version of Topic

Click here to view this topic in its original format

RCBot Forums _ RCbot2 _ RCBot 2 Latest Beta

Posted by: Cheeseh Jun 22 2009, 08:24 PM

I added support for the CP map CP_Granary (And made a waypoint)

CODE

0.43
- Provisional Support for CP Granary
- Fixed a crash bug
- Engineers upgrade team mates dispensers and sentries


please tell me how they do, if its worth a release

http://rcbot.bots-united.com/downloads/rcbot2/rcbot2beta.zip

The source SVN is up to date

http://sourceforge.net/scm/?type=svn&group_id=248612

Posted by: Genesis Jun 22 2009, 11:35 PM

It works, but the bots always go in the same path (maybe add some alternate paths). Also, sometimes they just sit on the point and do nothing. Other than that, it's good.

Posted by: Cheeseh Jun 22 2009, 11:39 PM

QUOTE(Genesis @ Jun 23 2009, 12:35 AM) *

It works, but the bots always go in the same path (maybe add some alternate paths). Also, sometimes they just sit on the point and do nothing. Other than that, it's good.

thanks for testing. The alternative path stuff will all come later. It's all there to be added.

Posted by: Ark Jun 23 2009, 03:00 AM

Where do I put the cp_granary.rcw file?

Posted by: Geralt Jun 23 2009, 03:34 AM

Nice work Cheeseh. smile.gif

Full download here:
http://files.filefront.com/RCBot2+043zip/;13922936;/fileinfo.html

Posted by: Ark Jun 23 2009, 06:55 AM

Argh, It's still crashing. Sorry I should have been more specific about the crash. What it does:

When it crashes, everything freezes, the sound will loop for about 3 seconds then it will close, like I hit alt f4.

Is there any crashlog that I can view? Because I just want to play with bots. Dont get me wrong, I LOVE your rcbot, it's very nice.

Posted by: Greig Jun 23 2009, 07:13 AM

QUOTE(Ark @ Jun 23 2009, 07:55 AM) *

Argh, It's still crashing. Sorry I should have been more specific about the crash. What it does:

When it crashes, everything freezes, the sound will loop for about 3 seconds then it will close, like I hit alt f4.

Is there anyway crashlog that I can view? Because I just want to play with bots. Dont get me wrong, I LOVE your rcbot, it's very nice.



Same here still crashing (running it on a dedi)

Posted by: mehdichallenger Jun 23 2009, 07:56 AM

it work good.
does it only work with cp_granary?
how to create a control point waypoint like your cp_granary?

Posted by: Geralt Jun 23 2009, 08:11 AM

Yes, only cp_granary. If you want to make your own you will have to get the source code, which he linked to in the first post.

Posted by: mehdichallenger Jun 23 2009, 08:57 AM

QUOTE(Geralt @ Jun 23 2009, 08:11 AM) *

Yes, only cp_granary. If you want to make your own you will have to get the source code, which he linked to in the first post.

nothing there.

Posted by: Geralt Jun 23 2009, 09:34 AM

You can get the source code from here:
http://sourceforge.net/scm/?type=svn&group_id=248612

Posted by: Cheeseh Jun 23 2009, 11:33 AM

QUOTE(Geralt @ Jun 23 2009, 10:34 AM) *

You can get the source code from here:
http://sourceforge.net/scm/?type=svn&group_id=248612


This part is the hard-coded cp_granary script:

bot_mods.cpp

CODE

   97 void CTeamFortress2Mod :: getNextPoints (int iPoint,int iTeam,int iMyTeam,int *iCurrentDefendArea,int *iCurrentAttackArea)
   98 {
   99     char *mapname = CBotGlobals::getMapName();
  100
  101     int iAttackPoint;
  102
  103     if ( strcmp(mapname,"cp_granary") == 0 )
  104     {
  105         if ( iTeam == TF2_TEAM_BLUE )
  106         {
  107             iAttackPoint = iPoint + 1;
  108
  109             if ( iMyTeam == TF2_TEAM_BLUE )
  110             {
  111                 *iCurrentDefendArea = iPoint;
  112                 *iCurrentAttackArea = iAttackPoint;
  113             }
  114             else
  115             {
  116                 *iCurrentDefendArea = iAttackPoint;
  117                 *iCurrentAttackArea = iPoint;
  118             }
  119         }
  120         else
  121         {
  122             iAttackPoint = iPoint - 1;
  123
  124             if ( iMyTeam == TF2_TEAM_BLUE )
  125             {
  126                 *iCurrentDefendArea = iAttackPoint;
  127                 *iCurrentAttackArea = iPoint;
  128             }
  129             else
  130             {
  131                 *iCurrentDefendArea = iPoint;
  132                 *iCurrentAttackArea = iAttackPoint;
  133             }
  134         }
  135     }
  136 }


Posted by: bir3yk Jun 23 2009, 12:50 PM

If removed "if ( strcmp(mapname,"cp_granary") == 0 )", the other CP maps will work normally?

Posted by: Cheeseh Jun 23 2009, 03:35 PM

QUOTE(bir3yk @ Jun 23 2009, 01:50 PM) *

If removed "if ( strcmp(mapname,"cp_granary") == 0 )", the other CP maps will work normally?

Oh no that would be too easy tongue.gif

At the moment its not very easy to add support for other maps, this was not the point of this test DLL, it was just to see if it works. I will probably have to change a lot of things, including the method itself.

Posted by: Positronic Jun 23 2009, 04:30 PM

Found this via the Steam forums where Geralt posted them. For what it's worth, I'll try and list some of the bugs I found from 2 hours of playtime. Note: Some of them are things I think should be added, feature-wise, and yes, I realize you are probably aware of most of these things, just figured I might as well add my 2 cents.

Things that don't work well:

Things that work well:Amazing job on these, btw. It's nice to see some working bots for TF2. Bot taunts are especially cool! tongue.gif If you do waypoint more maps / map types, how hard would it be to do cp_dustbowl? I can imagine that being pretty interesting with bots.

Posted by: bir3yk Jun 24 2009, 08:26 AM

Changed your code to "if (strncmp (mapname, "cp_",3) == 0)". Tried to map cp_fastlane, set 5 waypoints on the CP (area (0 ... 4), radius 180, capture). The problem is capturing the central point (2), bots do not want it to run. If I caught it myself, the more work the run and take over the point. What could be the problem? Not to the point located close to the CP? .

Posted by: naMelesS Jun 24 2009, 03:22 PM

Cheeseh the rcbot gravity seems to have a little problem, could you fix the rcbot gravity..???

Posted by: Skeggar Jun 24 2009, 04:38 PM

Meh, tried cp_granary but they didnt capture anything. They just ran around randomly and killed eachother until TF2 crashed.

Posted by: Greig Jun 24 2009, 05:49 PM

Is it just me or do the bots ran way fast compaired to the clients in the game. my bots all run faster than the scout, and the scout runs like the flash

Posted by: Positronic Jun 24 2009, 07:07 PM

QUOTE(Skeggar @ Jun 24 2009, 04:38 PM) *

Meh, tried cp_granary but they didnt capture anything. They just ran around randomly and killed eachother until TF2 crashed.


Interesting; for me, the bots capped fine... and relatively quickly too. The only issue is that if one team only has one point left, they will all desert that point and attempt to cap the next one, allowing the enemy to cap the last one and win.

Posted by: Cheeseh Jun 24 2009, 08:07 PM

QUOTE(Positronic @ Jun 24 2009, 08:07 PM) *

Interesting; for me, the bots capped fine... and relatively quickly too. The only issue is that if one team only has one point left, they will all desert that point and attempt to cap the next one, allowing the enemy to cap the last one and win.

they need the cp_granary waypoints.

The speed + gravity thing is well known and an old bug that can't be fixed yet.

Posted by: mehdichallenger Jun 25 2009, 06:33 AM

does bot use melee now?

Posted by: Speed12 Jun 25 2009, 07:08 AM

Its very funy on cp_granary with 19 bots biggrin.gif.

But the bots in my team don't use my tele. And at "Sudden-Death" they should play the motions.

Sorry i'm from Germany and my English is not the best.

€: And the crash bug is not fixed.

Posted by: naMelesS Jun 25 2009, 07:23 AM

Could you just change the gravity to the lowest like 400?

Posted by: Fillmore Jun 25 2009, 10:49 AM

QUOTE(naMelesS @ Jun 25 2009, 07:23 AM) *

Could you just change the gravity to the lowest like 400?

I'd prefer the same gravity as the players have.

Posted by: Geralt Jun 25 2009, 12:55 PM

I have now release improved cp_granary waypoints - these are basically Cheeseh's waypoints, just with the following improvements:

- Optimized for performance. (Bots will still be able to go in the exact same places, it has just been optimized - less waypoints/waypoint paths)
- Engineers should now build their Sentry Guns facing the correct direction.
- Bots may now take different paths.
- Bots now use all the ammo/health packs on the map.
- Various other improvements.

I spent more than an hour optimizing this - hopefully it will help those with not so good PCs.

Enjoy.

They can be found here:
http://rcbot.bots-united.com/forums/index.php?showtopic=1192

Posted by: MacinSam Jun 25 2009, 01:39 PM

Hmm, with those bots don't seem to ever take the middle path to the middle CP, Geralt.
Another question, though - will visibility info calculated allow bots or maneuver into corners - like this one, for example? The path(waypoint)s don't seem to indicate so, but I'm not actually seeing the advantage of optimization through reducing the amount of paths bots can take nor am I sure what visibility tables do in relation to what bots actually do when put into situations other than heading straight to objectives and mowing anything down in the path (i.e. double-jumping to avoid sentries or other players).

IPB Image

Posted by: Speed12 Jun 25 2009, 01:44 PM

I have found a bug.


If the ball (from the sandman) hits the bots continue to shoot even though they are stunned.

again: my english is not the best sorry.

Posted by: Geralt Jun 25 2009, 01:55 PM

QUOTE(MacinSam @ Jun 26 2009, 01:39 AM) *
IPB Image


I removed the waypoint from that corner as it had no real use - that is one of the only waypoints in places like that, that I actually removed.

QUOTE(MacinSam @ Jun 26 2009, 01:39 AM) *

Hmm, with those bots don't seem to ever take the middle path to the middle CP, Geralt.[/img]


All paths are waypointed - it's up to the bots to take them. In Cheesehs waypoints he didn't have that fully waypointed, so they wouldn't have went up there anyway.

QUOTE(MacinSam @ Jun 26 2009, 01:39 AM) *
not seeing the advantage of optimization through reducing the amount of paths bots can tak...


I remove only paths that go through waypoints already behind them, like so;

Waypoints A+B+C:
A----------B----------C

The path goes from A to B and from A to C. What is the point of having the A to C path when bots already go from A to B, then from B to C? I do a lot of this to keep the waypoints clean, and the bots seem to work quite well on them.


Posted by: Cheeseh Jun 25 2009, 05:12 PM

QUOTE(Geralt @ Jun 25 2009, 02:55 PM) *

I removed the waypoint from that corner as it had no real use - that is one of the only waypoints in places like that, that I actually removed.
All paths are waypointed - it's up to the bots to take them. In Cheesehs waypoints he didn't have that fully waypointed, so they wouldn't have went up there anyway.
I remove only paths that go through waypoints already behind them, like so;

Waypoints A+B+C:
A----------B----------C

The path goes from A to B and from A to C. What is the point of having the A to C path when bots already go from A to B, then from B to C? I do a lot of this to keep the waypoints clean, and the bots seem to work quite well on them.


The bots will use those waypoints actually to take ... cover, so it is useful to have them. Also if they ever get thrown back into an area with no waypoints they can find their way out. It might not improve much CPU to optimise the waypoints as path finding takes several frames and is concurrent, it also uses a shortest path algorithm so it does'nt matter if the waypoints are a bit messy, as long as the bots can reach the waypoints it should be ok.

The bot bug when they get hit by the sandman ball ... this is a bug on valve's part, I should let them know.

Posted by: Geralt Jun 26 2009, 01:34 AM

Updated the ctf_2fort waypoints;
http://rcbot.bots-united.com/forums/index.php?showtopic=1192

These are based off Cheeseh's latest ctf_2fort waypoints, too. smile.gif

Posted by: naMelesS Jun 26 2009, 06:08 AM

QUOTE(Fillmore @ Jun 25 2009, 06:49 PM) *

I'd prefer the same gravity as the players have.


No no no when i change the sv_gravity to 400. The bots will jump like the normal gravity in 800.. Try it.

Posted by: Geralt Jun 26 2009, 10:43 AM

Cheeseh - about setradius; should I add it to all/most of the waypoints around the map? I had a play around with it and it works quite well. Should I add it to all the waypoints in corridors and such?

Posted by: Cheeseh Jun 26 2009, 12:04 PM

QUOTE(Geralt @ Jun 26 2009, 11:43 AM) *

Cheeseh - about setradius; should I add it to all/most of the waypoints around the map? I had a play around with it and it works quite well. Should I add it to all the waypoints in corridors and such?

it would be beneficial. but only on waypoints where there is a lot of room to move around

Posted by: Geralt Jun 26 2009, 12:15 PM

QUOTE(Cheeseh @ Jun 27 2009, 12:04 AM) *

it would be beneficial. but only on waypoints where there is a lot of room to move around


Yeah, thought so. I'll do it to all my new waypoints. smile.gif

Posted by: KeReMiD4O Jun 26 2009, 10:19 PM

Is there a command to see the actual wp radius? I have no idea how big is it...

Posted by: Cheeseh Jun 27 2009, 12:03 AM

QUOTE(KeReMiD4O @ Jun 26 2009, 11:19 PM) *

Is there a command to see the actual wp radius? I have no idea how big is it...

rcbot waypoint drawtype 1

Posted by: KeReMiD4O Jun 27 2009, 06:54 AM

QUOTE(Cheeseh @ Jun 27 2009, 12:03 AM) *

rcbot waypoint drawtype 1


Thank you. (:

Posted by: Fillmore Jun 27 2009, 01:33 PM

If the bots go into a waypoint with no paths in it,they'll return to the waypoint they came to that point,right?
If so, I found a way to make bots cap the points without CP support.
And they won't use the point anymore because the bot wont use the waypoint anymore due to lack of paths biggrin.gif

Posted by: MacinSam Jun 27 2009, 05:51 PM

Well, I'd think it be more computationally expensive than anything - the point is that you're supposed to have enough models so that you don't have to "brute-force" paths - and for a more "natural" feel - while not including too many paths so that the bot has to decide - which is probably computationally expensive too if you multiply it by the number of bots. The thing about getting back to waypoints would be for cases where the bot gets pushed off a path (in TF2, it's more likely blown off) and can do so directly... I'm guessing.

/speaks out of ass

Posted by: KeReMiD4O Jun 28 2009, 11:37 AM

There is still a bug with the medic bot.

I was a soldier with 2 medics on one team. The medics healed each other, when i yelled medic, the bots looking and following me, but didn't stop healing each other. And the uber percentage is filling really fast.

Spy? Eh, no biggrin.gif bots will always know if a human is a spy. Enemy medic bot still aims at you, but doesn't calculate the distance, and if he shoots the needles fall in front of you. Can't hit you since the needles need an angle to hit.

If you put a sentry waypoint near a wall, and the engi puts the sentry close to the wall, he tries to put a dispenser in the wall biggrin.gif (was funny when i saw it...)

Overall that is it from my testing.






Bad english ftw biggrin.gif

Posted by: Skeggar Jun 28 2009, 11:46 AM

QUOTE(KeReMiD4O @ Jun 28 2009, 01:37 PM) *

If you put a sentry waypoint near a wall, and the engi puts the sentry close to the wall, he tries to put a dispenser in the wall biggrin.gif (was funny when i saw it...)
Bad english ftw biggrin.gif

That is because the engie is trying to do a thing called tanking, Sentry takes all damage in front, (usually where the enemies come from) engie keeps sentry alive by the metal given to him by the dispenser.

Posted by: KeReMiD4O Jun 28 2009, 10:22 PM

I know what it is... I mean there isn't any room for the dispenser, but the engi still tries to put it there.

Posted by: Fillmore Jun 29 2009, 10:39 AM

QUOTE(KeReMiD4O @ Jun 28 2009, 11:37 AM) *

Spy? Eh, no biggrin.gif bots will always know if a human is a spy.

They won't know if the enemy team has a spy and you disguise as him.

Posted by: Cheeseh Aug 22 2009, 11:20 AM

I've updated my first post with the latest release and fixes

Posted by: Geralt Aug 22 2009, 12:42 PM

Great job mate! I'll see if I can find a bit of time to finish off a few more waypoints, so you can include them in the official release. smile.gif