This wiki is archived and useful information is being migrated to the main bzflag.org website

Editing BZRobots/ShotsAndEnemies

Jump to: navigation, search

Warning: The database has been locked for maintenance, so you will not be able to save your edits right now. You may wish to copy and paste your text into a text file and save it for later.

The administrator who locked it offered this explanation: Archived wiki

The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.
Latest revision Your text
Line 1: Line 1:
#REDIRECT [[BZRobots/Ideas]]
+
= Overview =
 +
 
 +
This page lists some ideas and issues in delivering the shot and player info to Frontend from Backend.
 +
 
 +
= Shots =
 +
 
 +
== In BZAdvancedRobot ==
 +
* getShots() -type of functions (get all shots, shots in certain volume, ...) return a list of shots (class Shot)
 +
 
 +
== In Shot ==
 +
* getPosition(dt) -return position after dt seconds as is assumed
 +
* getType() - normal? gm? laser? ...
 +
* getShooter() - who shot it? at least own shots should be distinguished because on no-rico servers we could just throw them away when doing collision forecasts
 +
 
 +
* unique identifier so that frontend and backend can refer to individual shots: can be composed using player id and shot id
 +
 
 +
= Players =
 +
 
 +
== About the current Tank system ==
 +
 
 +
* We can only get all the players at the same time and all the information is sent too
 +
* Sending callsigns there is a problem with spaces in callsigns (i haven't tested it but I'd assume so)
 +
 
 +
What could be instead?
 +
 
 +
== In BZAdvancedRobot ==
 +
* getPlayers() -type of functions return a list of players (class Tank)
 +
 
 +
== In Tank ==
 +
* getPosition(dt) -return assumed position after dt seconds, "Haha meet my bullet there!"
 +
* getVelocity() -return current velocity, "So that's the speed you got"
 +
* getAngularVelocity() -return current angular velocity, "It's turning to face us! Fire!"
 +
* getHeading() -which way the bot is heading? "ARGH It's aiming us!"
 +
 
 +
* unique identifier so that frontend and backend can refer to individual players: we got playerid
 +
 
 +
= Issues =
 +
 
 +
Functions in Tank and Shot will have to call backend. Should we make a
 +
separate request for each of them or some kind of general
 +
"GetShotInfoRequest <command> [arguments]" ?
 +
 
 +
Are there functions ready in bzflag to ask for assumed positions of tanks
 +
or bullets after dt seconds without updating them first?

Please note that all contributions to BZFlagWiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see BZFlagWiki:Copyrights for details). Do not submit copyrighted work without permission!

To edit this page, please answer the question that appears below (more info):

Cancel | Editing help (opens in new window)