Is it possible to write games like Pac-Man in a functional language?

This page summarizes the projects mentioned and recommended in the original post on news.ycombinator.com

InfluxDB – Built for High-Performance Time Series Workloads
InfluxDB 3 OSS is now GA. Transform, enrich, and act on time series data directly in the database. Automate critical tasks and eliminate the need to move data externally. Download now.
www.influxdata.com
featured
SaaSHub - Software Alternatives and Reviews
SaaSHub helps you find the best software and product alternatives
www.saashub.com
featured
  1. elm-games

    All Elm Games (hopefully)

  2. InfluxDB

    InfluxDB – Built for High-Performance Time Series Workloads. InfluxDB 3 OSS is now GA. Transform, enrich, and act on time series data directly in the database. Automate critical tasks and eliminate the need to move data externally. Download now.

    InfluxDB logo
  3. Elm

    Compiler for Elm, a functional language for reliable webapps.

    I think the most fun and approachable way for beginners to build games with functional programming is with Elm [1].

    See a few (small, demo) games built by the community in [2] .

    Notice Elm has abandoned the FRP approach in favor of Model-View-Update [3].

    [1] https://elm-lang.org/

  4. repl

    Fable online REPL (by fable-compiler)

  5. Fable: F# |> BABEL

    F# to JavaScript, TypeScript, Python, Rust and Dart Compiler

  6. OCamlODE

    OCaml bindings for the Open Dynamics Engine (ODE), a 3D physics engine.

  7. chips

    A clone of Chips Challenge in Haskell (by egonSchiele)

    https://github.com/egonSchiele/chips

    It's not better than using C, but worked just fine when I wrote it in 2014. I'd say, unless you're planning to sell it, write the game in whatever language you enjoy.

  8. minild72

    :space_invader: Mini Ludum Dare 72: p_ng

    Just to pitch in with a Clojurescript/Quill example, where the game loop takes a function that takes game state, modifies it, and returns it for the next iteration of the game loop.

    https://github.com/opyate/minild72/blob/master/src/pong/core...

  9. SaaSHub

    SaaSHub - Software Alternatives and Reviews. SaaSHub helps you find the best software and product alternatives

    SaaSHub logo
  10. Monadius

    2-D arcade scroller

  11. defect-process

    Defect Process (2d hack n' slash game) full source code

    Totally possible. Here’s a link to a game recently released on Steam that is written in Haskell and whose source is open: https://github.com/incoherentsoftware/defect-process

    I recently hacked together an asteroids clone in Haskell with SDL2 and not much else. It’s not super pretty but it works.

    I’ve talked to folks who’ve been using the newer effects libraries taking advantage of the new delimited continuation primops in GHC 9.6 for their game dev. Even with very high level libraries their reporting acceptable performance.

    With enough dedication I’m certain anyone could make whatever game they wanted in an FP language.

  12. bfhs

    bf interp in hs

    Made a mostly pure brainfuck in haskell where output collects to list in state & tape is a zipper. Machine type is Brain. Compute returns Brain & bool for whether program halted or is wanting input to overwrite current tape value & resume pure evaluation

    https://github.com/serprex/bfhs/blob/master/minibf.hs

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts

  • Should I pick up OCaml or Haskell?

    3 projects | /r/functionalprogramming | 24 Aug 2022
  • 3 Options to Avoid Side-Effects in Web Dev

    2 projects | dev.to | 23 Apr 2025
  • Reactivity in Programming

    2 projects | dev.to | 15 Apr 2025
  • How I host Elm web applications with GitHub Pages

    15 projects | dev.to | 17 Oct 2024
  • Learning Elm by porting a medium-sized web front end from React (2019)

    15 projects | news.ycombinator.com | 29 Feb 2024

Did you know that Haskell is
the 25th most popular programming language
based on number of references?