GodotRx's icon

GodotRx 1.0.0 Scripts 4.1 Community

Submitted by user Neroware; MIT; 2023-11-20

GodotRx - Reactive Extensions for the Godot Game Engine version 4 (GDRx)

Why Rx? ReactiveX allows a more declarative programming style working on observable data streams. It encourages high cohesion and low coupling rendering the code more easily readable and extendable.

The Godot Engine brings a well thought-out event system as well as a nice implementation of coroutines to the table. It allows you to easily implement asynchronous code execution, meaning that code is not run in the sequence order which it is written in. An observer listens to an observable event which fires when something important happens in the program resulting in side-effects for the connected instances, this can be e.g. a player attacking an enemy or an item, which is picked up.

Rx extends this idea by turning all forms of data within the program like GD-signals, GD-lifecycle events, callbacks, data structures, coroutines etc. into observable data streams which emit items. These data streams, referred to as 'Observables', can be transformed using concepts from the world of functional programming. (Say hello to Flat-Map, Reduce and friends!)

View files Download Submit an issue Recent Edits