Skip to content

An attempt to recreate 2048 game using C99 and Raylib.

License

Notifications You must be signed in to change notification settings

misterabdul/2048

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

2048

An attempt to recreate 2048 game using C99 and Raylib. Web version is available here.

Requirement

  • 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.

Building

  • 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.

Building raylib

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.a

Building the game

Example script to build the game, desktop version:

$ PLATFORM="desktop" CC="clang" CFLAGS="-g" LDFLAGS="-g" ./configure
$ gmake

Web version:

$ PLATFORM="web" CC="emcc" CFLAGS="-O2" LDFLAGS="-O2" RAYLIB_PATH="/usr/local/src/raylib" ./configure
$ gmake

About

An attempt to recreate 2048 game using C99 and Raylib.

Resources

License

Stars

Watchers

Forks