Systematic Gaming

August 29, 2008

Functional Gaming: Writing a game in OCaml

Filed under: game programming, ocaml — Tags: , , — systematicgaming @ 2:25 am

If you’re following the latest trends in multi-threading you may have seen some renewed interest in functional programming.

When you bring up functional programming you’ll often get one of two opinions:

  • It’s the silver bullet of parallelism, and will allow automatic parallelizing of code, and also is easier to read, write and creates less bugs.
  • I remember those from university, they made my head hurt and ears bleed. Nobody uses those type of languages in the real world.

I find you’ll get more of the second responses, because really, who codes in functional languages outside of university?

Of course I’m biased since I generally hang out with other game programmers. If you program for consoles you do it in C or C++, since there aren’t any other compliers provided. So nobody I know uses functional programming on a daily basis.

That said, I’m intrigued by the possibilities offered by functional programming. I can see how they can parallelize well, and they allow you to write some clean mathematical code. To form a more informed opinion I decided to start exploring the world of functional programming.



Create a free website or blog at