View Single Post
Re: Planning and design
Old
  (#4)
stefanhendriks
RealBot Author
 
stefanhendriks's Avatar
 
Status: Offline
Posts: 3,088
Join Date: Nov 2003
Location: Netherlands
Default Re: Planning and design - 05-01-2004

agreed. Although the priorities differ for each coder, i do agree on this 'code structure'. Keep the code, nice, clean, but commented.

here a snippet from my own BotThink function (a left over from botmans template actually):
Code:
// GENERAL BOT THINK:
void BotThink( cBot *pBot )
{ 
   // STEP 1: Update status
   pBot->UpdateStatus();   
   // STEP 2: Think
   pBot->Think();
   // STEP 3: Act
   pBot->Act(); // Bot act
   // PASS THROUGH ENGINE
   g_engfuncs.pfnRunPlayerMove( pBot->pEdict, pBot->vecMoveAngles, pBot->f_move_speed,
								pBot->f_strafe_speed, 0, pBot->pEdict->v.button, 0, pBot->msecval);
   return;
}


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