No description
  • C 88.9%
  • HTML 6.3%
  • GLSL 4.1%
  • Makefile 0.7%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
sophie 12d5878577
All checks were successful
build / desktop (linux) (push) Successful in 1m44s
build / wasm (emscripten) (push) Successful in 54s
Playin x box all night
2026-10-05 10:46:56 +03:00
.forgejo/workflows ci: upload-artifact v3 (v4 API unsupported on forgejo/ghes) 2026-10-03 22:03:38 +03:00
assets oops 2026-10-05 09:58:54 +03:00
src optimizing assets 2026-10-05 09:58:45 +03:00
web optimizing assets 2026-10-05 09:58:45 +03:00
.gitignore beerrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr 2026-09-25 23:40:14 +03:00
Makefile first commit 2026-09-25 21:32:12 +03:00
Makefile.wasm Playin x box all night 2026-10-05 10:46:56 +03:00
README.md optimizing assets 2026-10-05 09:58:45 +03:00

bee gets bread

Split-screen 2-player raylib game (bees, honey, beer).

Desktop

make
./build/split_screen

Needs raylib-devel (see install-deps in Makefile).

Web (WASM)

Built with Emscripten in the Arch distrobox (host has no emcc).

One-time setup — raylib for WebGL2 (raylib 5.5 to match desktop):

distrobox enter arch -- sh -c 'export PATH=$PATH:/usr/lib/emscripten && cd ~/raylib/src && make PLATFORM=PLATFORM_WEB GRAPHICS=GRAPHICS_API_OPENGL_ES3 -B -j$(nproc)'

Build + serve:

distrobox enter arch -- sh -c 'export PATH=$PATH:/usr/lib/emscripten && make -f Makefile.wasm'
python3 -m http.server -d build/web 8000
# open http://localhost:8000/index.html

Notes:

  • build/web/ contains index.html / index.js / index.wasm / index.data. Zip that directory for itch.io, or publish it to GitHub Pages. Don't use file:// — .wasm/.data need HTTP.
  • Click the game once to enable audio (browser autoplay policy).
  • settings.cfg persists in IndexedDB (IDBFS) on web, as settings.cfg next to the binary on desktop.
  • The .data bundle is ~7 MB: audiotrack.ogg (64kbps Vorbis, ~4 MB), ground_grass.jpg (1024px, ~400 KB), ground_rock.jpg (~250 KB). Keep music compressed and textures small — everything under assets/ ships in the bundle.
  • web/shell.html carries a Module.HEAPF32 shim: raylib 5.5's miniaudio (0.11.21) reads it in its WebAudio callback, but Emscripten 6.x no longer aliases HEAP views onto Module. Without the shim every audio quantum throws TypeError: Cannot read properties of undefined (reading 'buffer'). Revisit when upgrading raylib/emscripten.
  • Web shaders live in assets/ground_web.vs / assets/ground_web.fs (GLSL ES 3.00 twins of ground.vs / ground.fs); selected automatically on __EMSCRIPTEN__ builds.
  • Web page is bare fullscreen black (web/shell.html): canvas fills the viewport, framebuffer tracks the window, no text except a tiny CSS spinner while loading. Logs go to the browser console only.
  • On resize the game calls SetWindowSize to re-sync Emscripten's GLFW size struct; without it mouse coordinates scale from a stale size and every click misses.
  • Makefile.wasm (not Makefile.web): make treats Makefile.web as a Knuth-WEB source for regenerating Makefile and breaks without tangle.