Nottingham FP Lab Blog

Functional Reactive Games and Kinect

by Ivan Perez on November 28, 2014.
Tagged as: FRP, Yampa, Game programming, Kinect.

A new version of the Haskanoid game has been published. This version features Kinect support. The image processing module is about 80 locs long, and connecting it to the rest of the game only requires modifying one module (the main input subsystem).

This new version also fixes two issues, opened by online collaborators, related to asset locations after installation and multiplatform hardware support (wiimote and kinect can now be disabled when not available, using compilation flags).

Haskanoid is a Haskell game that features some of the complex elements found in arcade games: SDL graphics and sound, Wiimote and Kinect controls, and differentiated subsystems for rendering and sound, game input, physics/collisions, game logic, etc. The game has several levels, and more can be added easily.

The code has substantial haddock documentation. You are encouraged to go through the program, point out any issues/questions you may have, suggest improvements and send pull requests.

The game is written in Haskell, using the new Yampa 0.9.6, hcwiid for wiimote access, freenect for Kinect access and SDL 1.2 for multimedia.

A version of this Haskell game (on steroids) is being developed using SDL2. You can read the announcement and watch a video of the Haskell code running on a Android tablet here. Keera Studios has more Haskell games running on Android, and being beta tested via Google Play.


comments powered by Disqus