Okay i have made a random gen map what is tiles the tiles can be changed to different tiles
I want to save the map I have tried xml however it crashes while saving any suggestions
// try {
// //int whatisit, int blockID, float x, float y, float width, float height, Vector2 velocity, boolean hasCollision, boolean object, int objectID
// for(int i = 0;i < 200;i++){
// for(int j = 0;j < 200;j++){
//
// Tile t = Level.tiles[i][j];
// xml.element("tile").attribute("whatisit", t.getBlockDef()).attribute("blockID", t.getBlockID())
// .attribute("x", t.getX()).attribute("y", t.getY()).attribute("width", t.getWidth()).attribute("vx", 0).attribute("vy", 0)
// .attribute("hasCollision", t.isCollision()).attribute("object", t.isObject()).attribute("objectID", t.getObjectID());
// }
// }
//
//
// file.writeString(writer.toString(), false);
// } catch (IOException e) {
// e.printStackTrace();
// }