Day 3 -

Aug 20th

Stage 2

15:20 - 16:00

Coding the game of unspoken rules in Scala 3

What does it take to create a game where the rules are unknown, constantly evolving, and authored by the players themselves? Inspired by the chaotic and creative card game Mao, we’ve built a multiplayer, browser-based game entirely in Scala 3: backend, frontend, and user API. Players don’t just play the game, they program the rules in real-time.

This talk is a feedback session from our development journey. We’ll walk through a selection of the most interesting challenges we faced, from game engine to code editing, and share what worked (and what didn’t) when pushing Scala 3 into this weird and wonderful space.

Topics we’ll cover include:

  • Modularization of game logic and runtime
  • Live Scala code editing in the browser
  • Analyzing user-submitted code
  • Scala-style web animations and UI interactivity
  • Using LLMs to help non-programmers write game rules
  • Security against malicious code

Along the way, we’ll raise bigger questions:

  • Is Scala 3 a good language to build such a game?
  • Should players program in full Scala, or do we need a specialized DSL?
  • How do we lower the barrier to entry while preserving the expressive power of the language?

Whether you’re into Scala programming, online games, or coding experiment — this talk is for you.

Adrien Piquerez

Scala Center

I am a compiler engineer at Digital Asset and former member of the Scala Center. I contributed to Scala 3, sbt and the Scala debugger.

Benoît Fouré

Subscribe

Join our conference

Subscribe and follow @ScalaDays on BlueSky for the latest conference updates.