Skip to content

Lanred-Dev/extro

Repository files navigation

IMPORTANT

extro is currently being rewritten entirely in cpp and soon will no longer support python (at least for the time being). While this is being done no activity may be viewable from this repo but work is being done!

extro

A opinionated 2D game engine for Python.

Features

  • Instance and scene management
  • Built-in developer console
  • Built-in profiler and performance metrics
  • 2D physics and collision detection
  • UI framework
  • Instance hierarchy and object parenting
  • Animation system supporting sprites and tweened instances
  • Utility classes (timeouts, janitor, signals, etc.)
  • Built-in 2D camera support

Examples

Examples can be found here.

Benchmarks

Benchmarks can be found here.

Requirements

  • Python 3.14.0 (or newer)
  • CMake 3.15 (or newer) *
  • C++23 (or newer) compiler *

* Required only if building from source

Tested Platforms

  • Windows 10/11 (x64)
  • MacOS Tahoe (M series chip)

Installation

You can install extro directly from the latest release on GitHub:

pip install https://github.com/Lanred-Dev/extro/releases/download/<tag>/<file>.whl

Replace <tag> and <file> with the version and filename from the release you want to use.

For example:

pip install https://github.com/Lanred-Dev/extro/releases/download/v0.10.0-alpha/extro-0.10.0a0-cp314-cp314-win_amd64.whl

Alternative: Install from source

If you prefer to build from source:

git clone https://github.com/Lanred-Dev/extro.git
cd extro
pip install .

This automatically builds and installs the Python package (and its C++ extensions if needed).

Setup

  1. Clone this repository
git clone https://github.com/Lanred-Dev/extro.git
cd extro
  1. Create a Python virtual environment:
python -m venv .venv
  1. Activate the virtual environment:
.venv\Scripts\activate
  1. Install dependencies:
pip install .[dev]

Building the wheel

To create a distributable .whl file:

pip install --upgrade build
python -m build

Building C++ extensions separately from the wheel

If you want to build the C++ extensions separately from the .whl, you can do so using CMake and nanobind.

  1. Install nanobind:
pip install nanobind
  1. Then build:
sh build.sh

# or to build manually:
cmake -S . -B build
cmake --build build --config Release

About

A opinionated 2D game engine for Python.

Topics

Resources

Stars

Watchers

Forks