.:: Bots United ::.  
filebase forums discord server github wiki web
cubebot epodbot fritzbot gravebot grogbot hpbbot ivpbot jkbotti joebot
meanmod podbotmm racc rcbot realbot sandbot shrikebot soulfathermaps yapb

Go Back   .:: Bots United ::. > Developer's Farm > SDK Programming discussions > Half-Life 2 SDK
Half-Life 2 SDK For developments focused around the Half-Life 2 engine Half-Life 2

Reply
 
Thread Tools
Re: Let the revolution begin!!!
Old
  (#21)
Cheeseh
[rcbot]
 
Cheeseh's Avatar
 
Status: Offline
Posts: 361
Join Date: Dec 2003
Location: China
Default Re: Let the revolution begin!!! - 31-12-2004

ok how the hell do I debug with .Net and HL2 ?? sorry Im a bit mad at it... (most of the time it crashes and I have to close CS:S cause it blocks the MSVC window when it wants to break.. so its stops debugging..)

Also it doesnt debug the source, only the dissasembly which is a bit crap since I cant read that damn stuff

Last edited by Cheeseh; 31-12-2004 at 22:10..
  
Reply With Quote
Re: Let the revolution begin!!!
Old
  (#22)
botman
Super Moderator
 
Status: Offline
Posts: 280
Join Date: Jan 2004
Location: Plano, TX
Default Re: Let the revolution begin!!! - 31-12-2004

I have notes in the ReadMe.txt file that explains how to set up .NET 2003 for debugging the plugin.

Does that not work for you?

botman
  
Reply With Quote
Re: Let the revolution begin!!!
Old
  (#23)
Cheeseh
[rcbot]
 
Cheeseh's Avatar
 
Status: Offline
Posts: 361
Join Date: Dec 2003
Location: China
Default Re: Let the revolution begin!!! - 31-12-2004

Yeah I did that but there are problems such as not copying the DLL file to the bin folder, even though it says "1 file(s) copied" I don't see it in the counter-strike source/bin folder.

I'll read over it all again ( I tried doing it myself without reading too much)...

this is gonna be my new years, I can tell for sure :p

oh it seems the default dir was c:\program files\valve\steam\... where mine should just be in c:\program files\steam , trying again

Last edited by Cheeseh; 31-12-2004 at 23:00..
  
Reply With Quote
Re: Let the revolution begin!!!
Old
  (#24)
Bluesman
Member
 
Bluesman's Avatar
 
Status: Offline
Posts: 103
Join Date: Jan 2004
Location: Delsbo, Sweden
Default Re: Let the revolution begin!!! - 31-12-2004

Keep up the good work botman...you are the best!

And keep up the good work all you others bot-coders also!


"The blues are the roots, everything else is the fruits" -Willie Dixon
  
Reply With Quote
Re: Let the revolution begin!!!
Old
  (#25)
botman
Super Moderator
 
Status: Offline
Posts: 280
Join Date: Jan 2004
Location: Plano, TX
Default Re: Let the revolution begin!!! - 01-01-2005

stefan, regarding the view angles.

I don't set them in the HPB_bot2 WriteUsercmd() function. You will probably want to change that code. Instead of this...

Code:
   buf->WriteOneBit( 0 );  // viewangles[0]
   buf->WriteOneBit( 0 );  // viewangles[1]
   buf->WriteOneBit( 0 );  // viewangles[2]
...try this...
Code:
    EDIT:  Doooh!!!!  The last one is only 8 bits...
   buf->WriteOneBit( 1 );
   buf->WriteBitAngle( cmd->viewangles[ 0 ], 16 );
   buf->WriteOneBit( 1 );
   buf->WriteBitAngle( cmd->viewangles[ 1 ], 16 );
   buf->WriteOneBit( 1 );
   buf->WriteBitAngle( cmd->viewangles[ 2 ], 8 );
...where "viewangles" is the array of angles (I assume in degrees 0-360, but I don't know why they allow 16 bits).

The gameclients->ProcessUsercmds() eventually calls CBasePlayer :: PlayerRunCommand() which does this...
Code:
     	if ( pl.fixangle == FIXANGLE_NONE)
     	{
     		VectorCopy ( ucmd->viewangles, pl.v_angle );
     	}
Since fixangle should normally be 0 (FIXANGLE_NONE) it should be copying the viewangles from your bot cmd into the Player's viewangles variable.

EDIT: When I do this, the bot's don't turn their bodies, but the DO move in a different direction each time the YAW changes in the viewangles. Perhaps the bot's model rendering isn't being handled properly somewhere (your client doesn't know which way they are really facing), so you see them as facing one direction, but they are really facing a completely different direction (Half-Life1 bots had this problem initially too). It should be easy to tell which way they are facing by setting the pitch to zero and have them shoot their weapons every second or so and see which way the bullets go!

botman

Last edited by botman; 01-01-2005 at 02:08..
  
Reply With Quote
Re: Let the revolution begin!!!
Old
  (#26)
stefanhendriks
RealBot Author
 
stefanhendriks's Avatar
 
Status: Offline
Posts: 3,088
Join Date: Nov 2003
Location: Netherlands
Default Re: Let the revolution begin!!! - 01-01-2005

thx botman. I do wonder how you figure this stuff out, as it seems most of the time i am looking into the wrong direction

Will try that soon!

, edit:

found somewhere in baseplayer_shared.cpp (dunno if it could be of any help)
Code:
//-----------------------------------------------------------------------------
// Eye angles
//-----------------------------------------------------------------------------
const QAngle &CBasePlayer::EyeAngles( )
{
 // NOTE: Viewangles are measured *relative* to the parent's coordinate system
 CBaseEntity *pMoveParent = const_cast<CBasePlayer*>(this)->GetMoveParent();
 if ( !pMoveParent )
 {
  return pl.v_angle;
 }
 // FIXME: Cache off the angles?
 matrix3x4_t eyesToParent, eyesToWorld;
 AngleMatrix( pl.v_angle, eyesToParent );
 ConcatTransforms( pMoveParent->EntityToWorldTransform(), eyesToParent, eyesToWorld );
 static QAngle angEyeWorld;
 MatrixAngles( eyesToWorld, angEyeWorld );
 return angEyeWorld;
}
especially the comment above is interesting...?


Author of RealBot, "Arrakis" and "Dune 2 - The Maker" | co-Founder of Bots-United | Fundynamic | Blog | E-Mail me

Last edited by stefanhendriks; 01-01-2005 at 15:27..
  
Reply With Quote
Re: Let the revolution begin!!!
Old
  (#27)
Cheeseh
[rcbot]
 
Cheeseh's Avatar
 
Status: Offline
Posts: 361
Join Date: Dec 2003
Location: China
Default Re: Let the revolution begin!!! - 01-01-2005

I'm wondering how to get Vector.Length() to work without getting _pfSqrt external errors (?)
  
Reply With Quote
Re: Let the revolution begin!!!
Old
  (#28)
@$3.1415rin
Council Member, Author of JoeBOT
 
@$3.1415rin's Avatar
 
Status: Offline
Posts: 1,381
Join Date: Nov 2003
Location: Germany
Default Re: Let the revolution begin!!! - 01-01-2005

looks like you can have different coordinate systems and the matrix multiplications are used to transform one into another. if there is the need for info about transformations one could write another wiki article once we know what this is exactly about ...

no idea about that sqrt stuff ... the parameter of sqrt is always >=0 so I dunno where the problem can be ... no hl2 vector class here at the moment


  
Reply With Quote
Re: Let the revolution begin!!!
Old
  (#29)
stefanhendriks
RealBot Author
 
stefanhendriks's Avatar
 
Status: Offline
Posts: 3,088
Join Date: Nov 2003
Location: Netherlands
Default Re: Let the revolution begin!!! - 03-01-2005

got it working... well partially
http://forums.bots-united.com/showth...1474#post31474


Author of RealBot, "Arrakis" and "Dune 2 - The Maker" | co-Founder of Bots-United | Fundynamic | Blog | E-Mail me
  
Reply With Quote
Re: Let the revolution begin!!!
Old
  (#30)
Lazy
Member
 
Lazy's Avatar
 
Status: Offline
Posts: 236
Join Date: Jan 2004
Location: Toronto, Ontario, Canada
Default Re: Let the revolution begin!!! - 05-01-2005

Can someone post a compiled dll of this?
Whenever I try to load the one I compiled I get the very descriptive "could not load plugin" error message which makes it hard to track it down.
  
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump



Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
vBulletin Skin developed by: vBStyles.com