Advertisement Jump to content


This topic is now archived and is closed to further replies.


About the interface

This topic is 5637 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I''m new to the Arena competition, and i want to find out more about some stuff which confuses me: How does the bot interact with the program? In the source i found the functions i have to write for the bot, but how does the bot get info about the world (what is in the FOV: the bullets that are flying, what is in front of me etc) ? Death to the gaming industry! Long live games. /*ilici*/

Share this post

Link to post
Share on other sites
To see what's in the FOV, use the GetObjectsInSight method... for example:

//In your update function

int nofObjs = g_pCore->GetNumObjectsInSight(); //Gives you how many objects are in sight

for (int i=0;i<nofObjs;i++) //Goes through each object

float distance,direction,objDirection; //Will hold information about each object

int type; //Corresponds to the type listed in ICore.h

g_pCore->GetObjectsInSight(i,type,direction,distance,objDirection); //Fills with data about the current object

//Here you could either store the data and deal with it later, or deal with it immediately, for example:

if (type == OBJ_ENEMY)
g_pCore->Fire(); //If one of the objects in view is an enemy, the bot will fire

g_pCore->SetSpeed(SET_HIGH_SPEED); //Moves forward fast

g_pCore->TurnLeft(TURN_FAST); //Turns left fast

So that's a very basic bot, which runs in circles and will fire at the enemy if seen.

Hope it helps you understand how this works.

[Note: as of the current build, the bots can't actually see the bullets. To tell if you're being hit, call the GetMyHealth() method every cycle and see if your health has changed. If it has, you know someone is shooting at you...]

[edited by - HappyDude on August 17, 2003 1:01:22 PM]

Share this post

Link to post
Share on other sites

  • Advertisement

Important Information

By using, you agree to our community Guidelines, Terms of Use, and Privacy Policy. is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!