Mobile Game Programming in Haskell

被引:1
|
作者
Zeller, Christina [1 ]
Perez, Ivan [1 ]
机构
[1] Keera Studios Ltd, Nottingham, England
来源
FARM'19: PROCEEDINGS OF THE 7TH ACM SIGPLAN INTERNATIONAL WORKSHOP ON FUNCTIONAL ART, MUSIC, MODELING, AND DESIGN | 2019年
关键词
functional programming; game programming; mobile applications; games; Haskell;
D O I
10.1145/3331543.3342580
中图分类号
J [艺术];
学科分类号
13 ; 1301 ;
摘要
The use of pure functional languages for interactive applications, especially mobile applications and games, is still rare. Reasons include the lack of libraries and frameworks that implement necessary features, poor integration with existing toolchains, and the lack of examples that demonstrate how to best structure large interactive applications in a way that is scalable in terms of performance and modularity. In this paper we identify three specific challenges that limit the application of functional programming specifically to mobile apps and games: purity, compositionality, and abstraction. We discuss solutions to these problems, and propose a framework for mobile app programming that completely separates logic from IO, resulting in an architecture that is referentially transparent, modular, scalable, backend agnostic and trivial to test. We implement this proposal in FAWN, a collection of libraries that provide higher-level notions needed in commercial applications, like resource management, widgets, storing user preferences, audio playing, image rendering, and composable applications. We have verified the suitability of this approach by using it to build, in Haskell, six mobile games for iOS and Android.
引用
收藏
页码:37 / 48
页数:12
相关论文
共 50 条
  • [1] Haskell in space -: An interactive game as a functional programming exercise
    Lüth, C
    JOURNAL OF FUNCTIONAL PROGRAMMING, 2003, 13 : 1077 - 1085
  • [2] Polytypic programming in Haskell
    Norell, U
    Jansson, P
    IMPLEMENTATION OF FUNCTIONAL LANGUAGES, 2004, 3145 : 168 - 184
  • [3] A Mobile Game Algorithm for Programming Education
    Hwang, SunMyung
    Yeom, Hee Gyun
    INTERNATIONAL JOURNAL OF SOFTWARE INNOVATION, 2022, 10 (02)
  • [4] Haskell programming language
    Anon
    Database and Network Journal, 2005, 35 (05):
  • [5] Deterministic Parallel Programming with Haskell
    Coutts, Duncan
    Loh, Andres
    COMPUTING IN SCIENCE & ENGINEERING, 2012, 14 (06) : 36 - 42
  • [6] Learn Physics by Programming in Haskell
    Walck, Scott N.
    ELECTRONIC PROCEEDINGS IN THEORETICAL COMPUTER SCIENCE, 2014, (170): : 67 - 77
  • [7] Distributed programming in Haskell with ports
    Huch, F
    Norbisrath, U
    IMPLEMENTATION OF FUNCTIONAL LANGUAGES, 2001, 2011 : 107 - 121
  • [8] Libraries for Generic Programming in Haskell
    Jeuring, Johan
    Leather, Sean
    Magalhaes, Jose Pedro
    Yakushev, Alexey Rodriguez
    ADVANCED FUNCTIONAL PROGRAMMING, 2009, 5832 : 165 - 229
  • [9] Probabilistic functional programming in Haskell
    Erwig, M
    Kollmansberger, S
    JOURNAL OF FUNCTIONAL PROGRAMMING, 2006, 16 (21-34) : 21 - 34
  • [10] Strong mobility in Mobile Haskell
    Du Bois, Andre Rauber
    Trinder, Phil
    Loidl, Hans-Wolfgang
    JOURNAL OF UNIVERSAL COMPUTER SCIENCE, 2006, 12 (07) : 868 - 884