Bringing Zelda Classic To The Browser

Finding a device or app that isn’t a web browser doesn’t seem easy. These days, it is either connected to the web (looking at you ESP32) or is just a web browser pretending to be something else (a la electron, PWAs, or React Native). So, of course, it is on us to create more and more exciting things to browse. [Connor Clark] is one of those people, and he brought Zelda Classic to the browser.

Zelda Classic (ZC) isn’t an official Zelda game. Instead, it’s an old engine designed to run the world in the OG Legend of Zelda and be easily modified to support hundreds of different games. To date, there are over 600 games submitted by a large community. ZC is an Allegro-based Windows-only game, so the first step was to bust out Emscripten to start tweaking the C++ code to support a web environment. Rather than completely port the huge codebase over from Allegro, [Connor] made the jump from Allegro 4 to 5. Allegro 5 has SDL as a backend and adds support for Emscripten.

Unfortunately, the 4 to 5 wasn’t as simple as changing the dependency. The API was wholly re-written, and there is a handy adapter known as Allegro Legacy to help transition a project from one to another. After squashing a multitude of bugs, it was a relatively painless procedure. After a quick detour getting music and level data working, [Connor] faced his next challenge: multi-threading. Efforts to move the main loop off of the browser thread and into a web worker ran into issues with having to yield in loops, deadlocks, and recursive mutexes. Finally, he added music and gamepad support after fixing several bugs in SDL and Allegro.

It’s an incredible journey with many tips and tricks for debugging seemingly intractable bugs. The code is up on GitHub, or jump in and start playing if you’re interested. Why not check out this browser-based OpenSCAD as well?

Comparing Altium And Cadence PCB Layout Tools

We see a lot of projects using Eagle for the schematics and PCB layout. There are a few that use Kicad, but we hear very little about other alternatives. Recently, [Limpkin] has been working with Altium and Cadence and wrote about how they compare when it comes to PCB layout. Neither are free packages so it’s good to know what you’re getting into before taking the plunge.

[Limpkin] begins his overview by mentioning that the schematic editors are comparable; the differences start to show themselves in the PCB layout tools. Here you can see that Altium always labels the pads so you know what net each of them belongs to. Cadence (whose PCB layout tool is called Allegro) will display the net if you hover over the pad with your mouse. Both have 3D rendering, with Altium’s looking a bit more pleasant but what real use is it anyway? Okay, we will admit we love a good photorealistic board rendering, but we digress. The most interesting differences show themselves once traces are all on the board and need to be rejiggered. Cadence will actually move traces on other layers automatically to avoid collision with a via that is late to the party, and Altium shows some strange behavior when dragging traces. [Limpkin] doesn’t register a final judgement, but the comparison alone is worth the read.