# SDL2 game compiled to wasm/emscripten

**URL:** <https://ziggit.dev/t/sdl2-game-compiled-to-wasm-emscripten/7910>\
**Category:** Showcase\
**Tags:** wasm, cross-compile, game\
**Created:** [January 16, 2025, 7:20am UTC](https://ziggit.dev/t/sdl2-game-compiled-to-wasm-emscripten/7910 "2025-01-16T07:20:06Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![fei](https://ziggit.dev/letter_avatar_proxy/v4/letter/f/59ef9b/32.png) [@fei](https://ziggit.dev/u/fei)\
**Post date:** [January 16, 2025, 7:20am UTC](https://ziggit.dev/t/sdl2-game-compiled-to-wasm-emscripten/7910/1 "2025-01-16T07:20:06Z")

</div>

Brought an obscure childhood game to the web! It’s called destruct, essentially a real-time scorched earth kind of game ([Destruct | Tyrian, the Wiki | Fandom](https://tyrian.fandom.com/wiki/Destruct)).

Play it here: [destruct](https://mm318.github.io/destruct/)

This is a non-trivial SDL2-based game compiled to wasm/emscripten. As always, zig made the compilation experience as good as it’s going to get 🙂

---

<div class="post-metadata">

**Author:** ![fei](https://ziggit.dev/letter_avatar_proxy/v4/letter/f/59ef9b/32.png) [@fei](https://ziggit.dev/u/fei)\
**Post date:** [January 16, 2025, 7:20am UTC](https://ziggit.dev/t/sdl2-game-compiled-to-wasm-emscripten/7910/2 "2025-01-16T07:20:41Z")

</div>

Source at: [https://github.com/mm318/destruct](https://github.com/mm318/destruct)
