Clien->Thread thread is about to die:
Setting various properties (e.g. this.communicationAlive flag, etc.) after
terminating the thread (or right before it).
Parser->Client thread is about to die:
setting various properties (e.g. this.communicationAlive flag, etc.) after
terminating the thread (or right before it).
abs() -
Method in class cz.cuni.utils.math.Tuple2D
abs() -
Method in class cz.cuni.utils.math.Tuple3D
abs() -
Method in class cz.cuni.utils.math.Tuple4D
AddExtra is a class for user-defined inventory in the game
like mushrooms, apples, mines, whatever is a user fantasy
it is basicaly same as Item, the only advantage of this class is that anyone can register listener
exactly for Extra messages
AddExtra() -
Constructor for class cz.cuni.pogamut.MessageObjects.AddExtra
adds ray to auto-trace rays - those are sended every batch
"ADDRAY {Id X} {Direction X X X} {Lenght X} {FastTrace True|False} {TraceActors True|False}"
if the trace of same ID is added, the previous one is just configured by the parameters of new one
add listener to specified type of message common use when you want to
listen only for instance to dead message, you add listener with proper
message type
Adds newWeapon ammo to the ammo of weapon of the same type in the inventory
if the weapon was the first agent got (at the game start), set it as current
adrenaline -
Variable in class cz.cuni.pogamut.MessageObjects.Self
AgentBody is wrapping up communication with parser and execution of commands
it receives messages, some of them are compressed and AgentBody provides
their completion according to recent messages stored in knownObjects
Commands are available using methods of AgentBody like RunTo(navPoint)
AgentBody is also hidding difference between Remote and Local Parser
TODO: to throw exception or not to throw exception
initialize AgentBody - mainly Parser Parser - there are two
possibilities: Parser on remote computer and Parser on same computer
Remote Parser - Parser is on the same machine as Unreal Tournament -
advantages - low network traffic - part of the load is on remote server,
more of the system is available for agent logic - disadvantages - it is
necessary to run Parser on another machine
Local Parser - Parser is on the same machine as Client - advantages - we
can run all on one machine - when on one machine, there is no unnecessary
traffic - disadvantages - CPU load
class used to initialize agent
by changing parameters of this class you are modifying the init message sent by body to GB
hence modifying your agent accuracy, skin, vulnerability, etc.
AgentInventory serves to keep info about the weapons agent is carrying
it provides usefull methods which can be used to determine suitability of visible ammo
or to able to switch among possesed weapons
Some profiling should take place here - don't know which operation will be the most
used, so I tried to KISS - "keep it simple and stupid":)
AgentMemory is taking care of implementation of WorldView and RecentMemory interfaces
hence it uses History and methods are queries to History object
WorldView
gives a view on History that shows only current information (things that agent perceives at the very moment)
RecentMemory
gives a view on History that shows past information (like players seen in last 2 seconds)
this is very handy, because only event driven agent could be quite
vulnerable because when he suddenly stop perceiving an object he
should be able to remember its position for a while
(like when agent picks up an armor while engaging enemy, he turns
for an armor and hence stop seeing enemy, so he could stop engaging
him, but he got some memory so he remembers that the enemy was there
recently and can try to locate him and start engaging again)
Another offered service is Inventory - methods to work with inventory, like
add weapons, get weapon of some kind, usability of ammo, getBetterWeapon (according to player and enemy possition) etc.
check two things: 1) agent's velocity - size of vector greater than 50 UT
units 2) agent is heading to the location - distance from the location is
greater about 50 UT units than distance from object after adding agent's
velocity vector to location vector
- if this method fails - delete the edge in the graph for A*
========================================================
This file holds implementation of generic A* algorithm,
better refered to as A* Machine according to
Dan Higgins, Generic A* Pathfind, AI Gaming Wisdom, 2002
========================================================
What is A*
----------
A* is space-search algorithm using a custom-built heuristic.
AStar() -
Constructor for class cz.cuni.astar.AStar
This class represents the search space for A* algorithm
1) we need to know which neighbours the node has
2) we need to know the travel cost between two nodes (edge cost)
AutoTraceRay notification message
contains:
ID: id of the ray query
from: location from which the ray is emitted
to: location to which the ray is sended
result: true if it hit something, false if not
hitNormal: normal vector to the trace ray in the point of hit
hitId: id of hitted actor
hitLocation: point of the hit
traceActors: whether to care about other actors in the game
fastTrace: switch to fastTrace way of evaluation of trace
synchronous message - sended every turn
NOTE that it is not delta compressed
Is called whenever another bot (the one who is connected
through the UTWorld interface) enters the world.
... called when UTWorld.connectBot() is called
Is called whenever another bot (the one who is connected
through the UTWorld interface) left the world.
... called when UTWorld.disconnectBot() is called
checks whether there are any medkit items around and if there are
checks if the agent is not standing on the first one in the choosenMedKits
(bot got stucked because nearestHealth returns Healths according to inventory spots
not to the current situation, so the bot with low health got stucked on the inventory spot)
Reasoning about what to do with seen item
the easiest way of handeling it will be just to take it every time, but what should we do
when there are many of items laying in front of agent?
Reasoning about what to do with seen item
the easiest way of handeling it will be just to take it every time, but what should we do
when there are many of items laying in front of agent?
choose weapon according to the one he is currently holding
has melee and see ranged => pick up ranged
has ranged and see melee => pick up melee
pick up first weapon he sees
choose weapon according to the one he is currently holding
has melee and see ranged => pick up ranged
has ranged and see melee => pick up melee
pick up first weapon he sees
Three points in 2D ... assuming that [X2,Y2] is the right-most (biggest X coordinate) point of all points from polygon
Edges exist as follows A1A2, A2A3 ...
clone() -
Method in class cz.cuni.pogamut.MessageObjects.AddAmmo
clone() -
Method in class cz.cuni.pogamut.MessageObjects.AddArmor
clone() -
Method in class cz.cuni.pogamut.MessageObjects.AddExtra
clone() -
Method in class cz.cuni.pogamut.MessageObjects.AddHealth
clone() -
Method in class cz.cuni.pogamut.MessageObjects.AddItem
interface which specifies which commands with what arguments are available
all method descriptions are in the fashion:
description of the method
example of the desired string entered in the command property content
All data fields which are marked by @PogProp annotation and
PropertyEditorManager can find editor for them are recognized as
Properties of introspectable proxy and are returned by this method.
configure agent:
autoTrace - start/stop autoTracing
name - name of the agent - could be changed this way to for instance carry some additional info about agent
(e.g. role in the team, mood etc.) -> good for visual observation - debugging and presentation of work
manualSpawn - start/stop automatic spawn of agent after death - when true, you must spawn him manualy
invulnerable - makes agent invulnerable from any threat
visionTime - a frequency of synchronous batches - from 0.1 up to 2 - means from 10 per second to 1 per two seconds
showFocalPoint - if the FocalPoint of the bot should be visible or not
drawTraceLines - if the autoTracing lines should be visible in game or not
synchronousOff - if all synchronous messages should be disabled for the agent or not
configure name
name - name of the agent - could be changed this way to for instance carry some additional info about agent
(e.g. role in the team, mood etc.) -> good for visual observation - debugging and presentation of work
Counter for items without ID, which needs ID - like sounds for instance
every sound has its ID, as integer got about at least 65536 values, there
is no chance, that there will be two different objects of the same type with the same ID
we have to add the points in the right order to obtain
the same hash code ... we will compare their coordinates
doesn't work for degenerated segments (a == b), that's
why all degenerated segments have hash code == 0
If triangle is a one point ... hash code == 0
If exactly two vertices are the same ... hash code == 1
Otherwise we need to sort it according to verties' coordinates.
If triangle is a one point ... hash code == 0
If exactly two vertices are the same ... hash code == 1
Otherwise we need to sort it according to verties' coordinates.
Main method of the bot's brain - we're going to do some thinking about
the situation we're in (how it's unfair to be the bot in the gloomy world
of UT2004 :-).
just makes agent jump higher than jump, useful as a reflex action when hitting the wall
sometimes agent encounter some obstacles, which could be jumped over
(like girders etc.)
Extra is a class for user-defined inventory in the game
like mushrooms, apples, mines, whatever is a user fantasy
it is basicaly same as Item, the only advantage of this class is that anyone can register listener
exactly for Extra messages
fastTrace - emit ray from the place where agent stands from about "1.5m" height to specified location
fastTrace will return true, if it hits anything
"FTRACE {Id X} {To X X X}"
Trace notification message
contains:
ID: id of the trace query
from: location from which the ray is emitted
to: location to which the ray is sended
result: true if it hit something, false if not
asynchronous message
Called after nav points are received from GameBot in state MAP_RECEIVE
fix NeighNav.neighbour references (can't be fixed before, because we're
receiveing identifiers to non-existing objects)
This is flag class which is designed for Boolean or Integer types (but
it should work with other types as well as long as they have equals() implemented
correctly.
FlagInfo contains all info about the flag in the CTF game mode
id - a unique id for this flag, assigned by the game
location - an absolute location of the flag
holder - the identity of player/bot holding the flag (only sent if flag is being carried).
FlagInfo() -
Constructor for class cz.cuni.pogamut.MessageObjects.FlagInfo
GameMap provides simple navigation information e.g. nearest navigation point,
path to specified object
it also integrates AStar algorithm and use it to answer request for get path.
general run to location sets general agent's speed and acceleration for
all runTo commands the default settings are: Speed: 700 Acceleration: 450
therefore you can use those or choose your own settings
returns null, if bot has no weapon, that is better than the one he already holds
according to the distance from the target
returns better weapon, if there is any loaded
NOTE!
Returns cost of the path from startNode to node if the node was touched
by A* algorithm (if A* was successful, then this always contains the goalNode
and every node on the path).
Returns extra cost to add to value when trying to go
nodeFrom to nodeTo ... of course it can depends only on nodeTo
(some special kind of a floor for instance)
Don't worry about the edge cost to become negative, A* ensures that
that the least cost is 0 (Algorithm can't work over graphs with negative
costs.)
GetPath - calls Gamebots GETPATH - returns PTH with specified ID to match
the query properly
takes two parameters location - location the agent want to go to and ID
for matching the queries together
sends GETPATH to Gamebots - that will result with PATH sended back in
PATH will be list of NavPoints and the path will be identified by the ID
specified in this method
obtain path to specified location keeps returning null until path is
received don't forget to initialize it - initializeGetPath should be
called prior this method
sends GETPATH to Gamebots - that will result with PATH sended back in
PATH will be list of NavPoints and the path will be identified by the ID
specified in this method
The problem with Python introspection is, that we can't rely on the
information about the wrapper of the object in stored place
as it can change between two calls of PyObjectAdapter methods.
has better weapon - this magic check goes through weapons in inventory and according to their characteristics
decides which is the best - that means which effectiveDistance is lowest and which maximal distance is big enough
to reach enemy.
Health contains those properties:
Strenght - 5 for HealthVials, 25 for MedKits
Boostable - true for HealthVials - agent health can exceed 100 points
TypeOfHealth - HealthVial | MedKit
History contains a structure which is a compound of couple containers
it is an Array of Container of Set
First level of indexation - TIME - using HistoryBatch as an item in array - see for reference
Second level of indexation - TYPE
Third levet - HashMap - key is ID, value Object
example usage - getSeenMessageObjectsInTime(3,3) - return NavPoints(type = 3) that agent saw
in last 3 end messages (last three batches)
another example - getSeenMessageObjectsInTime(7,5) - return Players(type = 7) that agent
saw in last 5 batches, but their properties will be same during the time,
it doesn't matter that they moved before
HistoryBatch is a class that stores one batch of messages from Gamebots
it therefore has a structure to save them to
it is indexed by type of item and on this index, you can find HashMap with all items
saved at the current batch - so some of them are mostly empty
Special attention should be payed to items without ID, those are stored under fantom ID
which is negative and goes down from -1 to MIN_VALUE of int.
HistoryIterator is an iterator for History
it has two kinds of next and hasNext according to the value of unique
in both cases it iterates through first batch and, after exhausting this one,
proceed to next batch until it reaches the last batch or the specified depth
it iterates only through items of specified type
parametrized init - sets name, team and location, rotation where the bot will spawn
sets as well manualSpawn - identifies whether bot will be spawned manualy or automaticaly after his death
agent initializer obviously initializes agent - it contains all parameters which can be set before agent is spawned into
the environment, so it fills actualy the GB INIT message
line1 == vector(nx, ny, nz), point(a, b, c)
line2 == vector(mx, my, mz), point(u, v, w)
Trying to solve problem for t, r from R:
a + nx * t = u + mx * r
b + ny * t = u + my * r
c + nz * t = u + mz * r
Robust implementation -> trying to compute with the biggest nA / mA
Returns true, if we've reached the goal ... e.g. actualNode
is node we were trying to get to
if this function never returns true, A* will run until
all nodes are evaluated
this class is a database, yet it could be written in XML, but we decided to save parsing of XML and do it this way
anyway, this class stores static HashMap, that includes all known objects in current Unreal Tournament 2004
the key is the object class, atributes are desribing object properties, capabilities etc.
ItemCathegory object contains additional information about item
it is initialized according to information stored in ItemCathegories
it has couple different consturctors depending on the number of
parameters - atributes of the current types of objects
so every object has message type
identifies type of message (WEAPON, AMMO etc.)
In case the delete from batch is of type ITEM, this
field is filled by the parser so the agent know the ItemClass
so it is possible to delete it from batch.
itemClass -
Variable in class cz.cuni.pogamut.MessageObjects.NavPoint
Class of respawn item, "None" if no item is respawning there TODO: NOT
SUPPORTED RIGHT NOW
returns HistoryIterator - entity, which could be used to search history for all
objects of specified type up to specified depth
unique indicates if you need only objects unique according to ID (for true)
or all objects of type (for false), no matter that there will be more of one
object - that could be useful for quessing opponent tactics or some other issues
just makes agent jump, useful as a reflex action when hitting the wall
sometimes agent encounter some obstacles, which could be jumped over
(like girders etc.)
jump() -
Method in interface cz.cuni.pogamut.Client.Commands
Interface to define method which will be used to provide access to agent long-term memory (e.g. last known position of
a player, known items, known nav points, known whatever)
Container for storing known MessageObjects
enables fast access to stored objects via HashMap
its descendants are used in agenMemory - for the implementation of Knowledge interface
constructor requires AgentBody to register listener
knownObjects are used for composition of incoming message from old
message and new (which got set only modified properties) knownObjects
store old objects
KnownObjects store messages necessary for multiple uses
stored messages are used to complete received compressed message
possibly will be used as a part of memory - last player position etc.
Descendant of KnownCathegorizedObjects - store players, keep their data up to date
useful for situations like pursueing enemy, which got hidden behind the corner
Last sent command - if the string in next command is the same, don't send it
works only for MOVE command - it is either not necessary and more good looking to sent it so often
so every 5th is sent
Called only from processRequest(), it will load navpoints
IFF not previously loaded... it will store it to the
this.owner.items
It will also raise the latch in owner ...
... this.owner.itemsLoadedLatch
Called only from processRequest(), it will load navpoints
IFF not previously loaded... it will store it to the
this.owner.navPoints
It will also raise the latch in owner ...
... this.owner.navPointsLoadedLatch
Logger manager is ment to take care about loggers
it is a singleton
when you create new logger - no matter for what object, you
just request new logger from manager
than you can do with it what ever you want - assign handler, logging level etc.
Frequency of evaluation of doLogic - used to count milliseconds for sleep in run()
it is in Hertz, so for example 10 means evaluation every 100 milliseconds
check if the agent is ready to run logic
3 parts:
Memory restart - needs to switch old memories with new ones - check AgentMemory for
more info
Has self - basicaly logic can't run without a clue about at least agent's position
so SELF message is required
Logic paused - necessary for example during usage of manual control - logic sending commands will be quite disturbing
You may want to spawn N bots and wait for their initialization,
if you do so, you may use setLogicStartLatch() method,
which will store the provided CountDownLatch here and
do it before you startAgent().
if memory is restared, it creates a copy of memory and switch it with the obsolete one once it is ready for switch
Switch is called in agent.run() when it is checking, whether memory is restarted or not.
This is called from sendMessageToClient() when message
which should be registered in agent memory is received (== other then
communication info message).
move along 2 locations - should result in more smooth move when following the path
- recommended use = when the agent follows the path to the item for instance, do not move him by runTo
but this method and suply it with next two locations instead of one in the case of runTo
move along 2 nav points (locations) - should result in more smooth move when following the path
- recommended use = when the agent follows the path to the item for instance, do not move him by runTo
but this method and suply it with next two navpoints instead of one in the case of runTo
move continuously to navigation point 1 and then to navigation point - no abrupt movement - just smooth
"MOVE {Location1 X X X} {Location2 X X X} {Speed X}"
NavPoint carries information about Unreal NavPoint - location, reachability,
its neighbours and in case it is respawn point, class of item that respawn.
very basic method for getting healths of strenght greater or equal to
strenght numberOfHealths specifies how many do you want
for more complex and more efficient way of doing this use something else
think about map preprocessing and more efficient methods of search
through the space (than using AStar numerous times)
note, it uses restricted AStar - restricted number of iterations, so it
can find nothing!
very basic method for getting healths of strenght greater or equal to
strenght numberOfHealths specifies how many do you want
for more complex and more efficient way of doing this use something else
think about map preprocessing and more efficient methods of search
through the space (than using AStar numerous times)
note, it uses restricted AStar - restricted number of iterations, so it
can find nothing!
very basic method for getting restricted number of closest items of
specified type
for more complex and more efficient way of doing this use something else
think about map preprocessing and more efficient methods of search
through the space (than using AStar numerous times)
note, it uses restricted AStar - restricted number of iterations, so it
can find nothing!
very basic method for getting restricted number of closest items of
specified type
for more complex and more efficient way of doing this use something else
think about map preprocessing and more efficient methods of search
through the space (than using AStar numerous times)
note, it uses restricted AStar - restricted number of iterations, so it
can find nothing!
Finds nearest navPoint - presume that the agent doesn't see any, so it
uses this unefficient method
counts only those in bigger distance than specified
needs Triple from as a parameter
Finds nearest navPoint - presume that the agent doesn't see any, so it
uses this unefficient method
counts only those in bigger distance than specified
needs Triple from as a parameter
nodes -
Variable in class cz.cuni.pogamut.MessageObjects.Path
array of nodes, if bot walks from current position through sequence of these NavPoints, it will arrive to the destination
Note, that reachable is not valid in these NavPoints
Path is an object to store information from Gamebots message PATH
it contains an array of navPoints that leads to the goal point
PATHs are stored in GameMap
This class encapsulate work with paths during navigation
so it is on one place and it is clearer what is going on with them
1) call either retrievePathGB() or retrievePathAStart()
2) check it's result ... if PATH_FOUND then use getPath() to get found path
3) When the path is successfully retrieved, you may then call runAlongPath() method.
Creates a new instance of PathManager, body is passed so the PathManager may hook
a listener to sniff PATH messages and SPAWN messages (to know when to restart itself)
and issue commands.
types of path, path manager is requiring path depending on the path type from GB or from built-in A*
of course when A* is disabled, path manager will use GB for all cases
Contains information about other players in the game, like their current
velocity, position, weapon and rechablity
Another character (bot or human) in the game.
prepare logic according to information from gathered from startCommunication
like choosing plan/parameters according to game type
note that you still can't send any messages to gamebots (like CONF etc.)
parse name of the item from class, then exploit information from
databasis stored in ItemCathegories and use those to create proper item
object new message is then returned and fired as an event, so you can
register listener for ADD_WEAPON etc.
parse name of the item from class, then exploit information from
databasis stored in ItemCathegories and use those to create proper item
object new message is then returned and fired as an event, so you can
register listener for ADD_WEAPON etc.
parse name of the item from class, then exploit information from
databasis stored in ItemCathegories and use those to create proper item
object new message is then returned and fired as an event, so you can
register listener for WEAPON etc.
This class is wrapper for PyObject which probes the PyObject
for it's type and accessibility and provides methods neccessary
for introspection of the PyObject
If you want to extend the number of classes the Python introspection
accepts, than simply create class PyNewClassWrapper extends PyObjectWrapper
and add it to a PyObjectAdapater.probeObject() body.
This absract class is used for anonymous classes which decribes
where the PyObject lies (it's owner), when we do set() on the
property we have to know where to write the new value.
Factory object that is registered through SPI standard and creates
PythonEngineScriptProxy if it is asked to create proxy for
com.sun.script.jython.JythonScriptEngine engine.
listener for events - handels incomming messages
ADD_AMMO - add collected ammo to inventory
ADD_WEAPON - add weapon to inventory
ADD_SPECIAL - nothing yet, place to add whatever developper needs
SELF - correction of current ammo and current weapon - when bot fires it is no other way
to find out how much ammo he has left
CHANGED_WEAPON - bot changed weapon - reflect it to inventory
receiveMessage is a listener method that listens to AgentBody
which receives messages from Parser and thus raise Event RcvMsgEvent
there I distinguish end message from other messages!!!
messages got processed only with navPoint setted
otherwise those are sended during the game so they could be fallen from
somebody or thrown by somebody and so agent should not remember them
Class which connects to GameBots and awaits new clients.
===================================
RemoteParser for Pogamut 2 Platform
===================================
RemoteParser is meant to save the network traffic between GameBot and Client.
request test on reachability of the target from the location, ID is for matching a query with a result
"CHECKREACH {Id X} {Target UnrealId} {From X X X}"
request test on reachability of the target from the location, ID is for matching a query with a result
"CHECKREACH {Id X} {Location X X X} {From X X X}"
restarts variables, which became invalid after the agent got killed
therefore erase myHistory and myInventory
according to synchronization issues switching is used
how it works:
- memory creates new instances of history and inventory (the rest don't need synchronization)
- when agent's logic ends current interation, it checks if it is ready to run again
and call switchMemories()
- when the memories are switched - new are on their place, it waits for the first SELF message
and let logic do its work again
method to follow smoothly desired path - list of navigation points
obtained from game map can handle movers - wait on it until top and leave
note that movers in the way are in this fashion: - LiftExit -> LiftCenter
-> LiftExit so as agent is supposed to go up when he is supposed to go to
LiftCenter (therefore is around first LiftExit) he waits for mover to be
about his level and then goes on it, wait to level with second LiftExit
and move on
method to follow smoothly desired path - list of navigation points
obtained from game map can handle movers - wait on it until top and leave
note that movers in the way are in this fashion: - LiftExit -> LiftCenter
-> LiftExit so as agent is supposed to go up when he is supposed to go to
LiftCenter (therefore is around first LiftExit) he waits for mover to be
about his level and then goes on it, wait to level with second LiftExit
and move on
method to follow smoothly desired path - list of navigation points
obtained from game map can handle movers - wait on it until top and leave
note that movers in the way are in this fashion: - LiftExit -> LiftCenter
-> LiftExit so as agent is supposed to go up when he is supposed to go to
LiftCenter (therefore is around first LiftExit) he waits for mover to be
about his level and then goes on it, wait to level with second LiftExit
and move on
run around items in the map is a complex method which covers behavior
which runs around the map according to specified list of items, it works
in the following fashion:
1) nextItem == null => shuffle itemsToRunAround, choose first one
2) path == null => obtain path 3) run along the path 4) if
the run along fails or if bot reaches the item, switch to next on
run around items in the map is a complex method which covers behavior
which runs around the map according to specified list of items, it works
in the following fashion:
1) nextItem == null => shuffle itemsToRunAround, choose first one
2) path == null => obtain path 3) run along the path 4) if
the run along fails or if bot reaches the item, switch to next on
This class shouldn't be altered or instancied - it's only example / template
where you can learn how to implement runnable classes and what is a good practice
when doing so.
safely navigates agent to the location of choosen item (could be
anywhere). moreover you can set the distance at which agent will stop
when reaching last point of the path (by setting
GameMapSettings.lastNavigationPointOfPathPrecision) it should be I think
at least 5 as I think it is not guaranteed that bots moves precisely.
safely navigates agent to the location of choosen item (could be
anywhere). moreover you can set the distance at which agent will stop
when reaching last point of the path (by setting
GameMapSettings.lastNavigationPointOfPathPrecision) it should be I think
at least 5 as I think it is not guaranteed that bots moves precisely.
search through known navigation points (received at the beginning of the connection)
and if the navpoint has itemID not equal to 0, get the item, set its properties and fire event
get ArrayList of Ammos from myHistory - they are stored here as MessageObjects
so I do overtyping for all objects
when there is nothing yet stored - returns empty ArrayList!
get ArrayList of Armors from myHistory - they are stored here as MessageObjects
so I do overtyping for all objects
when there is nothing yet stored - returns empty ArrayList!
get ArrayList of Healths from myHistory - they are stored here as MessageObjects
so I do overtyping for all objects
when there is nothing yet stored - returns empty ArrayList!
get ArrayList of Items from myHistory - they are stored here as MessageObjects
so I do overtyping for all objects
when there is nothing yet stored - returns empty ArrayList!
get ArrayList of Movers from myHistory - they are stored here as MessageObjects
so I do overtyping for all objects
when there is nothing yet stored - returns empty ArrayList!
get ArrayList of NavPoints from myHistory - they are stored here as MessageObjects
so I do overtyping for all objects
when there is nothing yet stored - returns empty ArrayList!
get ArrayList of Players from myHistory - they are stored here as MessageObjects
so I do overtyping for all objects
when there is nothing yet stored - returns empty ArrayList!
get ArrayList of Weaponss from myHistory - they are stored here as MessageObjects
so I do overtyping for all objects
when there is nothing yet stored - returns empty ArrayList!
This accepts java class instance which is proper for the
object it wrappes - it uses wrapper.getNewValue() for
obtaining the PyObject representation of the java object
and then it uses place.set() to insert the new value to
it's correct place in another python object.
This is called at the beggining of the A* algorithm to bind the close list
to the goal (you may use it check which nodes we've visited, etc... for
extra cost for instance).
You may want to spaw N bots and wait for their initialization,
if you do so, you may use this method which will store the provided CountDownLatch here.
This is called at the beggining of the A* algorithm to bind the open list
to the goal (you may use it check which nodes we've visited, etc... for
extra cost for instance).
agent start to shoot at location using alternate fire - target is
optional, if it is provided server provides aim correction, so this
method is without aim correction
start demo recording, it will be saved to the file with specified fileName
the file will be located at the same machine as the server of the game
for remote server use FTP (for instance) to get it
strafe is like RUNTO, but you move towards a destination while facing
another point/object whereToGo is for location agent is running to,
whereToStrafeTo is for location to face to
strafe is like RUNTO, but you move towards a destination while facing
another point/object whereToGo is for location agent is running to,
whereToStrafeTo is for location to face to
strafe is like RUNTO, but you move towards a destination while facing
another point/object whereToGo is for location agent is running to,
target is for target to face to
To test, whether Ammo of type is suitable for one of collected weapons
it is not AddAmmo, because we want to know it for ammo which is still on the floor
This object causes the timer's task execution thread to exit
gracefully when there are no live references to the Timer object and no
tasks in the timer queue.
trace - emit ray from the place where agent stands from about "1.5m" height to specified location
trace will return true, if it hits anything
"TRACE {Id X} {To X X X} {TraceActors True}"
Trace notification message
contains:
ID: id of the trace query
from: location from which the ray is emitted
to: location to which the ray is sended
result: true if it hit something, false if not
hitNormal: normal vector to the trace ray in the point of hit
hitId: id of hitted actor
hitLocation: point of the hit
asynchronous message
Trace() -
Constructor for class cz.cuni.pogamut.MessageObjects.Trace
Triple implemets triple of double - used in representation of location, rotation, velocity
Triple has couple handy methods like add, substract, distance (in 2D and in 3D) which
are usefull while designing agent in complex virtual environment
Turn agent around (Yaw) - amount is in degrees not in UT units where 360 degrees is 65535 UT units
"ROTATE {Axis Horizontal} {Amount X}" - X should be correct according to conversion between degrees and UT units
Turn agent around (Pitch) - amount is in degrees not in UT units where 360 degrees is 65535 UT units
"ROTATE {Axis Vertical} {Amount X}" - X should be correct according to conversion between degrees and UT units
Update needs known objects to substitute delta-compressed NavPoints
Path is composed of full NavPoints and NavPoints with only ID
(those compressed agent already encountered, so it is not necessary to send
all information again)
so I replace compressed navs with their full version obtained from KnownObjects
Representation of the UTServer, runs it own thread
and manages CONNECTION / RECONNECTION / KEEP ALIVE / COMMUNICATION
Work of the thread is based on requests that are stored in the
queue and executed accordinaly.
We're counting with a certain precision epsilon, that means
... 2 vertices which are closer then epsilon are counted as 1
... what if distance of 2 vertices is 1,5 epsilon and there is
third vertex in the middle?
We're counting with a certain precision epsilon, that means
... 2 vertices which are closer then epsilon are counted as 1
... what if distance of 2 vertices is 1,5 epsilon and there is
third vertex in the middle?