Game Development Community

Tilemap rendering with "LINES"???

by Anthony Ayers · in Torque X 2D · 05/13/2008 (4:10 pm) · 2 replies

First of all, I'm sure this topic has been coverd a zillion times before, but since I haven't been able to find anything associated w/ TXB I'm gonna post this anyways.

So I have created a simple tilemap and whenever I run the game I get "lines" around just about all of the tiles. I am not using any sort of color key - just basic cells. It seems as though TXB is "softening" the edges of my tiles and causing the cells to overlap slightly into an adjacent cell - causing the lines???

Any thought???

here is a screenshot of what I am seeing:
www.bellaspectra.com/tmp.jpg

#1
05/17/2008 (2:02 pm)
I'm not sure, but I'm guessing it has to do with the fact that TorqueX does linear interpolation of textures by default. Basically your sprites are put in textures in order for DirectX to be able to draw them. When drawing a pixel on the screen, DX calculates the "texture coordinate" of that pixel, and looks at the texture at that point. Linear interpolation means that it will blend the four nearest texels (pixels within the texture) in order to get the color. Thus, if your green grass is next to the brown dirt in the texture, you'd blend in a bit of green on the border.

Someone with source might be able to confirm this.
#2
05/18/2008 (10:12 am)
That sound right to me. Hopefully, gg will fix this in the next build?