Skip to content

Commit

Permalink
Updated docs
Browse files Browse the repository at this point in the history
  • Loading branch information
mwydmuch committed Nov 14, 2018
1 parent 3425d4b commit ea2276e
Show file tree
Hide file tree
Showing 5 changed files with 96 additions and 11 deletions.
37 changes: 30 additions & 7 deletions doc/Changelog.md
@@ -1,10 +1,35 @@
# Changelog

## Changes in 1.1.7

#### Python & Julia
- Added missing `is_multiplayer_game` method to Python and Julia binding.

#### CVARS
- Added `VIEW_HEIGHT`, `CAMERA_POSITION_X`/`Y`/`Z`, `CAMERA_ANGLE`, `CAMERA_PITCH`, `CAMERA_ROLL` and `CAMERA_FOV` GameVariables.


## Changes in 1.1.6

#### Julia specific
- Julia binding added.

#### Server state
- Added `getServerState` method that returns `ServerState` object.

#### Mutliplayer
- Added timeout for network game synchronization controlled by `viz_connect_timeout` CVAR.
- Fixed `viz_spectator` CVAR.

#### Python specific
- Added Python interpreter version check.


## Changes in 1.1.5

#### Automap
- Added `viz_am_scale` CVAR (CVAR version of `am_scale` CCMD)
- Added `viz_am_center` CVAR (and `am_center` CCMD)
- Added `viz_am_scale` CVAR (CVAR version of `am_scale` CCMD).
- Added `viz_am_center` CVAR (and `am_center` CCMD).

#### Buttons and actions
- **Added `getButton` method.**
Expand All @@ -29,8 +54,6 @@
- Fixed minor rendering issue in depth and labels buffer.
- Fixed order of color values in `RGB/BGR` modes of `ScreenFormat`.

#### Other
- Added `getServerState` method.

## Changes in 1.1.4

Expand All @@ -52,15 +75,15 @@
- Added `viz_ignore_render_mode` CVAR which disables overriding rendering settings.

#### GameVariables
- **Added `ANGLE`, `PITCH`, `ROLL`, `VELOCITY_X/Y/Z` GameVariables.**
- **Added `ANGLE`, `PITCH`, `ROLL`, `VELOCITY_X`/`Y`/`Z` GameVariables.**

#### Missing config keys
- Added support for `DEATHCOUNT`, `USER31` - `USER60`, `PLAYER_NUMBER`, `PLAYER_COUNT`, `PLAYER1_FRAGCOUNT` - `PLAYER16_FRAGCOUNT`, `POSITION_X/Y/Z` GameVariables in the config file.
- Added support for `DEATHCOUNT`, `USER31` - `USER60`, `PLAYER_NUMBER`, `PLAYER_COUNT`, `PLAYER1_FRAGCOUNT` - `PLAYER16_FRAGCOUNT`, `POSITION_X`/`Y`/`Z` GameVariables in the config file.
- Added support for `ALTATTACK` Button in the config file.

#### Java specific
- Fixed `makeAction`.
- Added missing `POSITION_X/Y/Z` Game Variables.
- Added missing `POSITION_X`/`Y`/`Z` Game Variables.

#### Python specific
- Added manual GIL management for better performance when used with Python threads.
Expand Down
50 changes: 49 additions & 1 deletion doc/DoomGame.md
Expand Up @@ -7,6 +7,8 @@
* [replayEpisode](#replayEpisode)
* [isRunning](#isRunning)
* [isMultiplayerGame](#isMultiplayerGame)
* [isRecordingEpisode](#isRecordingEpisode)
* [isReplayingEpisode](#isReplayingEpisode)
* [setAction](#setAction)
* [advanceAction](#advanceAction)
* [makeAction](#makeAction)
Expand All @@ -16,6 +18,7 @@
* [respawnPlayer](#respawnPlayer)
* [sendGameCommand](#sendGameCommand)
* [getState](#getState)
* [getServerState](#getServerState)
* [getLastAction](#getLastAction)
* [getEpisodeTime](#getEpisodeTime)

Expand Down Expand Up @@ -200,6 +203,34 @@ Added in 1.1.2
Checks if the game is in multiplayer mode.


---
### <a name="isRecordingEpisode"></a> `isRecordingEpisode`

| C++ | `bool isRecordingEpisode()` |
| :-- | :-- |
| Lua | `boolean isRecordingEpisode()` |
| Java | `boolean isRecordingEpisode()` |
| Python | `bool is_recording_episode()` |

Added in 1.1.5

Checks if the game is in recording mode.


---
### <a name="isReplayingEpisode"></a> `isReplayingEpisode`

| C++ | `bool isReplayingEpisode()` |
| :-- | :-- |
| Lua | `boolean isReplayingEpisode()` |
| Java | `boolean isReplayingEpisode()` |
| Python | `bool is_replaying_episode()` |

Added in 1.1.5

Checks if the game is in replaying mode.


---
### <a name="setAction"></a> `setAction`

Expand Down Expand Up @@ -324,12 +355,29 @@ See also: [ZDoom Wiki](http://zdoom.org/wiki/Console)
Changed in 1.1.0

Returns [`GameState`](Types.md#gamestate) object with the current game state.
If the game is not running or the current episode is finished `nullptr/null/None` will be returned.
If the current episode is finished `nullptr/null/None` will be returned.

See also:
- [`Types: GameState`](Types.md#gamestate)


---
### <a name="getServerState"></a> `getServerState`

| C++ | `ServerStatePtr (std::shared_ptr<ServerState>) ServerState getServerState()` |
| :-- | :-- |
| Lua | `ServerState getServerState()` |
| Java | `ServerState getServerState()` |
| Python | `ServerState get_state_state()` |

Added in 1.1.6

Returns [`ServerState`](Types.md#serverstate) object with the current server state.

See also:
- [`Types: ServerState`](Types.md#serverstate)


---
### <a name="getLastAction"></a> `getLastAction`

Expand Down
17 changes: 16 additions & 1 deletion doc/Types.md
Expand Up @@ -2,6 +2,7 @@

* [Label](#label)
* [GameState](#gamestate)
* [ServerState](#serverstate)
* [Enums](#enums)
* [Mode](#mode)
* [ScreenFormat](#screenformat)
Expand Down Expand Up @@ -76,14 +77,20 @@ See also:


---
#### <a name="delta-buttons"></a> ServerInfo
#### <a name="serverstate"></a> `ServerState`
(`C++ type / Lua type / Java type / Python type` **name**)

- `unsigned int / number / unsigned int / int` **tic**
- `unsigned int / number / unsigned int / int` **playerCount / player_count**
- `bool[] / table / boolean[] / list` **playersInGame / players_in_game**
- `int[] / table / int[] / list` **playersFrags / players_frags**
- `std::string[] / table / String[] / list` **playersNames / players_names**
- `bool[] / table / boolean[] / list` **playersAfk / players_afk**
- `unsigned int[] / table / unsigned int[] / list` **playersLastActionTic / players_last_action_tic **
- `unsigned int[] / table / unsigned int[] / list` **playersLastKillTic / players_last_kill_tic **

Right now `ServerInfo` is only available to C++ and Python.
Added in 1.1.6.

## <a name="enums"></a> Enums

Expand Down Expand Up @@ -241,9 +248,17 @@ Enum type that defines all variables that can be obtained from the game.
- **ANGLE** - Orientation of the player, not available if `viz_nocheat` is enabled.
- **PITCH**
- **ROLL**
- **VIEW_HEIGHT** - View high of the player, not available if `viz_nocheat` is enabled. Position of the camera in Z axis is equal to **POSITION_Z** + **VIEW_HEIGHT**.
- **VELOCITY_X** - Velocity of the player, not available if `viz_nocheat` is enabled.
- **VELOCITY_Y**
- **VELOCITY_Z**
- **CAMERA_POSITION_X** - Position of the camera, not available if `viz_nocheat` is enabled.
- **CAMERA_POSITION_Y**
- **CAMERA_POSITION_Z**
- **CAMERA_ANGLE** - Orientation of the camera, not available if `viz_nocheat` is enabled.
- **CAMERA_PITCH**
- **CAMERA_ROLL**
- **CAMERA_FOV** - Field of view in degrees, not available if `viz_nocheat` is enabled.
- **PLAYER_NUMBER** - Player's number in multiplayer game.
- **PLAYER_COUNT** - Number of players in multiplayer game.
- **PLAYER1_FRAGCOUNT** - **PLAYER16_FRAGCOUNT** - Number of N player's frags
Expand Down
2 changes: 1 addition & 1 deletion examples/python/README.md
@@ -1,4 +1,4 @@
> For the examples to work properly you need to install ViZDoom [system-wide with pip](https://github.com/mwydmuch/ViZDoom/blob/master/doc/Building.md) or set doom_game_path and vizdoom_path manually or in config files.
> For the examples to work properly you need to install ViZDoom [system-wide with pip](https://github.com/mwydmuch/ViZDoom/blob/master/doc/Building.md) or create a link to dir with ViZDoom pip_package or set doom_game_path and vizdoom_path manually or in config files.
# Troubleshooting
* `SystemError: dynamic module not initialized properly` may mean that you are trying the run an example using python3 instead of python2.
Expand Down
1 change: 0 additions & 1 deletion examples/python/cig_multiplayer_host.py
Expand Up @@ -64,5 +64,4 @@
# Use this to respawn immediately after death, new state will be available.
game.respawn_player()

game.get_game
game.close()

0 comments on commit ea2276e

Please sign in to comment.