title: 2D Overhead Tile Generation
body: <p>I have this code right now:</p>
  
  <pre><code>private void generateLevel() {
      for (int y = 0; y &lt; height; y++) {
          for (int x = 0; x &lt; width; x++) {
              tiles[x + y * width] = random.nextInt(4);
          }
      }
  }
  </code></pre>
  
  <p>Which allows this method to work:</p>
  
  <pre><code>public Tile getTile(int x, int y) {
      if (x &lt; 0 || y &lt; 0 || x &gt;= width || y &gt;= height) return Tile.voidTile;
      if (tiles[x + y * width] == 0) return Tile.grass;
      if (tiles[x + y * width] == 1) return Tile.stone;
      else return Tile.water; 
      //return Tile.voidTile;
  }
  </code></pre>
  
  <p>Which returns this result:
  <img src="https://i.stack.imgur.com/DwMhs.png" alt="2D Tile Generation"></p>
  
  <p>What I want is smooth, rounded islands with random stone deposits here and there. Would perlin noise be overkill for this? I figured I could just generate a tile, check the tile id next to it and then place it down if the tile adjacent is of the same type. But that would create endless expanses of the same tile. Any help?</p>