HN user

DerThorsten

8 karma
Posts3
Comments7
View on HN

Author here: If you want to skip the reading and directely want to go to the code, just go here https://notebook.link/@DerThorsten/jupyter-games

A jupyter notebook which runs python in the browsers via wasm will wait for you. Pyb2d3, python bindings for box2d-3 are installed in the environment and are used to create tiny games / simulations in a hand full of lines of code.

The goal of this is to make fun things like box2d accessible for educational purposes and similar, without the hussle of installing anything.

Let's start the week with something fun. We ported pyb2d, python bindings for #Box2D, to #pyodide / #wasm. With that, we can implement tiny games directly in #jupyterlite. While the framerate might not be the best, it should have some educational value.

This runs directly in the browser without any server.

Play billiard: https://jupyterlite.github.io/demo/lab?path=pyolite%2Fpyb2d%...

Play a World of Goo clone: https://jupyterlite.github.io/demo/lab?path=pyolite%2Fpyb2d%...

Play an Angry Birds clone: https://jupyterlite.github.io/demo/lab?path=pyolite%2Fpyb2d%...

Steer a rocket: https://jupyterlite.github.io/demo/lab?path=pyolite%2Fpyb2d%...

https://jupyterlite.github.io/demo/lab/

You can create your own deployment of jupyterlite with this: https://github.com/jupyterlite/demo