code: private void saveTiles(FileWriting file, int widthInTile, int step, int s) throws IOException
      {
          for (int tx = 0; tx < widthInTile; tx++)
          {
              for (int ty = 0; ty < map.getInTileHeight(); ty++)
              {
                  final Tile tile = map.getTile(tx + s * step, ty);
                  if (tile != null)
                  {
                      saveTile(file, tile);
                  }
              }
          }
      }
docs: Save the active tiles.
  
  @param file The output file.
  @param widthInTile The horizontal tiles.
  @param step The step number.
  @param s The s value.
  @throws IOException If error on saving.