Iterative Functional Reactive Programming with the Nu Game Engine - An Informal Experience Report

This is an experience report on the design and usage of the Nu Game Engine, a purely-functional 2D game engine written in F# -

Iterative Functional Reactive Programming with the Nu Game Engine

Synopsis

The Nu Game Engine certainly qualifies as 'functional reactive' in that -
1) it is reactive in that it uses user-defined events to derive successive simulation states.
2) it is functional in that is uses pure functions everywhere, even in the event system.

However, I cannot describe it as the typical first-order or higher-order FRP system since it uses neither continuous nor discrete functions explicitly parameterized with time. Instead it uses a classically-iterative approach to advancing game states that is akin to the imperative tick-based style, but implemented with pure functions.

Thus, I gave it the name of 'Iterative FRP'. It's a purely-functional half-step between classic imperative game programming and first / higher-order FRP systems. This document discusses the major plusses and minuses to using this 'iterative' FRP style.

An aside about the document -

I released an earlier version of this PDF along with an earlier version of the engine, but had to make significant revisions due to a fundamental flaw in the engine's previous design, and thus removed it.

Hopefully this newer version will inform us about the properties of this 'iterative' style of FRP in contrast to the known styles.

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

I for one

am excited. Thanks for the post.

Also hiring part-time

Thanks!

BTW, I'm looking to hire someone part-time with expertise in functional programming and / or game development to help work on the engine as well as a game with it.

I'm available at bryanedds@gmail.com if anyone is interested.