diff --git a/isometric-park-fna/FNAGame.cs b/isometric-park-fna/FNAGame.cs --- a/isometric-park-fna/FNAGame.cs +++ b/isometric-park-fna/FNAGame.cs @@ -8,6 +8,7 @@ using System.IO; using SpriteFontPlus; using isometricparkfna; +using System.Diagnostics; struct Entity { @@ -63,6 +64,7 @@ int frameRate = 0; int frameCounter = 0; TimeSpan elapsedTime = TimeSpan.Zero; + TimeSpan drawTime = TimeSpan.Zero; private const int width = 1280; private const int height = 640; @@ -85,8 +87,8 @@ //new tile stuff TileMap myMap = new TileMap(); - int squaresAcross = 25; - int squaresDown = 25; + int squaresAcross = 250; + int squaresDown = 250; int baseOffsetX = -14; int baseOffsetY = -14; @@ -283,6 +285,9 @@ frameCounter = 0; } + + + base.Update(gameTime); @@ -316,15 +321,11 @@ - + Stopwatch stopWatch = new Stopwatch(); + stopWatch.Start(); GraphicsDevice.Clear(Color.CornflowerBlue); batch.Begin(); - Line.drawLine(batch, new Vector2(0, 1), new Vector2(1, 50), Color.Black); - Line.drawLine(batch, new Vector2(0, 50), new Vector2(1, 100), Color.White); - Line.drawLine(batch, new Vector2(500, 500), new Vector2(500, 1000), Color.White); - - //New tile stuff Vector2 firstSquare = new Vector2(Camera.Location.X / 32, Camera.Location.Y / 32); @@ -337,7 +338,6 @@ int offsetX = (int)squareOffset.X; int offsetY = (int)squareOffset.Y; - for (int y = 0; y < this.squaresDown; y++) { int rowOffset = 0; @@ -356,8 +356,8 @@ Color.White); } } + - //Gridlines //Lines going down and to the right: @@ -408,7 +408,12 @@ batch.DrawString(font, fps, new Vector2(33, 33), Color.Black); batch.DrawString(font, fps, new Vector2(32, 32), Color.White); + batch.DrawString(font, this.drawTime.TotalMilliseconds.ToString(), new Vector2(120, 33), Color.Black); + batch.DrawString(font, this.drawTime.TotalMilliseconds.ToString(), new Vector2(119, 32), Color.White); + batch.End(); + stopWatch.Stop(); + this.drawTime = stopWatch.Elapsed; base.Draw(gameTime); } diff --git a/isometric-park-fna/isometric-park-fna.csproj b/isometric-park-fna/isometric-park-fna.csproj --- a/isometric-park-fna/isometric-park-fna.csproj +++ b/isometric-park-fna/isometric-park-fna.csproj @@ -73,5 +73,8 @@ PreserveNewest + + +