Getting Started

Pyxen is a game-making studio for iPad and Mac. You write Pyxen Script, a Python dialect made for games, and Pyxen runs it as a real game with sprites, collision, audio, and input.

Creating a project

The first time you open Pyxen, a small game is already open and ready to Run: change a line, run it again, and see what changed. It isn’t saved until you save it.

New Project opens a short setup: the project’s name, what you start from (Simple, a small game that already runs, and its Guide; or Empty, just a main.py that writes “Hello, world” to the console), a palette that recolours it, and the screen size. Create opens the game, ready to Run. The next New Project starts from the one you made last.

A project is a .pyxen file: your code, images, and sounds in one file that you can rename, duplicate, or move like any other.

Projects work with iCloud. An account is optional, and 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

Choose Run in the toolbar (⌘R) to run your game. Your code is checked and compiled, and the game starts in the Preview. If there’s an error, Pyxen shows it at its line.

Choose Stop (⌘.) at any time. When you change the code while the game runs, the Preview says Code changed · Reload.

Next steps