FunctionalProgrammingInGames
Functional Programming in Games Resources
Install / Use
/learn @Andrea/FunctionalProgrammingInGamesREADME
Functional Programming In Games
Welcome to this page! Hope you find what you are looking for
I don't know you, but when I was learning how to do funcitonal programming I wanted to program fun things, or something other than a "website for your cat(tm)" so I was looking for FP in games and there wasn't much around at the time... so I created this list.
Please note: this list is not complete. If you find something missing or incorrect, please send a PR or create an issue specifying the problem.
Thanks
Some resources for Functional Programming in Games Resources
Books
- Haskell: Game Programming in Haskell
- F#: Friendly F# Not totally about games but all examples are game related
- Lisp: Land of Lisp
- Racket: Realm of Racket
- Rust:
- Learn game development in Rust
- Hands-on Rust- Effective Learning through 2D Game Development and Play
- arewegameyet.rs links to 5+ books, and there are also tutorials, videos, etc.
Tutorials
- F# game tutorial series with Monogame
- Arcadia - Clojure on Unity3d
- Building flappy bird from scratch with Arcadia at November Clojure NYC Meetup
- Writing a 2048 clone in elm
- Caves of Clojure a blog series on how to develop a Roguelike in Clojure. Code.
- Game development in Clojure (with play-clj)
Videos
- Building a platform game from the ground up with F# and MonoGame
- A reactive game stack: Using Erlang, Lua and Voltdb to enable a nonsharded game world
- Writing a game in Haskell
- F# in Social Gaming
- My adventures with Elm
- Morgan Mullaney - Well I Wouldn't Want To Make a Dysfunctional Game (Video)
- Games and 3D Graphics in Arcadia
- CodeMesh 2014 - Arcadia: Functional Video Game Development
- Making Games at Runtime with Clojure (with play-clj)
- RustConf 2018 - Closing Keynote - Using Rust For Game Development by Catherine West
- Rust Linz, 2021 - Herbert Wolverson - Learning Rust with Game Development - this video is by the author of Hands-On Rust
Presentations
Papers
- Monadic Scripting in F# for Computer Games
- A Formal Specification for Casanova,a Language for Computer Games
Libraries and engines
Haskell
- HELM An FRP game engine inspired by Elm.
- FunGEn A BSD licensed, cross platform non FRP game engine written in Haskell.*
- Haskell game related libraries
- LambdaHack Haskell game engine library for roguelike dungeon crawlers.
F #
- Duality Scripting Allows you to write F# on the Duality Game Engine (the compiler is integrated into the editor so you can write code on any editor you want). This plugin supports C# too.
- Nu Game Engine cross-platform F# 2D game engine. It encourages to use as the architecture a variation of FRP which he calls Iterative Functional Reactive Programming.
- Unity 3D can be used with F#. There are multiple examples in the internet, for example this one.
- Godot can be scripted with F#. Setup guides for Godot 3 and Godot 4.
- Monogame based F# engine Mibo
Clojure
- play-clj A wrapper around libGDX. It supports pc, Android and iOS (through RoboVM).
- brute An Entity Component System which supports both Clojure and ClojureScript. Some information on the thinking behind the implementation are on the author's blog.
- Arcadia Clojure integrated into the Unity engine. It uses ClojureCLR. It has been used for interactive art installations and game jam games.
Scala
- Indigo: A Scala 3 / Scala.js 2D game engine built specifically for functional programmers.
- SGL: Scala Game Library (SGL) is a library for developing cross-platform 2D video games in Scala. It provides a high-level API for building games, and can export games to the Desktop, Android, and the web. More platforms, including iOS and consoles, are on the roadmap.
- Minart: Scala library with low-level primitives for making media applications such as games. Compiles to the JVM native and JS.
Awesome Gamedev Repositories
- OCaml: Awesome OCaml Gamedev
Games
Shipped or in development commercial games made with FP languages
- Onikira: Demon Killer is a 2D side scrolling beat ‘em up set in a fantasy feudal Japan. It's on Steam (tho unsupported), parts of it written in F#.
- Wayward Tide A game in development, targeting pc and written in Haskell
- Magic Cookies Published on iTunes and Google Play for Android, it's written in Haskell.
- Nikki and the Robots is a 2-dimensional platform game written in Haskell, now open source. It's published on Steam.
- [Asteroid Sharpshooter] published on Xbox Live Indie Games, written in F#. Slides on the development process. His blog has more information on how he made F# work with XNA on Xbox 360.
Open source
-
Game jam games
- An Evening of Modern Dance made with Arcadia (Clojure) for Ludum Dare 32. Source available.
- Elm Flyer made with Elm. Source.
- Castle of Elm 7DRL game made in Elm. Source, slides on Elm and developing a game jam game with it.
- Hyper Loop Runner LD47 racing game made with Scala. Source
- Volcano Lullaby LD50 platforming game made with Scala. Source
- 10 Second Lander MJ130 clone of lunar lander with a time limit. Source
- Xtreme Skydive 3D 32BitJam entry based on Nokia Skydiver. Source
-
More open source games, by language
- Haskell
- Haskanoid A breakout game in Haskell using SDL and FRP, with Wiimote and Kinect support. Available on Google Play.
- Allure of the Stars is a near-future Sci-Fi roguelike and tactical squad game written in Haskell.
- Nikki and the Robots commercial game written in Haskell, now open source.
- Scala
- The Minartaur's Lair Roguelike following the rougly following the "Yet another roguelike" tutorial. itch.io
- Haskell
-
Meta - games that teach functional programming concepts in-game
- cube-composer
- "A puzzle game inspired by functional program
- cube-composer
Related Skills
himalaya
341.2kCLI to manage emails via IMAP/SMTP. Use `himalaya` to list, read, write, reply, forward, search, and organize emails from the terminal. Supports multiple accounts and message composition with MML (MIME Meta Language).
node-connect
341.2kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
84.5kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
coding-agent
341.2kDelegate coding tasks to Codex, Claude Code, or Pi agents via background process
Security Score
Audited on Feb 17, 2026
