Chapter 6. Building a Simple ClojureScript Game with Reagi
In the previous chapter, we learned about how a framework for Compositional Event Systems (CES) works by building our own framework, which we called respondent. It gave us great insight into the main abstractions involved in such a piece of software, as well as a good overview of core.async
, Clojure's library for asynchronous programming and the foundation of our framework.
Respondent is but a toy framework, however. We paid little attention to cross-cutting concerns, such as memory efficiency and exception handling. This is okay, as we use it as a vehicle for learning more about handling and composing event systems with core.async
. Additionally, its design is intentionally similar to Reagi's design[1].
In this chapter, we will cover the following topics:
- Reagi, a CES framework built on top of
core.async
- Using Reagi to build the rudiments of a ClojureScript game, which will teach us how to handle user input in a clean and maintainable...