title: How to create 2D playing field fot a game?
body: <p>In JAVA, I made this using Path2D:
  <a href="http://postimg.org/image/g99862hd1/" rel="nofollow">Before</a></p>
  
  <p>I used this code for this:</p>
  
  <pre><code>// First Bezier curve points
  P1 = new Point2D.Double(0, 480); // Start Point
  P2 = new Point2D.Double(400, 350); // End Point
  ctrl1 = new Point2D.Double(50, 450); // Control Point 1
  ctrl2 = new Point2D.Double(200, 260); // Control Point 2
  // Second Bezier curve points
  P3 = new Point2D.Double(400, 350); // Start Point
  P4 = new Point2D.Double(800, 600); // End Point
  ctrl3 = new Point2D.Double(600, 440); // Control Point 1
  ctrl4 = new Point2D.Double(700, 310); // Control Point 2
  
  // path bezier curve
  path = new Path2D.Double();
  path.moveTo(P1.x, P1.y);
  path.curveTo(ctrl1.x, ctrl1.y, ctrl2.x, ctrl2.y, P2.x, P2.y);
  path.lineTo(P2.x, 600);
  path.lineTo(0, 600);
  path.closePath();
  // path2 bezier curve
  path2 = new Path2D.Double();
  path2.moveTo(P3.x, P3.y);
  path2.curveTo(ctrl3.x, ctrl3.y, ctrl4.x, ctrl4.y, P4.x, P4.y);
  path2.lineTo(800, 600);
  path2.lineTo(400, 600);
  path2.closePath();
  </code></pre>
  
  <p>The players will move on this ground.
  My game will be like a shooter game and if somebody does not hit the enemy but hits the ground, I want to destroy the ground where the shell bangs it. Like this:
  <a href="http://postimg.org/image/5shedp0h7/" rel="nofollow">After</a></p>
  
  <p>How can I do this? To split the given Bezier curves and draw more is hard I think. So I thought that I will fill this area with 1x1px rectangles using arrayList and delete the rectangles from the arrayList where a shell hits the ground but I think, this is not the best solution because the arrayList will be too big and uses too much resource to refresh the painting area :( So what do you think, what would be the best solution to do this?</p>