An attempt to recreate 2048 game using C99 and Raylib. Web version is available here.
- Platform: Desktop (tested on Fedora 43) & Web
- Compiler: C99 compiler (EMSDK's emcc if you want to build web version).
- Dependency: C99 standard library, raylib.
- EMSDK is installed at
/usr/local/src/emsdk, as of writing this the SDK is at version 4.0.21. - Raylib is installed at
/usr/local/src/raylib, as of writing this the library is at version 5.5.
The script I use to build the raylib:
$ cd /usr/local/src/raylib
$ gmake # desktop variant: libraylib.a
$ EMSDK_PATH="/usr/local/src/emsdk" gmake PLATFORM="PLATFORM_WEB" -B # web variant: libraylib.web.aExample script to build the game, desktop version:
$ PLATFORM="desktop" CC="clang" CFLAGS="-g" LDFLAGS="-g" ./configure
$ gmakeWeb version:
$ PLATFORM="web" CC="emcc" CFLAGS="-O2" LDFLAGS="-O2" RAYLIB_PATH="/usr/local/src/raylib" ./configure
$ gmake