title: How do I use one single PNG image for multiple sprites?
body: <p>How do I use a single PNG image for multiple sprites?
  I'm trying to make a simple 2d game and I don't want to have like 20+ different image files.
  I just want to put them on one PNG file.</p>
  <h3>Example</h3>
  <p>The <code>terrain.png</code> (and <code>items.png</code>) from minecraft has different tiles on it and each of the 16x16 pixel areas are used for a different texture of a block.</p>
  <p>Can someone provide some code and an explanation?</p>