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 pystk2.GraphicsConfig
SuperTuxKart graphics configuration.
- static hd() pystk2.GraphicsConfig
High-definitaiton graphics settings
- static ld() pystk2.GraphicsConfig
Low-definition graphics settings
- static none() pystk2.GraphicsConfig
Disable graphics and rendering
- static sd() pystk2.GraphicsConfig
Standard-definition graphics settings
- property animated_characters bool property
Animate characters
- property bloom bool property
Enable the bloom effect
- property degraded_IBL bool property
Disable specular IBL
- property display_adapter int property
GPU to use (Linux only)
- property dof bool property
Depth of field effect
- property dynamic_lights bool property
Enable dynamic lighting
- property glow bool property
Enable glow around pickup objects
- property high_definition_textures int property
Enable high definition textures 0 / 2
- property light_shaft bool property
Enable light shafts
- property mlaa bool property
Enable anti-aliasing
- property motionblur bool property
Enable motion blur
- property particles_effects int property
Particle effect 0 (none) to 2 (full)
- property render bool property
Is rendering enabled?
- property screen_height int property
Height of the rendering surface
- property screen_width int property
Width of the rendering surface
- property ssao bool property
Enable screen space ambient occlusion
- property texture_compression bool property
Use texture compression
- pystk2.init(config: pystk2.GraphicsConfig) None
Initialize Python SuperTuxKart - this will download the game assets if not already done. Only call this function once per process. Calling it twice will cause a crash.
- pystk2.clean() None
Free Python SuperTuxKart, call this once at exit (optional). Will be called atexit otherwise.