Better HN
topnewbestaskshowjobs
Log inSign up

mahsu

11 karma · joined Dec 20, 2015 (10y ago) · 4 submissions

https://matthewhsu.me/
Submissions

1.

Building a Configurable Framework to Model Working Hours Regulations(medium.com ↗)

2 points · by mahsu · 5y ago · discuss

comment 10y ago · link · parent

jsoo certainly takes some getting used to, especially when it comes to actually having to care about the return types of things. Online documentation is painfully sparse and the ocaml type checker was vague at times, so there was quite a bit of trial and error. It does help that all the library bindings are parallel to their javascript counterparts.

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.

comment 10y ago · link · parent

What would be the best way to throttle fps and ensure compatibility between different refresh rates?

comment 10y ago · link · parent

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.