UTRemoteBot::RemoteBot Class Reference

List of all members.

Public Member Functions

 RemoteBot (string name, BotSkin skin, BotColour colour, string server)
 Constructor for creating a new Remote Bot.
 RemoteBot (string name, BotSkin skin, BotColour colour, string server, OutputLevel outputLevel)
 Constructor for creating a new Remote Bot.
 RemoteBot (string name, BotSkin skin, BotColour colour, string server, TextWriter outputWriter, OutputLevel outputLevel)
 Constructor for creating a new Remote Bot.
void DisconnectFromServer ()
 Disconnects this bot form the Game and Map Servers.

Protected Member Functions

abstract void PerformActions ()
 Method to be overriden in the child class This is where the programmer must add the main functionality to make the bot work. They can use CurrentGameState, LevelMap and BotCommands It is called about twice a second.
virtual void PickedUpItem (UTItem item)
 Your bot has just picked up a new item.
virtual void HitWall (UTVector locationOfBot, UTVector normalOfCollision)
 Your bot has just collided with a wall.
virtual void HitLedge (UTVector locationOfBot, bool isAlreadyFalling)
 Your bot has just hit a ledge, If walking, will not fall. If running, you are already falling by the time you get this.
virtual void BumpedActor (string actorID, UTVector locationOfActor)
 Your bot bumped into another actor, could be a player or another blocking object such as a moving door.
virtual void HeardPickup (string byBotID, UTVector location)
 Your bot heard someone pickup an item.
virtual void HeardNoise (string botID, UTVector location)
 Your bot heard a noise made by another player. Maybe another player walking or shooting.
virtual void IncomingProjectile (float timeUntilImpact, UTVector fromLocation)
 There is an incoming projectile likely to hit you. May give you a chance to dodge.
virtual void AnotherBotDied (string deadBotID, string killerID, string damageType)
 Some other bot just died.
virtual void WasKilled (string killerID, string damageType)
 Your bot just died.
virtual void TookDamage (int amount, string damageType, string instigator, UTVector fromLocation)
 Your bot just took some damage.
virtual void ShotAnotherBot (string botHitID, int amountOfDamage, string damageType)
 Your bot just shot another bot.
virtual void NewGlobalChatMessage (string message)
 Someone just said something in the global chat channel.
virtual void PathReceieved (string requestID, UTNavPoint[] path)
 A series of path nodes which have been returned in response to a GetPathTo() call to the server.

Properties

UTMap LevelMap
 The UTMap of the current level, containing the locations of all inventory pickups and navigation points.
BotCommands BotCommands
 Contains methods that can be called to make your Bot perform actions in the game.
GameState CurrentGameState
 The GameState at this specific moment in time. Includes all currently visible pickups, navigation points and opponents.
UTBotSelfState Self
 The current status of your Bot.
TextWriter Output
 The TextWriter for the output of this bot.

Private Member Functions

bool ConnectToMapServer ()
bool ConnectToGameServer ()
void ProcessInfoMessage (UTMessage infoMsg)
void ParseMapInfo ()
void MessageLoop ()
 Main Running method that constantly loops round collecting the messages from the server The messages are then acted upon. An Asynchronus message makes the appropriet virtual method get called A Synchronus message will be shunnted off to the GameState so it can update itself.
void PerformGameOver ()

Static Private Member Functions

static UTNavPoint[] GetPathNodes (UTMessage pathMsg)

Private Attributes

UTVisConnection visCommunicator
UTConnection gameCommunicator
string agentName
BotSkin agentSkin
BotColour agentColour
string uniqueID
UTMap map
UTBotSelfState myState
GameState currentState
Thread messageLoopThread
Queue< UTMessagemessageQueue = new Queue<UTMessage>(UTConnection.MAX_MESSAGES)
Queue< UTMessagemessageQueueASync = new Queue<UTMessage>(UTConnection.MAX_MESSAGES)
OutputLevel outputLevel
TextWriter output
BotCommands botCommands

Constructor & Destructor Documentation

UTRemoteBot::RemoteBot::RemoteBot string  name,
BotSkin  skin,
BotColour  colour,
string  server
[inline]
 

Constructor for creating a new Remote Bot.

Parameters:
name The name of the bot in the game
skin The enum of the skin type the bot will have
colour The enum of the colour the bot will be
server The ip address of the game host

UTRemoteBot::RemoteBot::RemoteBot string  name,
BotSkin  skin,
BotColour  colour,
string  server,
OutputLevel  outputLevel
[inline]
 

Constructor for creating a new Remote Bot.

Parameters:
name The name of the bot in the game
skin The enum of the skin type the bot will have
colour The enum of the colour the bot will be
server The ip address of the game host
outputLevel The level of debugging information to output

UTRemoteBot::RemoteBot::RemoteBot string  name,
BotSkin  skin,
BotColour  colour,
string  server,
TextWriter  outputWriter,
OutputLevel  outputLevel
[inline]
 

Constructor for creating a new Remote Bot.

Parameters:
name The name of the bot in the game
skin The enum of the skin type the bot will have
colour The enum of the colour the bot will be
server The ip address of the game host
outputWriter The stream to write debug info to
outputLevel The level of debugging information to output


Member Function Documentation

virtual void UTRemoteBot::RemoteBot::AnotherBotDied string  deadBotID,
string  killerID,
string  damageType
[inline, protected, virtual]
 

Some other bot just died.

Parameters:
deadBotID The ID of the bot that just died
killerID The ID of the killer
damageType The type of damage that killed the bot

virtual void UTRemoteBot::RemoteBot::BumpedActor string  actorID,
UTVector  locationOfActor
[inline, protected, virtual]
 

Your bot bumped into another actor, could be a player or another blocking object such as a moving door.

Parameters:
actorID The ID of the object you bumped into
locationOfActor The Location of the object you collided with

bool UTRemoteBot::RemoteBot::ConnectToGameServer  )  [inline, private]
 

bool UTRemoteBot::RemoteBot::ConnectToMapServer  )  [inline, private]
 

void UTRemoteBot::RemoteBot::DisconnectFromServer  )  [inline]
 

Disconnects this bot form the Game and Map Servers.

static UTNavPoint [] UTRemoteBot::RemoteBot::GetPathNodes UTMessage  pathMsg  )  [inline, static, private]
 

virtual void UTRemoteBot::RemoteBot::HeardNoise string  botID,
UTVector  location
[inline, protected, virtual]
 

Your bot heard a noise made by another player. Maybe another player walking or shooting.

Parameters:
botID The ID of the bot that made the noise
location The location that the noise came from

virtual void UTRemoteBot::RemoteBot::HeardPickup string  byBotID,
UTVector  location
[inline, protected, virtual]
 

Your bot heard someone pickup an item.

Parameters:
byBotID The ID of the bot that picked up the item
location The location the item was picked up from

virtual void UTRemoteBot::RemoteBot::HitLedge UTVector  locationOfBot,
bool  isAlreadyFalling
[inline, protected, virtual]
 

Your bot has just hit a ledge, If walking, will not fall. If running, you are already falling by the time you get this.

Parameters:
locationOfBot The location of the bot when it hit the ledge
isAlreadyFalling Whether or not you fell off the ledge

virtual void UTRemoteBot::RemoteBot::HitWall UTVector  locationOfBot,
UTVector  normalOfCollision
[inline, protected, virtual]
 

Your bot has just collided with a wall.

Parameters:
locationOfBot The location of the bot when it hit the wall
normalOfCollision The normal of the angle that the bot collided at

virtual void UTRemoteBot::RemoteBot::IncomingProjectile float  timeUntilImpact,
UTVector  fromLocation
[inline, protected, virtual]
 

There is an incoming projectile likely to hit you. May give you a chance to dodge.

Parameters:
timeUntilImpact Estimated time till impact
fromLocation Location that the projectile is coming from.

void UTRemoteBot::RemoteBot::MessageLoop  )  [inline, private]
 

Main Running method that constantly loops round collecting the messages from the server The messages are then acted upon. An Asynchronus message makes the appropriet virtual method get called A Synchronus message will be shunnted off to the GameState so it can update itself.

virtual void UTRemoteBot::RemoteBot::NewGlobalChatMessage string  message  )  [inline, protected, virtual]
 

Someone just said something in the global chat channel.

Parameters:
message The message that was just said

void UTRemoteBot::RemoteBot::ParseMapInfo  )  [inline, private]
 

virtual void UTRemoteBot::RemoteBot::PathReceieved string  requestID,
UTNavPoint[]  path
[inline, protected, virtual]
 

A series of path nodes which have been returned in response to a GetPathTo() call to the server.

Parameters:
requestID An ID matching the one that was sent in the GetPathTo() call allowing you to match up request with response
path Containing an ordered array of UTNavPoints to follow in order to get to the required location

abstract void UTRemoteBot::RemoteBot::PerformActions  )  [protected, pure virtual]
 

Method to be overriden in the child class This is where the programmer must add the main functionality to make the bot work. They can use CurrentGameState, LevelMap and BotCommands It is called about twice a second.

void UTRemoteBot::RemoteBot::PerformGameOver  )  [inline, private]
 

virtual void UTRemoteBot::RemoteBot::PickedUpItem UTItem  item  )  [inline, protected, virtual]
 

Your bot has just picked up a new item.

Parameters:
item The UTItem that was just collected

void UTRemoteBot::RemoteBot::ProcessInfoMessage UTMessage  infoMsg  )  [inline, private]
 

virtual void UTRemoteBot::RemoteBot::ShotAnotherBot string  botHitID,
int  amountOfDamage,
string  damageType
[inline, protected, virtual]
 

Your bot just shot another bot.

Parameters:
botHitID The ID of the bot you just shot
amountOfDamage The amount of damage that you just did
damageType The type of damage that you just did

virtual void UTRemoteBot::RemoteBot::TookDamage int  amount,
string  damageType,
string  instigator,
UTVector  fromLocation
[inline, protected, virtual]
 

Your bot just took some damage.

Parameters:
amount The amount of damage taken
damageType The type of damage that was taken
instigator The ID of the bot that caused the damage if it was a bot and you can see it, otherwise returns blank string ("")
fromLocation The location that the source of the damage came from

virtual void UTRemoteBot::RemoteBot::WasKilled string  killerID,
string  damageType
[inline, protected, virtual]
 

Your bot just died.

Parameters:
killerID The ID of the bot that killed you
damageType The type of damage that killed you


Member Data Documentation

BotColour UTRemoteBot::RemoteBot::agentColour [private]
 

string UTRemoteBot::RemoteBot::agentName [private]
 

BotSkin UTRemoteBot::RemoteBot::agentSkin [private]
 

BotCommands UTRemoteBot::RemoteBot::botCommands [private]
 

GameState UTRemoteBot::RemoteBot::currentState [private]
 

UTConnection UTRemoteBot::RemoteBot::gameCommunicator [private]
 

UTMap UTRemoteBot::RemoteBot::map [private]
 

Thread UTRemoteBot::RemoteBot::messageLoopThread [private]
 

Queue<UTMessage> UTRemoteBot::RemoteBot::messageQueue = new Queue<UTMessage>(UTConnection.MAX_MESSAGES) [private]
 

Queue<UTMessage> UTRemoteBot::RemoteBot::messageQueueASync = new Queue<UTMessage>(UTConnection.MAX_MESSAGES) [private]
 

UTBotSelfState UTRemoteBot::RemoteBot::myState [private]
 

TextWriter UTRemoteBot::RemoteBot::output [private]
 

OutputLevel UTRemoteBot::RemoteBot::outputLevel [private]
 

string UTRemoteBot::RemoteBot::uniqueID [private]
 

UTVisConnection UTRemoteBot::RemoteBot::visCommunicator [private]
 


Property Documentation

BotCommands UTRemoteBot::RemoteBot::BotCommands [get, protected]
 

Contains methods that can be called to make your Bot perform actions in the game.

GameState UTRemoteBot::RemoteBot::CurrentGameState [get, protected]
 

The GameState at this specific moment in time. Includes all currently visible pickups, navigation points and opponents.

UTMap UTRemoteBot::RemoteBot::LevelMap [get, protected]
 

The UTMap of the current level, containing the locations of all inventory pickups and navigation points.

TextWriter UTRemoteBot::RemoteBot::Output [get, protected]
 

The TextWriter for the output of this bot.

UTBotSelfState UTRemoteBot::RemoteBot::Self [get, protected]
 

The current status of your Bot.


The documentation for this class was generated from the following file:
Generated on Thu Jan 26 09:12:40 2006 for UTUserBot by  doxygen 1.4.6-NO