Please log in to watch this conference skillscast.
Idealised versions of board and simple arcade games render beautiful snippets of Haskell code. But real games need to deal with user input and output, animation, sound, asset management, UI plasticity, graphics acceleration, concurrency and networking, all of which involve the outside world and add side effects throughout the program. Most of the problems and patterns that we find in other kinds of software can also be found in some form in game programming. As such, game programming represents Haskell’s ultimate challenge.
There have been multiple attempts at proving that Haskell can be used to write games, but none have been definitive enough to convince those outside the community. Keera Studios was founded as a way to turn this situation around, by creating more and more complex games and demonstrate, by example, the possibilities and benefits of functional programming.
To prove that Haskell is a suitable choice for game programming, we want to do real multimedia and interact with real modern hardware, target (at least some) gaming platforms; and show that FP principles and techniques are beneficial for game development.
Our work in game programming has demonstrated that Haskell is a worthy contestant. We have created games that interact with Kinect, Wiimotes and Leapmotion, use OpenGL and SDL2 (SDL is used in games such as Angry Birds) for multimedia, target mobile platforms such as Android and are available for purchase on Google Play. We have also explored different ways to take advantage of pure functional programming, either by means of an embedded DSL (like in our Cross-platform Graphical Adventure Game Engine GALE) or using FRP (Keera Magic Cookies, Keera Breakout), and also for game testing and profiling purposes.
In this workshop I will demonstrate, by example, how to write games that combine these features, what to watch for, where the current challenges lie, and how we can, as a community, use the creative and fun process of game programming to bring Haskell to the world and vice versa.
Whoever wants to follow the talk with their own laptops should be able to compile this haskell package:
There's no need to read/process the material ahead. If it compiles, they are good to go.
It usually takes just 2-7 minutes on my machine, so if they can't get it working before the talk, that's ok.
I strongly recommend using a sandbox.
Workshop: Haskell’s ultimate challenge: Game programming for Fun and Profit - Part 2
Ivan is the founder of the Haskell Game Programming company Keera Studios. He is a PhD candidate at the University of Nottingham, under the supervision of Henrik Nilsson and Graham Hutton.