GameState¶
GameState is the main object returned by DoomGame::getState method.
The declarations of all the enums can be found in the include/ViZDoomTypes.h header file.
GameState¶
(C++ type / Python type name)
unsigned int / intnumberunsigned int / intticstd::vector<float> / numpy.double[] | NonegameVariables / game_variablesImageBufferPtr / numpy.uint8[] | NonescreenBuffer / screen_bufferImageBufferPtr / numpy.uint8[] | NonedepthBuffer / depth_bufferImageBufferPtr / numpy.uint8[] | NonelabelsBuffer / labels_bufferImageBufferPtr / numpy.uint8[] | NoneautomapBuffer / automap_bufferAudioBufferPtr / numpy.int16[] | NoneaudioBuffer / audio_bufferstd::string / str | NoneNotificationsBuffer / notifications_bufferstd::vector<Label> / list | Nonelabels / labelsstd::vector<Objects> / list | Noneobjects / objectsstd::vector<Sectors> / list | Nonesectors / sectors
number - number of the state in the episode. tic - ingame time, 1 tic is 1/35 of second in the game world. Note: added in 1.1.1. labels, objects, sectors - note: added in 1.1.8. audioBuffer / audio_buffer - note: added in 1.1.9. NotificationsBuffer / notifications_buffer - note: added in 1.3.0.
See also:
Types used only in C++¶
Buffer (std::vector<uint8_t>)ImageBufferPtr (std::shared_ptr<Buffer>)GameStatePtr (std::shared_ptr<GameState>)
Structures¶
Label¶
(C++ type / Python type name)
unsigned int / intobjectId / object_idstd::string / strobjectName / object_namestd::string / strobjectCategory / object_categoryuint8_t / intvalueunsigned int / intxunsigned int / intyunsigned int / intwidthunsigned int / intheightdouble / floatobjectPositionX / object_position_xdouble / floatobjectPositionY / object_position_ydouble / floatobjectPositionZ / object_position_zdouble / floatobjectAngle / object_angledouble / floatobjectPitch / object_pitchdouble / floatobjectRoll / object_rolldouble / floatobjectVelocityX / object_velocity_xdouble / floatobjectVelocityY / object_velocity_ydouble / floatobjectVelocityZ / object_velocity_z
Description of the object in the labels buffer.
objectId / object_id - unique object ID, if both Labels and Objects information is enabled, this will be the same as id in corresponding Object.
objectName / object_name - ingame object name, many different objects can have the same name (e.g. Medikit, Clip, Zombie).
objectCategory / object_category - category of the object (e.g. “Monster”, “Weapon”, “Player”). Category “Self” is assigned to current player. The category assignment may not be accurate, especcialy for custom objects and WADs other than Freedoom/Doom. Note: added in 1.3.0.
value - value that represents this particular object in labelsBuffer.
x, y, width, height - describes bounding box of this particular object in labelsBuffer. Note: added in 1.1.5.
See also:
Object¶
(C++ type / Python type name)
unsigned int / intidint / intsectorId / sector_idstd::string / strnamestd::string / strcategorydouble / floatpositionX / position_xdouble / floatpositionY / position_ydouble / floatpositionZ / position_zdouble / floatangledouble / floatpitchdouble / floatrolldouble / floatvelocityX / velocity_xdouble / floatvelocityY / velocity_ydouble / floatvelocityZ / velocity_z
Description of the object present in the game world.
id - unique object ID. This is the value referenced by Label.objectId / object_id.
name - ingame object name, many different objects can have the same name (e.g. Medikit, Clip, Zombie).
category - category of the object (e.g. “Monster”, “Weapon”, “Player”). Category “Self” is assigned to current player. The category assignment may not be accurate, especcialy for custom objects and WADs other than Freedoom/Doom. Note: added in 1.4.0.
sectorId / sector_id - ID of the sector the object currently belongs to (same as corresponding Sector.id). Note: added in 1.4.0.
See also:
Note: added in 1.1.8.
Line¶
(C++ type / Python type name)
double / floatx1double / floaty1double / floatx2double / floaty2bool / boolisBlocking / is_blocking
Description of the line that is part of a sector definition.
x1, y1 - position of the line’s first vertex.
x2, y2 - position of the line’s second vertex.
isBlocking / is_blocking - is true, if line is a wall that can’t be passed.
See also:
Note: added in 1.1.8.
Sector¶
(C++ type / Python type name)
unsigned int / intiddouble / floatfloorHeight / floor_height - Note: before 1.4.0 the value of floorHeight was inverted (negative). The bug was fixed in 1.4.0.double / floatceilingHeight / ceiling_heightstd::vector<Line> / listlines
Description of the sector, part of the map with the same floor and ceiling height.
id - unique sector ID. This is the value referenced by Object.sectorId / sector_id. Note: added in 1.4.0.
floorHeight / floor_height - height of the sector’s floor.
ceilingHeight / ceiling_height - height of the sector’s ceiling.
lines - contains list of line segments, that forms sector.
See also:
Note: added in 1.1.8.
ServerState¶
(C++ type / Python type name)
unsigned int / intticunsigned int / intplayerCount / player_countbool[] / listplayersInGame / players_in_gameint[] / listplayersFrags / players_fragsstd::string[] / listplayersNames / players_namesbool[] / listplayersAfk / players_afkunsigned int[] / list**playersLastActionTic / players_last_action_tic **unsigned int[] / list**playersLastKillTic / players_last_kill_tic **
ServerState is the main object returned by DoomGame::getServerState method, and it purpose is to get more information about the state of the multi-player game.
See also:
Note: added in 1.1.6.