I'd like to experiment with Haskell a bit, and I'm hoping to write a small 2D arcade game (Tetris or Breakout). Can you recommend a simple graphics library that will help me to get started quickly?
Btw, I've been experimenting with SDL and wxWidgets, but haven't yet succeeded in running any samples because of dependency problems, working on it...
It's not exactly a "simple" library, but there is a lot of information online about OpenGL and GLUT, as well as some very good tutorials and a ton of example code.
The biggest issue you're up against is that the OpenGL and GLUT bindings in Haskell do not include the libraries that they bind to. (This is true for wxWidgets as well.) A lot of Linux distros come with OpenGL binaries bundled, but not Windows. The Haskell Platform was supposed to fix this, but it didn't seem to for me.
So, assuming you're installing on Windows, here's what I'd recommend you try:
OpenGL is very stateful, so you may find the Haskell code a little daunting if you haven't fully grokked Monads yet. I'm using my OpenGL experiments as motivation to finally wrap my mind around the concept.
Good luck!
Have you perused the following lists:
Haskell Graphics Libraries: There appears to be quite a few interfaces to OpenGL, SDL, and other graphic libs here.
Haskell GUI: There's some wxWidget libs here as well.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With