title: Techniques for generating a 2D game world
body: <p>I want to make a 2D game in <strong>C++</strong> using the <strong>Irrlicht</strong> engine. In this game, you will control a tiny ship in a cave of some sort. This cave will be created automatically (the game will have random levels) and will look like this:</p>
  
  <p><img src="https://i.imgur.com/HxEI3.png" alt="Cave"></p>
  
  <p>Suppose I already have the the points of the polygon of the inside of the cave (the white part). How should I render this shape on the screen and use it for collision detection? From what I've read around different sites, I should use a triangulation algorithm to make meshes of the walls of the cave (the black part) using the polygon of the inside of the cave (the white part). Then, I can also use these meshes for collision detection. Is this really the best way to do it? Do you know if Irrlicht has some built-in functions that can help me achieve this? </p>
  
  <p>Any advice will be apreciated.</p>