Skip to main content

Pygame Videogame Maker

A 2D platformer game creator with a built-in visual editor, built with Pygame.

This project lets you compose game scenes in an integrated editor, save them as EEI compositions, and run them immediately.

Features

  • Scene editor: Compose scenes from a scrollable palette of exported entities and environments, then inspect the scene tree and edit supported properties.
  • Extended viewport: The target game resolution is centered inside a larger composition workspace. Elements can be placed outside the target area and remain in the composition; the game view clips them at runtime.
  • EEI compositions: Save scene hierarchy, class paths, transforms, and state to versioned .eei.json files.
  • Editor-only markers: Logical nodes such as music can expose a selectable marker without adding a sprite to gameplay.
  • Keyboard and gamepad editing: Use mouse controls or the virtual cursor and buttons on a connected controller.
  • Project generator: Create a new game folder with the editor, runtime, starter components, and an empty composition.

Getting Started

1. Installation

To install the project dependencies, run:

uv sync

2. Run the Editor

The project includes a visual editor that runs by default. To launch it, use:

uv run pygame-editor editor

This will open the editor scene. To run the current game composition directly, use:

uv run pygame-editor run

Create a game project

From this repository, generate a clean project folder:

uv run pygame-editor new MyGame --output-dir ../games
cd ../games/MyGame
uv sync
uv run my-game editor

The generated project keeps the editor, runtime, and generic entities and environments, but starts with an empty composition. Run it with uv run my-game run. See game/docs/DevelopingAGame.md for instructions on adding game-specific entities, environments, assets, and mechanics. Replace my-game with the command generated from your chosen project name.

Export a game

When development is finished, create a game-only Linux export with:

uv run pygame-editor export game

The command asks where to create dist/; press Enter to use the current directory. To choose the directory without a prompt, pass --output-dir:

uv run pygame-editor export game --output-dir ../release

The export is written to dist/<project-name>-linux/. It keeps the game runtime source, composition, and assets, and removes the editor and input tester scenes. An existing vendor/ directory is copied as well. The exporter currently looks for a launcher named PygameVideogameMaker.pygame; if your generated project renamed it, rename it to that name before exporting. The launcher requires Python 3.12 or newer on the target device; any native packages in vendor/ must match the target Linux architecture. This export does not bundle a Python interpreter or cross-compile dependencies. See game/docs/ExportingAGame.md for the full workflow and platform notes.

Switch scenes

Use F2 or Tab to move to the next scene, and F1 or Shift+Tab to move to the previous one. Press Escape to close the application.

The Visual Editor

The editor provides these current scene-building features:

  • Target resolution: Choose 720×480, 1024×768, desktop size, or enter a custom resolution. The game target stays centered in the workspace.
  • Palette: Add concrete entities and environments exported by the game modules. Scroll each palette column when it contains more items than fit on screen; placing an item starts a drag so you can position it immediately.
  • Composition workspace: Select and drag nodes inside the extended workspace, including areas outside the target game frame. Nodes keep their game-space coordinates when you save or play.
  • Scene tree: Select nodes from the hierarchy, review parent/child relationships, and scroll through larger compositions.
  • Property inspector: Edit supported public values on the selected node. Booleans toggle on click; text and numeric values can be edited with the keyboard.
  • Context menu: Right-click a node to delete it, change its render order, or add an allowed entity or environment before or after it.
  • Save and play: Use the toolbar buttons or Ctrl+S to save. Play saves the composition and opens it in the game scene.
  • Controller cursor: When a joystick is connected, the left stick moves a virtual cursor, A/B act as the primary click, Y/X act as the secondary click, and the right stick scrolls panels.

To add a selectable editor marker for a logical object without a sprite, define EDITOR_MARKER_LABEL on its class. The marker is drawn by the editor only.

The Entity–Environment Interaction Model (EEI)

The project uses a design model where the game is built from two main components:

  • Environments (Environment): Represent spaces or zones that apply rules to their child entities. Built-ins include backgrounds, forces, music, and void containers; environments may be nested under entities.
  • Entities (Entity): Game objects such as players, platforms, and items. Each entity belongs to an environment and may contain child environments.

The editor enforces these parent/child rules when adding nodes and records the hierarchy in the composition file. Learn how to extend it in game/docs/DevelopingAGame.md.

You can adjust the initial window size, title, FPS, and display settings in game/configs/settings.toml. The editor also lets you choose the target resolution per composition.

[window]
title = "Videogame Maker"
width = 720
height = 480
fps = 60

Controls and Controllers

The editor loads its controller labels and mappings from game/configs/controllers/generic.toml. Define controls as TOML arrays of tables; the editor also has fallback button and axis indices.

name = "Generic Controller"
deadzone = 0.2

[[buttons]]
name = "a"
index = 0
label = "A"

[[axes]]
name = "left_x"
index = 0

Console Deployment

The deployment script vendors the current Python dependencies and transfers the working project over SSH. It is intended for Linux-based console setups with a compatible Python runtime already installed:

bash deploy_to_console.sh

For a game-only folder without editor scenes, use pygame-editor export game first. The export command prepares a local folder; deploy_to_console.sh deploys the current project tree and does not automatically deploy that export.

Utility Scripts

Optimize PNG Images

The project includes a script to trim excess transparent space from your sprites, optimizing their memory footprint.

# Trim all images in the platforms folder
uv run python scripts/prune_pngs.py game/assets/images/platforms

Metadata

Release files for pygame-videogame-maker 1.0.12

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pygame-videogame-maker 1.0.12
File Size Uploaded
pygame_videogame_maker-1.0.12.tar.gz 213.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for pygame-videogame-maker 1.0.12
File Interpreter ABI Platform
pygame_videogame_maker-1.0.12-py3-none-any.whl Python 3 none any Details

Total release size: 429.2 kB

Release files / pygame_videogame_maker-1.0.12.tar.gz

Download URL pygame_videogame_maker-1.0.12.tar.gz
Size 213.0 kB
Tags Source
SHA-256 checksum
How to use checksums
d17337e26b0710a62d4159665d752e05f4ff55c77fa79096bf80c5f5e0faea45
BLAKE2b-256 checksum
How to use checksums
c13775c62beffc0a2691eddb74f4f60c073fc12f7e88e5284ef72cb47b478a76
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.11.17

Release files / pygame_videogame_maker-1.0.12-py3-none-any.whl

Download URL pygame_videogame_maker-1.0.12-py3-none-any.whl
Size 216.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
23d1450da32118411079953fed3d4d001e92716ee23f93274a9adec06bbd1b64
BLAKE2b-256 checksum
How to use checksums
b166f9796bf749c080c9713f148b647fc9960df043226882846bca3f63440827
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.11.17

Release history Release notifications | RSS feed

This release

1.0.12 This release

2 release files

1.0.10

2 release files

1.0.9

2 release files

1.0.8

2 release files

1.0.7

2 release files

1.0.6

2 release files

1.0.5

2 release files

1.0.4

2 release files

1.0.2

2 release files

1.0.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page