Getting Started

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

Pyxen comes in two editions. From pyxen.com/download: Pyxen for Mac and Pyxen for Windows, unlocked with the full licence, one key for 2 computers, and kept up to date by Pyxen itself. From the App Store: Pyxen for iPad and Mac, unlocked with your Apple Account. Each new version comes to pyxen.com first, and to the App Store once Apple has reviewed it. Both open the same projects; install one edition at a time.

In your browser, pyxen.com/app opens Pyxen with nothing to install: a free trial on a computer. Your projects stay in that browser; download them any time.

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.

On Home, Start from a game shows the thirteen starters, each with its cover and what you do in it. Pick one and New Project opens with that game chosen: its art, palette, screen size and what it can include are that game’s. It opens unsaved.

New Project opens a short setup, and Create opens the game it makes, ready to Run.

Start from a starter: Simple, Runner, Rhythm, Clicker, Mini Golf, Match-3, Platformer, Brick Breaker, Shooter, Adventure, Tower Defense, Puzzle, Card battler or Farming. Each is a small game that already runs, its verb under its cover. The newest six: Rhythm has you press the arrows as the notes land, in time with a song you can’t fail; Match-3 swaps two neighbours to line up three of a kind, across three levels; Card battler draws five cards a turn to beat three foes, with a card to pick after each fight; Mini Golf is nine holes to putt through: drag back and let go, and draw holes of your own in holes.py; Tower Defense builds towers beside the path to hold the gate through ten waves, the path and the waves drawn in letters; and Farming, where you plant, water and sell. Or start from Empty: just a main.py that writes “Hello, world” to the console. The next New Project starts from the one you made last.

Pick how it looks: five art styles.

Pick a palette that recolours it, and the screen size.

Include adds mechanics if you want them: each adds a file of code you can read and a few commented lines in main.py.

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

On the Mac and on Windows, a project can also be a folder of plain files (see Projects & Assets).

On the Mac and the iPad, 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.

Pyxen on Windows

Pyxen on Windows is the same app, with Windows’ keys and menus. Where the help names a Mac key, press Ctrl for Cmd (⌘), Alt for Option (⌥), Enter for Return and Backspace for Delete: Run is Ctrl+R. A few are Windows’ own:

Updates

Pyxen from pyxen.com keeps itself up to date. The second time you open it, it asks whether to check for updates automatically: choose Check Automatically, and it looks once a day and says something only when a new version is out. Help › Check for Updates… looks now. When one is out, Install and Relaunch closes Pyxen, installs it and opens it again; Remind Me Later and Skip This Version leave it for now. Nothing is downloaded before you choose to install, and Pyxen installs an update only once its signature is checked.

Next steps