MariOCaml: HTML5 Mario, written exclusively in OCaml
github.com
github.com
I have no idea how to word what I mean. Is anyone else experiencing this too?
Also, I can move beyond the beginning of the level. :P
https://info.sonicretro.org/Sonic_Physics_Guide
It's fairly hack free in the abstract. But reality is often a little different, based on the quirks of your collision detection.
At 144hz with a fixed time-slice set for 60hz, you'd have one update on the 2nd, 4th, 7th, 9th, 12th, 14th, etc. frames.
I tried to stick to statically allocated values, but there is clearly some sort of GC happening in Firefox. Chrome is stable, but Internet Explorer is extremely noisy.
ocamlbuild -use-ocamlfind -pkgs js_of_ocaml,js_of_ocaml.syntax -syntax camlp4o main.d.byteThe nice thing about haxe is it has cross platform tooling and libraries for games. The language itself is a little weird and seems homegrown but it works.
Hopefully some of this demo can get rolled into some kind of cross platform game library! I would love to write games in ocaml that target mobile/desktop and web (via js).
Anyway, would be nice to hear the author experience using js_of_caml.
EDIT: Is the canvas api the future of web apps? I mean if someone can write such an interactive web app with no 'javascript library of the month' makes you think of all these JS libs doing the same thing over and over, or is Ocaml such a nice language that makes working with the browser much nicer?
I think naming it this way makes a lot of sense, since OCaml has a lot of <target-type>_of_<source-type> functions, so it is a pretty clever nod to OCamls conventions.
Pattern matching with Ocaml is definitely a plus :P, but I definitely felt that working with Ocaml was substantially more challenging. Especially since none of us had prior experience in game development, much less functional game development, the code we produced was riddled with mutability. It would've helped to look at established design patterns first.
I'm really excited to see this project because it's the first jsoo program I've seen with a logical structure and a considerable amount of logic implemented in OCaml that ties into JS.
Movement definitely feels a bit off, although not the worst I've ever seen in a Mario fan game, not by a long shot.
The textbooks are "OCaml from the very beginning" and "More OCaml: Algorithms, Methods & Diversions"
#ocaml on irc.freenode.net might be of help for adequate suggestions.
The Functional Approach to Programming (Cousineau)