~/talk

Building a 2D Game from Scratch with WebGPU

Talkat code.talks 2023 · 2023-09-14..09-15· [web-platform, creative-coding]
slides:none on file

Built a playable 2D Boulder Dash–style game from pixel sprites with three render backends: Canvas2D for a quick MVP, WebGL using two-screen-covering triangles and fragment shaders that compute per-pixel color, and a partially completed WebGPU backend wired through an interface with setup/frame/setSize. Uses 11ty, esbuild, TypeScript, vanilla web components and an ASCII level format; live engine switching works, WebGPU required manual texture recreation and indexed bindings and is stable in Chrome, behind a flag in Firefox, not in Safari. The WebGPU shader shows compute shaders and read/write storage buffers and the implementation is low-level and more explicit than WebGL.

AI-written summary · about

  1. 0:00Introduction
  2. 2:18Game design overview
  3. 4:31WebGPU support strategies
  4. 6:14Rendering architecture
  5. 7:17Canvas 2D approach
  6. 9:45WebGL basics
  7. 12:13WebGPU API differences
  8. 14:09Live demo
  9. 16:38Code walkthrough
  10. 23:26Shader syntax comparison
  11. 24:56Learning resources
~/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.