Recently I've been working through Jane Street's OCaml Workshop. One of the projects involves building a Snake clone, and it uses X11 for rendering. Though it's relatively simple to work with, the graphics are a little clunky and it comes with an additional system dependency (e.g. XQuartz for Mac users), so I broke my Snake clone out into a standalone app and switched to using Notty to display the game in the terminal.
To build the project, run
dune build
Then play the game using
_build/default/bin/main.exe
To run tests,
dune runtest
wasd or โโโโ to move
Space to accelerate
r to restart
Esc to quit