How to Read the Docs

A guide on how to navigate and understand the Kraken Engine documentation.

The documentation is organized into three sections:

  • Manual: Information like constants, implicit conversions, and more.
  • Classes: Detailed documentation of all classes available in Kraken, including their methods and properties.
  • Functions: Comprehensive list of all functions provided by Kraken.

Note:

We like to use "kn" as the common alias for the PyKraken module throughout the documentation.

For nearly every class, you can write them in code as kn.[ClassName]. If a class cannot be accessed directly from kn, the documentation will specify which submodule it belongs to, and you can write it as kn.[submodule_name].[ClassName]. For example, the "Capsule" tab under the "Classes" section documents the kn.Capsule class, whereas the "MotorJoint" class is to be accessed as kn.physics.MotorJoint.

Just below the class description, you'll often find a list of constructor signatures. These show you how to instantiate the class with different parameters. For example, the "InputAction" class has five different constructors, one of which being InputAction(gamepad_button: GamepadButton, slot: int = 0).

Meaning, the input action class can be instantiated as such:

# 'X' button on an Xbox controller,
# assigned to the second connected controller
input_action = kn.InputAction(kn.C_WEST, slot=1)

The "Functions" section is organized a little differently. The name of the sections correspond to the submodule where the functions are located. For example, the "mouse" section has a function called "is_pressed", which you can call in code as kn.mouse.is_pressed().