Keera Studios published Android game written in Haskell

8 views
Skip to first unread message

Alex Berg

unread,
Mar 19, 2015, 12:58:28 PM3/19/15
to hask...@googlegroups.com
I've been following Keera Studios' efforts at using Haskell to write games. They finally published an Android game written in Haskell. It's a pretty simple game, but it's a significant milestone, as there's a ton of foundations they had to create to run Haskell and some crucial libraries on Android.

Sounds like they are using FRP ideas, the same idea that used by some JS web app frameworks/platforms, e.g. CycleJS and Elm. I'd like to do a talk for the group about FRP, but I haven't used Haskell libraries for it yet - only JS libraries.

Here's their blog post about this event, which illustrates their efforts and its significance.



"""
The game consists of 2K lines of code, of which 1K is game specific and 400 are Arrowized Functional Reactive code. Everything is written in Haskell, except for three “transgressors”: 1) a Java activity that loads all the libraries and passes events to our program, 2) a C main that loads the RTS and calls our Haskell main, and 3) C++ functions to call Java and save the game state using Android’s shared preferences API.
...
The game was compiled using the Android backend for GHC, and the SDL libraries used weresdl2sdl2-imagesdl2-mixer and sdl2-ttf. Our current version is compiled against the older hsSDL2 available on github; a newer version is now available separately, but we are not using it just yet.
...
Finally, our game includes over 30 libraries. We have written a few scripts to list all the dependencies and copy them from GHC’s install path to the project directory so that they are packaged with the Android APK.

"""
Reply all
Reply to author
Forward
0 new messages