MatthiasM wrote:
I have a library called
TWLTiled which has separated model and rendering. It also has a tool to create a minimap. Using libGDX it can be used on Android. And of course all data loading is using URL.
You can check the (simple)
demo.
Okay thanks. I'm looking for a way to load them from my cache... not a URL. As stated above, my cache is like a ZIP archive; storing files within in itself then using GZIP for compression. I can load my sprites, my entity files but I cannot load my Tiled maps because there is no option (i'm guessing) available. I'm doing so without extracting the cache. I noticed the TiledMap has a constructor for an InputStream so I'm using the DataInputStream to read a certain amount of bytes into a ByteArrayInputStream for storage then calling this:
'input' being my DataInputStream and my ZoneMap extends TiledMap and implements TileBasedMap for various pathfinding abilities...
Code:
byte[] buffer = new byte[(int) length];
input.readFully(buffer, 0, (int) length);
ByteArrayInputStream bais = new ByteArrayInputStream(buffer);
// ZoneMap map = new ZoneMap(bais);
// Game.getMaps().add(map);
I have them commented out for the obvious reason of them not loading the sprites used for the TileSets.
If I've missed something here or you need me to explain something a little more please don't hesitate to ask me.
Thanks for your help and kindness.