Code Editor & Player
Pyxen combines a code editor and a game player in the same screen. You write Python on one side and play your game on the other.
Code editor
The editor supports Python syntax highlighting and shows errors inline when your code fails to compile. You can tap any error to jump to the relevant line.
On iPad with a hardware keyboard, standard shortcuts work: select, copy, paste, undo, redo. The editor also supports keyboard, mouse, and trackpad for precise cursor placement.
Jump to Symbol
Press Cmd+Shift+O to open the symbol navigator. This lists all functions and classes in your project. Start typing to filter, then select a symbol to jump directly to its definition.
Jump to Definition
Cmd+Click on any function or variable name to jump to where it’s defined. This works across files in your project — if a function is defined in utils.py and called in main.py, Cmd+Click takes you straight there.
Word-wise navigation
Use Option+Arrow keys to move the cursor one word at a time instead of one character. Combined with Shift, this selects word by word — useful for quickly selecting variable names or function calls.
Running your game
Tap Play to compile and run your code. The game starts in the player view. Tap Stop to return to the editor.
If your code has a syntax error, Pyxen shows the error message and the line number. Fix the error and press Play again.
Frame inspector
When you pause a running game, the frame inspector activates. This is Pyxen’s built-in debugger.
The inspector lets you:
- Browse every entity in the current frame — see their position, components, and state
- Inspect components — view the exact values of sprites, bodies, custom components, and transforms
- Understand your scene — see parent-child relationships, layers, and visibility
Time scrubber
Pyxen records up to 300 frames of history while your game runs. When paused, you can scrub backward and forward through time.
This means you can:
- Rewind to the exact frame where a bug happened
- Step frame by frame to see how state changes over time
- Compare frames to understand what your code did between two points
The time scrubber turns debugging from guesswork into observation. Instead of adding print statements and re-running, you pause, rewind, and look.
Workflow
A typical workflow in Pyxen:
- Write or edit code in the editor
- Press Play to test
- If something looks wrong, pause the game
- Scrub back in time to find the frame where it went wrong
- Inspect entities to see what state was unexpected
- Stop, fix the code, repeat