@@ -8,21 +8,23 @@ formatting (stuff like `"This: {0}"`) known from C#. Rendering happens through t
88and is quite fast.
99
1010## Debug overlay
11- The debug overlay, useful for displaying text and graphs that update every frame.
12- Like this: ![ Pretty picture] ( https://user-images.githubusercontent.com/4175246/28583020-e34a3a12-7167-11e7-8871-7199f410aa8d.gif )
11+ The debug overlay is useful for displaying text and graphs that update every frame.
12+ Like this:
13+
14+ ![ Pretty picture] ( https://user-images.githubusercontent.com/4175246/28583020-e34a3a12-7167-11e7-8871-7199f410aa8d.gif )
1315
1416This can be done with some level of convenience using this code:
1517
1618``` c#
17- // FPS in top left corner
19+ // FPS in top left corner
1820 DebugOverlay .Write (1 , 0 , " FPS:{0,6:###.##}" , 1 . 0 f / Time .deltaTime );
1921
2022 // Small graph of FPS below
2123 fpsHistory [Time .frameCount % fpsHistory .Length ] = 1 . 0 f / Time .deltaTime ;
2224 DebugOverlay .DrawGraph (1 , 1 , 9 , 1 . 5 f , fpsHistory , Time .frameCount % fpsHistory .Length , Color .green );
2325```
2426
25- Even though it involves string formatting, not garbage will be generated.
27+ Even though it looks like regular string formatting, no garbage will be generated.
2628
2729## Console
2830The console is useful for checking logs / output while ingame and also for easily registrering commands
@@ -31,8 +33,7 @@ that can be used to tweak the game behaviour or turn on/off debugging aspects.
3133You can write stuff like
3234
3335``` c#
34-
35- // Register quit command
36+ // Register quit command
3637 Game .console .AddCommand (" quit" , CmdQuit , " Quit game" );
3738
3839 /* ... */
@@ -42,12 +43,9 @@ You can write stuff like
4243 Game .console .
4344 Application .Quit ();
4445 }
45-
46-
47-
4846```
4947
50- and it will look like this
48+ and it will work like this:
5149
5250![ Pretty picture] ( https://user-images.githubusercontent.com/4175246/28582984-d215e5f2-7167-11e7-99ff-e96b2981b9bb.gif )
5351
0 commit comments