Demo in the browser: https://8observer8.github.io/examples/sdl3/collision-detection-box2d-3.1.1-sdl-3.3.6-c
EXE for Windows 10, 64-bit: english-text-sdl-3.3.6-c-exe.zip
- Zip size: 2.43 MB
- Unzipped: 5.56 MB
Version in Python: GitHub repository
WASM ( built with Emscripten 4.0.15):
index.html— 3.64 KBapp.js— 186 KBapp.wasm— 2.17 MB- Total: 2.35 MB
EXE (built with MinGW GCC 11.2):
- EXE — 607 KB
SDL3.dll(v3.3.6) — 2.65 MBSDL3_ttf.dll(v3.2.2) — 1.92 MB- Assets (LiberationSans-Regular.ttf) — 402 KB
- Total: 5.56 MB
- MinGW GCC 11.2 (zip - 178 MB, unzipped - 671 MB)
- box2d-3.1.1-mingw.zip (zip - 239 KB, unzipped - 827 KB)
- SDL3-3.3.6-win32-x64.zip (zip - 1.09 MB, unzipped - 2.65 MB)
- SDL3-devel-3.3.6-mingw.zip (zip - 2.64 MB, unzipped - 9.43 MB)
- SDL3_ttf-3.2.2-win32-x64.zip (zip - 980 KB, unzipped - 1.57 MB)
- SDL3_ttf-devel-3.2.2-mingw.zip (zip - 1.33 MB, unzipped - 3.15 MB)
- freetype-2.13.3-mingw.zip (zip - 572 KB, unzipped - 1.54 MB)
- Emscripten 4.0.15 (1.82 GB)
- box2d-3.1.1-wasm.zip (zip - 555 KB, unzipped - 1.37 MB)
- SDL3-devel-3.3.6-wasm.zip (zip - 1.21 MB, unzipped - 5.21 MB)
- SDL3_ttf-devel-3.2.2-wasm.zip (zip - 62 KB, unzipped - 213 KB)
- freetype-2.13.3-wasm.zip (zip - 1.2 MB, unzipped - 2.89 MB)
- Add MinGW GCC 11.2
binfolder to yourPATH. - Add SDL3-3.3.6-win32-x64.zip folder to your
PATH. - Add SDL3_ttf-3.2.2-win32-x64.zip folder to your
PATH. - Configure paths in
config-web.batfor your SDL3 libraries. - From the project root, run:
config-exe
build-exe
run-exe- Set up Emscripten 4.0.15 and Node.js
- Install http-server globally:
npm i http-server -g- Configure paths in
config-web.batfor your SDL3 libraries. - From the project root, run:
config-web
build-web
http-server -c-1- Open your browser and go to http://localhost:8080 to run the app locally.
Note: You can also run the WASM app on Android via Wi-Fi using http-server. After starting the server, it will show local URL addresses — just type one into your mobile browser.
This example uses a free font file: https://github.com/liberationfonts/liberation-fonts/releases/tag/2.1.5