The last time I saw a Game Boy emulator written in Ruby was part of a RubyConf presentation[0] a few years back, and the performance at the time was understandably not amazing.
The performance here pre-optimisation is more than playable, and with all of the optimisations stacked on top, it was amazing to see it go from ~40FPS to >270FPS.
Very impressive feat and a great write-up on the whole process!
When are we finally going to see a game boy emulator for X86 running in an x86 emulator in the game boy?
Theoretically, we could then lift the emulation from the platform altogether as a pure wave function, completely isolated from the problematic issues of real hardware made of pesky particles. By shedding problems such as power consumption, physical scaling, and non concurrent memory access, we can finally realise the dream of unlimited cloud resource scaling at zero marginal cost.
Why expand memory or cores vertically in a single universe, when you can go horizontal into a small infinity of parallel universes instead. Just collapse the wave from the subset of infinities in the desired page or branch space.
As ridiculous as this sounds, it’s not too far off from what we might achieve given the MWI if we actually learn how to manipulate our environment in a selective manner.
(Assuming that these kinds of shenanigans turn out to be allowed concurrently with our ability to observe the outcome, which is not really safe to assume)
We’ve got a long way to go. Let’s try not to screw it all up just as it’s getting interesting.
Crystal instead of Opal? I didn't consider using Crystal because I specifically wanted to implement this in Ruby! As for using Opal instead of ruby.wasm for the web version, I haven't tried that approach yet, but it sounds like an intriguing possibility.
The queuing system RabbitMQ was ported over to Crystal in an afternoon with minimal changes, though I don't know if the result of that experiment resulted in anything new. It was cool to see the founders of Rabbit showing that it was possible. It might be worth trying for the emulator