Past Meetup

[Claes Worm] - Flappy, an extended variant of the flappy-bird game in OCaml

This Meetup is past

27 people went

Every last Tuesday of the month

Location visible to members


This talk is based on the codebase of 'Flappy' - an extended variant of the flappy-bird game written in OCaml.

The game was written as an example of how to write simple and purely functional games in OCaml - with an architecture resembling that of Elm's. It then also became a playground for tackling some common problems in game programming and FP; subtyping of entities and referencing entities from entities.

The focus of the talk will be:

* The Elm architecture in OCaml, or how to write a simple purely functional game in OCaml with the browser as backend
-- The details of the architecture - what is needed
-- What was my experience programming Flappy this way?
* How OCaml enables a unique form of typesafe subtyping of game-entities, using polymorphic variants.
* Referencing game-entities recursively in a purely functional program
-- How entity-referencing is solved in Flappy
-- Discussion of the problem in general, including pros and cons of solutions.
* Discussion of advantages and limitations of pure functional programming for games

The code can be found at GitHub:


We have set up a collaboration with Prosa, who generously offered to provide a location for our regular meetups. Please see Prosa's Calendar for more details: Prosa Calendar (

The ADA meeting room fits about 25 people and if we need more space, we can use the canteen (PASCAL), which has a capacity of at most 50 (fire regulation).


Ramón and Joakim