Skip to content

sleeptightAnsiC/rlspr

Repository files navigation

rlspr

Simple clone of classic Minesweeper game.
Created with Raylib, written in strict C99.
Try it out at: https://stacc.itch.io/rlspr

BUILDING

$ git clone https://github.com/sleeptightAnsiC/rlspr --depth 1 --recursive --recurse-submodules --shallow-submodules
$ cd rlspr
$ make

Detailed build dependencies are: minimal POSIX enviroment, GIT SCM, GNU Make, GNU-compatible C99 compiler (either: GCC, Clang or TCC). On most Linux distributions, those packages should be already installed and ready to use (maybe excluding GIT). On newer MacOSX and most BSD flavours, you need to download and use "gmake" instead of built-in make utility. On Windows, either w64devkit, Cygwin or MSYS2 with installed MinGW should do the trick (latest w64devkit is often tested, known to work, and should provide everything). There are no runtime dependencies besides libraries provided by OS.

GOALs

  • Testing portability of Raylib, building it for multiple systems and WEB (initial goal)
  • Trying out Raylib and tools created around it (e.g. raygui, rres, etc.)
  • Implementing most of the features from other Minesweeper clones and the original ones

NON-GOALs

  • Better looks (polished functionality is the goal, not polished visuals)

NOTEs

  • I implemented everything from the scratch, without any tutorials or guides. This is my take on Minesweeper implementation.
  • Although, I did NOT peek at any Minesweeper's implementation details, I referenced to this page for the design details: https://minesweeper-pro.com/introduction/

TODOs

  • Draw proper textures intead of primitive shapes and fonts
  • Provide multiple customization options
  • Provide automatic resolution scaling and better scaling in general
  • (in far future) alghorithm that generates bomb placement in a way that makes it possible to win the game without guessing (minesweeper-pro.com has something like this, while the original Minesweepers don't, but I think this is really important)
  • (in far future) replace current draw pass with GLSL shader
  • (in far future) throw away raylib and raygui, and replace them by GLFW and Nuklear (there are many reasons for this...)

FIXMEs

  • Although, I haven't prepared any mobile support, the WEB version can be started from mobile web browser, but it will NOT work properly due to lack of touch support. This should be either prevented or fixed by implementing gestures.
  • Lots of canonical bugs from original Minesweeper and its various clones (e.g. https://www.reddit.com/r/raylib/comments/1iavxy8/comment/mapc85l/?context=3 )
  • Some minor bugs (usually mentioned throughout code comments)

LICENSE

Copyright holder: https://github.com/sleeptightAnsiC
Code under this repository is licensed under permissive MIT/X license,
but this does NOT include its dependencies and git-submodules, such as raylib.

REFERENCES