Graphics Setup

Before you can use pystk you need to setup the OpenGL rendering engine and graphics settings. There are three default settings GraphicsConfig::ld (lowest), GraphicsConfig::sd (medium), GraphicsConfig::hd (high). Depending on your graphics hardware each setting might perform slightly differently (ld fastest, hd slowest). To setup pystk call:

pystk.init(pystk.GraphicsConfig.hd())
# Only call init once per process
... # use pystk
pystk.clean() # Optional, will be called atexit
# Do not call pystk after clean
class pystk.GraphicsConfig

SuperTuxKart graphics configuration.

static hd() pystk.GraphicsConfig

High-definitaiton graphics settings

static ld() pystk.GraphicsConfig

Low-definition graphics settings

static none() pystk.GraphicsConfig

Disable graphics and rendering

static sd() pystk.GraphicsConfig

Standard-definition graphics settings

property animated_characters bool

Animate characters

property bloom bool

Enable the bloom effect

property degraded_IBL bool

Disable specular IBL

property display_adapter int

GPU to use (Linux only)

property dof bool

Depth of field effect

property dynamic_lights bool

Enable dynamic lighting

property glow bool

Enable glow around pickup objects

property high_definition_textures int

Enable high definition textures 0 / 2

property light_shaft bool

Enable light shafts

property mlaa bool

Enable anti-aliasing

property motionblur bool

Enable motion blur

property particles_effects int

Particle effect 0 (none) to 2 (full)

property render bool

Is rendering enabled?

property screen_height int

Height of the rendering surface

property screen_width int

Width of the rendering surface

property ssao bool

Enable screen space ambient occlusion

property texture_compression bool

Use texture compression

pystk.init(config: pystk.GraphicsConfig) None

Initialize Python SuperTuxKart. Only call this function once per process. Calling it twice will cause a crash.

pystk.clean() None

Free Python SuperTuxKart, call this once at exit (optional). Will be called atexit otherwise.