Par thy Android - A short followup on "60 FPS to 500"

Last week we published a blog post briefly outlining several steps of optimization of a Haskell game. In the article, the last two steps, which referred to parallelism and concurrency respectively, were inverted, making it sound like the Android version was using the parallel library. ...

From 60 Frames per Second to 500 in Haskell

Haskell is often advertised as fast, easy to parallelize and to optimize. But how much of that is really true? We are going to demonstrate it using a game we are building, including how many changes we had to introduce to increase the game speed by 700% on desktop, how we managed to go from increasing memory consumption in the order of hundreds of megabytes down to constant memory consumption of only 3MB. We’ll also see the impact it had on Android. ...

Declarative Game Programming -- slides, videos and code

Earlier this month, Henrik Nilsson & Ivan Perez presented a tutorial at PPDP 14 on Declarative Game Programming. The goal was to show how real game programming is possible in a purely functional, declarative way. One way of doing so, seeing games as networks of interconnected signals and signal transformers, results in clear, reusable, modular code. To illustrate these ideas, a small but realistic game was demonstrated, featuring many of the complex elements found in arcade games: SDL graphics and sound, Wiimote controller, and differentiated subsystems for rendering and sound, game input, physics/collisions, game logic, etc. The game has several levels, each with its own background and music. To help others interested in functional game programming, all the talk material have been made available, including the slides and the full game code. ...

The most inspiring green screen you will ever see

While Haskell, Idris and other Functional Programming (FP) languages enable writing elegant code, the road to production is, well, bumpy. Writing code for industrial environments has added costs that make certain products too expensive and infeasible in practice. ...

Creating board games in Haskell in 100 lines of code

While code written in Haskell is very declarative and mathematical, as soon as we try to create a user interface, we’ll be slapped on the cheek by a wave of IO that will turn our code procedural in no time. One of the main ideas behind this gaming (ad)venture called Keera Studios is to write more mathematical, robust games. We want these games to be easy to understand and expand, and we want them to look good too. The current trend in this respect is based mostly on FRP. However, FRP is still on its way, and no Haskell implementation (AFAWK) performs really well. (We recently tried all of them, and found that there’s still a lot to be done to be able to fully rely on FRP for interactive applications). In this post we’ll see that, through an ad-hoc layer that will hide most of the controller and separate the UI from the mathematical model, we can implement nice-looking games in Haskell that have declarative, pure definitions and use graphics efficiently for the implementation. ...