Game Development Community

Grid with sprites looks horrible! What to do?

by Steve De George · in Torque X 2D · 02/12/2010 (12:56 am) · 26 replies

The sheet used to draw in the grid was one with about 5 32x32 tiles in it. After I paint the tiles in and run, you can see all sorts of lines through the thing. It's almost as if it's grabbing half a pixel of what is next to it and drawing it with the tile.

The tiles are pretty basic, only like 4 colors. I tried growing the tiles to 64x64 but it didn't make any difference.
Page«First 1 2 Next»
#21
02/14/2010 (5:51 pm)
[sorry did't read that you had your problem solved]
#22
02/14/2010 (11:49 pm)
@Steve: yep - the camera settings.
#23
03/02/2010 (7:11 am)
This isn't working well. I still see lines in the grid here and there, but not everywhere. My shader was modified and uses the screen size parameters, so it should be working well. My graphics are all pixelated and look crisp, just like I want them.

Screen size: 1024x768
Camera size: 320x240
Sprite size: (I only have one animated sprite) 20x40, same as individual cells in animation
Sprite source: 20x40 frames
Grid size: 32x32, same as cells in the sprite sheet.
Grid sheet source: 32x32 frames.

Am I missing something? :( :(
#24
03/02/2010 (9:27 am)
1024x768 vs 320x240 is a factor of *3.2*

3.2 is the number of pixels per camera unit in your current set up. Unless you have your tiles and objects sized and aligned to multiples of 0.3125 then you will get artifacts in the visual output.
#25
03/02/2010 (1:31 pm)
GOT IT! I needed that formula and I wasn't gleaning it from the above posts. Thanks a bunch.

One thing I've been wondering about is changing resolutions for the client. Is this just something not really supported by TX? To we just hardcode everything to a single resolution?
#26
03/02/2010 (3:10 pm)
You can target multiple resolutions. The whole point of the Camera dimensions is so you can work in camera units and not worry about the target screen resolution.

That gets complicated though if you need absolutely pixel perfect output. You'd have to make some compromises somewhere obviously.
Page«First 1 2 Next»