I created a simple Grid-Display system for debugging my games.
Pretty useful when I want to know the position of any object in the game.
It helps a lot in visualization.
Required class members:
The Draw method:
To draw the lines:
Assume that the given position is the center of the Grid.
Grid extends on each side, i.e x and z axis by the amount width/2 and height/2.
The xDiff and xDiff are the distance between each column and row.
Start adding lines for each column and row.
Note the <= operator for the loop construct!