~/talk

Sandbox Games: Using WebAssembly and C++ to Make a Simple Game

Talkat C++ on Sea 2022 · 2022-07-05..07-07· [webassembly, c-and-cpp]
slides:none on file

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

  1. 0:00Start
  2. 1:56What Is Web Assembly
  3. 2:28Webassembly
  4. 4:19Tensorflow Js
  5. 23:27Embind
  6. 25:27Javascript
  7. 31:15Game Graphics on the Web Assembly
  8. 33:58Game Loop
  9. 34:25Rendering Code
  10. 39:25The Chrome Development Tools
  11. 41:17Debugging
  12. 41:42Cmake Build
  13. 42:11Python Server
  14. 49:36Web Assembly
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.