Haskell library for 2D drawing [closed]

Instead of picking individual libraries, I’ll have a go at a quick overview at all of them, as listed in the Graphics section on Hackage.

Basic frameworks:

OpenGL

  • Part of the Haskell Platform
  • Used for many small 2 and 3D games.
  • Examples: lambdacube-engine, roguestar-gl, hpong, monadius, raincat, frag

GTK

cabal install cairo
  • Used for high quality two-d graphics/vector graphics.
  • On Hackage
  • Examples: diagrams, 4blocks, gameclock

QTHaskell

  • Relatively little use, but when it is used, it is used notably.
  • Not on Hackage, found here, due to C++ issues
  • Notable users: Nikki and the Robots, a commercial game.

SDL

cabal install sdl
  • On Hackage, quite widely used for game-like, interactive apps with 2D graphics.
  • Examples: haskgame, Eternal10Seconds, HTicTacToe, RainCat, starrover

X11

cabal install X11

Venerable Unix user interfaces.

Examples: xmonad.

GD

cabal install gd

The GD graphics system. Package on hackage.

Examples: wordcloud, sparklines.

HOgre

cabal install hogre

Bindings to the Ogre game graphics system.

Now, besides these game layers, there are many higher level frameworks and tools:

Diagrams

cabal install diagrams

2D vector diagrams (e.g. for math), built on cairo.

  • Examples: fractals.

Gloss

cabal install gloss

2D graphics, very easy interface, relatively new. See TomMD’s comment.

  • Examples: functional flocking

Cal3D

cabal install cal3d

Bindings to the Cal3D animation package.

Chalkboard

cabal install chalkboard
  • URL
  • Read the tutorial

OpenGL-based combinators for generating images, used in teaching.

TeaHS

cabal install TeaHS
  • URL

A simple library for use creating 2D games, inspired by the Ruby library Tea.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)