# Should I take line thickness into consideration for a grid based light game?

I'm currently rewriting some horrific code I wrote for a prototype and have stumbled right at the start! The game I'm working on revolves around directing light and there is a small ambiguity in regards to the way the grid is drawn:

Code wise, information about each node of the grid is stored in an int[,], the grid lines are drawn for debugging purposes. Currently there is nothing explicitly defined for the line thickness, i.e if you look at the pixels closely, the bottom and right lines are drawn in a way which means the grid is not centered on screen, it is one pixel out!

If you shrink the scale of the grid to each being cell being 4x4 pixels the problem is really obvious:

The red area is the cell; the lines show how I draw the grid lines and what the light beams travels across. Would it better to represent this as a grid of 3x3 pixel cells with a line thickness of 1?

Normally I wouldn't be bothered too much because this is really looking into it in a lot of depth, but since the lines of light themselves actually traverse these currently non-existing lines I thought it might be better to make the representation a more elegant! What do you think?

• How big is each tile assuming a blank grid. 4x4? – Justin Skiles Aug 23 '12 at 23:26
• Currently 32x32 but that could go easily go up or down depending on the art style my friend comes back with! – Joe Shanahan Aug 23 '12 at 23:32