# Tiling seamless diagonal lines

## Tiling seamless diagonal lines

### Question

I'm working on a tile-based game, and I'd like to have diagonal lines for (32x32) tiles. The problem is, whenever you tile them, they look like this:

How do I make it seamlessly tile?

2011/11/09

### Popular Answer

If your lines should perfectly align to pixels, then you must choose a spacing that's a divisor of 32.

This leaves you with line-spacings of 2, 4, 8 and 16. And since 1 pixel is occupied by the line itself, your possible "blank" lines between your lines are 1, 3, 7 and 15.

2011/11/09