Try to write a "pong game" in OCaml using Raylib...
- we created a new switch locally for the project
opam switch create . 5.1.1
eval $(opam env)
- and we install
dune
to manage the project- you can install others tools like
utop
orocaml-lsp-server
.
- you can install others tools like
- you also need to install the raylib ocaml bindings
- automatically install dependencies if supported by your distro:
opam depext raylib
- and install raylib:
opam install raylib
- automatically install dependencies if supported by your distro:
dune exec opong
- drawing the window
- drawing the players, the ball and the let
- managing players movements
- managing ball movement
- reset the position when one player miss the ball
- counting score
- be more acurate when ball hitting players
- improve the ball movement (manage different angles, ...)
- add effects on the ball (slice, ...)