Udemy
    •  
    •  
    •  
    •  
    •  
    •  
    •  
    •  
Turn what you know into an opportunity and reach millions around the world.
Learn More
Your cart is empty.
Keep shopping
Build Games in the Browser with C++, Lua & WebAssembly
Rating: 4.8 out of 5(11 ratings)
192 students

Build Games in the Browser with C++, Lua & WebAssembly

Learn C++20, Lua, and WebAssembly by building a complete 2D game engine that runs in the browser.
Created byDustin Clark
Last updated 5/2026
English

What you'll learn

  • Compile C++ and Lua to WASM using Emscripten
  • Build a modular 2D game engine from scratch
  • Add Lua scripting, rendering, input, and asset management
  • Make real playable browser-based games

Course content

16 sections135 lectures38h 52m total length
  • Introduction1:15

    Build a browser-based 2D game engine with C++20, WebAssembly, and Emscripten. Implement SDL2/OpenGL rendering, ENT-based entity systems, box2D physics, and Lua scripting across a Tetris-style game and platformer.

  • Join the Community - Ask Questions & Get Support0:29

Requirements

  • You should be comfortable writing basic C++ (functions, pointers, classes) — no WASM or Lua knowledge needed.

Description

Bring the power of modern C++20, OpenGL, and SDL2 straight to the browser with WebAssembly, and build your own 2D game engine from the ground up. In this course, you’ll learn how to combine native C++ performance with the accessibility of the web, using Emscripten to compile your engine to WASM so it runs directly in any modern browser.

You’ll go beyond just drawing sprites — we’ll architect a real engine with:

  • Entity Component System (ECS) using EnTT

  • Physics and collisions powered by Box2D

  • Lua scripting for flexible and dynamic gameplay logic

  • OpenGL rendering for efficient graphics

  • SDL2 for input, windowing, and audio

  • Hot-reloadable assets and a modular architecture ready for expansion

By the end of the course, you’ll have built a complete, browser-based game framework capable of running complex 2D games — all coded in modern, clean C++20 and easily extended through Lua scripts.

We’ll start with a simple Tetris-style game, then evolve into a platformer using physics, tilemaps, and real scripting control. Along the way, you’ll learn core engine design patterns, modern C++ techniques, and real-world practices for cross-compiling and optimizing games for the web.

What You’ll Learn:

  • How to compile modern C++20 to WebAssembly using Emscripten

  • How to use SDL2 and OpenGL for cross-platform rendering in the browser

  • How to build an Entity Component System (ECS) with EnTT

  • How to add physics using Box2D

  • How to embed and use Lua for scripting gameplay

  • How to organize your game engine architecture cleanly and efficiently

  • How to create real browser-based 2D games with C++ performance

Technologies Used:
C++20
WebAssembly (WASM)
Emscripten
SDL2
OpenGL
Box2D
Lua
EnTT (ECS)

Who This Course Is For:

  • C++ developers who want to bring their games to the web

  • Game developers interested in building their own 2D engine

  • Programmers who want to learn Emscripten and WebAssembly in a real-world project

  • Anyone who wants to combine native performance with web deployment

Why Take This Course:
Most WebAssembly tutorials stop at “Hello World.” In this course, you’ll build something real — a fully functional 2D game engine capable of running in the browser. You’ll understand every layer: from C++20 compilation, ECS architecture, and physics integration, to scripting, rendering, and deployment.

This is modern game engine design for the web, taught step-by-step, with clean, maintainable C++ and production-quality techniques.

Who this course is for:

  • Whether you’re a hobbyist or aspiring engine developer, this course gives you real, low-level skills to create and extend your own games and tools.