Skip to main content

Player

You can play this game on the web at http://electronstudio.github.io/raylib-example-game . Works on mobile devices!

You can download binary releases for Windows, Macos and Linux from https://github.com/electronstudio/raylib-example-game/releases/latest

You can install this game from pypi:

uv tool install raylib-example-game
raylib-example-game

Developer

Python Implementation

This project defaults to PyPy 3.11 for improved runtime performance. To switch to CPython:

uv sync --python python3.13

Raylib Backend

This project uses raylib_sdl instead of the standard raylib package for enhanced controller and gamepad compatibility.

If you prefer to use the standard Raylib backend, you can switch by updating the dependency:

# Remove raylib_sdl and add standard raylib
uv remove raylib_sdl
uv add raylib

Backend Comparison:

  • raylib_sdl: Better controller/gamepad support, SDL backend
  • raylib: Standard Raylib backend, potentially faster for basic graphics

The API is identical between both packages - no code changes are needed when switching.

Setup

Install uv from https://docs.astral.sh/uv/getting-started/installation/

# Clone the repository
git clone https://github.com/electronstudio/raylib-example-game.git
cd raylib-example-game

# Install in development mode
uv sync

# Run the game
uv run raylib-example-game

Building the package

# Build wheel and source distribution
uv build

Binary Compilation with Nuitka

uv run build-binary

Creating Releases:

# Tag and push to create a release with binaries
git tag v1.0.0
git push upstream v1.0.0

Important: The workflow requires contents: write permission to create GitHub releases. If release creation fails with a 403 error, check your repository's Actions permissions under Settings → Actions → General → Workflow permissions.

Web Build with pygbag

Build for web deployment using pygbag:

# Build for web and start local server
uv run build-web

# Build for web only (no server)
uv run build-web --build

Github Actions automatically deploys the game to GitHub Pages on push to master.

Metadata

Release files for raylib-example-game 0.3.1

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

Built distribution (wheel)

Table of built distributions (wheels) for raylib-example-game 0.3.1
File Interpreter ABI Platform
raylib_example_game-0.3.1-py3-none-any.whl Python 3 none any Details

Release files / raylib_example_game-0.3.1-py3-none-any.whl

Download URL raylib_example_game-0.3.1-py3-none-any.whl
Size 80.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
3584fea19a5df498d48e7ec57f075e0baa65a42663cef032e31013f31ea77434
BLAKE2b-256 checksum
How to use checksums
f2f9e1cf64503d9c26ed11834d755e193cc674370f69887a18fdacfd0c8f67c2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.1.dev28+g60e377bd5 CPython/3.13.7

Release history Release notifications | RSS feed

This release

0.3.1 This release

1 release file

0.3.0

1 release file

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