A convenient 2D OpenGL games framework
Project description
A fast, cutting-edge 2D game engine for Python.
Current features include:
- Sprites, text, and stroked and filled polygons - all rotatable, scalable, and colorizeable
- A coroutine programming model for easy animated effects.
- Particle systems
- Built-in post-processing effects using GLSL shaders.
- Sound, music and tone generation.
- Event driven input handling for keyboard and mouse.
- Animation/tweening.
- "Local storage" to easily save state.
Wasabi2D is based on moderngl, with pygame 2.0 for some supporting functions, and supporting APIs ported from Pygame Zero.
Quick example
Draw a drop-shadowed circle that follows the mouse:
import wasabi2d as w2d
scene = w2d.Scene()
scene.background = 0.9, 0.9, 1.0
scene.layers[0].set_effect('dropshadow')
circle = scene.layers[0].add_circle(
radius=30,
pos=(400, 300),
color='red',
)
@w2d.event
def on_mouse_move(pos):
circle.pos = pos
w2d.run()
Installation
Use pip to install Wasabi2d from PyPI:
pip install wasabi2d
Please make sure your requirements.txt
pins a major version, as Wasabi2D may
continue to make breaking API and graphical changes in major versions.
Documentation
Documentation is available at https://wasabi2d.readthedocs.io/
Screenshots
This screenshot shows off polygons, sprites, text and particle effects:
Roller Knight was an entry in PyWeek 28, written with Wasabi2D by Daniel Pope and Larry Hastings:
Spire of Chaos was another entry in PyWeek 28 written with Wasabi2D by Daniel Moisset:
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file wasabi2d-1.4.0.tar.gz
.
File metadata
- Download URL: wasabi2d-1.4.0.tar.gz
- Upload date:
- Size: 530.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.47.0 CPython/3.8.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f158815929454610323f5adfd8afa0ff7a36d970776cffd723a2475ccdcbaa60 |
|
MD5 | 5d5cfb32e8bd633f3aa546566e5986af |
|
BLAKE2b-256 | cd1624760d93b6235432140b1f29ef1a0c1985e10da6e709d8c7658c41511314 |
File details
Details for the file wasabi2d-1.4.0-py3-none-any.whl
.
File metadata
- Download URL: wasabi2d-1.4.0-py3-none-any.whl
- Upload date:
- Size: 298.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.47.0 CPython/3.8.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | fd7a2cbaa24ae0c0202a6c7f00e676dfe2afec1e638d0dedd0453cfc56c17092 |
|
MD5 | ffec5dafaafdce414e314a58fcc74267 |
|
BLAKE2b-256 | d167cea42335fae9a35ac8ebfcda46da3bd983795a70522a3e650bd4372d3575 |