Show HN: Lemmings in HTML in Canvas

Posted by VorticonCmdr 1 day ago

Counter2Comment3OpenOriginal

For fun I decided I wanted to reimplement Lemmings using HTML-in-cavas and a DOM-based Entity-Component-System. I made heavy use of Claude Code (using only Sonnet 5 High) and I used everything already published on this topic. I used already existing HTML ports (like DHTML Lemmings, LemmingsJS and Lemmings.ts) to kickstart development.

Even though I was able to add some new stuff like EGA, CGA and Tandy as well as Adlib, Tandy and PC Speaker that wasn't documented (or I didn't find it). I, or rather Sonnet, was able to do so because I hooked it up to a Ghidra MCP and a DOSBox MCP.

At some point feature creep set in so I am guessing there are still a few things not working as intended. I'd love to hear all about it.

Comments

Comment by SaltyAstronaut 5 hours ago

Good use of the new HTML-in-canvas feature but I'm not sure of the advantage over emulators (?) Its a big friction to have to enable it but I am guessing you just did this to play around with it. Great stuff!

Comment by luisperis1011 1 day ago

Thanks 4 the code, but I have the last chrome and i can't play it.

The browser show me the next message:

HTML-in-Canvas not available This build uses the experimental layoutsubtree / drawElementImage canvas API. It currently runs only in Chrome Canary with the flag enabled

----

I can't understand that you'r using the last technology but 'canvas' is a normal object...

Comment by VorticonCmdr 1 day ago

HTML-in-canvas is a new original-trial feature of Chrome I wanted to experiment with. You don't need Chrome Canary. You can enable the feature in "normal" Chrome (148 to 154 see here https://developer.chrome.com/origintrials/#/view_trial/34784...) as well just go to chrome://flags/#canvas-draw-element and change it to "enabled"