Write a tutorial for drawing lines with sprites.
I'd like to know how you could draw lines in 2D with a SpriteBatch.
If it's drawing a 2D grid that you're talking about, that seems simple enough.
x = the width of the screen
y = the height of the screen
xLocation = the X location of the line
yLocation = the Y location of the line
linesX = the amount of squares along the width of the screen + 1
linesY = the amount of squares along the height of the screen + 1
lineImage = some image that is solid black, or whatever
Draw(SpriteBatch spriteBatch, GameTime gameTime)
xLocation = 0;
yLocation = 0;
for (int numberDone = 0; numberDone < linesX; numberDone++)
spriteBatch.Draw(lineImage, new Rectangle(xLocation, 0, 1, y), Color.White);
xLocation += x / linesX;
for (int numberDone = 0; numberDone < linesY; numberDone++)
spriteBatch.Draw(lineImage, new Rectangle(0, yLocation, x, 1), Color.White);
yLocation += y / linesY
Off the top of my head, without the compiler, I believe this would work for a 2D grid.