Textures quality issues with Libgdx

Posted by user1876708 on Game Development See other posts from Game Development or by user1876708
Published on 2014-01-22T21:57:40Z Indexed on 2014/05/28 22:10 UTC
Read the original article Hit count: 369

Filed under:
|
|
|
|

I have drawn several vector objets and characters ( in Adobe Illustrator ) for my game on Android. They are all scalable at any size without any quality losses ( of course it's vector ^^ ).

I have tried to simulate my gameboard directly on Illustrator just before setting my assests on libdgx to implement them in my game.

I set all the objects at the good size, so that they fit perfectly on my XHDPI device I am running my test on.

Gameboard made on Illustrator

As you can see it works great ( for me at least ^^ ), the PNG quality is good for me, as expected !

So I have edited all my PNG at this size, set my assets on libgdx and build my game apk.

And here is a screenshot of my gameboard ( don't pay attention at the differences of placing and objects, but check at the objets presents on both screenshot ).

Game from the game

As you can see, I have a loss of my PNG quality in the game. It can be seen clealry on the hedgehog PNG, but also ( but not as obvious ) on the mushroom ( check at the outline ) and the hole PNG. If you really pay attention, on every objects, you can see pixels that are not visible on my first screenshot.

And I just can't figure out why this is happening Oo If you have any ideas, you are very welcome !

Thanks.

PS : You can check more clearly the 2 gameboard on this two links ( look at them at 100%, display at high resolution ) :

Good quality link, from Illustrator

Poor quality link, from the game

Second phase of tests :

We display an object ( the hedgehog ) on our main menu screen to see how it looks like. The things is that it looks like he is suppose to, which means, high quality with no pixels.

The hedgehog PNG is coming from an atlas :

layer.addActor(hedgehog);

No loss of quality with this method

So we think the problem is comming from the method we are using to display it on our gameboard :

blocks[9][3] = new Block(TextureUtils.hedgehog, new Vector2(9, 3));

the block is getting the size from the vector we are associating to it, but we have a loss of quality with this method.

© Game Development or respective owner

Related posts about android

Related posts about libgdx