Warning, this is a work in progress and all APIs are subject to changes! Nothing is stable yet.
One can install pyb2d
and its dependencies via conda:
mamba install pyb2d -c conda-forge
pyb2d
can be also installed via pip (conda is recommended and should be preferred over pip)
pip install pyb2d
pyb2d
can also be install it from the sources but you will first need to install dependencies:
mamba install cmake python numpy pydantic -c conda-forge
Then you can compile the sources (replace $CONDA_PREFIX
with a custom installation
prefix if need be)
mkdir build && cd build
cmake .. -D CMAKE_PREFIX_PATH=$CONDA_PREFIX -D CMAKE_INSTALL_PREFIX=$CONDA_PREFIX -D CMAKE_INSTALL_LIBDIR=lib
make && make install
To try out pyb2d interactively in your web browser, just click on the binder link:
The documentation can be found here. One should pay attention to the tutorials and the examples section.
- Liquidfun Integration
- Examples / Testbed for various backends:
- pygame
- kivy
- jupyter (vian ipycanvas)
- opencv (for gif-rendering only)
- Fun Examples: The examples can be started from various backend: Below we show screenshots from the jupyter integration. These examples can be tried out online with Binder
A medium blogpost about the Jupyter integration of pyb2d. Disclaimer: The article was written by @DerThorsten/@ThorstenBeier (the main author of pyb2d)
The pythonbytes podcast talked about the jupyter integration of pyb2d:
Episode #264: of pythonbytes We're just playing games with Jupyter at this point
This project originated 2015 with the goal to create python bindings for liquidfun. The original work can still be found here: https://github.com/DerThorsten/liquidfun/tree/master/liquidfun/Box2D/pyb2d