This workshop closely follows the HTML5 Games Workshop but altered for jsgame0.js instead of Phaser.
Play the jsgame0.js version of the MDN platformer game.
jsgame0.js is a collection of JavaScript objects following the Pygame Zero specifications. It makes porting Pygame Zero scripts from Python to JavaScript straightforward. There are still language quirks like the remainder operator (%) that may trip you up. The game runs in the browser using the Canvas API.
I don’t know anyone that uses jsgame0.js besides myself. I have not taught this workshop. So following the philosophy of untested code is broken, please consider this workshop broken. Nonetheless, this workshop gives you a better understanding of how jsgame0.js works.
If you do go through this workshop, please create pull requests for areas where it is difficult or unclear. Thank you.
Since the game is written in JavaScript, knowledge of the language is necessary. At the very least, read the JavaScript Guide at MDN.
Knowledge of CSS and HTML is also helpful to understand how the boilerplate works. But you can get by with just copy and paste.
The graphic and audio assets of the game in this guide have been released in the public domain under a CC0 license. These assets are: