This has been a fun (and rather long) project. I craved for a simple city builder that a toddler could play and understand. You might want to start from the first devlog entry to see where Liikennematto came from.
You can play Liikennematto in your browser on itch.io[1] (the link is buried at the end of the article).
Though many games have been built with Elm, I've had to implement lots of "game engine" code myself. For example, the collision system, physics (acceleration etc.), and path finding are custom code. It's worth mentioning that this is my fist gamedev project, and I've had to read up a quite a bit on the topic. Still the difficult was not in Elm itself, but in math and data structures, as it would be on any language.
Elm's lack of runtime exceptions and mutable state makes any game quite robust. Most of the bugs in Liikennematto have been of omissions (forgot to update something) and in math formulas. 3rd party Elm libraries are often excellent with great docs and have helped along the way.
Lastly Elm is quite performant (pure functions can be inlined and easily optimized) and I can create a single .js file that contains the game code, UI and the assets (which are still SVG in Elm). The whole game is still about 1 megabyte minimized! I think that's amazing, despite not shipping the runtime enviroment (the browser).
I've done some basic game dev in Elm and was surprised how nice it was. In one game, I had melee fighters moving around a map fighting each other. Much later I came back to add a projectile class.
Having not touched the game code in months, adding an archer was a matter of adding an `Archer` model (with archer specific state) to an enum and then following the errors until I'd handled the archer at every switch site in the code. It blew my mind that I had a working archer system without even running the code once and without having to reload the whole code base into my head.
I wonder if there is some reasonably priced flexible display I could use to make this into an actual "mat" for kids to play on.
EDIT: I just found this; anyone here with experience with this kind of tech? https://www.aliexpress.com/item/1005006497423497.html
Ok so what I actually would for something like this, is having the traditional play mat, and in addition to that, have a digital-physical hybrid traffic simulation with programmable physical cars driving around, and remotely steerable toy car that your kid could drive around the traffic.
You should teach how to build those streets for people first, bicycles second, public transportation third, cars last.
Build for people not for machines.
Bicycle are all age inclusive, all ability inclusive. Cars is the most discriminatory mode of transport.
Those crosswalks should be continuous: https://www.youtube.com/watch?v=9OfBpQgLXUc