Squashed images advice requested
Wednesday, July 10, 2013 - 09:01
Hey guys and gals,
So im working on this 2d game, right? And i finally get something to display correctly on the screen! (Commence gasps and shocked fainting) the problem is, all the images are squashed around, distorted, and badly abused. My hero actually looks like hes crying! My game is at a 800x480 resolution, and so far my images are drawn on ms paint at 130x130. Can anyone point me to another thread or give me some advice on how to make my images unsquashed?
Please. Help the crying knight. XD
From what you said so far, it could be any number of things, so:
Hello and thank you for the reply!
For this game, I am using libGDX as the framework and using its amazing native desktop testing feature to test and debug. I also have a OpenGl call that overrides the power of two requirement, if that helps.
Here is the image of my hero at this point:
Zombie_Knight_1.png
And here is the full-size screenshot of the desktop LWJGL App:
ScreenShot_1.png
I admit, I'm not the best artist. XD
Thanks
Do you mind pasting your map drawing code on pastebin so I can take a look at it?
Your map tiles look like they're a) smaller than the tile image, which is 130x130, and b) not square. Without seeing your code, my first suggestion is to set up opengl to use an orthographic camera, with the viewport such that 1 unit = 1 pixel on the screen.
Also, to make things easier, you should probably consider using sprite sizes that are powers of two, although I don't think that's your problem here.
The Zombie Knight image is being scaled down, so it's likely a filter issue. Try swapping the GL_MIN_FILTER between GL_LINEAR and GL_NEAREST, and see which gives the best effect.
My project: Bits & Bots
Hey and thanks for the superquick replies. Your help is greatly appreciated.
@MoikMellah my code does not use those explicit gl calls, but instead uses the provided libGDX calls.
@bart my idea was to display a certain number of tiles based on the screen resolution. So the idea is to always display, say, seven by ten tiles always, and then each image is squashed into their respective tiles. I am already using the orthographic camera, with each tile being one unit.
So should i redo the assets to match the tiles?
@bart my idea was to display a certain number of tiles based on the screen resolution. So the idea is to always display, say, seven by ten tiles always, and then each image is squashed into their respective tiles. I am already using the orthographic camera, with each tile being one unit.
It sounds to me that given your choice of resolution, your ideal number of tiles would be ten across by six down, and then redo the tiles at 80x80. One problem you're having is that the aspect ratio (the ratio of the width to the height) is different in your art from what how you're drawing it on screen. Right now, your art is square, but your tiles are actually rectangles, so the images on them are going to look a bit squeezed in one direction.
Anyway, you don't have to stick with that tile size or that resolution, but for the best quality, make sure that your tiles are square and that the resolution of your art is the same size as the tiles when they are drawn on screen.
Ugh.... redrawing art... xD
Thank you so much for the help