Skip to content

Commit b4a800d

Browse files
Figures and indexes pass - done
1 parent 09fc316 commit b4a800d

File tree

14 files changed

+54
-54
lines changed

14 files changed

+54
-54
lines changed

articles/tutorials/building_2d_games/03_the_game1_file/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ This class provides the following structure:
2323
3. **Content Loading**: The [**LoadContent**](xref:Microsoft.Xna.Framework.Game.LoadContent) method manages game asset loading during startup.
2424
4. **Game Loop**: The *game loop* consists of the [**Update**](xref:Microsoft.Xna.Framework.Game.Update(Microsoft.Xna.Framework.GameTime)) method for game logic and the [**Draw**](xref:Microsoft.Xna.Framework.Game.Draw(Microsoft.Xna.Framework.GameTime)) method for rendering, running continuously until the game is told to exit.
2525

26-
Figure 3-1 below shows the lifecycle of a MonoGame game including the [**Update**](xref:Microsoft.Xna.Framework.Game.Update(Microsoft.Xna.Framework.GameTime)) and [**Draw**](xref:Microsoft.Xna.Framework.Game.Draw(Microsoft.Xna.Framework.GameTime)) methods that make up the *game loop*.
26+
*Figure 3-1* below shows the lifecycle of a MonoGame game including the [**Update**](xref:Microsoft.Xna.Framework.Game.Update(Microsoft.Xna.Framework.GameTime)) and [**Draw**](xref:Microsoft.Xna.Framework.Game.Draw(Microsoft.Xna.Framework.GameTime)) methods that make up the *game loop*.
2727

2828
| ![Figure 3-1: Lifecycle of a MonoGame game](./images/monogame-lifecycle.png) |
2929
| :--------------------------------------------------------------------------: |

articles/tutorials/building_2d_games/05_content_pipeline/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ To open the *Content.mgcb* content project file in the MGCB Editor using the dot
7979
| :-------------------------------------------------------------------------------------------: |
8080
| **Figure 5-2: MonoGame Content Builder Editor (MGCB Editor) Window** |
8181

82-
In Figure 5-2 above, you can see the user interface for the MGCB Editor:
82+
In *Figure 5-2* above, you can see the user interface for the MGCB Editor:
8383

8484
- **Toolbar**: Contains icon buttons for common actions such as creating new items, opening files, saving changes, and building content.
8585
- **Project Panel**: Located on the left of the MGCB Editor, displays a hierarchical tree view of all content items added to the content project. The root node *Content* represents the root of the content project.

articles/tutorials/building_2d_games/06_working_with_textures/index.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ The reason the sprite did not rotate as expected is because of the `origin` para
112112

113113
### Origin
114114

115-
The `origin` parameter specifies the point of origin in which the sprite is rendered from, rotated from, and scaled from. By default, if no origin is set, it will be [**Vector2.Zero**](xref:Microsoft.Xna.Framework.Vector2.Zero), the upper-left corner of the sprite. To visualize this, see Figure 6-5 below. The red square represents where the origin is for the sprite, and we can see how it is rotated around this origin point.
115+
The `origin` parameter specifies the point of origin in which the sprite is rendered from, rotated from, and scaled from. By default, if no origin is set, it will be [**Vector2.Zero**](xref:Microsoft.Xna.Framework.Vector2.Zero), the upper-left corner of the sprite. To visualize this, see *Figure 6-5* below. The red square represents where the origin is for the sprite, and we can see how it is rotated around this origin point.
116116

117117
| ![Figure 6-5: Demonstration of how a sprite is rotated around its origin](./videos/top-left-origin-rotation-example.webm) |
118118
| :-----------------------------------------------------------------------------------------------------------------------: |
@@ -247,7 +247,7 @@ For instance, take the logo image we have been using. We can break it down into
247247
| :-----------------------------------------------------------------------------------------------------------------: |
248248
| **Figure 6-14: The MonoGame logo broken down into the icon and wordmark regions** |
249249

250-
We can see from Figure 6-14 above that the actual icon starts at position (0, 0) and is 128px wide and 128px tall. Likewise, the wordmark starts at position (150, 34) and is 458px wide and 58px tall. Knowing the starting position and the width and height of the region gives us a defined rectangle that we can use as the `sourceRectangle`.
250+
We can see from *Figure 6-14* above that the actual icon starts at position (0, 0) and is 128px wide and 128px tall. Likewise, the wordmark starts at position (150, 34) and is 458px wide and 58px tall. Knowing the starting position and the width and height of the region gives us a defined rectangle that we can use as the `sourceRectangle`.
251251

252252
We can see this in action by drawing the icon and the wordmark separately from the same texture. Update the code to the following:
253253

@@ -271,7 +271,7 @@ If you run the game now, you should see the following:
271271
272272
### Layer Depth
273273

274-
The final parameter to discuss is the `layerDepth` parameter. Notice that in Figure 6-15 above, the word mark is rendered on top of the icon. This is because of the order the draw calls were made; first the icon was rendered, then the word mark was rendered.
274+
The final parameter to discuss is the `layerDepth` parameter. Notice that in *Figure 6-15* above, the word mark is rendered on top of the icon. This is because of the order the draw calls were made; first the icon was rendered, then the word mark was rendered.
275275

276276
The [**SpriteBatch.Begin**](xref:Microsoft.Xna.Framework.Graphics.SpriteBatch.Begin(Microsoft.Xna.Framework.Graphics.SpriteSortMode,Microsoft.Xna.Framework.Graphics.BlendState,Microsoft.Xna.Framework.Graphics.SamplerState,Microsoft.Xna.Framework.Graphics.DepthStencilState,Microsoft.Xna.Framework.Graphics.RasterizerState,Microsoft.Xna.Framework.Graphics.Effect,System.Nullable{Microsoft.Xna.Framework.Matrix})) method contains several optional parameters, one of which is the `sortMode` parameter. By default, this value is [**SpriteSortMode.Deferred**](xref:Microsoft.Xna.Framework.Graphics.SpriteSortMode.Deferred), which means what is drawn is done so in the order of the [**SpriteBatch.Draw**](xref:Microsoft.Xna.Framework.Graphics.SpriteBatch.DrawString(Microsoft.Xna.Framework.Graphics.SpriteFont,System.Text.StringBuilder,Microsoft.Xna.Framework.Vector2,Microsoft.Xna.Framework.Color,System.Single,Microsoft.Xna.Framework.Vector2,System.Single,Microsoft.Xna.Framework.Graphics.SpriteEffects,System.Single)) calls. Each subsequent call will be drawn visually on top of the previous call.
277277

@@ -294,9 +294,9 @@ Now we can see this in action. We have already set the `layerDepth` parameter of
294294

295295
Now we are telling it to use the [**SpriteSortMode.FrontToBack**](xref:Microsoft.Xna.Framework.Graphics.SpriteSortMode.FrontToBack) sort mode, which will sort the draw calls so that those with a higher `layerDepth` will be drawn on top of those with a lower one. Even though we did not change the order of the `_spriteBatch.Draw` calls, if you run the game now, you will see the following:
296296

297-
| ![Figure 5-17: The MonoGame icon drawn on top of the wordmark](./images/icon-on-top-of-wordmark.png) |
297+
| ![Figure 6-16: The MonoGame icon drawn on top of the wordmark](./images/icon-on-top-of-wordmark.png) |
298298
| :--------------------------------------------------------------------------------------------------: |
299-
| **Figure 5-17: The MonoGame icon drawn on top of the wordmark** |
299+
| **Figure 6-16: The MonoGame icon drawn on top of the wordmark** |
300300

301301
There are also two additional [**SpriteSortMode**](xref:Microsoft.Xna.Framework.Graphics.SpriteSortMode) values that can be used. These, however, are situational and can have draw backs when using them, so understanding what they are for is important.
302302

articles/tutorials/building_2d_games/07_optimizing_texture_rendering/index.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ A texture atlas (also known as a sprite sheet) is a large image file that contai
4747
> [!NOTE]
4848
> Using a texture atlas not only eliminates texture swaps but also reduces memory usage and simplifies asset management since you are loading and tracking a single texture instead of many individual ones.
4949
50-
In the Pong example, imagine taking the paddle and ball image and combining them into a single image file like in Figure 7-1 below:
50+
In the Pong example, imagine taking the paddle and ball image and combining them into a single image file like in *Figure 7-1* below:
5151

5252
| ![Figure 7-1: Pong Texture Atlas Example](./images/pong-atlas.png) |
5353
|:------------------------------------------------------------------:|
@@ -244,7 +244,7 @@ The key improvements here is in [**LoadContent**](xref:Microsoft.Xna.Framework.G
244244

245245
This configuration based approached is advantageous because we can now add new and modify existing regions within the atlas without having to change code and/or recompile. This also keeps the sprite definitions separate from the game logic.
246246

247-
Running the game now will show the same results as `Figure 7-4` above, with the slime and bat texture regions rendered in the upper-left corner of the game window.
247+
Running the game now will show the same results as *Figure 7-4* above, with the slime and bat texture regions rendered in the upper-left corner of the game window.
248248

249249
## Conclusion
250250

articles/tutorials/building_2d_games/09_the_animatedsprite_class/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ While packing images into a texture atlas and managing them through our `Sprite`
88
> [!NOTE]
99
> The term "frame" in animation refers to a single image in an animation sequence. This is different from a game frame, which represents one complete render cycle of your game.
1010
11-
In MonoGame, we can create these animations by cycling through different regions of our texture atlas, with each region representing a single frame of the animation. For example, `Figure 9-1` below shows three frames that make up a bat's wing-flapping animation:
11+
In MonoGame, we can create these animations by cycling through different regions of our texture atlas, with each region representing a single frame of the animation. For example, *Figure 9-1* below shows three frames that make up a bat's wing-flapping animation:
1212

1313
| ![Figure 9-1: Animation example of a bat flapping its wings](./images/bat-animation-example.gif) |
1414
| :-----------------------------------------------------------------------------------------------: |

articles/tutorials/building_2d_games/12_collision_detection/index.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ Two find the distance between two circles, imagine drawing a line from the cente
4242
| :---------------------------------------------------------------------------------------------------------------------------------------: |
4343
| **Figure 12-1: Showing the distance between the center of two circles forms a right triangle** |
4444

45-
In the Figure 12-1 above
45+
In the *Figure 12-1* above
4646

4747
- $a$ is the distance between the center of the two on the x-axis (horizontal).
4848
- $b$ is the distance between the center of the two circles on the y-axis (vertical).
@@ -337,7 +337,7 @@ Running the game now
337337

338338
| ![Figure 12-5: When the slime collides ("eats") the bat, the bat respawns in a new location on the screen with a random velocity assigned](./videos/gameplay.webm) |
339339
| :----------------------------------------------------------------------------------------------------------------------------------------------------------------: |
340-
| **Figure 12-5: When the slime collides ("eats") the bat, the bat respawns in a new location on the screen with a random velocity assigned** |
340+
| **Figure 12-5: When the slime collides ("eats") the bat, the bat re-spawns in a new location on the screen with a random velocity assigned** |
341341

342342
## Conclusion
343343

articles/tutorials/building_2d_games/13_working_with_tilemaps/index.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ A tileset is a collection of small images (tiles) that can be combined and arran
2626
- Decorative elements like plants and furniture.
2727
- Special tiles like doors, ladders, or water.
2828

29-
Each tile in a tileset is assigned an ID number, which the tilemap uses to reference which tile goes where. For example, in Figure 13-1 below, the tileset we will add to our game in a moment is shown on the left and on the right is the same tileset with an overlay showing how each tile is assigned an ID number.
29+
Each tile in a tileset is assigned an ID number, which the tilemap uses to reference which tile goes where. For example, in *Figure 13-1* below, the tileset we will add to our game in a moment is shown on the left and on the right is the same tileset with an overlay showing how each tile is assigned an ID number.
3030

3131
| ![Figure 13-1: Left: Original dungeon tileset. Right: The same tileset with an overlay showing how each tile is assigned a numeric ID](./images/tileset-grid-comparison.png) |
3232
|:----------------------------------------------------------------------------------------------------------------------------------------------------------------------------:|
@@ -46,7 +46,7 @@ For example, a simple tilemap may look like this conceptually:
4646
12 13 14 13 15
4747
```
4848

49-
If we took the above tilemap data and mapped each cell to the tile in the related tileset, it would look something similar to Figure 13-2 below:
49+
If we took the above tilemap data and mapped each cell to the tile in the related tileset, it would look something similar to *Figure 13-2* below:
5050

5151
| ![Figure 13-2: From tileset to tilemap. Left: Tileset with an overlay showing the tile IDs. Right: The tilemap created using the tiles arranged with the pattern from the code example above](./images/tileset-to-tilemap-example.png) |
5252
|:---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------:|

articles/tutorials/building_2d_games/16_working_with_spritefonts/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ The `<CharacterRegions>` element defines which Unicode character ranges to inclu
121121
For most games, the default range is sufficient.
122122

123123
> [!NOTE]
124-
> ALthough for fun, TRY using the Wingdings font :D
124+
> Although for fun, TRY using the Wingdings font :D
125125
126126
## Loading a SpriteFont Description
127127

articles/tutorials/building_2d_games/18_texture_sampling/index.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -161,9 +161,9 @@ Next, add this texture to your content project using the MGCB Editor:
161161
3. Navigate to and select the `background-pattern.png` file.
162162
4. Save the changes and close the MGCB Editor.
163163

164-
| ![Figure 18-9: The MGCB Editor with the *background-pattern* image added](./images/mgcb-editor.png) |
164+
| ![Figure 18-10: The MGCB Editor with the *background-pattern* image added](./images/mgcb-editor.png) |
165165
| :-------------------------------------------------------------------------------------------------: |
166-
| **Figure 18-9: The MGCB Editor with the *background-pattern* image added** |
166+
| **Figure 18-10: The MGCB Editor with the *background-pattern* image added** |
167167

168168
### Updating the Title Scene
169169

@@ -189,9 +189,9 @@ The key changes here are
189189
190190
Running the game now with these changes, the title screen now has a scroll background that adds more visual depth and interest to it than just the plain colored background we had before.
191191

192-
| ![Figure 18-10: The title screen now with the repeating background texture of the slime and bat scrolling diagonally down and to the right](./videos/titlescreen.webm) |
192+
| ![Figure 18-11: The title screen now with the repeating background texture of the slime and bat scrolling diagonally down and to the right](./videos/titlescreen.webm) |
193193
| :--------------------------------------------------------------------------------------------------------------------------------------------------------------------: |
194-
| **Figure 18-10: The title screen now with the repeating background texture of the slime and bat scrolling diagonally down and to the right** |
194+
| **Figure 18-11: The title screen now with the repeating background texture of the slime and bat scrolling diagonally down and to the right** |
195195

196196
## Conclusion
197197

articles/tutorials/building_2d_games/20_implementing_ui_with_gum/index.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -371,9 +371,9 @@ Next, add this sound effect to your content project using the MGCB Editor:
371371
4. In the Properties panel, verify that the `Processor` is set to `Sound Effect`.
372372
5. Save the changes and close the MGCB Editor.
373373
374-
| ![Figure 20-2: The MGCB Editor with ui.wav added to the audio folder](./images/mgcb-editor.png) |
374+
| ![Figure 20-1: The MGCB Editor with ui.wav added to the audio folder](./images/mgcb-editor.png) |
375375
| :---------------------------------------------------------------------------------------------: |
376-
| **Figure 20-2: The MGCB Editor with ui.wav added to the audio folder** |
376+
| **Figure 20-1: The MGCB Editor with ui.wav added to the audio folder** |
377377
378378
We will load and use this sound effect in our UI implementation to provide auditory feedback when players interact with buttons and sliders.
379379
@@ -535,9 +535,9 @@ Update the `Draw` method to the following:
535535

536536
With these changes, our UI system is now fully integrated into the scene's game loop. Gum updates its controls in the `Update` method and draws them in the `Draw` method. This produces a fully functional title screen with buttons that allows players to start the game or adjust audio settings.
537537
538-
| ![Figure 20-1: Title screen with default Gum buttons](./images/title-unstyled.png) |
538+
| ![Figure 20-2: Title screen with default Gum buttons](./images/title-unstyled.png) |
539539
| :--------------------------------------------------------------------------------: |
540-
| **Figure 20-1: Title screen with default Gum buttons** |
540+
| **Figure 20-2: Title screen with default Gum buttons** |
541541
542542
> [!NOTE]
543543
> You may notice that the UI elements currently use Gum's default styling, which does not match our game's visual theme. We will explore customizing these controls to match our game's visual style in the next chapter.
@@ -617,9 +617,9 @@ Finally, add Gum's drawing call to the end fo the `Draw` method:
617617
618618
With these changes, the pause menu is now fully integrated into the game scene's game loop. Gum updates its controls during the `Update` method and draws them during the `Draw` method. If the game is paused, as determined by the `IsVisible` property of the pause menu, then updating the actual game logic is skipped.
619619

620-
| ![Figure 20-12: The pause menu during the game scene with default Gum buttons](./images/pause-unstyled.png) |
620+
| ![Figure 20-3: The pause menu during the game scene with default Gum buttons](./images/pause-unstyled.png) |
621621
| :---------------------------------------------------------------------------------------------------------: |
622-
| **Figure 20-12: The pause menu during the game scene with default Gum buttons** |
622+
| **Figure 20-3: The pause menu during the game scene with default Gum buttons** |
623623

624624
## Conclusion
625625

articles/tutorials/building_2d_games/21_customizing_gum_ui/index.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -358,9 +358,9 @@ When you run the game now, you will see a dramatic improvement in the visual app
358358
3. All text uses our custom bitmap font.
359359
4. Visual feedback clearly indicates which element has focus.
360360

361-
| ![Figure 12-3: The game using Gum now with custom styled UI components](./videos/gameplay.webm) |
361+
| ![Figure 21-3: The game using Gum now with custom styled UI components](./videos/gameplay.webm) |
362362
| :---------------------------------------------------------------------------------------------: |
363-
| **Figure 12-3: The game using Gum now with custom styled UI components** |
363+
| **Figure 21-3: The game using Gum now with custom styled UI components** |
364364

365365
The entire UI now has a cohesive style that matches the rest of the game.
366366

0 commit comments

Comments
 (0)