I'm trying to figure out the optimal width and height (in pixels) to start building hex tiles for game development. My preference is for "flat topped" hex grids, but the math is similar for both.
I am looking for an "optimal" tile size that allows both the width and the height of the tile to be a rounded pixel number, based on the fact that height = sqrt(3)/2 * width
.
My math skills being virtually nonexistent, I just ran a brute force script that ran through widths from 1 to 1024 and did not come up with a single value for w
where h
was an integer. Is this really the case? How does anyone create pixel-perfect hex tiles if there's no even width & height size that can accommodate a perfect hex aspect ratio?