๊ฒŒ์ž„ ๋ฃจํ”„

By @barryrowe

This recipe demonstrates one way you might create a Game Loop as a combined set of streams. The recipe is intended to highlight how you might re-think existing problems with a reactive approach. In this recipe we provide the overall loop as a stream of frames and their deltaTimes since the previous frames. Combined with this is a stream of user inputs, and the current gameState, which we can use to update our objects, and render to to the screen on each frame emission.

Ultimate RxJS

Example Code

( StackBlitz )

Game Loop

supporting js

html

Operators Used

Last updated