.:: Bots United ::.

.:: Bots United ::. (http://forums.bots-united.com/index.php)
-   The RealBot 'Source' (http://forums.bots-united.com/forumdisplay.php?f=52)
-   -   BSP and RBN utilities (http://forums.bots-united.com/showthread.php?t=2322)

evy 18-07-2004 21:06

BSP and RBN utilities
 
I just commited version 0.9.2 of the Bsp2Rbn packages:
Quote:

- added version number, currently 0.9.2
- added Windows version of basename & dirname functions
- added two other utilities DrawNodes & DumpNodes
- updated README file
- fixed compilation warnings (thanks dstruct2k)
Else, no changes in functionality. Still working on them.

As usual, comments are welcome.:D

-eric

NOTE: this is only available in CVS. I put a link to a Mandrake Linux compiled executable on http://www.students.hec.be/~evyncke/cs/realbot/

Josh_Borke 18-07-2004 23:59

Re: BSP and RBN utilities
 
just tried to compile it after doing a CVS checkout and fixing my paths--
Code:

multiplayer/engine" -I"../../HLSDK/multiplayer/pm_shared" -c bspfile.cpp -o bspfile.o
 bspfile.cpp: In function `int FindEntityByClassname(int, const char*)':
 bspfile.cpp:763: `stricmp' undeclared (first use this function)
 bspfile.cpp:763: (Each undeclared identifier is reported only once for each
    function it appears in.)
 make: *** [bspfile.o] Error 1

HTH

evy 19-07-2004 07:59

Re: BSP and RBN utilities
 
Josh,

Just updated CVS for bspfile.cpp... :D

Can you try again ?

Sorry for the issue :'(

-eric

PS: no need to use the latest Makefile, it is mainly a personal change.

Josh_Borke 19-07-2004 14:59

Re: BSP and RBN utilities
 
found the reason it segfaults:
Code:

Program received signal SIGSEGV, Segmentation fault.
 0x0804c466 in FreeEntities() () at bspfile.cpp:852
 852                          free(pEpair->key);

HTH

Josh_Borke 19-07-2004 22:04

Re: BSP and RBN utilities
 
nj evy :) works great, keep up the good work :)

dstruct2k 20-07-2004 02:07

Re: BSP and RBN utilities
 
Not compiling on Win32 still... :)

evy 20-07-2004 07:51

Re: BSP and RBN utilities
 
Quote:

Originally Posted by dstruct2k
Not compiling on Win32 still... :)

:'( :'(

What are the symptoms ?

-eric

evy 20-07-2004 14:38

Re: BSP and RBN utilities
 
Committed yet another version in CVS (nothing changed in the algorithm). This version has been tested on Windows with MinGW (a free C++ compiler).

Quote:

- bumped version to 0.9.3
- it compiles eventually on Windows with mingw...
Windows and Mandrake Linux compiled versions are in:
http://www.students.hec.be/~evyncke/cs/realbot/

Hope this helps

-eric

Josh_Borke 20-07-2004 15:53

Re: BSP and RBN utilities
 
Quote:

\bots\hlsdk\multiplayer source\dlls\vector.h(22) : error C2061: syntax error : identifier 'Vector2D'
\bots\hlsdk\multiplayer source\dlls\vector.h(22) : error C2059: syntax error : ';'
\bots\hlsdk\multiplayer source\dlls\vector.h(23) : error C2449: found '{' at file scope (missing function header?)
\bots\hlsdk\multiplayer source\dlls\vector.h(51) : error C2059: syntax error : '}'
\bots\hlsdk\multiplayer source\dlls\vector.h(54) : error C2061: syntax error : identifier 'Vector2D'
\bots\hlsdk\multiplayer source\dlls\vector.h(54) : error C2059: syntax error : ';'
\bots\hlsdk\multiplayer source\dlls\vector.h(54) : error C2143: syntax error : missing '{' before '*'
\bots\hlsdk\multiplayer source\dlls\vector.h(54) : error C2059: syntax error : 'type'
\bots\hlsdk\multiplayer source\dlls\vector.h(59) : error C2061: syntax error : identifier 'Vector'
\bots\hlsdk\multiplayer source\dlls\vector.h(59) : error C2059: syntax error : ';'
\bots\hlsdk\multiplayer source\dlls\vector.h(60) : error C2449: found '{' at file scope (missing function header?)
\bots\hlsdk\multiplayer source\dlls\vector.h(105) : error C2059: syntax error : '}'
\bots\hlsdk\multiplayer source\dlls\vector.h(107) : error C2054: expected '(' to follow 'inline'
\bots\hlsdk\multiplayer source\dlls\vector.h(107) : error C2143: syntax error : missing ')' before '&'
etc etc etc

a total of 204 errors before it quit

using Visual C++ :)

HTH

Whistler 21-07-2004 02:50

Re: BSP and RBN utilities
 
a small change to the bsp2rbn to make it put the generated files to current directory, which is supposed to (and not data\cstrike\exp folder):

// Need to implement the basename & dirname functions under Windows...
#ifndef __linux__
char * basename(char * s)
{
char * fs ;

if ((s == NULL) || (*s == 0)) return "." ;
if (strcmp(s,"\\") == 0) return s ;
fs = strrchr(s,'\\') ;
if (fs == NULL) fs = strrchr(s,'/') ;
if (fs == NULL) return s ;
return fs + 1 ;
}

char * dirname(char * s)
{
char * fs ;

if ((s == NULL) || (*s == 0)) return "." ;
if (strcmp(s,"\\") == 0) return s ;
fs = strrchr(s,'\\') ;
if (fs == NULL) fs = strrchr(s,'/') ;
if (fs == NULL) return "." ;
* fs = 0 ;
return s ;
}
#endif

Note: the nodemachine.cpp uses "/" as separater when it calls UTIL_BuildFileNameRB().

evy 21-07-2004 08:39

Re: BSP and RBN utilities
 
Quote:

Originally Posted by Whistler
a small change to the bsp2rbn to make it put the generated files to current directory, which is supposed to (and not data\cstrike\exp folder):

Note: the nodemachine.cpp uses "/" as separater when it calls UTIL_BuildFileNameRB().

Whistler,8D

Thanks, I was unaware that NodeMachine was using / even under Windows.

CVS repository has been updated.=)

Josh,

Regarding the use of VC++, I can only imagine an issue with the order of include path...

-eric

evy 22-07-2004 00:01

Re: BSP and RBN utilities
 
Some changes in the CVS repository...

Code:

- jumped to version 0.9.5
- more interesting display while working :-)
- small change in the algorithms for connections between nodes

The major impact is that connections are more valid now, i.e., bots are not blocked while trying to join two nodes when it is impossible :D

???:( I still have problem to put nodes on the de_aztec bridge :'( , it looks like it is not a normal 'worldspawn' face. Does someone know about to find this >:( bridge>:( from the BSP file ? Is it a specific entity ?

Thanks in advance for any tip;)

-eric

stefanhendriks 23-07-2004 13:53

Re: BSP and RBN utilities
 
the bridge can be detected by a tracehull, but i found you cannot use that in the bsp2rbn util. Its a func_illusionary afaik; perhaps that can help you?

dstruct2k 25-07-2004 10:25

Re: BSP and RBN utilities
 
Is there any chance of a Windows-compilable Bsp2Rbn package? Or at least a pre-compiled EXE?

I really wanna play with this, so if anyone can get it to compile and actually OUTPUT something, please post here.

stefanhendriks 25-07-2004 10:52

Re: BSP and RBN utilities
 
i did not try to compile it yet, so i cant help you there (yet). Today i will be a day off so i wont be able to figure it out myself either.

evy 25-07-2004 14:06

Re: BSP and RBN utilities
 
Quote:

Originally Posted by dstruct2k
Is there any chance of a Windows-compilable Bsp2Rbn package? Or at least a pre-compiled EXE?

I really wanna play with this, so if anyone can get it to compile and actually OUTPUT something, please post here.

Have a look at:
http://www.students.hec.be/~evyncke/cs/realbot/

It is old for a couple of days now... I hope to post something better tonight or on Monday.

Comments are welcome as usual :)

-eric

PS: CVS version can be compiled for Windows with Mingw32 (no clue on how to test with MSFT VC++) :'(

V or 'Tex 26-07-2004 00:16

Re: BSP and RBN utilities
 
I don't think the bridge is straight across, and is a bunch of lil faces, I don't know, but it seems logical for a wooden bridge of that sort to be an arc.

dstruct2k 27-07-2004 08:55

Re: BSP and RBN utilities
 
It is a slight arc... This will be like reading stairs, I think.


PS -- mingw32 is kinda useless if you've got VC++... It's not worth the trouble installing it.

dstruct2k 27-07-2004 09:32

Re: BSP and RBN utilities
 
I installed mingw32 and it's still not compiling. The precompiled EXE's work well though, thanks. :)

evy 27-07-2004 09:50

Re: BSP and RBN utilities
 
Just commited some major changes into CVS repository:

Code:

- bumped version to 0.9.6
- slightly better 'GUI' to show progress
- it took long, I lost hair ;-), but TraceHull is now fully implemented
  without the HL engine, just by looking into BSP, w00t !
- added a COPYING file for GPL
- better wall avoidance when creating a node
- handling of func_wall & func_illusionary (for de_aztec bridge)

Still room for improvement :( but progress is made ;) .

De_aztec, mindmaze2 seem to work quite fine (still experimenting some isssues with two ways connections while jumping...).

Will try to make it work as well on cs_siege & es_cell...

As usual, pre-compiled binaries for Linux/Mandrake and Windows are:
http://www.students.hec.be/~evyncke/cs/realbot/

Comments are welcome

HTH

-eric

PS: CVS repository now contains Makefile.mingw32 which is the exact Makefile I'm using to compile on Win2K.

evy 27-07-2004 23:15

Re: BSP and RBN utilities
 
Productive day today...

Code:

- version is 0.9.7
- only one added feature: detecting CONTENTS_WATER by checking all func_water entities

Just committed to the CVS repository, the usual download location has been updated as well.

The detection of CONTENTS_WATER seems to work but is not really exploited by NodeMachine.cpp which checks whether the origin of the player (i.e. his/her waist) is in water. While, AFAIK, it is enough to have water up to the ankle to make a deep downward jump ???:(

==> will try to change NodeMachine:add()

-eric

stefanhendriks 29-07-2004 18:02

Re: BSP and RBN utilities
 
i just check for contents water, if there is water, then the bot is 'in the water' and therefor needs to 'jump out'. Ofcourse, you can make a check for the waist or not, but hence its very hard to determine when you are 'just coming out' or 'just coming in' or whatever; and then make a decision on that (especially when you want to exclude nodes). Add that with the distance check and you might add up with some serious troubled connections.. hmm...

evy 07-08-2004 20:18

Re: BSP and RBN utilities
 
Just added to the CVS repository:

Code:

- bumped version to 0.9.8
- DrawNodes can now draw in different colors the reachable nodes from a specific node
- Bsp2Run is now using a brand new cNodeMachine::add2 function
- Bsp2Run detects more walkable surfaces
- Bsp2Run better detects water

As usual, pre-compiled version for Linux & Windows are on:
http://www.students.hec.be/~evyncke/cs/realbot/

Comments welcome

-eric

V or 'Tex 09-08-2004 13:27

Re: BSP and RBN utilities
 
So the bridge on Aztec is fixed? Good work.


I think as official member of the team your new job is to increase the # of nodes because mindmaze2 can easily be over 6000 nodes when you consider all the jumps, the huge amount of land, nooks, crannies, etc.

Perhaps from 12 bit (4096) you could just take it to say, 14 bit (16384)...

But then there would need to be optimizations in the node-searching.

evy 09-08-2004 15:59

Re: BSP and RBN utilities
 
Quote:

Originally Posted by V or 'Tex
So the bridge on Aztec is fixed? Good work.

Indeed, it is fixed. :)

Quote:

Originally Posted by V or 'Tex
I think as official member of the team your new job is to increase the # of nodes because mindmaze2 can easily be over 6000 nodes when you consider all the jumps, the huge amount of land, nooks, crannies, etc.

Perhaps from 12 bit (4096) you could just take it to say, 14 bit (16384)...

But then there would need to be optimizations in the node-searching.

Regarding mindmaze2 which is part of my test suite, I'll first try to optimize the nodes locations.

The RBN file should probably be changed in order to record how to go along a neighbourhood relationship: jumping ? ducking ? horizontal jump ? ... ???:(

I've seen also a couple of issues on how bots move (like always trying to go to 3 nodes ahead). I'll make some more tests.

You probably have read that Josh ported Pierre-Marie's navmesh in realbot (not in CVS). This could be an alternative.

Thanks in advance for any feedback

-eric

V or 'Tex 09-08-2004 16:39

Re: BSP and RBN utilities
 
A relational setup would work very well too, which I presume is what the navmesh is. You specify large planes and thus drastically reduce the number of calculations because each plain is uninterrupted. Movement within a plane could be given a high level of entropy and provide quick access to important knowledge, as anything inside the plane would be immediately accessible, so it would be best for a bot intent on hiding to go to a different area.


I don't know, but I hope to see more nodes and more executables released, as the last release on the official site was a month and a day ago.



As for other data, I think the best system would be a mix between a navmesh and a node system, allowing both open rooms with planes (to save on unneeded nodes) and specific points. Using this system you could decrease the number of nodes specified in a high traffic area by a huge number (because a rectangle can be formed from two points) and then using this extra space and reduced CPU usage you could add features or special-use areas/nodes... such as nodes that specify another node as an aiming point for camping purposes. Ergo: You manually specify Area 1, and then you go make Area 2, and you specify that Area 1 is linked to Area 2 (but not vice versa).

Josh_Borke 10-08-2004 02:51

Re: BSP and RBN utilities
 
from what I can see, the navmesh reduces the number of calculations needed to connect a path.
The thing about using nodes is they lend themselves well to the bot because they are more easily described by a single vector, where as with a plane you have "many" vectors to choose from.
what I'm "attempting" to do with the mesh is to choose a random vector within a plane for the bot to head to and then to look at.
meh, I've run into a few more problems so yeah...

@evy
from what I can tell, the bot only looks 3 nodes ahead when it doesn't have an enemy. i think it is an arbitrary (sp?) choice. perhaps something where it looks at a more dangerous location?

evy 10-08-2004 20:47

Re: BSP and RBN utilities
 
Minor changes commited into the CVS repository (as well as a newer Nodemachine.cpp):

Code:


- bumped to version 0.9.9
- small changes: adding ducking nodes and improved support for ladders

HTH

-eric

[BBB]sluggo 14-08-2004 13:00

Re: BSP and RBN utilities
 
I feel mighty stupid right now... but how do I use it?

I can drag maps to the bsp2rbn.exe and it executes something but where goes the outputfiles?

Well, I know I must have missed some thread somewhere but I can't find anything on how to use it so if someone could post a link?

Thanks in advance

dstruct2k 14-08-2004 16:33

Re: BSP and RBN utilities
 
It will either put nodes in the folder Bsp2Rbn is in, or put them in the folder the maps are in. Look around. ;)

[BBB]sluggo 14-08-2004 18:00

Re: BSP and RBN utilities
 
Hmm, ok thank you... I searched my entire hd and as it turns out it puts the output into my userfolder.

[BBB]sluggo 15-08-2004 11:27

Re: BSP and RBN utilities
 
Hi
Got it working now... it was mush easier once I figured out that I should run the program from a dos-promt :D And not draging the maps onto the bsp2rbn.exe :o

But there is a map that crashes the program, don't know if it's the map or the program that is wrong.

Here is the map if you want to try it yourselfe.... (the map isn't the best but i thougt you maybe was interested in all errors?)
http://hem.bredband.net/prhod/828_pk_23.zip

evy 15-08-2004 16:04

Re: BSP and RBN utilities
 
Thanks, I'm going on holiday tomorrow, but, I'll have a look

-eric

dstruct2k 15-08-2004 19:32

Re: BSP and RBN utilities
 
It's quite possible that an editor other than WorldCraft was used to create that map... In which case the file format may be similar but not exact.... Just give evy a chance to look at it, I guess.

evy 07-09-2004 07:52

Re: BSP and RBN utilities
 
(as it looks like my previous post disappeared in a black hole)

Just updated Bsp2Rbn utility in CVS

Code:

- bumped to version 0.9.10 (skipping version 0.9.9)
- trim down some ancilliary files (from botman): remove unused codes,
  variables, ...
- improved boundaries testing on most parameters
- use 3 passes if needed (switch -3)
- can specify the Half-Life directory (switch -d) in order for Bsp2Rbn
  to fetch map file from the default directory and to store the RB
  files in their directories

As usual, Linux & Windows compiled versions are at:
http://www.students.hec.be/~evyncke/cs/realbot/

Comments welcome

-eric


All times are GMT +2. The time now is 07:38.

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