I’m proud to announce a super original new game entirely written in ocaml, one that you can not play in your browser (this is to save energy, of course ): Snóke!
The ó is for Ocaml, or Original, or whatever.
Yes, it is yet another variant of the classic 1976 snake video game, but there is a new idea (well, at least I couldn’t find it elsewhere, please don’t disprove me): the goal is not to eat as many apples as possible, but just the exact amount to cover a “shed skin” (or ghost snake, if you prefer, this is the grey snake in the screenshot).
You can already have… well maybe a few minutes of fun with it, but of course contributors are welcome to make it even better.
As a noob to Ocaml, it’ll serve as a great reference for me, I wasn’t aware such game programming was possible with the language (in a practical sens).
I found the share/config folder requirement confusing for local dev, it’d be nice if you could expand on that in the README or via comments
Build failure from git clone:
# File "src/snoke.ml", line 37, characters 8-24:
# 37 | match Theme.find_share "snoke" "SnakeChan-MMoJ.ttf" with
# ^^^^^^^^^^^^^^^^
# Error: Unbound value Theme.find_share
Or runtime error when overriding the prefix function to equal: . (dot, the current dir):
Loading Bogue 20221002 with config dir /home/user/.opam/4.14.0/share/bogue/themes/default
INFO: Using SDL 2.0.10
Level = 0
Fatal error: exception Bogue__B_utils.Sdl_error("SDL ERROR: Couldn't open /home/user/.opam/4.14.0/share/bogue/themes/default/./sounds/great.wav")
in fact this folder is not required: if you work in the snoke/src directory and did not install the game via opam install . then the assets (images, sounds) will be loaded directly from that dir.