.:: 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
  (#11)
Zacker
Project Leader, Lead Level Designer, Waypointer
 
Status: Offline
Posts: 337
Join Date: Mar 2004
Location: Denmark
Default Re: Let the revolution begin!!! - 31-12-2004

Fantastic work Botman! Nice to see that you are still kicking ass
  
Reply With Quote
Re: Let the revolution begin!!!
Old
  (#12)
stefanhendriks
RealBot Author
 
stefanhendriks's Avatar
 
Status: Offline
Posts: 3,088
Join Date: Nov 2003
Location: Netherlands
Default Re: Let the revolution begin!!! - 31-12-2004

dr00l dr00l dr00l!!!!

i am gonna read the source and try it myself aswell. I am eager to see how close iw as myself...


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
  (#13)
stefanhendriks
RealBot Author
 
stefanhendriks's Avatar
 
Status: Offline
Posts: 3,088
Join Date: Nov 2003
Location: Netherlands
Default Re: Let the revolution begin!!! - 31-12-2004

I took a look at the code...

botman congrats! you succeeded in the theory i had in mind as well (as the little snippet in 'i don't like this'). Congrats!

Actually i was thinking that i had to do a lot more copying of code for WriteUserCmd and such, but it seemed it was not that much after all.

The bot will crash in HL2DM for now, but thats a fault at valve, but no worries, they have fixed it (got confirmation from alfred) and will be updated on a next steam update of HL2DM

I am gonna change this lovely code... perhaps i can even get it to work for my ITM project...

one question though:
i see you use the gameinfomanager to let a bot change team. I assume this is on purpose? Because a bot should *actually* try to join the game via usercommands? (or some sort of 'menuselect' thingy?).


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

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

I'm not sure about the best way to select a team. I notice that there is a client-side cvar now (something like cl_team or some such sillyness) that teamplay_gamerules.cpp uses to select the player model. That stuff may only be used by HL2DM and/or TF2.

I don't know how to get plugin entities to set client-side cvars yet.

I did notice that weapon select is now done as part of the cmd structure (instead of sending a text command with the weapon name that you want to switch to). Just set the proper bit in the cmd structure and do the WriteUsercmd() like you do for movement.

Obviously, there's still LOTS of stuff to do, but hopefully we can help each other out and get a nice "empty" bot template going for the Source engine.

botman
  
Reply With Quote
Re: Let the revolution begin!!!
Old
  (#15)
stefanhendriks
RealBot Author
 
stefanhendriks's Avatar
 
Status: Offline
Posts: 3,088
Join Date: Nov 2003
Location: Netherlands
Default Re: Let the revolution begin!!! - 31-12-2004

yes, i also noticed that on the weapon part The cl_team thing is something odd for me too. I also noticed that the chooseteam(2) code does not work properly, the argument you pass is somehow overwritten by autoteambalance or something alike (i bet it is game dll specific code, so the argument you give is not used at all).

I am now investigating this piece of code, via the server interface:

Code:
	float fPitch = pBot->fIdealPitch;
	float fYaw   = pBot->fIdealYaw;

	// PROCESS AIMING
	engine->CrosshairAngle( pBot->edict, fPitch, fYaw );
i hope it works well, i just saw my bots walking backwards with a yaw of 180... and a pitch of 180... when this is the same as in HL1, i think we can copy/paste a lot of code. But i am not sure yet..


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
  (#16)
stefanhendriks
RealBot Author
 
stefanhendriks's Avatar
 
Status: Offline
Posts: 3,088
Join Date: Nov 2003
Location: Netherlands
Default Re: Let the revolution begin!!! - 31-12-2004

noticed:

* you can change team to any one you want, the argument is a bit different: 1 = spectator, 2 = terror, 3 = counter-terrorists

* my bots keep walking backwards, even when forward speed is set to 200. Even when removing the crosshairangle and such.

EDIT:
in addition to the second point. It seems 'forward move' is related to something. When i use -200 , my bots walk (on the T side) forward. THe same bot walks sideways in de_cbble.

perhaps you need to link this with pitch/yaw things. I did not look into this yet.


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

Last edited by stefanhendriks; 31-12-2004 at 18:44..
  
Reply With Quote
Re: Let the revolution begin!!!
Old
  (#17)
Jerry
Member
 
Jerry's Avatar
 
Status: Offline
Posts: 10
Join Date: Dec 2004
Location: Woerden, The Netherlands
Default Re: Let the revolution begin!!! - 31-12-2004

Quote:
Originally Posted by stefanhendriks
noticed:

EDIT:
in addition to the second point. It seems 'forward move' is related to something. When i use -200 , my bots walk (on the T side) forward. THe same bot walks sideways in de_cbble.

perhaps you need to link this with pitch/yaw things. I did not look into this yet.
Maybe the bot uses the orientation of the map .


Imagination is more important than knowledge. Knowledge is limited - Albert Einstein
  
Reply With Quote
Re: Let the revolution begin!!!
Old
  (#18)
@$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!!! - 31-12-2004

nice work, next week i'm back at my normal PC

they still use normal angles in source2 ? 0°-360° or whatever ? I mean, calculation is based on radian, i.e. 0-2Pi, so why not that ?


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

@asp, why do it the hard way or the more human way?


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
  (#20)
stefanhendriks
RealBot Author
 
stefanhendriks's Avatar
 
Status: Offline
Posts: 3,088
Join Date: Nov 2003
Location: Netherlands
Default Re: Let the revolution begin!!! - 31-12-2004

ok, i had a little bit more time to fiddle around:

- the forward speed is somehow relative to the map. I did not yet figure this out. However, when i tried using IN_FORWARD (for buttons) only, it did not work either. Also a combination of 'forwardspeed=200' plus the IN_FORWARD bit, did not work either.

I tried figuring out this relative computing of the speeds, but i think its like this: The game dll itself has code to let clients move around the map; they also rely on 'forwardmove' and 'sidemove' and such. I do not see some computing there; though i have to admit i did not do a very indepth search.

Perhaps the engine itself handles movement for fake clients differently?

- edit:
also not luck with the crosshair function, despite what kind of pitch or yaw i pass through there... :S

- edit 2:
about the crosshair thingy; i think this is due the fact that the plugin sets info first, and then the game dll. Meaning the game dll overwrites the crosshair info? (fixme!)


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

Last edited by stefanhendriks; 31-12-2004 at 20:57..
  
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