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:

enter image description here

How do I make it seamlessly tile?

1
1
11/9/2011 4:30:00 PM

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.

5
11/9/2011 12:58:00 PM

Licensed under: CC-BY-SA with attribution
Not affiliated with: Stack Overflow
^