Pyxen Scripting Reference

Welcome to the Pyxen scripting API reference.

For concepts and tutorials, see the documentation.


Modules

ModuleDescription
worldEntity lifecycle and queries
inputKeyboard, mouse, touch, gamepads
screenScreen dimensions
timeFrame timing
logDebug logging

Types

TypeDescription
EntityLightweight handle for game objects
CameraView and projection control
GridBodyGrid-based collision body
GridMapTile grid container
SpriteRenderable image
SoundShort audio clip (WAV)
MusicStreamed audio track (OGG)

Quick Example

player = world.spawn(
    name="player",
    sprite=Sprite("hero"),
    x=32, y=32
)
player.health = {'value': 100}

for e in world.all("health"):
    e.health.value -= 1

world.destroy(player)