From 42703e8a9641e2808c3fc8d96f6d7b944d404ac5 Mon Sep 17 00:00:00 2001 From: Becon032 Date: Wed, 3 Sep 2025 17:25:38 +0200 Subject: [PATCH 1/5] Fix typo in ch 10 of the 2D game tutorial --- .../building_2d_games/10_handling_input/snippets/inputbuffer.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/articles/tutorials/building_2d_games/10_handling_input/snippets/inputbuffer.cs b/articles/tutorials/building_2d_games/10_handling_input/snippets/inputbuffer.cs index 7ddae06a..d6128306 100644 --- a/articles/tutorials/building_2d_games/10_handling_input/snippets/inputbuffer.cs +++ b/articles/tutorials/building_2d_games/10_handling_input/snippets/inputbuffer.cs @@ -33,7 +33,7 @@ } // In movement update code. -if(_inputBuffer.COunt > 0) +if(_inputBuffer.Count > 0) { Vector2 nextDirection = _inputBuffer.Dequeue(); _position += nextDirection * _speed; From c292e3d3ed85424534e3219bebab59bb0eddb687 Mon Sep 17 00:00:00 2001 From: Becon032 Date: Sun, 7 Sep 2025 18:26:23 +0200 Subject: [PATCH 2/5] Corrected variable name to match class name. "Tileset" not "TileSet" --- .../13_working_with_tilemaps/snippets/tilemap.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/articles/tutorials/building_2d_games/13_working_with_tilemaps/snippets/tilemap.cs b/articles/tutorials/building_2d_games/13_working_with_tilemaps/snippets/tilemap.cs index f4fe5d0e..770c8be2 100644 --- a/articles/tutorials/building_2d_games/13_working_with_tilemaps/snippets/tilemap.cs +++ b/articles/tutorials/building_2d_games/13_working_with_tilemaps/snippets/tilemap.cs @@ -126,8 +126,8 @@ public void Draw(SpriteBatch spriteBatch) { for (int i = 0; i < Count; i++) { - int tileSetIndex = _tiles[i]; - TextureRegion tile = _tileset.GetTile(tileSetIndex); + int tilesetIndex = _tiles[i]; + TextureRegion tile = _tileset.GetTile(tilesetIndex); int x = i % Columns; int y = i / Columns; From e2edac972466d3c32901b03f608075a7254fa0e4 Mon Sep 17 00:00:00 2001 From: Becon032 Date: Sun, 7 Sep 2025 18:30:14 +0200 Subject: [PATCH 3/5] typo: added missing space --- .../15_audio_controller/snippets/audiocontroller.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/articles/tutorials/building_2d_games/15_audio_controller/snippets/audiocontroller.cs b/articles/tutorials/building_2d_games/15_audio_controller/snippets/audiocontroller.cs index 3c646d08..d3bb901c 100644 --- a/articles/tutorials/building_2d_games/15_audio_controller/snippets/audiocontroller.cs +++ b/articles/tutorials/building_2d_games/15_audio_controller/snippets/audiocontroller.cs @@ -88,7 +88,7 @@ public float SoundEffectVolume /// /// Gets a value that indicates if this audio controller has been disposed. /// - public bool IsDisposed {get; private set; } + public bool IsDisposed { get; private set; } #endregion #region ctors From f4c872d54612ee61abb8acfe8a17be95a414b083 Mon Sep 17 00:00:00 2001 From: Becon032 Date: Sun, 7 Sep 2025 18:35:27 +0200 Subject: [PATCH 4/5] Changed default pitch value. Short version of PlaySoundEffect method was playing up an octave by default. --- .../15_audio_controller/snippets/audiocontroller.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/articles/tutorials/building_2d_games/15_audio_controller/snippets/audiocontroller.cs b/articles/tutorials/building_2d_games/15_audio_controller/snippets/audiocontroller.cs index d3bb901c..871f8c99 100644 --- a/articles/tutorials/building_2d_games/15_audio_controller/snippets/audiocontroller.cs +++ b/articles/tutorials/building_2d_games/15_audio_controller/snippets/audiocontroller.cs @@ -168,7 +168,7 @@ protected void Dispose(bool disposing) /// The sound effect instance created by this method. public SoundEffectInstance PlaySoundEffect(SoundEffect soundEffect) { - return PlaySoundEffect(soundEffect, 1.0f, 1.0f, 0.0f, false); + return PlaySoundEffect(soundEffect, 1.0f, 0.0f, 0.0f, false); } /// From f638d15b6ac04fb5985b2e5b919c4ed419cefa92 Mon Sep 17 00:00:00 2001 From: Becon032 Date: Sun, 7 Sep 2025 18:39:19 +0200 Subject: [PATCH 5/5] missing word in FromFile method summary --- .../07_optimizing_texture_rendering/snippets/textureatlas.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/articles/tutorials/building_2d_games/07_optimizing_texture_rendering/snippets/textureatlas.cs b/articles/tutorials/building_2d_games/07_optimizing_texture_rendering/snippets/textureatlas.cs index 61d1c6e3..57483041 100644 --- a/articles/tutorials/building_2d_games/07_optimizing_texture_rendering/snippets/textureatlas.cs +++ b/articles/tutorials/building_2d_games/07_optimizing_texture_rendering/snippets/textureatlas.cs @@ -88,7 +88,7 @@ public void Clear() } /// - /// Creates a new texture atlas based a texture atlas xml configuration file. + /// Creates a new texture atlas based on a texture atlas xml configuration file. /// /// The content manager used to load the texture for the atlas. /// The path to the xml file, relative to the content root directory.