Utilities

Here we document the helpers functions that are not part of any object. They mostly help to deal with conversion of Doom’s engine types.

Time conversion functions

doom_tics_to_ms(doom_tics: float, fps: int = 35) float

Calculates how many tics will be made during given number of milliseconds.

Note: changed in 1.1.0

ms_to_doom_tics(doom_tics: float, fps: int = 35) float

Calculates the number of milliseconds that will pass during specified number of tics.

Note: changed in 1.1.0

doom_tics_to_sec(doom_tics: float, fps: int = 35) float

Calculates how many tics will be made during given number of seconds.

Note: added in 1.1.0

sec_to_doom_tics(doom_tics: float, fps: int = 35) float

Calculates the number of seconds that will pass during specified number of tics.

Note: added in 1.1.0

Doom fixed point conversion functions

doom_fixed_to_float(*args, **kwargs)

Overloaded function.

  1. doom_fixed_to_float(doom_fixed: int) -> float

Converts fixed point numeral to a floating point value. Doom engine internally use fixed point numbers. If you assign fixed point numeral to USER1 - USER60 GameVariables, you can convert them to floating point by using this function.

  1. doom_fixed_to_float(doom_fixed: float) -> float

Converts fixed point numeral to a floating point value. Doom engine internally use fixed point numbers. If you assign fixed point numeral to USER1 - USER60 GameVariables, you can convert them to floating point by using this function.

Button functions

is_binary_button(button: vizdoom.Button) bool

Returns True if Button is binary button.

is_delta_button(button: vizdoom.Button) bool

Returns True if Button is delta button.