Step One: Watch Mary Rose Cook Live Codes Space Invaders from Front-Trends. (The second worst conference name ever?)
Step Two: Fork this gist.
Step Three: Respond to this question in your fork: What is one approach you can take from this Mary's code and implement in your project?
How she organized code:
- Moving logic from the game loop into the game class: having one update method on game, and having that function call slime.update() and ball.update().
- Puting requestAnimationFrame in a
tick
method - Having a 'keyboarder' class.
Step Four: Totally Optional: take a look at some of the other forks and comment if the spirit moves you.
👍