private void DrawGrid(SpriteBatch sb) { int gridsize = 16; for (int x = -128; x < 128; x++) { ShapeRenderer.Line(sb, bgLineColor, new Vector2(x * gridsize, -4096), new Vector2(x * gridsize, 4096), 1 / Camera.Zoom); } for (int y = -128; y < 128; y++) { ShapeRenderer.Line(sb, bgLineColor, new Vector2(-4096, y * gridsize), new Vector2(4096, y * gridsize), 1 / Camera.Zoom); } }