I am making a game with a grid based world.
I already have the code for running around and whatnot working.
However, there’s something I want to learn how to do.
Different maps of my world require different tiles
So a beach might require sand tiles and palm tree tiles, while a forest might require grass and maple tree tiles
The thing is, sand tiles are functionally identical to grass tiles as a “floor”, and palm trees are the same as maple trees as a “wall”
So I was wondering if there were ways to “clean up” some of my code
I know that in Minecraft, all of the block textures are derived from one picture
http://www.imgjoe.com/x/terrain.png
I assume that in the code, this singular picture is broken up into many different smaller textures
I’d like to do that
My grand idea is that I’d have one tileset for a beach, one for a forest, one for a dungeon etc.
So… how can I do this? How have people done it in the past?
(I’m using the standard LWJGL and Slick-Util)
Thanks