Generating Enemies in the Game Using Observables

Learn to use Observables to generate enemies in the spaceship video game.

This would be a very boring game if we didn’t have any enemies to take care of. So let’s create an infinite stream of them! We want to create a new enemy every second and a half in order to not overwhelm our hero.

Let’s look at the code for the Enemies Observable and then go through it:

Get hands-on with 1200+ tech skills courses.