Quickstart¶
Get a 2D game running and make your first code change in under three minutes.
Create a Project¶
Pite comes with starter templates to help you get moving quickly. Generate a new project using the gem-collector template:
This scaffolds a complete, playable 2D game with a player character, a collectible gem, score and countdown HUD labels, a game timer, and a pickup sound effect.
Tip
If you omit the --template flag (pite new my-game), Pite creates a blank project with a minimal pite.toml manifest and empty folders.
Launch the Visual Editor¶
To launch the interactive graphical editor, run pite inside your project folder:
(You can also use pite edit).
The Pite editor layout is designed around clarity and speed:
- Center Panel: The Viewport renders your game at its design resolution. Switch to the Code tab to view and edit Python scripts.
- Top Bar: Contains the menu bar (
Scene,Project,Help) and playback controls: Play (▶) and Stop (■). - Left Panel: The Scene Tree hierarchy on top shows all nodes in the active scene (
Main,Camera,ScoreLabel,Player,Gem,TimeLabel,GameTimer), with the Assets browser below. - Right Panel: The Inspector displays the editable properties (
props) and script attachments for the currently selected node. - Bottom Panel: The Console shows debug traces, log messages, and error diagnostics.
Press the Play (▶) button in the top-right corner (or press Ctrl+R / F5) to test the scene in the viewport.
Note
Keep the mouse pointer inside the viewport game area to send keyboard and mouse inputs to your running game. Moving the mouse outside the game area allows the editor shortcuts and code pane to retain priority.
- Move the player using the Arrow keys or WASD.
- Move the player over the gem to collect it. Notice how the pickup sound plays, the score increments, and the gem relocates to a new random position. The countdown timer ticks down from 30 seconds!
Run Directly from the Terminal¶
You don't need the editor open to test your game. Run the standalone engine runtime straight from your terminal:
This launches your project's main scene directly in a lightweight window with full hot reload active.
Testing specific scenes
You can test any scene in isolation by passing its path to pite run:
Edit a Script and Watch Hot Reload¶
Pite scripts are standard Python files powered by an embedded Python 3.12 runtime. You can edit scripts inside the editor's Code tab or using any external code editor such as VS Code, Zed, or PyCharm.
Open scripts/player.py and locate the speed variable on line 5:
import pite
class Player(pite.CharacterBody2D):
speed: float = 350.0
def _process(self, delta: float):
# Gather directional input
move_x, move_y = pite.action.vector("left", "right", "up", "down")
# Apply movement scaled by frame delta
self.position.x += move_x * self.speed * delta
self.position.y += move_y * self.speed * delta
# Keep player within screen bounds
self.position.x = max(30.0, min(1250.0, self.position.x))
self.position.y = max(30.0, min(690.0, self.position.y))
Change speed: float = 350.0 to speed: float = 900.0, then save the file (Ctrl+S).
If your game is running in pite run or inside the editor, hot reload immediately reloads the Python module in place. Tap the arrow keys: your player character now moves across the screen at high speed without restarting the game.
Check Project Health¶
Pite includes a built-in static validator that inspects your manifests, scenes, asset references, and Python scripts:
pite check verifies:
- Scene node hierarchies, missing parents, and invalid node types.
- Missing or moved
res://assets (and suggests automatic re-import commands). - Script syntax and unresolved dependencies.
- Manifest configuration syntax and schema.
Strict mode for CI
Run pite check --strict to treat warnings as errors, ideal for automated test pipelines and GitHub Actions.
Export a Standalone Build¶
When you are ready to distribute your game, Pite packages a standalone, single-folder release with a bundled Python runtime and runner binary:
You can export to any supported platform from any development OS — for example, building Windows and macOS releases while working on Linux, or producing Linux builds from Windows. Pite handles fetching the target platform's runner binary and embedded Python environment automatically without requiring external SDKs, cross-compilers, or virtual machines.
The output lands in dist/ containing an executable launcher and all required assets, ready to distribute to players.
Next Steps¶
Now that you have seen how Pite projects work, dive deeper into the engine:
-
Project Structure Explore the files, folders, and conventions in a Pite project.
-
Your First Game Build a complete 2D Gem Collector game from scratch step-by-step.
-
Editor Guide Master the visual scene editor, tree manipulation, and shortcuts.
-
Export Guide Learn how cross-platform exports and standalone player bundling work.