This wiki was in read-only mode for many years, but can now be edited again. A lot of information will need to be updated.

BZRobots/API BZRobots vs Robocode: Difference between revisions

From BZFlagWiki
Jump to navigation Jump to search
Daxxar (talk | contribs)
New page: =Overview= This page is to describe the changes that have been made to the RoboCode-compliant part of the API to accomodate how BZFlag worsk. = API Changes = == Behaviour changes == * '''...
 
add api additions
Line 1: Line 1:
=Overview=
=Overview=
This page is to describe the changes that have been made to the RoboCode-compliant part of the API to accomodate how BZFlag worsk.
This page is to describe the changes that have been made to the RoboCode-compliant part of the API to accomodate how BZFlag works.


= API Changes =
= API Changes =
Line 8: Line 8:
== Name changes ==
== Name changes ==
* '''getHeight()''' - Renamed to '''getLength()'''. This is because "height" in three dimensions refers to an different axis than what getHeight in two dimensions (and RoboCode) refers to.
* '''getHeight()''' - Renamed to '''getLength()'''. This is because "height" in three dimensions refers to an different axis than what getHeight in two dimensions (and RoboCode) refers to.
== API Additions ==
* getZ() - Returns the Z position of a tank
* getLength() - Previously the "height" in the RoboCode API, this returns the length of a tank from the tip of the barrel to the rear of the tank.


=See Also=
=See Also=
* [[BZRobots/About]]
* [[BZRobots/About]]
* [[BZRobots/Protocol]]
* [[BZRobots/Protocol]]

Revision as of 16:35, 9 July 2007

Overview

This page is to describe the changes that have been made to the RoboCode-compliant part of the API to accomodate how BZFlag works.

API Changes

Behaviour changes

  • execute() - No longer "blocks" until the action is completed - it returns immediately unless you're currently completing an action. This also goes for other functions, see their relevant protocol messages in BZRobots/Protocol ("Steady-state required?"). This is because BZFlag is realtime (and RoboCode isn't).

Name changes

  • getHeight() - Renamed to getLength(). This is because "height" in three dimensions refers to an different axis than what getHeight in two dimensions (and RoboCode) refers to.

API Additions

  • getZ() - Returns the Z position of a tank
  • getLength() - Previously the "height" in the RoboCode API, this returns the length of a tank from the tip of the barrel to the rear of the tank.

See Also