Understanding how to create/use textures for games when limited by power of two sizes
Posted
by
Matthias Reisner
on Game Development
See other posts from Game Development
or by Matthias Reisner
Published on 2012-09-14T16:33:16Z
Indexed on
2012/09/14
21:49 UTC
Read the original article
Hit count: 320
I have some questions about the creating graphics for a game.
As an example. I want to create a motorbike. (1pixel = 1centimeter) So my motorbike will have 200 width and 150 height. (200x150) But the libgdx only allows to load sizes with the power of 2?! (2,4,8,16,...)
First I thought about that way. I will create my bike with the size (200x150) and save it as png. Than I will open it again (e.g. with gimp) resize the image to a size which uses values with power of 2 (128x128). I will load that as texture in the programm and set width as 200 and height as 150.
But wouldn't it be a problem? Because I will lose some pixel information when I make the first conversation.?! Isn't it?
© Game Development or respective owner