09.12.2024

Week 2: Dodgeballs

Loading...

Controls: W,A,S,D

Time: 30 hours

I spent almost no time on the game design or the code. Most of the time was grinding away trying to figure out why things weren't building properly.

gl3w is update to date. I can compile my code on MacOS. Got the hot reloading working properly. Projection matrix added so my old shader code works again. I'm using HandmadeMath.h instead of cglm because it looks simpler. Emscripten build works.

Getting the program to build with emscripten is kind of weird. I am hot reloading a dynamic library on desktop but I remove that stuff for the web build. I am not a fan of all the #ifdef flags. Hopefully I can clean it up. The command I am using is: emcc ../src/main_emsc.c ../src/block_pusher.c -o web/index.js -Isrc/ -DSOKOL_GLES3 -sUSE_WEBGL2 -sALLOW_MEMORY_GROWTH=1 -sSTACK_SIZE=5MB -sINITIAL_MEMORY=6553600 --embed-file ../src/shaders/