.:: Bots United ::.

.:: Bots United ::. (http://forums.bots-united.com/index.php)
-   RACC (http://forums.bots-united.com/forumdisplay.php?f=11)
-   -   hehehehe (http://forums.bots-united.com/showthread.php?t=3121)

Pierre-Marie Baty 02-12-2004 10:48

hehehehe
 
well you know what? :)

since today 6:00 AM RACC is completely engine independent. :)

All the bot code is self-contained, and can compile by itself, without a single header from metamod or the HL SDK. The only file that needs to call these headers is the engine abstraction layer in interface.cpp.

Porting it to another game engine is a matter of minutes. :)

I'm packaging up a minimal bot framework and I'll tease the folks a bit in the United Bot forum :P

Josh_Borke 02-12-2004 13:43

Re: hehehehe
 
nicely done :)

MusicMan 02-12-2004 13:51

Re: hehehehe
 
nice work pmb w00t! you roxorz t3h big ONE!111 8D:P

[+Duracell-] 03-12-2004 00:07

Re: hehehehe
 
yay!

dead bwoy 03-12-2004 01:07

Re: hehehehe
 
Will you be porting RACC to CS:Source or HL2DM?
I havn't seen RACC since last year sometime, template 2 I believe...

Pierre-Marie Baty 03-12-2004 03:51

Re: hehehehe
 
Very probably. But so far I want to iron it out on what I have that I know well, i.e. CS and HLDM. The advantage is that with such an engine-independent way of coding, what you code for a game/mod works for all the others as well.

stefanhendriks 03-12-2004 13:28

Re: hehehehe
 
yeah yeah yeah... gimme the source and show it works :P i've seen enough of "i got this working" threads in this forum! :P


/me runs away ;)

Pierre-Marie Baty 03-12-2004 16:47

Re: hehehehe
 
ok, since you asked for it:
http://racc.bots-united.com/releases...dent-beta1.zip

Please note that this is still an early BETA. There are a few crash bugs left. And the rest of the bot code has been affected a bit by the "change". Not counting that it's still a big mess in the areas I was working on.

All HL related code is in interface.cpp. ALL the rest of the bot code is completely self-contained, and can even be compiled without any header from the HL SDK or the metamod SDK: it's just standard C.

It links to the engine and maintains its own engine-independent entity list and player list. The struct members the bot needs are fetched and translated in realtime. All engine calls have been abstracted. My favourite achievement is that in the game DLL API, only StartFrame() remains hooked -- well, nearly. The rest is to fix bugs in the HL engine.

What can be done from now on would be to make interface.cpp a separate "engine driver" DLL, and hold the rest of the bot code in an engine-independent RACC DLL.

But enough rambling, grab, compile, and see for yourself 8)

and don't forget to tell me your impressions 8)

stefanhendriks 03-12-2004 16:55

Re: hehehehe
 
omg, i am almost just dr00ling because of ur text in the forum post. I am checking it right now... :D

stefanhendriks 03-12-2004 17:04

Re: hehehehe
 
ok. I am fiddling around with it. I removed interface.cpp just to see what happens with compiling:

Quote:

Deleting intermediate files and output files for project 'cstrike - Win32 Release'.
--------------------Configuration: cstrike - Win32 Release--------------------
Compiling resources...
Compiling...
bmpfile.cpp
dxffile.cpp
mapdata.cpp
pathmachine.cpp
console.cpp
display.cpp
lrand.cpp
math.cpp
mfile.cpp
util.cpp
bot.cpp
bot_body.cpp
bot_chat.cpp
bot_cognition.cpp
bot_combat.cpp
bot_ears.cpp
bot_eyes.cpp
bot_navigation.cpp
bot_start.cpp
weapons.cpp
Updating resources...
makeres wordt niet herkend als een interne
of externe opdracht, programma of batchbestand.
Linking...
racc.def : error LNK2001: unresolved external symbol GiveFnptrsToDll
.\Release/racc.lib : fatal error LNK1120: 1 unresolved externals
LINK : fatal error LNK1141: failure during build of exports file
Error executing link.exe.
racc.dll - 3 error(s), 0 warning(s)
I guess i need to turn something off or something.

But, when compiling WITH that file, it needs a .h file
Quote:

c:\projecten\racc\release\cstrike\interface.cpp(19 ) : fatal error C1083: Cannot open include file: 'dllapi.h': No such file or directory
Error executing cl.exe.
Which is i bet metamod related ;) So no worries here.

I read through interface.cpp, you did not suprise me with the updating entity list and such. Its actually exactly what i expected! very nicely done pmb! And you have such clean code, i can read it fine. You have zillion of structs though. WOW.

I bet this can be stripped down to a bare minimum and get some template out of it? If you let me , i can play around with that idea... i will practicly remove everything then , as long as it spawns ;)

stefanhendriks 03-12-2004 17:06

Re: hehehehe
 
ah, i got it compiling now btw with interface.cpp, i forgot a path in msvc ;)

Code:

void BotSense (player_t *pPlayer)
{
  // this is the first step of the bot Think() trilogy. In nature, every behaviour that can be
  // associated to intelligence is resulting of three invariable steps :
  // 1 - sensing the environment and the character's state
  // 2 - working out the changes to commit onto the environment and the character's state
  // 3 - performing these changes, and experiencing this action, looping back to step 1.
  // Here we deal with the first step, sensing, which is a correlation of three "input vectors"
  // (actually there are more of them but these three together are sufficient to be said
  // symptomatic of the human behaviour), respectively in order of importance the sight, the
  // hearing, and the touch feeling. Since FPS players experience this last one mainly by proxy,
  // the game simulating it by visual and auditive means, the touch feeling of the bot will be
  // a little more efficient than those of the players, giving them a slight advantage in this
  // particular domain. But since we're very far from emulating the two other vectors (vision
  // and hearing) as accurately as their human equivalents, it's just fair that way :)
////////////////////////////////////////////////////////////////////////////////////////////////
////  CUT AND PASTE THIS CODE WHERE YOU WANT THE BOT TO BREAK INTO THE DEBUGGER ON COMMAND  ////
////                                                                                                                                                                                ////
if (DebugLevel.is_broke) _asm int 3; // x86 code only                                                                          ////
////////////////////////////////////////////////////////////////////////////////////////////////
  BotSee (pPlayer); // make bot see
  BotHear (pPlayer); // make bot hear
  BotTouch (pPlayer); // make bot touch
  return;
}

i especially like the comments at the top. Exactly the same as my principle on RealBot ;) Yay!

stefanhendriks 03-12-2004 17:16

Re: hehehehe
 
ok. Another post heh. I see that a lot of logic is involved here. If you rip one part, you have to rip a lot more. So , before ripping at all. I better read it.

Pierre-Marie Baty 03-12-2004 17:23

Re: hehehehe
 
<------ smiles and pops a beer 8)

Pierre-Marie Baty 03-12-2004 17:33

Re: hehehehe
 
oh btw have you had a look in the knowledge directory ?

stefanhendriks 03-12-2004 18:28

Re: hehehehe
 
hehe.

Yeah. But the only really usefull thing i found was the weapons.cfg file ;) I mean, the question is: Does a bot have to know what kind of sound it heared? Metallic/wooden etc? i think not.

FrostyCoolSlug 03-12-2004 18:40

Re: hehehehe
 
Quote:

Porting it to another game engine is a matter of minutes.
Doesnt that depend though? cause navmeshes wont work the same :D

still VERY good work, its quite an achievement, maybe you should make the main cognative functions 'modules', so how the bot behaves depends on what module is loaded.. will make coding the bot for different mods MUCH easier, create a file, change an include, and b00m, RACC for say, Firearms ;)

Pierre-Marie Baty 04-12-2004 06:21

Re: hehehehe
 
ah, indeed. I had forgotten that part, the map file format. That's very true :)

As for the modules, I want for starters that the bot works well on the few games it's already supposed to support.

FrostyCoolSlug 04-12-2004 16:40

Re: hehehehe
 
well, if you implemented the module support, those would be example modules, showing how the bot could be implemented into other mods / games :)

stefanhendriks 04-12-2004 17:10

Re: hehehehe
 
Well you could also try to make it work on other engines with just an other navigation engine... or let other bots try that. If the framework works well... it could prove itself in various ways i think ;)

FrostyCoolSlug 04-12-2004 17:16

Re: hehehehe
 
lol, i've mentioned this in the United Bot forum, because with the major step thats been made here, it might seem benificial to use RACC as the base for it :)

Huntkillaz 04-12-2004 22:49

Re: hehehehe
 
Cool now we got navigation and deicison making, we should get all the other bot coders here to hand out the bes stuff fromthier bots to maybe make a basic working bot

stefanhendriks 05-12-2004 13:23

Re: hehehehe
 
lol, we should copy/move this to the United Bot forum. However, we *could* use the RACC code to form a template, we need a working source, and an example that it REALLY works in HL2. If we can do it with an interface.cpp and do it metamod-ish or botman-ish, it would be uber nice, because thats a major advantage, no need to know the MOD source ;)

Pierre-Marie Baty 05-12-2004 17:45

Re: hehehehe
 
As soon as I'll have finished downloading these `#*#@ 3 gigabytes of HL2 stuff through Steam, I'll get my hands into the HL2 SDK and I promise you that my bots will RUN on HL2.

[+Duracell-] 06-12-2004 03:35

Re: hehehehe
 
3 gigabytes over 56k = hell...poor you :(

I just said screw it and bought the retail package

FrostyCoolSlug 06-12-2004 08:00

Re: hehehehe
 
is the SDK avaliable via. Retail?


PMB: The SDK is full of Crap. Thats why its so big.

stefanhendriks 06-12-2004 09:15

Re: hehehehe
 
nah, the sdk aint 3 gigs heh. But you need HL2 first. Why didnt u simply buy it on retail pmb? :S

Whistler 06-12-2004 10:24

Re: hehehehe
 
another bad thing is that I don't think we can redistribute the SDK code... as I can't find the SDK download in my steam list. Perhaps it's for who has a valid HL2 already.
in other words, you all have to download that 3GB cr*p with your 56kbps modem :( otherwise Valve will say you are "stealing" or "pirating" :(

stefanhendriks 06-12-2004 10:27

Re: hehehehe
 
we would not need to distribute the SDK code if we can have our own independant bot code like we have now... ;)

Pierre-Marie Baty 06-12-2004 13:00

Re: hehehehe
 
"why didnt u simply buy it on retail pmb"

because I hate a CDROM drive's noise...

stefanhendriks 06-12-2004 14:41

Re: hehehehe
 
ROFL. Its a DVD dude :P

anyway. You mean your pc is uber silent? wahaha, that wooden box of yours? :P

Pierre-Marie Baty 06-12-2004 18:02

Re: hehehehe
 
nag all you can, it IS !
I bet my balls that my wooden box is more silent than your LAPTOP!

ph34r my wooden box!!1!11

FrostyCoolSlug 06-12-2004 18:09

Re: hehehehe
 
haha, well, stefan had a hand getting a slightly smaller version of the SDK, with no way to test it, but at least he got a look before he finally got HL2 i'd be relativly happy to extend that service to others if they PM me and somehow proove they own hl2 (i need proof on the ground that otherwise distribution is prolly illegal) :p

PMB: I bet my wooden box is quieter than yours! *hugs his water cooler* WAH! A LEAK! *sizzles*

stefanhendriks 06-12-2004 23:17

Re: hehehehe
 
well, i read it but i can't get wise of it yet. So many files and so little i understand. I also lack time to have a good look at it and such.

I just hope i get my copy of HL2 very soon now, can't wait to play HL2 DM and such myself :D rofl.

Pierre-Marie Baty 07-12-2004 08:36

Re: hehehehe
 
Take it easy, that's normal. You can't expect to land in the middle of code that is completely new to you and understand everything at first sight, you've got to "get your head wrapped around it", like botmeister says. Make it run in CS first, then hack it around for 1 week or two. Or wait until I release a more bugfixed version :)

stefanhendriks 07-12-2004 10:43

Re: hehehehe
 
hehe sure. I just can't stand the fact i don't have HL2 _YET_ lol. So i can't do a thing. I will dig into the code acouple of times and see if i can make some sense of it ;) Perhaps to add some bits of info on the SDK knowledgebase (on the wiki)....

stefanhendriks 07-12-2004 10:46

Re: hehehehe
 
* Note:

i found bits of source files that gave me enough confidence your bot framework WILL work. Ie, it looks 'almost' identical to HL1, so the hooking principle should work! :)

One question to you PMB: Do you plan (or have plans) to make your bot more like a template? So its stripped down to bare senses (it can spawn and euh, it walks forward all the time rofl)? I think a HBP_Bot kinda template canmake a boost in the Bot development on the HL2 scene. But, on the other hand we have to consider making this United Bot principle work as well....

Pierre-Marie Baty 07-12-2004 11:31

Re: hehehehe
 
yes... but I want the code to be REALLY reliable. That's no use releasing a template if it's full of bugs... and I have the awful habit to leave a bug behind almost every 5 lines of code I type.

stefanhendriks 07-12-2004 12:29

Re: hehehehe
 
i can't remember the first hpb release was bug-free? ;)

Hence, if you succeed on spawning a HL2 bot, just put it on CVS and get it fixed by multiple people. That speeds up development greatly :D

MarD 08-12-2004 02:27

Re: hehehehe
 
Heyyo,

My steam auto-downloaded the source sdk for me while I was ingame getting pings of 300.. isin't steam nice? :P

It's on DVD if you get the collectors edition, or else you get 5 CDs... I'm sure you can get the .gcf files burnt to dvd by a bud n' then send it to ya (assuming you have at least DVD-rom drive...).

BTW, PMB, that's awesome how you updated ODDbot, time to throw on TFC 1.5 and enjoy the crazyness. :D

Whistler 08-12-2004 08:37

Re: hehehehe
 
well we don't think we can make HL2 hook dlls *unless* we are using non-steam warez version :(

you just can't specify a replaced game dll other than "bin\server.dll" in liblist.gam. You can use gcfscape to extract the gcf file and take a look at the liblist.gam file.

The only way to replace the game dll will be renaming the game dll, but Steam will just replace it back when it launches.


All times are GMT +2. The time now is 23:21.

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