Hello,
So as nobody could really help me, and i couldn’t find any documentation or libraries to use tiled maps, i don’t mean libraries like libgdx, i mean libraries for easy checking, customizing the maps and tiles, collision detection, and everything you want. but a library without any textures to load or using OpenGL and your graphics card in order to work. just a library to work with the map without rendering it (like server sided collision detection).
So extremely long story short, i created a basic library, which i can give to you all if you want.
It works like this, exactly how i want it -
TMXMapLoader.Load(); // Loading the TMXMapLoader
TiledMap map = TMXMapLoader.readMap("assets/maps/foo.tmx"); // We reading the map
// Get Tiled Layer, which is basically the layers you create inside Tiled
map.getTiledLayer(i); // Get Tiled Layer with an index, returns TiledLayer.
// Get a tile/cell
map.getTile(i, x, y); // First parameter = layer index, Second parameter = X axis of the tile, Third parameter = Y axis of the tile. returns Tile.
map.getTiledLayer(i).getTile(x,y); // Same as above.
// Check if the tile has the `blocked` property, if yes we can't move through it or collide it (wood, stone), if not we can move through it (like air, water).
map.isBlocked(i, x, y); // First parameter = layer index, Second parameter = X axis of the tile, Third parameter = Y axis of the tile. returns Boolean
map.getTile(i,x,y).isBlocked(); // Same as above
map.getTiledLayer(i).getTile(x,y).isBlocked(); // Same as above
// Get whatever you want
map.containsKey(i,x,y, key); // Get any property of the tile
map.getTile(i,x,y).containsKey(key); // Same as above
map.getTiledLayer(i).getTile(x,y).containsKey(key); // Same as above
// Get Tileset
map.getTileset(i); // Just get a Tileset with an index
// Get properties of the Tileset
map.containsKey(i, key) // Get any property of the tileset
map.getTileset(i).containsKey(key) // Same as above
That’s what i remembered, you can do basically everything, very easy to use. i added bunch of useful functions and more advanced than those, but no time to show.
tell me what you think. its not pro or something just created something fast that is exactly what i needed, and couldn’t find something like this nowhere.
If you want i can give it to you all.