Grey lines in tile map

Started by Draco9898, November 23, 2010, 04:37:40

Previous topic - Next topic

Draco9898



I'm getting strange grid-like lines through my tiled map in my game when I translate my map's verts to certain values, (e.g: ~ %.66667).

I'm not using any blending or filtering, the map's tiles are 32x32 and are using a bitmap that is laid-out in 32x32 tiles.

I don't want to add extra empty space in my bitmap to cover the edges of the UVs if that's the problem...

Anyone have a quick-fix for this?

kappa

looks like small floating point errors, are you using float or int to store/draw your tile positions?

Fool Running

Because all the top of the dark squares are always dark blue and the left sides are always tan, I would say you have a size problem. It looks to me that you're texture coordinates are off by one texture pixel or your tiles are one pixel too big. Make sure you aren't creating the tiles 33x33 pixels on an accident (if you start at 0 and end at 32 for instance). Also make sure that the size of the tiles in the texture is actually 32x32 and not 31x31 (if you start at 1 and end at 31 for instance). These are common mistakes that I've done many times.
Programmers will, one day, rule the world... and the world won't notice until its too late.Just testing the marquee option ;D