Simple games ported to Scala.js (Scala 3)
This is a collection of games ported from Scala 2 to Scala.js (Scala 3): the source for each game is written in Scala, and Scala.js cross compiled to run in the browser targeting the HTML5 Canvas. The original games can be found here and targeting Scala 2.
The games are, in order:
The controls are generally up-down-left-right and spacebar; they aren't very complex games. Click on a game to start playing and click somewhere else to pause it.
sbt fastLinkJS
(just to make sure the app compiles).npm install
to install the js dependencies.npm run dev
to launch the dev server, then, open http://localhost:3000
to load the app.npm run build
to prepare the production build.The bundle size is ~600kb, ~100kb compressed: