title: How to make a hitbox?
body: <p>I'm making a game similar to mario and I've got this map generated by arrays and images. But my problem is that I don't know how to make a hitbox system for all the tiles. I've tried to have a position based collision system based on your position on the map</p>
  
  <p>like this</p>
  
  <pre><code>if(xpos &gt; 10*mapX &amp;&amp; xpos &lt; 14 * mapX){
      ypos -= 1;
  }
  </code></pre>
  
  <p>But I don't want to that for every wall or hole.
  So is there a way to check in front, below and above the character to see if there is a hitbox there and if there is you cant move that direction or fall? </p>
  
  <p>Thank you</p>