Normally I would make a tile map using the program Tiled but I was wondering if i could make something like that without all my graphics having to be a the same size. I found these awesome graphics http://www.lostgarden.com/2007/05/dancs-miraculously-flexible-game.html and since there are not all perfect sqaures or rectangles I dont understand how I could make something like a tilemap. I was using photoshop to just make something that I wanted but if i just created a giant png rather then a tilemap I thought that would be very ineffecient… Well any ideas are helpful
They look the same size to me, just offset a bit. They also have slight overlapping fringes on top, which look like they’re on all the tiles, just controlled by rendering them in a specific order (looks mostly top to bottom then lowest to highest, but there may be non-obvious exceptions). So rendering looks a little more complicated, but storing and loading them should still be plenty simple.
For truly non-uniform tiles, LibGDX has a nice tool for creating texture atlases from arbitrary size images, they don’t need to be uniform.
I’m not sure if you downloaded it, but if you did you will notice that are not uniform sizes… How could I do this in libgdx?
They are just layered on top of each other and have transparent pixels. Draw each row from back to front.
And that’s not a tile map. It’s more like a voxel engine, though it can easily be done in 2D using the method above.
Ok that makes sense, since I am making a side scroller would this be innefecient since theres so much tiles and a lot of increasing cordinates of all them? I have never made a scroller so I’m not sure
There is a very, very good tool from the maker of “Physics Body Editor” available: LibGDX TexturePack GUI.
See also his blog.
This tool is much easier to use than the TexturePacker tool from command line
After I setup the texture using that tool would I still have to draw each part of the map individually? Like there is no way of setting up a “tile map”?
If you’re not using the provided map classes/formats, then yes
Using TextureAtlas is recommenced.
[quote]Returns the first region found with the specified name. This method uses string comparison to find the region, so the result should be cached rather than calling this method multiple times.
[/quote]