Re:MariOCaml: HTML5 Mario, written exclusively in OCaml
by mahsu on Sunday December 20, 2015 @06:45PM
(#10768809)
The movement is really hacky (https://github.com/mahsu/MariOCaml/blob/master/object.ml#L16...), whereas the actual game takes a more fine-tuned approach (http://s276.photobucket.com/user/jdaster64/media/smb3_physic...). It was tough to keep things simple and use a single set of rules without making everything too floaty or heavy.
Re:MariOCaml: HTML5 Mario, written exclusively in OCaml
by yoklov on Sunday December 20, 2015 @07:32PM
(#10768939)
I don't think "simple and use a single set of rules" describes the control code for any shipping (action) game. At least none I've worked on. They're all complex piles of special cases and hacks in an effort to make the movement 'feel' right (which works, but is disheartening at first, until you start to expect it).
Re:MariOCaml: HTML5 Mario, written exclusively in OCaml
by striking on Sunday December 20, 2015 @08:23PM
(#10769070)
The Sonic Physics Guide is how I implemented my first (good) platformer physics.
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.
Re:MariOCaml: HTML5 Mario, written exclusively in OCaml
by striking on Sunday December 20, 2015 @06:11PM
(#10768701)
I agree. It's difficult to get platformer physics right the first few times around, though. It's deceptively difficult.
Re:MariOCaml: HTML5 Mario, written exclusively in OCaml
by joshschreuder on Monday December 21, 2015 @01:00AM
(#10769818)
I think Mario has more inertia here than in the actual Mario games, he seems to slide forwards rather than stop as quickly as I would expect.
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