Flappy Square

A small demo for Retrocomputing with Clash

Flappy Square is a somewhat-simplified implementation of the game Flappy Bird, as an FPGA circuit. Its purpose is to serve as an introductory example to Clash, the Haskell-to-FPGA compiler. It is based on the "Haskell first" approach of my book Retrocomputing with Clash, but skips some of the more advanced generalization opportunities in favor of requiring less background.

Flappy Square was originally developed for my Haskell eXchange 2022 talk Clash: Haskell for FPGA Design: It's easy as 1-2-3...419,200.

The aim was to build something that is simple enough that it can be completely explained in a 50-minute talk aimed at an audience with existing Haskell experience, but still featured enough that the end result is recognizable and fun as a game.

The complete source code is availabe on GitHub. It comes with Shake rules for building and uploading to a variety of FPGA development boards. Support for other boards based on similar FPGA families should be straightforward.

Learn more about Clash and the design of old hardware with my book Retrocomputing with Clash: Haskell for FPGA Hardware Design.