programming c++/ai contest: GDArena

  • Hey - turns out IRC is out and something a little more modern has taken it's place... A little thing called Discord!

    Join our community @ https://discord.gg/JuaSzXBZrk for a pick-up game, or just to rekindle with fellow community members.

Rel@x

*****istrator
Jun 8, 2001
4,636
48
The Netherlands
might be fun for some of u .. might not be for a lot of others :P

it's a contest of writing ur own "bot" ai dll in c++.. you build ur bot and let em compete against others made by other ppl.

check the site here:
http://www.gamedev.net/community/contest/gdarena/

forum:
http://www.gamedev.net/community/forums/forum.asp?forum_id=50

afaik me and l0cky are gonna try and "compete" .. post here who else ;) and we can let our bots battle each other :P

added some screenies of the arena below with my leet bot just running around and shooting :D
 

Attachments

  • gdarena1.JPG
    46.8 KB · Views: 91
  • gdarena2.JPG
    49.6 KB · Views: 75
Last edited:
some code from my bot ;) just goes round and round and shoot when it sees some1 in line of fire ;)
Code:
void SampleBot::Update()
{
	// Update cycle entry point. Your AI code goes here.
   g_pCore->Taunt("lalala1");
   g_pCore->SetSpeed(	SET_HIGH_SPEED);
 //  g_pCore->SelectWeapon(WEAPON_GRENADE);
   if (inLineOfFire()) g_pCore->Fire();
   if (mode == 0) g_pCore->TurnLeft(TURN_SLOW);
}

bool SampleBot::inLineOfFire()
{
	int nrObs=0;
	nrObs = g_pCore->GetNumObjectsInSight();
	int type=0;
	float direction=0;
	float distance = 0;
	float objdir = 0;
  for (int a =0; a < nrObs; a++)
  {
	g_pCore->GetObjectsInSight(a,type,direction,distance,objdir);
   if (type == OBJ_ENEMY)	if ((direction < 2) && (direction > -2)) { mode = 1;  return true; }
  }
   mode = 0;
		return false;
}
 
If anyone can tell me how to compile it into a dll-file using VS.NET c++ then ill give it a go :)

(I dont dare ask in their forum cos theyll laugh at me for ages)