OCaml implementation of the Cut The Rope game
ocamlbuild
and ocamlfind
are both required to build this project. You can install them using OPAM.
The level editor needs python
to upload levels (for the input box)
Dependencies :
- OCaml Graphics (standard library)
- OCaml Str (standard library)
- Cohttp, install with
opam install cohttp lwt js_of_ocaml
Compile with one of these options
make debug ; ./game.byte
to compile and run main bytecode versionmake ; ./game.native
to compile and run main native versionmake test ; ./test.byte
to compile and run testsmake expe ; ./expe.byte
to compile and run your experiments (warning: "expe.ml" is excluded by gitignore)
Note that you must run sprites/convert.sh
to generate the PPM files from PNG sprites (need ImageMagick)
Run the game with the command ./game.native [level.lvl] [-s theme]
You can specify a level file (optional) and a theme after -s
. The defaults themes are basic
mario
and ctr
. Respect the order.
Things to do (including ideas)
- Set up projet/configuration
- Sprites converting/loading (
sprites/{THEME}/convert.sh
lib/ppm.ml
) - Main file (
game.ml
) - Physical engine
- Rendering (
lib/render.ml
) - Management of game mechanics (
lib/gamemechanics.ml
) - Levels management (loading/saving/data structure) (
level.ml
) - Unit tests (
test.ml
) -- FUCK TESTS, WE'RE USING OCAML NOT JAVA FFS - WYSIWYG level editor and online level sharing (
editor.ml
) - Level downloader (
download.ml
) - Remove secret NASA hacking code from our code
(•_•)
( •_•)>⌐■-■
(⌐■_■)