Sidequest

Preface

With the canvas setup, let's start by rendering the sky background and the scrolling ground along the bottom.

Here's a list of what we'll cover to accomplish this:

  • 🎯 A helper to load images
  • 🎯 A class to represent data such as position
  • 🎯 A class to represent a sub-image of the sprite sheet
  • 🎯 A class to manage drawing and scrolling the ground
  • 🎯 A game loop to update the position of the ground per frame
  • 🎯 A sprite lookup to tell us where to pull sprites from the sprite sheet