zell
zell

Reputation: 10204

VisualOcaml wanted to write a deminer (rather than using Ocaml's graphics library)

In Ocaml, is there easier ways to write a graphics-based toy programs like deminer (like the one that comes with Windows 95)? I find the only way is to start by scratch using Ocaml's graphics library. There must be better ways around?

Upvotes: 1

Views: 100

Answers (1)

gasche
gasche

Reputation: 31459

There are bindings to the SDL library, that provides more features than Graphics. There are actually several of them, and I'm not exactly sure which is best:

I think SdlCaml is more bare metal (probably partly automatically generated), and OCamlSDL is an older (but still occasionally updated) library with a larger user base.

Note however that Graphics is simple to use for a start, and you can still move to something more sophisticated later. If you run into speed-of-rendering issues, you have to use double buffering, as explained in the manual.

Upvotes: 2

Related Questions