Composing a video game in F#

This week it was my opportunity to present a topic for 15 minutes at the MLP group's ritual Tuesday afternoon tea and cakes session (yes - we are based in the UK). I thought it might be fun to knock up a little game with the Microsoft functional programming language F#. With only a few hours to spare at the weekend I decided to go with a retro style game and an old favourite of mine - the light cycle game sequence featured in the 80s movie Tron. So after about 4 hours I had a 2 player game in Windows Forms with optional support for XBox 360 controllers with managed DirectX all in under 200 lines of F#; and come tea time I even had some players. If you fancy having a go yourself the code can be viewed on the F# Wiki.

Light cycles

Have fun,