Skip to content

8Observer8/collision-detection-box2d-3.1.1-sdl-3.3.6-c

Repository files navigation

Collision Detection (SDL3 / C)

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


File Sizes

WASM ( built with Emscripten 4.0.15):

  • index.html — 3.64 KB
  • app.js — 186 KB
  • app.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 MB
  • SDL3_ttf.dll(v3.2.2) — 1.92 MB
  • Assets (LiberationSans-Regular.ttf) — 402 KB
  • Total: 5.56 MB

Tools to Build the EXE


Tools to Build WebAssembly


How to Build EXE (Windows)

config-exe
build-exe
run-exe

How to Build WebAssembly

  1. Set up Emscripten 4.0.15 and Node.js
  2. Install http-server globally:
npm i http-server -g
  1. Configure paths in config-web.bat for your SDL3 libraries.
  2. From the project root, run:
config-web
build-web
http-server -c-1
  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