.:: Bots United ::.

.:: Bots United ::. (http://forums.bots-united.com/index.php)
-   Half-Life 2 SDK (http://forums.bots-united.com/forumdisplay.php?f=62)
-   -   rcbot 2 source base (http://forums.bots-united.com/showthread.php?t=3407)

Cheeseh 14-01-2005 01:25

rcbot 2 source base
 
I have uploaded the source I've been working on so far for my HL2 bot.

http://filebase.bots-united.com/inde...on=file&id=259

unfortunately I think I've stuck it in the wrong category, I meant to put it in "Rcbot" but I can't delete or move it, I'm sure you can sort that out :)?

here is the readme
Quote:

RCBot 2 source (v 0.01) (rcbot ver 2.01)

By Cheeseh

--------------

released under GPL license, see licenseGPL.txt

The source so far is very basic in terms of AI, and is currently a bit buggy.
Enemy bots sometimes won't see each other for some reason, still to figure that out.

Anyway, source has:

- OO'd structure
- waypoints & pathwaypoints
- 3d waypoint hash table
- bitwise waypoint visibility table
- allowed clients file (clients to give bot command access to) "config/accessclients.ini"
- tasks & schedules
- bots join random teams in CSS.
- creates folders automatically for waypoints/config files etc in steamapps/email/rcbot2
- concurrent-ish & fast-ish A* waypoint path finding
- concurrent-ish & fast-ish bot visibles
- bot commands
- bot buttons allowing; start press time, end hold time, let go time
- probably more stuff

(waypoint commands are the same as rcbot for hl 1)

Pierre-Marie Baty 14-01-2005 02:36

Re: rcbot 2 source base
 
Sorted...

You can edit your own files, as a member by going back to the screen where you have the 3 options "add file" "delete file" and "edit file", and as an admin by having the side bar on the left, browsing to the file and clicking edit on the side bar.

wow anyway! do your bots select weapons correctly ? we're having trouble doing that...

WildPods 14-01-2005 10:54

Re: rcbot 2 source base
 
Compile it please!

Cheeseh 14-01-2005 12:06

Re: rcbot 2 source base
 
They don't have weapon code yet :P That will be the next stuff to work on I think :)

You know when I compile in Release mode I get all the compile erros I got when adding CBaseentity.h and sutff, obviously a _DEBUG flag was somewhere in those h files messing everything up.. I can post a debug dll somewhere but i'm not sure if it would work if you're not debugging.. steam usaully complains.

@$3.1415rin 14-01-2005 14:40

Re: rcbot 2 source base
 
nice !

( but next time, please remove the ncb file before, or 56k ppl like pmb will kill you ;) )

Whistler 14-01-2005 14:50

Re: rcbot 2 source base
 
for MSVC6 the .dsw, .opt, .ncb, .plg are all removable
and for VS.net you can also remove the .suo and .sln files :)

@$3.1415rin 14-01-2005 14:57

Re: rcbot 2 source base
 
if you only have a single project in one workspace you are right about the .dsw or .sln files, otherwise that won't be too much fun recreating them manually :)

@cheesy: at some classes I asked myself "why dont he use virtual destructors ?" when using polymorphism this might be handy.
another point : why no STL, but own implementations of stack, queue etc. ?

Cheeseh 14-01-2005 15:21

Re: rcbot 2 source base
 
1 Attachment(s)
I've had bad experiences with destructuors, sometimes MSVC destructed lots of stuff implicitly which I didn't like, because it messed up my data structures, I just stuck to making my own explicit delete/destroy functions.

I have some STL, but I changed most of the structures to my own because I didn't like the lack of methods (e.g. remove & member functions, adding to begining and end of queues, etc..)

and okay I removed the ncb file, I forgot which ones were unnecessary, the whole zip is now only 94 kb lol :)

oh, heres a simple de_cbble waypoint file (in the appropriate folders) if you manage to compile it.

stefanhendriks 14-01-2005 15:40

Re: rcbot 2 source base
 
cool Cheeseh ;) i just hope we get weapon support soon, then we'll be having some cool stuff going on.

Iced_Eagle 14-01-2005 23:39

Re: rcbot 2 source base
 
Steam does complain when you use debug, but if you add -allowdebug onto the command line for Half-Life 2 (go into play games, right click on HL2, properites, launch options and add the flag -allowdebug)

Is that what you were talking about?

Thx Cheeseh :)

*edit* I got MSVC++ .NET from my programming brother (got it at circuit city or something lol) anyways no clue what to do on how to compile, can anyone provide some sort of FAQ or documentation on how to compile custom stuff?

Or rather could someone upload just a compiled copy if they are still in the christmas spirit rofl......o_O

WildPods 15-01-2005 11:21

Re: rcbot 2 source base
 
Quote:

Originally Posted by Iced_Eagle
Or rather could someone upload just a compiled copy if they are still in the christmas spirit rofl......o_O

Yeah don't be mean like Valve do your public a service ppl! :'(

@$3.1415rin 15-01-2005 11:46

Re: rcbot 2 source base
 
you are currently in the "developer" part of this forums, therefore you can mostly find stuff here which is currently being developed. Normally this released code here isnt fully working, just shows some working features, isnt working at all, some code is just snippets etc. pp. If the author of a bot hasnt released any binaries yet, it is his decision. often the current state of code doesnt yet match the quality of the last released bot, there are too many bugs, whatever. So you may thank the developers here for uploading their code, show problems with the code, help in general, but please stop this crying for binaries.

you'll surely get binaries when they are ready for public.

@cheesy: with the STL, i was always content with the provided push/pop_back/front, erase, iterator classes :D I also havnt yet realized problems with unwanted calls of destructors by the compiler. the only problems I once had was when I wasnt sure myself in which ordner destructors are called, if base class destructors are also called when using virtual destructors and so forth. generally destructors are pretty powerful and saving quite a lot of coding work and/or management code

Cheeseh 15-01-2005 12:28

Re: rcbot 2 source base
 
Well, next time I'll surely consider the use of virtual destructors :P Although I've got quite a lot of explicit deleting of classes since a lot of stuff is kept during map change and some stuff aren't.

Actually, I only messed around with an STL class (i think it was the list class) and used an iterator once before it bugged me, as it kept crashing for some reason I couldn't understand, the list was instantiated properly but anytime when I just tried to clear() it (to initialize) it would crash, I never understood why. so I gave up and kept to my own made up structures :)

Iced_Eagle 15-01-2005 21:53

Re: rcbot 2 source base
 
@$3.1415rin: I know, it's just that I like to see the development process unfold, usually I do testing (such as look in the Call of Duty and Call of Duty United Offensive credits and their I am under tester :) )

I'll mess around more though. :) Fun to experiment and figure it out...

Cheeseh 16-01-2005 00:47

Re: rcbot 2 source base
 
Okay I got the enemy code sorted, lots of annoying stuff I had to fix. So I've updated the source with the changes (not exaclty noticable, I don't keep a very good history of changes :()

Also I've uploaded some binaries so you can test the bot without needing to compile it, it's a debug dll file so you need to use -allowdebug option on CS:S shortcut.

you can get it here: http://filebase.bots-united.com/inde...on=file&id=260

Iced_Eagle 16-01-2005 05:55

Re: rcbot 2 source base
 
Cheeseh you rock! :)

I'll go play with them asap!

*update* Fun stuff :D they slowed down my comp though (I had 19), fun :D :D

dub 17-01-2005 01:26

Re: rcbot 2 source base
 
Cheeseh nice work with rcbot2 :D (intresting code), have you had any luck with bot weapon identification/selection? i`m currently stumped???:(.

Cheeseh 17-01-2005 17:01

Re: rcbot 2 source base
 
I haven't had a look at any weapon stuff yet. I've been looking at some GameEvent stuff, I've found a few, in my source code I have a debug mode for finding game events (the source code uploaded at the moment is incomplete in that area)

just check my next post for game event stuff

dub 17-01-2005 17:14

Re: rcbot 2 source base
 
nice work :D also you might find g_pDebugOverlay->AddEntityTextOverlay (...) for debugging internal bot vars intresting. How did you go about finding all that info?

Cheeseh 17-01-2005 17:27

Re: rcbot 2 source base
 
ok I'm getting all this info from debugging, the gamevents.h had comments on how to print keys/values.

I also wrote down the evnt id's, I don't know if they are static or not, but will come in useful when comparing the events instead of comparing a whole string you can compare the event id (integer)

I got these:

"weapon_fire"
-------------
userid : int
time : int?
eventid : int (43)

"bullet_impact"
--------------

userid : int
x : float
y : float
z : float
time : int
eventid : int (51)

"player_connect"
----------------

userid : int
index : int
name : string
networkid : string (steam id)
address : string ?
time : int
event id : int (4)

"player_activate"
----------------
userid : int
time: int
eventid : int (7)

"player_team"
-------------
userid : int
team : int
oldteam : int
disconnect : int?
time : int
eventid : int (11)

"bomb_dropped"
---------------
userid : int
time : int
eventid : int (30)

"bomb_pickup"
--------------
userid : int
time : int
eventid : int (31)

"player_footstep"
----------------
userid : int
time : int
eventid : int (52)

"player_death"
-------------
userid : int
attacker : int
weapon : string (e.g. "world")
headshot : int (bool ?)
priority : int
time : int
eventid : int (13)

"round_end"
------------
winner : int (team Index)
reason : int
message : string (e.g. #Game_Commencing, #Round_Draw)
time : int
eventid : int (25)


"round_start"
------------
timelimit : int (time in seconds)
fraglimit : int
objective : string ? (e.g. "BOMB TARGET" for de_ maps, "HOSTAGE_RESCUE" for cs_ maps)
time : int
eventid : int (24)


"player_radio"
-------------
userid : int
slot : int
time : int
eventid : int (41)



=====================

any more that I find i'll put them up

dub 17-01-2005 17:38

Re: rcbot 2 source base
 
i`m going try it out now and see what i can find, i`ll keep you informed if i anything new pops up.
thanks Cheeseh

edit.
off to try the cs:s bot for a couple of hours first, got a simple debug class implemented now.

edit2.
cheeseh currently having problems with steam it`s eating my cpu alive in hl 1/2 :'( (found the problem it was zone alarm).


All times are GMT +2. The time now is 02:04.

Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.