From HaskellWiki
Revision as of 23:10, 30 June 2015 by SimonMichael (talk | contribs) (link to second Frag thesis)
Jump to navigation Jump to search



Frag is a 3D first person shooting game written in Haskell, by Mun Hon Cheong. It is licensed under the GPL. The design and implementation of Frag is described in Mun's 2005 undergraduate thesis, Functional Programming and 3D Games. An AI system for Frag is described in Jayatheeban Soundararajan's 2007 undergrad thesis, [ Functional Programming and 3D Games].

YouTube Video


  • Yampa, a domain-specific embedded language for the programming of hybrid systems that using the concepts of Functional Reactive Programming (FRP) was used to program the game entities.
  • The Quake 3 BSP level format, Q3Map2, and the MD3 format for models and animations are used in this game.
  • Sven Panne's OpenGL binding, HOpenGL is used to render graphics.


  • GHC 6.8 or greater, providing HOpenGL-2.0.
  • OpenGL drivers that support the vertex array and multitexture OpenGL extensions
  • Frag has portability problems. It is known to work on i386 and AMD64, and known not to work on big-endian systems.

See the blog article A Haskell eye for the windows guy for the list of requirements and how to install for Windows users.


The code can be downloaded from Hackage; it is also distributed via a Darcs repository:

darcs get

Darcs is the standard revision control system of the Haskell community.


Frag needs contributions from the community! Darcs send patches to Don Stewart.


(Note that these screenshots are of the old level, which was replaced for copyright reasons.)





BibTeX Entry

    author   = {Mun Hon Cheong},
    title    = {Functional Programming and 3D Games},
    year     = {2005},
    month    = {November},
    school   = {University of New South Wales},
    address  = {Sydney, Australia},
    abstract = {Games are commonly programmed in imperative languages.
                Functional languages have been known to have benefits but have
                rarely been used to program games. In this thesis we implement
                a first person shooting game in Haskell and Yampa. The merits
                of this approach are examined.}