.:: 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 > General Bot Coding
General Bot Coding See what a pain it is to get those little mechs shooting around

Reply
 
Thread Tools
hpb template 4 metamod & cleaned
Old
  (#1)
dub
Member
 
dub's Avatar
 
Status: Offline
Posts: 89
Join Date: Aug 2004
Location: UK
Default hpb template 4 metamod & cleaned - 24-12-2004

download hpb template 4 converted to metamod & cleaned from http://dubb-coding.8bit.co.uk/botman_template_4_mm.7z .
"you might need to download 7-zip from http://www.7-zip.org to decompress the archive".
  
Reply With Quote
Re: hpb template 4 metamod & cleaned
Old
  (#2)
Pierre-Marie Baty
Roi de France
 
Pierre-Marie Baty's Avatar
 
Status: Offline
Posts: 5,049
Join Date: Nov 2003
Location: 46°43'60N 0°43'0W 0.187A
Default Re: hpb template 4 metamod & cleaned - 24-12-2004

What do you mean by "cleaned" ? Were there bugs ?



RACC home - Bots-United: beer, babies & bots (especially the latter)
"Learn to think by yourself, else others will do it for you."
  
Reply With Quote
Re: hpb template 4 metamod & cleaned
Old
  (#3)
Rifleman
This user broke our rules and has been BANNED
 
Status: Offline
Posts: 128
Join Date: Sep 2004
Location: Mars
Default Re: hpb template 4 metamod & cleaned - 24-12-2004

wow , great job dude !

By the way , there are severe bug , you should reset the msec stuff every round ( I advised you to do so )

And this is an old bug of HPB_template

in bot_navigate.cpp the function BotChangePitch

pEdict->v.v_angle.x = current;

We have to add this line below the above line else the pitch angle we set wont have any use

pEdict->v.angles.x = pEdict->v.v_angle.x / 3;

Last edited by Rifleman; 24-12-2004 at 10:49..
  
Reply With Quote
Re: hpb template 4 metamod & cleaned
Old
  (#4)
dub
Member
 
dub's Avatar
 
Status: Offline
Posts: 89
Join Date: Aug 2004
Location: UK
Default Re: hpb template 4 metamod & cleaned - 24-12-2004

just take a look no extern vars every where now all defined in bot.h it`s so much more readable enjoy .
  
Reply With Quote
Re: hpb template 4 metamod & cleaned
Old
  (#5)
dub
Member
 
dub's Avatar
 
Status: Offline
Posts: 89
Join Date: Aug 2004
Location: UK
Default Re: hpb template 4 metamod & cleaned - 24-12-2004

added a couple of fixes thanks to rifleman & cleaned a little bit more.
  
Reply With Quote
Re: hpb template 4 metamod & cleaned
Old
  (#6)
dub
Member
 
dub's Avatar
 
Status: Offline
Posts: 89
Join Date: Aug 2004
Location: UK
Default Re: hpb template 4 metamod & cleaned - 24-12-2004

Quote:
Originally Posted by Rifleman
wow , great job dude !

By the way , there are severe bug , you should reset the msec stuff every round ( I advised you to do so )
done reset the msec at worldspawn when the gpGlobals->time starts from 0.0.
  
Reply With Quote
Re: hpb template 4 metamod & cleaned
Old
  (#7)
Pierre-Marie Baty
Roi de France
 
Pierre-Marie Baty's Avatar
 
Status: Offline
Posts: 5,049
Join Date: Nov 2003
Location: 46°43'60N 0°43'0W 0.187A
Default Re: hpb template 4 metamod & cleaned - 24-12-2004

hmm, you'd better call this your own template, and not the "HPB template" anymore. This because botman did not want his bot to support Counter-Strike, and the msec problem you're talking about affects Counter-Strike (and thus round-based games) only.
Quote:
Originally Posted by Rifleman
And this is an old bug of HPB_template

in bot_navigate.cpp the function BotChangePitch

pEdict->v.v_angle.x = current;

We have to add this line below the above line else the pitch angle we set wont have any use

pEdict->v.angles.x = pEdict->v.v_angle.x / 3;
No, this is not needed because the bot's body angles are set already at the end of each BotThink, before the RunPlayerMove call. Doing it again here is redundant.

It's nice that you care about CS players, though, but I think you should fork from the official HPB template and call this another name instead.



RACC home - Bots-United: beer, babies & bots (especially the latter)
"Learn to think by yourself, else others will do it for you."

Last edited by Pierre-Marie Baty; 24-12-2004 at 22:10..
  
Reply With Quote
Re: hpb template 4 metamod & cleaned
Old
  (#8)
Whistler
Summoner
 
Whistler's Avatar
 
Status: Offline
Posts: 1,499
Join Date: Feb 2004
Location: Mist Village
Default Re: hpb template 4 metamod & cleaned - 25-12-2004

actually there's no need to reset the msec value every round at all, but if you defined the msec as global variable instead of the way the original HPB bot did you need to reset them to zero every map start.
  
Reply With Quote
Re: hpb template 4 metamod & cleaned
Old
  (#9)
Rifleman
This user broke our rules and has been BANNED
 
Status: Offline
Posts: 128
Join Date: Sep 2004
Location: Mars
Default Re: hpb template 4 metamod & cleaned - 25-12-2004

Quote:
Originally Posted by Pierre-Marie Baty
No, this is not needed because the bot's body angles are set already at the end of each BotThink, before the RunPlayerMove call. Doing it again here is redundant.
Code:
   // make the body face the same way the bot is looking
   pEdict->v.angles.y = pEdict->v.v_angle.y;
 
   // save the previous speed (for checking if stuck)
   pBot->prev_speed = pBot->f_move_speed;
 
   BotFixIdealPitch (pEdict);
   BotFixIdealYaw (pEdict);
   BotFixBodyAngles (pEdict);
   BotFixViewAngles (pEdict);
 
   g_engfuncs.pfnRunPlayerMove (pEdict, pEdict->v.v_angle, pBot->f_move_speed,
								0, 0, pEdict->v.button, 0, g_fMsecVal);
   return;
}
Pardon ?
  
Reply With Quote
Re: hpb template 4 metamod & cleaned
Old
  (#10)
Pierre-Marie Baty
Roi de France
 
Pierre-Marie Baty's Avatar
 
Status: Offline
Posts: 5,049
Join Date: Nov 2003
Location: 46°43'60N 0°43'0W 0.187A
Default Re: hpb template 4 metamod & cleaned - 25-12-2004

well yes, you are right, it's my fault. I said this because it was really planned to put it there when botman allowed me to update his template but looks like I forgot to do it. And Whistler is right about the msecval too. The global msecval needs to be reset each time a new map starts. But since this is done in StartFrame already, there's no need to do it again in DispatchSpawn.



RACC home - Bots-United: beer, babies & bots (especially the latter)
"Learn to think by yourself, else others will do it for you."
  
Reply With Quote
Reply


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

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