Game Development Community

Tilemap rendering with "LINES"???

by Anthony Ayers · in Torque X 2D · 05/13/2008 (6:59 pm) · 6 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 have been following some threads about World Units but this doesn't seem to help me. If someone could lend a hand or even point me in the direction of a thread that covers my issue - I would be greatly appreciative.

Here are some specifics of my project:
Camera size: w100, h75
resolution: 800x600
Tilemap tile count: x300, y 25
tile size: x4, y4

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

#1
05/13/2008 (9:52 pm)
I was seeing those in my game as well. It was because the tile images had color key lines between each tile. If your tiles have these then change the material to use "key" mode rather than "cell", or you can edit the graphics to remove them.

--Tom
#2
05/13/2008 (10:04 pm)
Sorry for ther novice question, but how would one go about using a color key?
#3
05/13/2008 (10:28 pm)
It is a checkbox option in the image-map-datablock. Double click on the imageMap thumbnail that contains all your tiles
#4
05/13/2008 (10:29 pm)
Now that I have read up on it, I'm not using a color key. I'm using a png w/ transparency. So, color keys don't come into play here. Could this be an issue w/ how TXB is "slicing" up my tilemap?
#5
05/14/2008 (3:32 am)
Has anyone used Torque Game Builder to create a tilemap? I dl'd it to see if I would get the same results, and TGB has someting called a "Filter Pad" which solved my problem. Does TXB not have something like that?
#6
05/14/2008 (4:29 am)
Yeah, the problem is in how your graphics card "filters" the images. I had this same problem a while back and had to do some extensive research to figure out what is going on. The problem is that when your graphics card scales the source image so that it can render it at the proper resolution is filters the image when it scales so that it doesn't appear pixely (sp?). How I fixed it is changing the filter mode in the default shader for materials (SimpleEffect.fx) to use POINT filtering instead of BILINEAR filtering. Point filtering will scale the image exactly how it is so if it scales up then it will appear pixely as opposed to smooth as when BILINEAR is used. If you don't have source then I'm afraid I can't help you.