Search⌘ K
AI Features

Introduction to Keeping Application Pure Through Spaceship Game

Explore how to keep an application pure by building a reactive spaceship game that leverages RxJS observables. Understand how to manage game state within observable pipelines to avoid external variables, covering player controls, enemies, shots, and a dynamic starry background.

We'll cover the following...

To show how we can keep an application pure, we’ll build a video game in which our hero fights endless hordes of enemy spaceships. We’ll make heavy use of Observable pipelines, and I’ll point out along the way when it might be tempting to store state outside the pipeline and how to avoid it.

Video games notoriously keep a lot of external state—scores, screen coordinates for the ...