I really like that we’re defining state explicitly now. But I also definitely missed a couple during this conversion that kind of made me crazy. Don’t be me, use some codemod tool! When you use any rune in a file, all your old “reactive” variables are secretly not reactive 😱
Prop definition changes I’m slightly positive on. They are a little more annoying to type, but it’s much easier to spot props in a file now imo. Spot the props in these shots if you don’t believe me 👀
Defining deeply reactive structures are a little weird with classes, to be honest. It feels like misdirection. And at the call sites, you don’t want to dig (like `controls.map[‘LeftArrow’].on`). So: more helpers. A good thing in some ways, but here it felt awkward.
Next spot was this messy store that held state for the hue, saturation, and “on” status. I had some awkward update logic here because I placed `hue` and `sat` together. Svelte 5’s organization made this situation simpler, easier to read. Also removed the need for a separate types
First: stores. A simple writable became more verbose in order to keep the same clarity. Callers now use `chickenDinner.hasWon` instead of `winnerChickenDinner`. The plus side of classes is they make you want to encapsulate, like this `chickenDinner.win()` function.
You can see all the code at my github: github.com/backlitbytes/lil-…. I’m very open to bug reports, pull requests, forking, etc. I’d rather a like/share here than a star there, but I’m a beggar not a chooser!
One thing I kind of hated as I implemented it was the cartridge animations - they are done by animating left/top values (not performant, not easy to code 😢). I know there are better ways, but it works well enough for now (just don’t resize the window after selecting a cart 👀)
I made the gameboy more flexible than it needed to be thinking I might mess with the dimensions of it during the gameplay, but honestly the scope of this “little” project needed to be cut down so I could finally share it ✂️
The "games" are built with PhaserJS, which felt like overkill, but worked really well for the simple “find the next cartridge” gameplay. It was also really easy to integrate PhaserJS logic with Svelte stores.









