Getting Started

Pyxen is a game programming studio for iPad. You write Python, and Pyxen runs it as a real game with sprites, collision, audio, and input.

Creating a project

When you open Pyxen, you see your documents. Tap New Project to create a .pyxen file. This is your game — a single file that contains your code, images, and sounds. You can rename it, duplicate it, or move it like any other file on your iPad.

Projects live in the Files app and work with iCloud. There is no account and no cloud service — your files are yours.

Writing your first game

Every Pyxen game has two functions:

def start():
    # runs once when the game starts
    world.spawn(name="player", x=160, y=90, sprite=Sprite("hero"))

def update():
    # runs every frame (30 times per second)
    player = world.get(name="player")
    if input.keyboard.right.down:
        player.x += 2

start() sets up your world — spawn entities, place them, assign sprites. update() runs the game logic — read input, move things, check collisions.

That’s the entire structure. There is no main loop to write, no boilerplate. Pyxen calls start() once, then update() every frame.

Running your game

Tap the Play button to run your game. Your code compiles and the game starts immediately in the player view. If there’s an error, Pyxen shows it with the line number.

You can stop the game at any time and go back to editing. Changes take effect the next time you press Play.

Next steps