[HN Gopher] Show HN: Simple games ported to Scala 3 - Try them i... ___________________________________________________________________ Show HN: Simple games ported to Scala 3 - Try them in the browser Hi everybody, I just ported some 2018-scalajs games to Scala 3, it is amazing that such 8-year old code base required less than an hour to get all the games working in Scala 3. I encourage you to try Scala.js/Scala3 which work really nice. Author : AlexITC Score : 55 points Date : 2022-06-26 16:19 UTC (6 hours ago) (HTM) web link (github.com) (TXT) w3m dump (github.com) | hombre_fatal wrote: | The games on the live demo eat 100% of a CPU and go down to | crawling FPS on my Macbook M1 Pro once I start using the keyboard | to control them. Wonder what's going on. | AlexITC wrote: | Weird, I just tried Safari in a Macbook Air M1 and it doesn't | eat much CPU, still, the experience is far smoother in Firefox, | for some reason, the games get slooow in Safari. | crispyalmond wrote: | Just tried on Windows with Edge, and I'm experiencing this as | well. | threeseed wrote: | For those interested in Scala.js I would recommend two UI | frameworks: | | a) Slinky - https://slinky.dev | | b) Laminar - https://laminar.dev | cultofmetatron wrote: | laminar - https://laminar.dev/ | [deleted] | billfruit wrote: | Is there anything similar for Clojure. | Ketan-fullstack wrote: | Reagent and Reframe | amelius wrote: | What platforms do they target? | AlexITC wrote: | They target browsers. | | Slinky is very similar to React while Laminar is more | idiomatic Scala. | halfmatthalfcat wrote: | Or the OG React Scala.js library: | https://github.com/japgolly/scalajs-react | esarbe wrote: | Scala/Scala.js is an amazing ecosystem. It simply astounding | being able to take code from the frontend and move it to the | backend by simply importing it in a different project. Using the | same domain validations everywhere is also mind-blowing. | | Thanks for the effort, these are really cool demos. | marwis wrote: | Would be nice to see the diff vs Scala 2 | AlexITC wrote: | Well, given that I haven't refactored the code to take full | advantage of scala3, the changes are mostly on the build | scripts, which is very nice because the old repo likely used | scala 2.10 (or 2.11). | | The only required syntax change was related to | https://docs.scala-lang.org/scala3/reference/dropped-feature... | (2 minor occurrences). | | Original sources at https://github.com/lihaoyi/scala-js-games | [deleted] ___________________________________________________________________ (page generated 2022-06-26 23:00 UTC)