Sandbox Games: Using WebAssembly and C++ to Make a Simple Game
summary
Shows how to compile C++ to WebAssembly with Emscripten (emcc, emsdk, emrun) to run a sliding‑puzzle (2048/threes style) in the browser, first keeping rendering in JS and then moving game logic into wasm and finally rendering with SDL2 + SDL_ttf via emscripten. Covers practical hurdles: providing JS imports via the env object, preloading font/assets, setting initial memory and allowMemoryGrowth, and debugging with Chrome DevTools. Demonstrates a Wordle solver hitting ~30 games/sec in wasm (winning ~50%), and explains the 60 fps browser cap and when performance gains do and don’t appear.
AI-written summary · about
chapters (14)
- 0:00Start
- 1:56What Is Web Assembly
- 2:28Webassembly
- 4:19Tensorflow Js
- 23:27Embind
- 25:27Javascript
- 31:15Game Graphics on the Web Assembly
- 33:58Game Loop
- 34:25Rendering Code
- 39:25The Chrome Development Tools
- 41:17Debugging
- 41:42Cmake Build
- 42:11Python Server
- 49:36Web Assembly
related talks
01h 09mSandbox Games: Using WebAssembly and C++ to make a simple game
01h 12mSandbox Games - Using WebAssembly and C++ to Make a Simple Game
22mSimulating Sand: Building Interactivity With WebAssembly
57mC++ on the Web: Let's have some serious fun.
34mBack to the FUTURE! From C++ to JS
22mHarnessing the power of WebAssembly
50mWeb Assembly
28mWebAssembly: Of Portability, and Performance
