jeudi 30 avril 2015

libGDX - How can I make smooth transitions between tiles

So I am recoding a game with a randomly generated map using libgdx instead of using java2D. And I currently have a map that looks like this.

enter image description here

And I need to figure out a way to make it look like this without making edge tiles for every possible transition.

enter image description here

and

enter image description here

How I used to do it was take each 16 x 16 tile split it into 8 x 8 tiles then add on the transition texture depending on where it needed to be.

I would do this again but I have 2 issues.

  1. I don't know how to generate a single 16 x 16 tile from 4 8x8 tiles.
  2. I don't have a way to correctly color a greyscale image to the correct color.

If I can do number 1 then I can just create the border tiles for each transition. Its more work but shouldn't be to much more work.

If you think im going about this all wrong then suggestions are appreciated




Aucun commentaire:

Enregistrer un commentaire