Cyprus106
02-26-2008, 12:45 AM
I've got a tile-based map with Grass and Water. My big problem is the grass tiles have a grass picture and the water likewise. But when I went about making a jpg for when the water meets the land, I ended up with the STICKIEST most convoluted code...
Basically, right now I've got a series of booleans and IF statements to find if grass is directly above, directly to the right, to the left, (and above+left) etc. of the water tile. If it is directly above and not above and to the right or left, it loads a jpg to show that. If it's directly above, above/right or above/left it loads 2 different jpg. There are a lot of possibilities there and subsequently a ton of possible jpgs... not to mention the code itself is... laughable.
What have other people done? Maybe... is there a way to load a jpg that represents partial land on the left and place it on top of my water JPG, etc?
I really appreciate any help!
Basically, right now I've got a series of booleans and IF statements to find if grass is directly above, directly to the right, to the left, (and above+left) etc. of the water tile. If it is directly above and not above and to the right or left, it loads a jpg to show that. If it's directly above, above/right or above/left it loads 2 different jpg. There are a lot of possibilities there and subsequently a ton of possible jpgs... not to mention the code itself is... laughable.
What have other people done? Maybe... is there a way to load a jpg that represents partial land on the left and place it on top of my water JPG, etc?
I really appreciate any help!