Browse Source

GemStoneHunter update to SDK and MG 3.8.*

CartBlanche 3 weeks ago
parent
commit
a898c3ace9
60 changed files with 6640 additions and 0 deletions
  1. 25 0
      XNAGameDevelopmentbyExample/GemstoneHunter/.vscode/launch.json
  2. 19 0
      XNAGameDevelopmentbyExample/GemstoneHunter/.vscode/tasks.json
  3. 140 0
      XNAGameDevelopmentbyExample/GemstoneHunter/Core/AnimationStrip.cs
  4. BIN
      XNAGameDevelopmentbyExample/GemstoneHunter/Core/Content/Fonts/Pericles10Bold.xnb
  5. BIN
      XNAGameDevelopmentbyExample/GemstoneHunter/Core/Content/Fonts/Pericles8.xnb
  6. BIN
      XNAGameDevelopmentbyExample/GemstoneHunter/Core/Content/Game.ico
  7. BIN
      XNAGameDevelopmentbyExample/GemstoneHunter/Core/Content/GameThumbnail.png
  8. 2242 0
      XNAGameDevelopmentbyExample/GemstoneHunter/Core/Content/Maps/MAP000.MAP
  9. BIN
      XNAGameDevelopmentbyExample/GemstoneHunter/Core/Content/Maps/MAP000.bin
  10. 2242 0
      XNAGameDevelopmentbyExample/GemstoneHunter/Core/Content/Maps/MAP001.MAP
  11. BIN
      XNAGameDevelopmentbyExample/GemstoneHunter/Core/Content/Maps/MAP001.bin
  12. BIN
      XNAGameDevelopmentbyExample/GemstoneHunter/Core/Content/Textures/Gem.xnb
  13. BIN
      XNAGameDevelopmentbyExample/GemstoneHunter/Core/Content/Textures/PlatformTiles.xnb
  14. BIN
      XNAGameDevelopmentbyExample/GemstoneHunter/Core/Content/Textures/Sprites/Gem.xnb
  15. BIN
      XNAGameDevelopmentbyExample/GemstoneHunter/Core/Content/Textures/Sprites/MonsterA/Die.xnb
  16. BIN
      XNAGameDevelopmentbyExample/GemstoneHunter/Core/Content/Textures/Sprites/MonsterA/Idle.xnb
  17. BIN
      XNAGameDevelopmentbyExample/GemstoneHunter/Core/Content/Textures/Sprites/MonsterA/Run.xnb
  18. BIN
      XNAGameDevelopmentbyExample/GemstoneHunter/Core/Content/Textures/Sprites/MonsterB/Die.xnb
  19. BIN
      XNAGameDevelopmentbyExample/GemstoneHunter/Core/Content/Textures/Sprites/MonsterB/Idle.xnb
  20. BIN
      XNAGameDevelopmentbyExample/GemstoneHunter/Core/Content/Textures/Sprites/MonsterB/Run.xnb
  21. BIN
      XNAGameDevelopmentbyExample/GemstoneHunter/Core/Content/Textures/Sprites/MonsterC/Die.xnb
  22. BIN
      XNAGameDevelopmentbyExample/GemstoneHunter/Core/Content/Textures/Sprites/MonsterC/Idle.xnb
  23. BIN
      XNAGameDevelopmentbyExample/GemstoneHunter/Core/Content/Textures/Sprites/MonsterC/Run.xnb
  24. BIN
      XNAGameDevelopmentbyExample/GemstoneHunter/Core/Content/Textures/Sprites/MonsterD/Die.xnb
  25. BIN
      XNAGameDevelopmentbyExample/GemstoneHunter/Core/Content/Textures/Sprites/MonsterD/Idle.xnb
  26. BIN
      XNAGameDevelopmentbyExample/GemstoneHunter/Core/Content/Textures/Sprites/MonsterD/Run.xnb
  27. BIN
      XNAGameDevelopmentbyExample/GemstoneHunter/Core/Content/Textures/Sprites/Player/Celebrate.xnb
  28. BIN
      XNAGameDevelopmentbyExample/GemstoneHunter/Core/Content/Textures/Sprites/Player/Die.xnb
  29. BIN
      XNAGameDevelopmentbyExample/GemstoneHunter/Core/Content/Textures/Sprites/Player/Idle.xnb
  30. BIN
      XNAGameDevelopmentbyExample/GemstoneHunter/Core/Content/Textures/Sprites/Player/Jump.xnb
  31. BIN
      XNAGameDevelopmentbyExample/GemstoneHunter/Core/Content/Textures/Sprites/Player/Run.xnb
  32. BIN
      XNAGameDevelopmentbyExample/GemstoneHunter/Core/Content/Textures/TitleScreen.xnb
  33. 106 0
      XNAGameDevelopmentbyExample/GemstoneHunter/Core/Enemy.cs
  34. 229 0
      XNAGameDevelopmentbyExample/GemstoneHunter/Core/Game1.cs
  35. 267 0
      XNAGameDevelopmentbyExample/GemstoneHunter/Core/GameObject.cs
  36. 40 0
      XNAGameDevelopmentbyExample/GemstoneHunter/Core/Gemstone.cs
  37. 10 0
      XNAGameDevelopmentbyExample/GemstoneHunter/Core/GemstoneHunter.Core.csproj
  38. 173 0
      XNAGameDevelopmentbyExample/GemstoneHunter/Core/LevelManager.cs
  39. 206 0
      XNAGameDevelopmentbyExample/GemstoneHunter/Core/Player.cs
  40. 103 0
      XNAGameDevelopmentbyExample/GemstoneHunter/Core/TileEngine/Camera.cs
  41. 43 0
      XNAGameDevelopmentbyExample/GemstoneHunter/Core/TileEngine/MapSquare.cs
  42. 12 0
      XNAGameDevelopmentbyExample/GemstoneHunter/Core/TileEngine/MyClass.cs
  43. 362 0
      XNAGameDevelopmentbyExample/GemstoneHunter/Core/TileEngine/TileMap.cs
  44. 43 0
      XNAGameDevelopmentbyExample/GemstoneHunter/Core/app.manifest
  45. 46 0
      XNAGameDevelopmentbyExample/GemstoneHunter/GemstoneHunter.sln
  46. 15 0
      XNAGameDevelopmentbyExample/GemstoneHunter/Platforms/Android/AndroidManifest.xml
  47. 21 0
      XNAGameDevelopmentbyExample/GemstoneHunter/Platforms/Android/GemstoneHunter.Android.csproj
  48. 23 0
      XNAGameDevelopmentbyExample/GemstoneHunter/Platforms/Android/Program.cs
  49. 4 0
      XNAGameDevelopmentbyExample/GemstoneHunter/Platforms/Android/Resources/values/strings.xml
  50. 5 0
      XNAGameDevelopmentbyExample/GemstoneHunter/Platforms/Android/Resources/values/styles.xml
  51. 22 0
      XNAGameDevelopmentbyExample/GemstoneHunter/Platforms/Desktop/GemstoneHunter.DesktopGL.csproj
  52. 13 0
      XNAGameDevelopmentbyExample/GemstoneHunter/Platforms/Desktop/Program.cs
  53. 23 0
      XNAGameDevelopmentbyExample/GemstoneHunter/Platforms/Windows/GemstoneHunter.Windows.csproj
  54. 16 0
      XNAGameDevelopmentbyExample/GemstoneHunter/Platforms/Windows/Program.cs
  55. 21 0
      XNAGameDevelopmentbyExample/GemstoneHunter/Platforms/iOS/GemstoneHunter.iOS.csproj
  56. 23 0
      XNAGameDevelopmentbyExample/GemstoneHunter/Platforms/iOS/Info.plist
  57. 26 0
      XNAGameDevelopmentbyExample/GemstoneHunter/Platforms/iOS/Program.cs
  58. 60 0
      XNAGameDevelopmentbyExample/GemstoneHunter/README.md
  59. 8 0
      XNAGameDevelopmentbyExample/GemstoneHunter/Tools/MapMigration/MapMigration.csproj
  60. 52 0
      XNAGameDevelopmentbyExample/GemstoneHunter/Tools/MapMigration/Program.cs

+ 25 - 0
XNAGameDevelopmentbyExample/GemstoneHunter/.vscode/launch.json

@@ -0,0 +1,25 @@
+{
+    "version": "0.2.0",
+    "configurations": [
+        {
+            "name": "Launch Windows",
+            "type": "coreclr",
+            "request": "launch",
+            "preLaunchTask": "build-windows",
+            "program": "${workspaceFolder}/Platforms/Windows/bin/Debug/net8.0-windows/GemstoneHunter.Windows.exe",
+            "args": [],
+            "cwd": "${workspaceFolder}",
+            "stopAtEntry": false
+        },
+        {
+            "name": "Launch DesktopGL",
+            "type": "coreclr",
+            "request": "launch",
+            "preLaunchTask": "build-desktopgl",
+            "program": "${workspaceFolder}/Platforms/Desktop/bin/Debug/net8.0/GemstoneHunter.DesktopGL",
+            "args": [],
+            "cwd": "${workspaceFolder}",
+            "stopAtEntry": false
+        }
+    ]
+}

+ 19 - 0
XNAGameDevelopmentbyExample/GemstoneHunter/.vscode/tasks.json

@@ -0,0 +1,19 @@
+{
+    "version": "2.0.0",
+    "tasks": [
+        {
+            "label": "build-windows",
+            "type": "shell",
+            "command": "dotnet build Platforms/Windows/GemstoneHunter.Windows.csproj",
+            "group": "build",
+            "problemMatcher": ["$msCompile"]
+        },
+        {
+            "label": "build-desktopgl",
+            "type": "shell",
+            "command": "dotnet build Platforms/Desktop/GemstoneHunter.DesktopGL.csproj",
+            "group": "build",
+            "problemMatcher": ["$msCompile"]
+        }
+    ]
+}

+ 140 - 0
XNAGameDevelopmentbyExample/GemstoneHunter/Core/AnimationStrip.cs

@@ -0,0 +1,140 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using Microsoft.Xna.Framework;
+using Microsoft.Xna.Framework.Graphics;
+
+namespace Gemstone_Hunter
+{
+    public class AnimationStrip
+    {
+
+        private Texture2D texture;
+        private int frameWidth;
+        private int frameHeight;
+
+        private float frameTimer = 0f;
+        private float frameDelay = 0.05f;
+
+        private int currentFrame;
+
+        private bool loopAnimation = true;
+        private bool finishedPlaying = false;
+
+        private string name;
+        private string nextAnimation;
+
+
+
+        public int FrameWidth
+        {
+            get { return frameWidth; }
+            set { frameWidth = value; }
+        }
+
+        public int FrameHeight
+        {
+            get { return frameHeight; }
+            set { frameHeight = value; }
+        }
+
+        public Texture2D Texture
+        {
+            get { return texture; }
+            set { texture = value; }
+        }
+
+        public string Name
+        {
+            get { return name; }
+            set { name = value; }
+        }
+
+        public string NextAnimation
+        {
+            get { return nextAnimation; }
+            set { nextAnimation = value; }
+        }
+
+        public bool LoopAnimation
+        {
+            get { return loopAnimation; }
+            set { loopAnimation = value; }
+        }
+
+        public bool FinishedPlaying
+        {
+            get { return finishedPlaying; }
+        }
+
+        public int FrameCount
+        {
+            get { return texture.Width / frameWidth; }
+        }
+
+        public float FrameLength
+        {
+            get { return frameDelay; }
+            set { frameDelay = value; }
+        }
+
+        public Rectangle FrameRectangle
+        {
+            get
+            {
+                return new Rectangle(
+                    currentFrame * frameWidth,
+                    0,
+                    frameWidth,
+                    frameHeight);
+            }
+        }
+
+
+
+        public AnimationStrip(Texture2D texture, int frameWidth, string name)
+        {
+            this.texture = texture;
+            this.frameWidth = frameWidth;
+            this.frameHeight = texture.Height;
+            this.name = name;
+        }
+
+
+
+        public void Play()
+        {
+            currentFrame = 0;
+            finishedPlaying = false;
+        }
+
+        public void Update(GameTime gameTime)
+        {
+            float elapsed = (float)gameTime.ElapsedGameTime.TotalSeconds;
+
+            frameTimer += elapsed;
+
+            if (frameTimer >= frameDelay)
+            {
+                currentFrame++;
+                if (currentFrame >= FrameCount)
+                {
+                    if (loopAnimation)
+                    {
+                        currentFrame = 0;
+                    }
+                    else
+                    {
+                        currentFrame = FrameCount - 1;
+                        finishedPlaying = true;
+                    }
+                }
+
+                frameTimer = 0f;
+            }
+        }
+
+
+    }
+}

BIN
XNAGameDevelopmentbyExample/GemstoneHunter/Core/Content/Fonts/Pericles10Bold.xnb


BIN
XNAGameDevelopmentbyExample/GemstoneHunter/Core/Content/Fonts/Pericles8.xnb


BIN
XNAGameDevelopmentbyExample/GemstoneHunter/Core/Content/Game.ico


BIN
XNAGameDevelopmentbyExample/GemstoneHunter/Core/Content/GameThumbnail.png


+ 2242 - 0
XNAGameDevelopmentbyExample/GemstoneHunter/Core/Content/Maps/MAP000.MAP

@@ -0,0 +1,2242 @@
+[
+  [
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {}
+  ],
+  [
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {}
+  ],
+  [
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {}
+  ],
+  [
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {}
+  ],
+  [
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {}
+  ],
+  [
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {}
+  ],
+  [
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {}
+  ],
+  [
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {}
+  ],
+  [
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {}
+  ],
+  [
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {}
+  ],
+  [
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {}
+  ],
+  [
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {}
+  ],
+  [
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {}
+  ],
+  [
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {}
+  ],
+  [
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {}
+  ],
+  [
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {}
+  ],
+  [
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {}
+  ],
+  [
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {}
+  ],
+  [
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {}
+  ],
+  [
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {}
+  ],
+  [
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {}
+  ],
+  [
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {}
+  ],
+  [
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {}
+  ],
+  [
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {}
+  ],
+  [
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {}
+  ],
+  [
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {}
+  ],
+  [
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {}
+  ],
+  [
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {}
+  ],
+  [
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {}
+  ],
+  [
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {}
+  ],
+  [
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {}
+  ],
+  [
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {}
+  ],
+  [
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {}
+  ],
+  [
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {}
+  ],
+  [
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {}
+  ],
+  [
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {}
+  ],
+  [
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {}
+  ],
+  [
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {}
+  ],
+  [
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {}
+  ],
+  [
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {}
+  ],
+  [
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {}
+  ],
+  [
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {}
+  ],
+  [
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {}
+  ],
+  [
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {}
+  ],
+  [
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {}
+  ],
+  [
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {}
+  ],
+  [
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {}
+  ],
+  [
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {}
+  ],
+  [
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {}
+  ],
+  [
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {}
+  ],
+  [
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {}
+  ],
+  [
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {}
+  ],
+  [
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {}
+  ],
+  [
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {}
+  ],
+  [
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {}
+  ],
+  [
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {}
+  ],
+  [
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {}
+  ],
+  [
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {}
+  ],
+  [
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {}
+  ],
+  [
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {}
+  ],
+  [
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {}
+  ],
+  [
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {}
+  ],
+  [
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {}
+  ],
+  [
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {}
+  ],
+  [
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {}
+  ],
+  [
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {}
+  ],
+  [
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {}
+  ],
+  [
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {}
+  ],
+  [
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {}
+  ],
+  [
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {}
+  ],
+  [
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {}
+  ],
+  [
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {}
+  ],
+  [
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {}
+  ],
+  [
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {}
+  ],
+  [
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {}
+  ],
+  [
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {}
+  ],
+  [
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {}
+  ],
+  [
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {}
+  ],
+  [
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {}
+  ],
+  [
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {}
+  ],
+  [
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {}
+  ],
+  [
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {}
+  ],
+  [
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {}
+  ],
+  [
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {}
+  ],
+  [
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {}
+  ],
+  [
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {}
+  ],
+  [
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {}
+  ],
+  [
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {}
+  ],
+  [
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {}
+  ],
+  [
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {}
+  ],
+  [
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {}
+  ],
+  [
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {}
+  ],
+  [
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {}
+  ],
+  [
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {}
+  ],
+  [
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {}
+  ],
+  [
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {}
+  ],
+  [
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {}
+  ],
+  [
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {}
+  ],
+  [
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {}
+  ],
+  [
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {}
+  ],
+  [
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {}
+  ],
+  [
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {}
+  ],
+  [
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {}
+  ],
+  [
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {}
+  ],
+  [
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {}
+  ],
+  [
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {}
+  ],
+  [
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {}
+  ],
+  [
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {}
+  ],
+  [
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {}
+  ],
+  [
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {}
+  ],
+  [
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {}
+  ],
+  [
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {}
+  ],
+  [
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {}
+  ],
+  [
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {}
+  ],
+  [
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {}
+  ],
+  [
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {}
+  ],
+  [
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {}
+  ],
+  [
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {}
+  ],
+  [
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {}
+  ],
+  [
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {}
+  ],
+  [
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {}
+  ],
+  [
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {}
+  ],
+  [
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {}
+  ],
+  [
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {}
+  ],
+  [
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {}
+  ],
+  [
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {}
+  ],
+  [
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {}
+  ],
+  [
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {}
+  ],
+  [
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {}
+  ],
+  [
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {}
+  ],
+  [
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {}
+  ],
+  [
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {}
+  ],
+  [
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {}
+  ],
+  [
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {}
+  ],
+  [
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {}
+  ],
+  [
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {}
+  ],
+  [
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {}
+  ],
+  [
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {}
+  ],
+  [
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {}
+  ],
+  [
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {}
+  ],
+  [
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {}
+  ],
+  [
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {}
+  ],
+  [
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {}
+  ],
+  [
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {}
+  ],
+  [
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {}
+  ],
+  [
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {}
+  ],
+  [
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {}
+  ],
+  [
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {}
+  ],
+  [
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {}
+  ],
+  [
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {}
+  ],
+  [
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {}
+  ],
+  [
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {}
+  ],
+  [
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {}
+  ],
+  [
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {}
+  ],
+  [
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {}
+  ],
+  [
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {}
+  ],
+  [
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {}
+  ],
+  [
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {}
+  ],
+  [
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {}
+  ],
+  [
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {}
+  ]
+]

BIN
XNAGameDevelopmentbyExample/GemstoneHunter/Core/Content/Maps/MAP000.bin


+ 2242 - 0
XNAGameDevelopmentbyExample/GemstoneHunter/Core/Content/Maps/MAP001.MAP

@@ -0,0 +1,2242 @@
+[
+  [
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {}
+  ],
+  [
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {}
+  ],
+  [
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {}
+  ],
+  [
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {}
+  ],
+  [
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {}
+  ],
+  [
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {}
+  ],
+  [
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {}
+  ],
+  [
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {}
+  ],
+  [
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {}
+  ],
+  [
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {}
+  ],
+  [
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {}
+  ],
+  [
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {}
+  ],
+  [
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {}
+  ],
+  [
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {}
+  ],
+  [
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {}
+  ],
+  [
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {}
+  ],
+  [
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {}
+  ],
+  [
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {}
+  ],
+  [
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {}
+  ],
+  [
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {}
+  ],
+  [
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {}
+  ],
+  [
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {}
+  ],
+  [
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {}
+  ],
+  [
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {}
+  ],
+  [
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {}
+  ],
+  [
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {}
+  ],
+  [
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {}
+  ],
+  [
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {}
+  ],
+  [
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {}
+  ],
+  [
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {}
+  ],
+  [
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {}
+  ],
+  [
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {}
+  ],
+  [
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {}
+  ],
+  [
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {}
+  ],
+  [
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {}
+  ],
+  [
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {}
+  ],
+  [
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {}
+  ],
+  [
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {}
+  ],
+  [
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {}
+  ],
+  [
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {}
+  ],
+  [
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {}
+  ],
+  [
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {}
+  ],
+  [
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {}
+  ],
+  [
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {}
+  ],
+  [
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {}
+  ],
+  [
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {}
+  ],
+  [
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {}
+  ],
+  [
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {}
+  ],
+  [
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {}
+  ],
+  [
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {}
+  ],
+  [
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {}
+  ],
+  [
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {}
+  ],
+  [
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {}
+  ],
+  [
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {}
+  ],
+  [
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {}
+  ],
+  [
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {}
+  ],
+  [
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {}
+  ],
+  [
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {}
+  ],
+  [
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {}
+  ],
+  [
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {}
+  ],
+  [
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {}
+  ],
+  [
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {}
+  ],
+  [
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {}
+  ],
+  [
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {}
+  ],
+  [
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {}
+  ],
+  [
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {}
+  ],
+  [
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {}
+  ],
+  [
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {}
+  ],
+  [
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {}
+  ],
+  [
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {}
+  ],
+  [
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {}
+  ],
+  [
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {}
+  ],
+  [
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {}
+  ],
+  [
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {}
+  ],
+  [
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {}
+  ],
+  [
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {}
+  ],
+  [
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {}
+  ],
+  [
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {}
+  ],
+  [
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {}
+  ],
+  [
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {}
+  ],
+  [
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {}
+  ],
+  [
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {}
+  ],
+  [
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {}
+  ],
+  [
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {}
+  ],
+  [
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {}
+  ],
+  [
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {}
+  ],
+  [
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {}
+  ],
+  [
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {}
+  ],
+  [
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {}
+  ],
+  [
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {}
+  ],
+  [
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {}
+  ],
+  [
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {}
+  ],
+  [
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {}
+  ],
+  [
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {}
+  ],
+  [
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {}
+  ],
+  [
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {}
+  ],
+  [
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {}
+  ],
+  [
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {}
+  ],
+  [
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {}
+  ],
+  [
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {}
+  ],
+  [
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {}
+  ],
+  [
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {}
+  ],
+  [
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {}
+  ],
+  [
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {}
+  ],
+  [
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {}
+  ],
+  [
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {}
+  ],
+  [
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {}
+  ],
+  [
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {}
+  ],
+  [
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {}
+  ],
+  [
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {}
+  ],
+  [
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {}
+  ],
+  [
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {}
+  ],
+  [
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {}
+  ],
+  [
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {}
+  ],
+  [
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {}
+  ],
+  [
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {}
+  ],
+  [
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {}
+  ],
+  [
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {}
+  ],
+  [
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {}
+  ],
+  [
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {}
+  ],
+  [
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {}
+  ],
+  [
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {}
+  ],
+  [
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {}
+  ],
+  [
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {}
+  ],
+  [
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {}
+  ],
+  [
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {}
+  ],
+  [
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {}
+  ],
+  [
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {}
+  ],
+  [
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {}
+  ],
+  [
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {}
+  ],
+  [
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {}
+  ],
+  [
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {}
+  ],
+  [
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {}
+  ],
+  [
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {}
+  ],
+  [
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {}
+  ],
+  [
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {}
+  ],
+  [
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {}
+  ],
+  [
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {}
+  ],
+  [
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {}
+  ],
+  [
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {}
+  ],
+  [
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {}
+  ],
+  [
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {}
+  ],
+  [
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {}
+  ],
+  [
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {}
+  ],
+  [
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {}
+  ],
+  [
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {}
+  ],
+  [
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {}
+  ],
+  [
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {}
+  ],
+  [
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {}
+  ],
+  [
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {}
+  ],
+  [
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {}
+  ],
+  [
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {}
+  ],
+  [
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {}
+  ],
+  [
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {}
+  ],
+  [
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {}
+  ],
+  [
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {}
+  ],
+  [
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {}
+  ],
+  [
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {}
+  ],
+  [
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {}
+  ],
+  [
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {},
+    {}
+  ]
+]

BIN
XNAGameDevelopmentbyExample/GemstoneHunter/Core/Content/Maps/MAP001.bin


BIN
XNAGameDevelopmentbyExample/GemstoneHunter/Core/Content/Textures/Gem.xnb


BIN
XNAGameDevelopmentbyExample/GemstoneHunter/Core/Content/Textures/PlatformTiles.xnb


BIN
XNAGameDevelopmentbyExample/GemstoneHunter/Core/Content/Textures/Sprites/Gem.xnb


BIN
XNAGameDevelopmentbyExample/GemstoneHunter/Core/Content/Textures/Sprites/MonsterA/Die.xnb


BIN
XNAGameDevelopmentbyExample/GemstoneHunter/Core/Content/Textures/Sprites/MonsterA/Idle.xnb


BIN
XNAGameDevelopmentbyExample/GemstoneHunter/Core/Content/Textures/Sprites/MonsterA/Run.xnb


BIN
XNAGameDevelopmentbyExample/GemstoneHunter/Core/Content/Textures/Sprites/MonsterB/Die.xnb


BIN
XNAGameDevelopmentbyExample/GemstoneHunter/Core/Content/Textures/Sprites/MonsterB/Idle.xnb


BIN
XNAGameDevelopmentbyExample/GemstoneHunter/Core/Content/Textures/Sprites/MonsterB/Run.xnb


BIN
XNAGameDevelopmentbyExample/GemstoneHunter/Core/Content/Textures/Sprites/MonsterC/Die.xnb


BIN
XNAGameDevelopmentbyExample/GemstoneHunter/Core/Content/Textures/Sprites/MonsterC/Idle.xnb


BIN
XNAGameDevelopmentbyExample/GemstoneHunter/Core/Content/Textures/Sprites/MonsterC/Run.xnb


BIN
XNAGameDevelopmentbyExample/GemstoneHunter/Core/Content/Textures/Sprites/MonsterD/Die.xnb


BIN
XNAGameDevelopmentbyExample/GemstoneHunter/Core/Content/Textures/Sprites/MonsterD/Idle.xnb


BIN
XNAGameDevelopmentbyExample/GemstoneHunter/Core/Content/Textures/Sprites/MonsterD/Run.xnb


BIN
XNAGameDevelopmentbyExample/GemstoneHunter/Core/Content/Textures/Sprites/Player/Celebrate.xnb


BIN
XNAGameDevelopmentbyExample/GemstoneHunter/Core/Content/Textures/Sprites/Player/Die.xnb


BIN
XNAGameDevelopmentbyExample/GemstoneHunter/Core/Content/Textures/Sprites/Player/Idle.xnb


BIN
XNAGameDevelopmentbyExample/GemstoneHunter/Core/Content/Textures/Sprites/Player/Jump.xnb


BIN
XNAGameDevelopmentbyExample/GemstoneHunter/Core/Content/Textures/Sprites/Player/Run.xnb


BIN
XNAGameDevelopmentbyExample/GemstoneHunter/Core/Content/Textures/TitleScreen.xnb


+ 106 - 0
XNAGameDevelopmentbyExample/GemstoneHunter/Core/Enemy.cs

@@ -0,0 +1,106 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using Microsoft.Xna.Framework;
+using Microsoft.Xna.Framework.Content;
+using Microsoft.Xna.Framework.Graphics;
+using Tile_Engine;
+
+namespace Gemstone_Hunter
+{
+    public class Enemy : GameObject
+    {
+        private Vector2 fallSpeed = new Vector2(0, 20);
+        private float walkSpeed = 60.0f;
+        private bool facingLeft = true;
+        public bool Dead = false;
+
+
+        public Enemy(ContentManager content, int cellX, int cellY)
+        {
+            animations.Add("idle",
+                new AnimationStrip(
+                    content.Load<Texture2D>(
+                        @"Textures\Sprites\MonsterC\Idle"),
+                    48,
+                    "idle"));
+            animations["idle"].LoopAnimation = true;
+
+            animations.Add("run",
+                new AnimationStrip(
+                    content.Load<Texture2D>(
+                        @"Textures\Sprites\MonsterC\Run"),
+                    48,
+                    "run"));
+            animations["run"].FrameLength = 0.1f;
+            animations["run"].LoopAnimation = true;
+
+            animations.Add("die",
+                new AnimationStrip(
+                    content.Load<Texture2D>(
+                        @"Textures\Sprites\MonsterC\Die"),
+                    48,
+                    "die"));
+            animations["die"].LoopAnimation = false;
+
+            frameWidth = 48;
+            frameHeight = 48;
+            CollisionRectangle = new Rectangle(9, 1, 30, 46);
+
+            worldLocation = new Vector2(
+                cellX * TileMap.TileWidth,
+                cellY * TileMap.TileHeight);
+
+            enabled = true;
+
+            codeBasedBlocks = true;
+            PlayAnimation("run");
+        }
+
+
+
+        public override void Update(GameTime gameTime)
+        {
+            Vector2 oldLocation = worldLocation;
+
+            if (!Dead)
+            {
+                velocity = new Vector2(0, velocity.Y);
+
+                Vector2 direction = new Vector2(1, 0);
+                flipped = true;
+
+                if (facingLeft)
+                {
+                    direction = new Vector2(-1, 0);
+                    flipped = false;
+                }
+
+                direction *= walkSpeed;
+                velocity += direction;
+                velocity += fallSpeed;
+            }
+
+            base.Update(gameTime);
+
+            if (!Dead)
+            {
+                if (oldLocation == worldLocation)
+                {
+                    facingLeft = !facingLeft;
+                }
+            }
+            else
+            {
+                if (animations[currentAnimation].FinishedPlaying)
+                {
+                    enabled = false;
+                }
+            }
+
+        }
+
+
+    }
+}

+ 229 - 0
XNAGameDevelopmentbyExample/GemstoneHunter/Core/Game1.cs

@@ -0,0 +1,229 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using Microsoft.Xna.Framework;
+using Microsoft.Xna.Framework.Audio;
+using Microsoft.Xna.Framework.Content;
+using Microsoft.Xna.Framework.Graphics;
+using Microsoft.Xna.Framework.Input;
+using Microsoft.Xna.Framework.Media;
+using Tile_Engine;
+
+namespace Gemstone_Hunter
+{
+    /// <summary>
+    /// This is the main type for your game
+    /// </summary>
+    public class Game1 : Microsoft.Xna.Framework.Game
+    {
+        GraphicsDeviceManager graphics;
+        SpriteBatch spriteBatch;
+        Player player;
+        SpriteFont pericles8;
+        Vector2 scorePosition = new Vector2(20, 580);
+        enum GameState { TitleScreen, Playing, PlayerDead, GameOver };
+        GameState gameState = GameState.TitleScreen;
+
+        Vector2 gameOverPosition = new Vector2(350, 300);
+        Vector2 livesPosition = new Vector2(600, 580);
+
+        Texture2D titleScreen;
+
+        float deathTimer = 0.0f;
+        float deathDelay = 5.0f;
+
+        public Game1()
+        {
+            graphics = new GraphicsDeviceManager(this);
+            Content.RootDirectory = "Content";
+        }
+
+        /// <summary>
+        /// Allows the game to perform any initialization it needs to before starting to run.
+        /// This is where it can query for any required services and load any non-graphic
+        /// related content.  Calling base.Initialize will enumerate through any components
+        /// and initialize them as well.
+        /// </summary>
+        protected override void Initialize()
+        {
+            // TODO: Add your initialization logic here
+
+            this.graphics.PreferredBackBufferWidth = 800;
+            this.graphics.PreferredBackBufferHeight = 600;
+            this.graphics.ApplyChanges();
+            base.Initialize();
+        }
+
+        /// <summary>
+        /// LoadContent will be called once per game and is the place to load
+        /// all of your content.
+        /// </summary>
+        protected override void LoadContent()
+        {
+            spriteBatch = new SpriteBatch(GraphicsDevice);
+
+            TileMap.Initialize(
+                Content.Load<Texture2D>(@"Textures\PlatformTiles"));
+            TileMap.spriteFont =
+                Content.Load<SpriteFont>(@"Fonts\Pericles8");
+
+            pericles8 = Content.Load<SpriteFont>(@"Fonts\Pericles8");
+
+            titleScreen = Content.Load<Texture2D>(@"Textures\TitleScreen");
+
+            Camera.WorldRectangle = new Rectangle(0, 0, 160 * 48, 12 * 48);
+            Camera.Position = Vector2.Zero;
+            Camera.ViewPortWidth = 800;
+            Camera.ViewPortHeight = 600;
+
+            player = new Player(Content);
+            LevelManager.Initialize(Content, player);
+        }
+
+        private void StartNewGame()
+        {
+            player.Revive();
+            player.LivesRemaining = 3;
+            player.WorldLocation = Vector2.Zero;
+            LevelManager.LoadLevel(0);
+        }
+
+        /// <summary>
+        /// UnloadContent will be called once per game and is the place to unload
+        /// all content.
+        /// </summary>
+        protected override void UnloadContent()
+        {
+            // TODO: Unload any non ContentManager content here
+        }
+
+        /// <summary>
+        /// Allows the game to run logic such as updating the world,
+        /// checking for collisions, gathering input, and playing audio.
+        /// </summary>
+        /// <param name="gameTime">Provides a snapshot of timing values.</param>
+        protected override void Update(GameTime gameTime)
+        {
+			KeyboardState keyState = Keyboard.GetState();
+			
+            // Allows the game to exit
+            if (keyState.IsKeyDown(Keys.Escape)
+            || GamePad.GetState(PlayerIndex.One).Buttons.Back ==
+                ButtonState.Pressed)
+                this.Exit();
+
+            
+            GamePadState gamepadState = GamePad.GetState(PlayerIndex.One);
+            float elapsed = (float)gameTime.ElapsedGameTime.TotalSeconds;
+
+            if (gameState == GameState.TitleScreen)
+            {
+                if (keyState.IsKeyDown(Keys.Space) ||
+                    gamepadState.Buttons.A == ButtonState.Pressed)
+                {
+                    StartNewGame();
+                    gameState = GameState.Playing;
+                }
+            }
+
+            if (gameState == GameState.Playing)
+            {
+                player.Update(gameTime);
+                LevelManager.Update(gameTime);
+                if (player.Dead)
+                {
+                    if (player.LivesRemaining > 0)
+                    {
+                        gameState = GameState.PlayerDead;
+                        deathTimer = 0.0f;
+                    }
+                    else
+                    {
+                        gameState = GameState.GameOver;
+                        deathTimer = 0.0f;
+                    }
+                }
+            }
+
+            if (gameState == GameState.PlayerDead)
+            {
+                player.Update(gameTime);
+                LevelManager.Update(gameTime);
+                deathTimer += elapsed;
+                if (deathTimer > deathDelay)
+                {
+                    player.WorldLocation = Vector2.Zero;
+                    LevelManager.ReloadLevel();
+                    player.Revive();
+                    gameState = GameState.Playing;
+                }
+            }
+
+            if (gameState == GameState.GameOver)
+            {
+                deathTimer += elapsed;
+                if (deathTimer > deathDelay)
+                {
+                    gameState = GameState.TitleScreen;
+                }
+            }
+
+            base.Update(gameTime);
+        }
+
+        /// <summary>
+        /// This is called when the game should draw itself.
+        /// </summary>
+        /// <param name="gameTime">Provides a snapshot of timing values.</param>
+        protected override void Draw(GameTime gameTime)
+        {
+            GraphicsDevice.Clear(Color.Black);
+
+            spriteBatch.Begin(
+                SpriteSortMode.BackToFront,
+                BlendState.AlphaBlend);
+
+            if (gameState == GameState.TitleScreen)
+            {
+                spriteBatch.Draw(titleScreen, Vector2.Zero, Color.White);
+            }
+
+            if ((gameState == GameState.Playing) ||
+                (gameState == GameState.PlayerDead) ||
+                (gameState == GameState.GameOver))
+            {
+                TileMap.Draw(spriteBatch);
+                player.Draw(spriteBatch);
+                LevelManager.Draw(spriteBatch);
+                spriteBatch.DrawString(
+                    pericles8,
+                    "Score: " + player.Score.ToString(),
+                    scorePosition,
+                    Color.White);
+                spriteBatch.DrawString(
+                    pericles8,
+                    "Lives Remaining: " + player.LivesRemaining.ToString(),
+                    livesPosition,
+                    Color.White);
+            }
+
+            if (gameState == GameState.PlayerDead)
+            {
+            }
+
+            if (gameState == GameState.GameOver)
+            {
+                spriteBatch.DrawString(
+                    pericles8,
+                    "G A M E  O V E R !",
+                    gameOverPosition,
+                    Color.White);
+            }
+
+            spriteBatch.End();
+
+            base.Draw(gameTime);
+        }
+
+    }
+}

+ 267 - 0
XNAGameDevelopmentbyExample/GemstoneHunter/Core/GameObject.cs

@@ -0,0 +1,267 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using Microsoft.Xna.Framework;
+using Microsoft.Xna.Framework.Graphics;
+using Tile_Engine;
+
+namespace Gemstone_Hunter
+{
+    public class GameObject
+    {
+
+        protected Vector2 worldLocation;
+        protected Vector2 velocity;
+        protected int frameWidth;
+        protected int frameHeight;
+
+        protected bool enabled;
+        protected bool flipped = false;
+        protected bool onGround;
+
+        protected Rectangle collisionRectangle;
+        protected int collideWidth;
+        protected int collideHeight;
+        protected bool codeBasedBlocks = true;
+
+        protected float drawDepth = 0.85f;
+        protected Dictionary<string, AnimationStrip> animations =
+            new Dictionary<string, AnimationStrip>();
+        protected string currentAnimation;
+
+
+
+        public bool Enabled
+        {
+            get { return enabled; }
+            set { enabled = value; }
+        }
+
+        public Vector2 WorldLocation
+        {
+            get { return worldLocation; }
+            set { worldLocation = value; }
+        }
+
+        public Vector2 WorldCenter
+        {
+            get
+            {
+                return new Vector2(
+                  (int)worldLocation.X + (int)(frameWidth / 2),
+                  (int)worldLocation.Y + (int)(frameHeight / 2));
+            }
+        }
+
+        public Rectangle WorldRectangle
+        {
+            get
+            {
+                return new Rectangle(
+                    (int)worldLocation.X,
+                    (int)worldLocation.Y,
+                    frameWidth,
+                    frameHeight);
+            }
+        }
+
+        public Rectangle CollisionRectangle
+        {
+            get
+            {
+                return new Rectangle(
+                    (int)worldLocation.X + collisionRectangle.X,
+                    (int)WorldRectangle.Y + collisionRectangle.Y,
+                    collisionRectangle.Width,
+                    collisionRectangle.Height);
+            }
+            set { collisionRectangle = value; }
+        }
+
+
+
+        private void updateAnimation(GameTime gameTime)
+        {
+            if (animations.ContainsKey(currentAnimation))
+            {
+                if (animations[currentAnimation].FinishedPlaying)
+                {
+                    PlayAnimation(animations[currentAnimation].NextAnimation);
+                }
+                else
+                {
+                    animations[currentAnimation].Update(gameTime);
+                }
+            }
+        }
+
+
+
+        private Vector2 horizontalCollisionTest(Vector2 moveAmount)
+        {
+            if (moveAmount.X == 0)
+                return moveAmount;
+
+            Rectangle afterMoveRect = CollisionRectangle;
+            afterMoveRect.Offset((int)moveAmount.X, 0);
+            Vector2 corner1, corner2;
+
+            if (moveAmount.X < 0)
+            {
+                corner1 = new Vector2(afterMoveRect.Left,
+                                      afterMoveRect.Top + 1);
+                corner2 = new Vector2(afterMoveRect.Left,
+                                      afterMoveRect.Bottom - 1);
+            }
+            else
+            {
+                corner1 = new Vector2(afterMoveRect.Right,
+                                      afterMoveRect.Top + 1);
+                corner2 = new Vector2(afterMoveRect.Right,
+                                      afterMoveRect.Bottom - 1);
+            }
+
+            Vector2 mapCell1 = TileMap.GetCellByPixel(corner1);
+            Vector2 mapCell2 = TileMap.GetCellByPixel(corner2);
+
+            if (!TileMap.CellIsPassable(mapCell1) ||
+                !TileMap.CellIsPassable(mapCell2))
+            {
+                moveAmount.X = 0;
+                velocity.X = 0;
+            }
+
+            if (codeBasedBlocks)
+            {
+                if (TileMap.CellCodeValue(mapCell1) == "BLOCK" ||
+                    TileMap.CellCodeValue(mapCell2) == "BLOCK")
+                {
+                    moveAmount.X = 0;
+                    velocity.X = 0;
+                }
+            }
+
+            return moveAmount;
+        }
+
+        private Vector2 verticalCollisionTest(Vector2 moveAmount)
+        {
+            if (moveAmount.Y == 0)
+                return moveAmount;
+
+            Rectangle afterMoveRect = CollisionRectangle;
+            afterMoveRect.Offset((int)moveAmount.X, (int)moveAmount.Y);
+            Vector2 corner1, corner2;
+
+            if (moveAmount.Y < 0)
+            {
+                corner1 = new Vector2(afterMoveRect.Left + 1,
+                                      afterMoveRect.Top);
+                corner2 = new Vector2(afterMoveRect.Right - 1,
+                                      afterMoveRect.Top);
+            }
+            else
+            {
+                corner1 = new Vector2(afterMoveRect.Left + 1,
+                                      afterMoveRect.Bottom);
+                corner2 = new Vector2(afterMoveRect.Right - 1,
+                                      afterMoveRect.Bottom);
+            }
+
+            Vector2 mapCell1 = TileMap.GetCellByPixel(corner1);
+            Vector2 mapCell2 = TileMap.GetCellByPixel(corner2);
+
+            if (!TileMap.CellIsPassable(mapCell1) ||
+                !TileMap.CellIsPassable(mapCell2))
+            {
+                if (moveAmount.Y > 0)
+                    onGround = true;
+                moveAmount.Y = 0;
+                velocity.Y = 0;
+            }
+
+            if (codeBasedBlocks)
+            {
+                if (TileMap.CellCodeValue(mapCell1) == "BLOCK" ||
+                    TileMap.CellCodeValue(mapCell2) == "BLOCK")
+                {
+                    if (moveAmount.Y > 0)
+                        onGround = true;
+                    moveAmount.Y = 0;
+                    velocity.Y = 0;
+                }
+            }
+
+            return moveAmount;
+        }
+
+
+
+
+        public void PlayAnimation(string name)
+        {
+            if (!(name == null) && animations.ContainsKey(name))
+            {
+                currentAnimation = name;
+                animations[name].Play();
+            }
+        }
+
+        public virtual void Update(GameTime gameTime)
+        {
+            if (!enabled)
+                return;
+
+            float elapsed = (float)gameTime.ElapsedGameTime.TotalSeconds;
+
+            updateAnimation(gameTime);
+
+            if (velocity.Y != 0)
+            {
+                onGround = false;
+            }
+
+            Vector2 moveAmount = velocity * elapsed;
+
+            moveAmount = horizontalCollisionTest(moveAmount);
+            moveAmount = verticalCollisionTest(moveAmount);
+
+            Vector2 newPosition = worldLocation + moveAmount;
+
+            newPosition = new Vector2(
+                MathHelper.Clamp(newPosition.X, 0,
+                  Camera.WorldRectangle.Width - frameWidth),
+                MathHelper.Clamp(newPosition.Y, 2 * (-TileMap.TileHeight),
+                  Camera.WorldRectangle.Height - frameHeight));
+
+            worldLocation = newPosition;
+        }
+
+        public virtual void Draw(SpriteBatch spriteBatch)
+        {
+            if (!enabled)
+                return;
+
+            if (animations.ContainsKey(currentAnimation))
+            {
+
+                SpriteEffects effect = SpriteEffects.None;
+
+                if (flipped)
+                {
+                    effect = SpriteEffects.FlipHorizontally;
+                }
+
+                spriteBatch.Draw(
+                    animations[currentAnimation].Texture,
+                    Camera.WorldToScreen(WorldRectangle),
+                    animations[currentAnimation].FrameRectangle,
+                    Color.White, 0.0f, Vector2.Zero, effect, drawDepth);
+            }
+        }
+
+
+
+    }
+}

+ 40 - 0
XNAGameDevelopmentbyExample/GemstoneHunter/Core/Gemstone.cs

@@ -0,0 +1,40 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using Microsoft.Xna.Framework;
+using Microsoft.Xna.Framework.Content;
+using Microsoft.Xna.Framework.Graphics;
+using Tile_Engine;
+
+namespace Gemstone_Hunter
+{
+    public class Gemstone : GameObject
+    {
+
+        public Gemstone(ContentManager Content, int cellX, int cellY)
+        {
+            worldLocation.X = TileMap.TileWidth * cellX;
+            worldLocation.Y = TileMap.TileHeight * cellY;
+
+            frameWidth = TileMap.TileWidth;
+            frameHeight = TileMap.TileHeight;
+
+            animations.Add("idle",
+                new AnimationStrip(
+                    Content.Load<Texture2D>(@"Textures\Gem"),
+                    48,
+                    "idle"));
+
+            animations["idle"].LoopAnimation = true;
+            animations["idle"].FrameLength = 0.15f;
+            PlayAnimation("idle");
+            drawDepth = 0.875f;
+
+            CollisionRectangle = new Rectangle(9, 24, 30, 24);
+            enabled = true;
+        }
+
+
+    }
+}

+ 10 - 0
XNAGameDevelopmentbyExample/GemstoneHunter/Core/GemstoneHunter.Core.csproj

@@ -0,0 +1,10 @@
+<Project Sdk="Microsoft.NET.Sdk">
+  <PropertyGroup>
+    <TargetFramework>net8.0</TargetFramework>
+    <RootNamespace>GemstoneHunter.Core</RootNamespace>
+    <AssemblyName>GemstoneHunter.Core</AssemblyName>
+  </PropertyGroup>
+  <ItemGroup>
+    <PackageReference Include="MonoGame.Framework.DesktopGL" Version="3.8.*" />
+  </ItemGroup>
+</Project>

+ 173 - 0
XNAGameDevelopmentbyExample/GemstoneHunter/Core/LevelManager.cs

@@ -0,0 +1,173 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using Microsoft.Xna.Framework.Content;
+using Microsoft.Xna.Framework;
+using Microsoft.Xna.Framework.Graphics;
+using Tile_Engine;
+
+namespace Gemstone_Hunter
+{
+    public static class LevelManager
+    {
+
+        private static ContentManager Content;
+        private static Player player;
+        private static int currentLevel;
+        private static Vector2 respawnLocation;
+
+        private static List<Gemstone> gemstones = new List<Gemstone>();
+        private static List<Enemy> enemies = new List<Enemy>();
+
+
+
+        public static int CurrentLevel
+        {
+            get { return currentLevel; }
+        }
+
+        public static Vector2 RespawnLocation
+        {
+            get { return respawnLocation; }
+            set { respawnLocation = value; }
+        }
+
+
+
+        public static void Initialize(
+            ContentManager content,
+            Player gamePlayer)
+        {
+            Content = content;
+            player = gamePlayer;
+        }
+
+
+
+        private static void checkCurrentCellCode()
+        {
+            string code = TileMap.CellCodeValue(
+                TileMap.GetCellByPixel(player.WorldCenter));
+
+            if (code == "DEAD")
+            {
+                player.Kill();
+            }
+        }
+
+
+
+        public static void LoadLevel(int levelNumber)
+        {
+            using (var stream = TitleContainer.OpenStream(
+                "Content/Maps/MAP" +
+                levelNumber.ToString().PadLeft(3, '0') + ".MAP"))
+            {
+                TileMap.LoadMapFromStream(stream);
+            }
+
+            gemstones.Clear();
+            enemies.Clear();
+
+            for (int x = 0; x < TileMap.MapWidth; x++)
+            {
+                for (int y = 0; y < TileMap.MapHeight; y++)
+                {
+                    if (TileMap.CellCodeValue(x, y) == "START")
+                    {
+                        player.WorldLocation = new Vector2(
+                            x * TileMap.TileWidth,
+                            y * TileMap.TileHeight);
+                    }
+
+                    if (TileMap.CellCodeValue(x, y) == "GEM")
+                    {
+                        gemstones.Add(new Gemstone(Content, x, y));
+                    }
+
+                    if (TileMap.CellCodeValue(x, y) == "ENEMY")
+                    {
+                        enemies.Add(new Enemy(Content, x, y));
+                    }
+
+                }
+            }
+
+            currentLevel = levelNumber;
+            respawnLocation = player.WorldLocation;
+        }
+
+        public static void ReloadLevel()
+        {
+            Vector2 saveRespawn = respawnLocation;
+            LoadLevel(currentLevel);
+
+            respawnLocation = saveRespawn;
+            player.WorldLocation = respawnLocation;
+        }
+
+        public static void Update(GameTime gameTime)
+        {
+            if (!player.Dead)
+            {
+                checkCurrentCellCode(); 
+
+                for (int x = gemstones.Count - 1; x >= 0; x--)
+                {
+                    gemstones[x].Update(gameTime);
+                    if (player.CollisionRectangle.Intersects(
+                        gemstones[x].CollisionRectangle))
+                    {
+                        gemstones.RemoveAt(x);
+                        player.Score += 10;
+                    }
+                }
+
+                for (int x = enemies.Count - 1; x >= 0; x--)
+                {
+                    enemies[x].Update(gameTime);
+                    if (!enemies[x].Dead)
+                    {
+                        if (player.CollisionRectangle.Intersects(
+                            enemies[x].CollisionRectangle))
+                        {
+                            if (player.WorldCenter.Y < enemies[x].WorldLocation.Y)
+                            {
+                                player.Jump();
+                                player.Score += 5;
+                                enemies[x].PlayAnimation("die");
+                                enemies[x].Dead = true; ;
+                            }
+                            else
+                            {
+                                player.Kill();
+                            }
+                        }
+                    }
+                    else
+                    {
+                        if (!enemies[x].Enabled)
+                        {
+                            enemies.RemoveAt(x);
+                        }
+                    }
+                }
+
+            }
+        }
+
+        public static void Draw(SpriteBatch spriteBatch)
+        {
+            foreach (Gemstone gem in gemstones)
+                gem.Draw(spriteBatch);
+
+            foreach (Enemy enemy in enemies)
+                enemy.Draw(spriteBatch);
+
+        }
+
+
+
+    }
+}

+ 206 - 0
XNAGameDevelopmentbyExample/GemstoneHunter/Core/Player.cs

@@ -0,0 +1,206 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using Microsoft.Xna.Framework;
+using Microsoft.Xna.Framework.Graphics;
+using Microsoft.Xna.Framework.Content;
+using Microsoft.Xna.Framework.Input;
+using Tile_Engine;
+
+namespace Gemstone_Hunter
+{
+    public class Player : GameObject
+    {
+        private Vector2 fallSpeed = new Vector2(0, 20);
+        private float moveScale = 180.0f;
+        private bool dead = false;
+        private int score = 0;
+        private int livesRemaining = 3;
+
+        public bool Dead
+        {
+            get { return dead; }
+        }
+
+        public int Score
+        {
+            get { return score; }
+            set { score = value; }
+        }
+
+        public int LivesRemaining
+        {
+            get { return livesRemaining; }
+            set { livesRemaining = value; }
+        }
+
+
+
+        public Player(ContentManager content)
+        {
+            animations.Add("idle",
+                new AnimationStrip(
+                    content.Load<Texture2D>(@"Textures\Sprites\Player\Idle"),
+                    48,
+                    "idle"));
+            animations["idle"].LoopAnimation = true;
+
+            animations.Add("run",
+                new AnimationStrip(
+                    content.Load<Texture2D>(@"Textures\Sprites\Player\Run"),
+                    48,
+                    "run"));
+            animations["run"].LoopAnimation = true;
+
+            animations.Add("jump",
+                new AnimationStrip(
+                    content.Load<Texture2D>(@"Textures\Sprites\Player\Jump"),
+                    48,
+                    "jump"));
+            animations["jump"].LoopAnimation = false;
+            animations["jump"].FrameLength = 0.08f;
+            animations["jump"].NextAnimation = "idle";
+
+            animations.Add("die",
+                new AnimationStrip(
+                    content.Load<Texture2D>(@"Textures\Sprites\Player\Die"),
+                    48,
+                    "die"));
+            animations["die"].LoopAnimation = false;
+
+            frameWidth = 48;
+            frameHeight = 48;
+            CollisionRectangle = new Rectangle(9, 1, 30, 46);
+
+            drawDepth = 0.825f;
+
+            enabled = true;
+            codeBasedBlocks = false;
+            PlayAnimation("idle");
+        }
+
+
+
+        public override void Update(GameTime gameTime)
+        {
+            if (!Dead)
+            {
+                string newAnimation = "idle";
+
+                velocity = new Vector2(0, velocity.Y);
+                GamePadState gamePad = GamePad.GetState(PlayerIndex.One);
+                KeyboardState keyState = Keyboard.GetState();
+
+                if (keyState.IsKeyDown(Keys.Left) ||
+                    (gamePad.ThumbSticks.Left.X < -0.3f))
+                {
+                    flipped = false;
+                    newAnimation = "run";
+                    velocity = new Vector2(-moveScale, velocity.Y);
+                }
+
+                if (keyState.IsKeyDown(Keys.Right) ||
+                    (gamePad.ThumbSticks.Left.X > 0.3f))
+                {
+                    flipped = true;
+                    newAnimation = "run";
+                    velocity = new Vector2(moveScale, velocity.Y);
+                }
+
+                if (keyState.IsKeyDown(Keys.Space) ||
+                    (gamePad.Buttons.A == ButtonState.Pressed))
+                {
+                    if (onGround)
+                    {
+                        Jump();
+                        newAnimation = "jump";
+                    }
+                }
+
+                if (keyState.IsKeyDown(Keys.Up) ||
+                    gamePad.ThumbSticks.Left.Y > 0.3f)
+                {
+                    checkLevelTransition();
+                }
+
+
+                if (currentAnimation == "jump")
+                    newAnimation = "jump";
+
+                if (newAnimation != currentAnimation)
+                {
+                    PlayAnimation(newAnimation);
+                }
+            }
+
+            velocity += fallSpeed;
+
+            repositionCamera();
+            base.Update(gameTime);
+        }
+
+        public void Jump()
+        {
+            velocity.Y = -500;
+        }
+
+        public void Kill()
+        {
+            PlayAnimation("die");
+            LivesRemaining--;
+            velocity.X = 0;
+            dead = true;
+        }
+
+        public void Revive()
+        {
+            PlayAnimation("idle");
+            dead = false;
+        }
+
+
+
+
+        private void repositionCamera()
+        {
+            int screenLocX = (int)Camera.WorldToScreen(worldLocation).X;
+
+            if (screenLocX > 500)
+            {
+                Camera.Move(new Vector2(screenLocX - 500, 0));
+            }
+
+            if (screenLocX < 200)
+            {
+                Camera.Move(new Vector2(screenLocX - 200, 0));
+            }
+        }
+
+        private void checkLevelTransition()
+        {
+            Vector2 centerCell = TileMap.GetCellByPixel(WorldCenter);
+            if (TileMap.CellCodeValue(centerCell).StartsWith("T_"))
+            {
+                string[] code = TileMap.CellCodeValue(centerCell).Split('_');
+
+                if (code.Length != 4)
+                    return;
+
+                LevelManager.LoadLevel(int.Parse(code[1]));
+
+                WorldLocation = new Vector2(
+                    int.Parse(code[2]) * TileMap.TileWidth,
+                    int.Parse(code[3]) * TileMap.TileHeight);
+
+                LevelManager.RespawnLocation = WorldLocation;
+
+                velocity = Vector2.Zero;
+            }
+        }
+
+
+
+
+    }
+}

+ 103 - 0
XNAGameDevelopmentbyExample/GemstoneHunter/Core/TileEngine/Camera.cs

@@ -0,0 +1,103 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using Microsoft.Xna.Framework;
+
+namespace Tile_Engine
+{
+    public static class Camera
+    {
+
+        private static Vector2 position = Vector2.Zero;
+        private static Vector2 viewPortSize = Vector2.Zero;
+        private static Rectangle worldRectangle = new Rectangle(0, 0, 0, 0);
+
+
+
+        public static Vector2 Position
+        {
+            get { return position; }
+            set
+            {
+                position = new Vector2(
+                    MathHelper.Clamp(value.X,
+                        worldRectangle.X, worldRectangle.Width -
+                        ViewPortWidth),
+                    MathHelper.Clamp(value.Y,
+                        worldRectangle.Y, worldRectangle.Height -
+                        ViewPortHeight));
+            }
+        }
+
+        public static Rectangle WorldRectangle
+        {
+            get { return worldRectangle; }
+            set { worldRectangle = value; }
+        }
+
+        public static int ViewPortWidth
+        {
+            get { return (int)viewPortSize.X; }
+            set { viewPortSize.X = value; }
+        }
+
+        public static int ViewPortHeight
+        {
+            get { return (int)viewPortSize.Y; }
+            set { viewPortSize.Y = value; }
+        }
+
+        public static Rectangle ViewPort
+        {
+            get
+            {
+                return new Rectangle(
+                    (int)Position.X, (int)Position.Y,
+                    ViewPortWidth, ViewPortHeight);
+            }
+        }
+
+
+
+        public static void Move(Vector2 offset)
+        {
+            Position += offset;
+        }
+
+        public static bool ObjectIsVisible(Rectangle bounds)
+        {
+            return (ViewPort.Intersects(bounds));
+        }
+
+        public static Vector2 WorldToScreen(Vector2 worldLocation)
+        {
+            return worldLocation - position;
+        }
+
+        public static Rectangle WorldToScreen(Rectangle worldRectangle)
+        {
+            return new Rectangle(
+                worldRectangle.Left - (int)position.X,
+                worldRectangle.Top - (int)position.Y,
+                worldRectangle.Width,
+                worldRectangle.Height);
+        }
+
+        public static Vector2 ScreenToWorld(Vector2 screenLocation)
+        {
+            return screenLocation + position;
+        }
+
+        public static Rectangle ScreenToWorld(Rectangle screenRectangle)
+        {
+            return new Rectangle(
+                screenRectangle.Left + (int)position.X,
+                screenRectangle.Top + (int)position.Y,
+                screenRectangle.Width,
+                screenRectangle.Height);
+        }
+
+
+    }
+}

+ 43 - 0
XNAGameDevelopmentbyExample/GemstoneHunter/Core/TileEngine/MapSquare.cs

@@ -0,0 +1,43 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using Microsoft.Xna.Framework;
+using Microsoft.Xna.Framework.Graphics;
+
+namespace Tile_Engine
+{
+    [Serializable]
+    public class MapSquare
+    {
+
+        public int[] LayerTiles = new int[3];
+        public string CodeValue = "";
+        public bool Passable = true;
+
+
+
+        public MapSquare(
+            int background,
+            int interactive,
+            int foreground,
+            string code,
+            bool passable)
+        {
+            LayerTiles[0] = background;
+            LayerTiles[1] = interactive;
+            LayerTiles[2] = foreground;
+            CodeValue = code;
+            Passable = passable;
+        }
+
+
+
+        public void TogglePassable()
+        {
+            Passable = !Passable;
+        }
+
+
+    }
+}

+ 12 - 0
XNAGameDevelopmentbyExample/GemstoneHunter/Core/TileEngine/MyClass.cs

@@ -0,0 +1,12 @@
+using System;
+
+namespace TileEngine
+{
+	public class MyClass
+	{
+		public MyClass ()
+		{
+		}
+	}
+}
+

+ 362 - 0
XNAGameDevelopmentbyExample/GemstoneHunter/Core/TileEngine/TileMap.cs

@@ -0,0 +1,362 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using Microsoft.Xna.Framework;
+using Microsoft.Xna.Framework.Audio;
+using Microsoft.Xna.Framework.Content;
+using Microsoft.Xna.Framework.Graphics;
+using Microsoft.Xna.Framework.Input;
+using Microsoft.Xna.Framework.Media;
+using System.IO;
+using System.Xml.Serialization;
+using System.Runtime.Serialization.Formatters.Binary;
+
+namespace Tile_Engine
+{
+    public static class TileMap
+    {
+
+        public const int TileWidth = 48;
+        public const int TileHeight = 48;
+        public const int MapWidth = 160;
+        public const int MapHeight = 12;
+        public const int MapLayers = 3;
+        private const int skyTile = 2;
+
+        static public MapSquare[][] mapCells =
+            CreateJaggedArray(MapWidth, MapHeight);
+
+        public static bool EditorMode = false;
+
+        public static SpriteFont spriteFont;
+        static private Texture2D tileSheet;
+
+
+
+        static public void Initialize(Texture2D tileTexture)
+        {
+            tileSheet = tileTexture;
+            mapCells = CreateJaggedArray(MapWidth, MapHeight);
+            for (int x = 0; x < MapWidth; x++)
+            {
+                for (int y = 0; y < MapHeight; y++)
+                {
+                    for (int z = 0; z < MapLayers; z++)
+                    {
+                        mapCells[x][y] = new MapSquare(skyTile, 0, 0, "", true);
+                    }
+                }
+            }
+        }
+
+
+
+        public static int TilesPerRow
+        {
+            get { return tileSheet.Width / TileWidth; }
+        }
+
+        public static Rectangle TileSourceRectangle(int tileIndex)
+        {
+            return new Rectangle(
+                (tileIndex % TilesPerRow) * TileWidth,
+                (tileIndex / TilesPerRow) * TileHeight,
+                TileWidth,
+                TileHeight);
+        }
+
+
+
+        static public int GetCellByPixelX(int pixelX)
+        {
+            return pixelX / TileWidth;
+        }
+
+        static public int GetCellByPixelY(int pixelY)
+        {
+            return pixelY / TileHeight;
+        }
+
+        static public Vector2 GetCellByPixel(Vector2 pixelLocation)
+        {
+            return new Vector2(
+                GetCellByPixelX((int)pixelLocation.X),
+                GetCellByPixelY((int)pixelLocation.Y));
+        }
+
+        static public Vector2 GetCellCenter(int cellX, int cellY)
+        {
+            return new Vector2(
+                (cellX * TileWidth) + (TileWidth / 2),
+                (cellY * TileHeight) + (TileHeight / 2));
+        }
+
+        static public Vector2 GetCellCenter(Vector2 cell)
+        {
+            return GetCellCenter(
+                (int)cell.X,
+                (int)cell.Y);
+        }
+
+        static public Rectangle CellWorldRectangle(int cellX, int cellY)
+        {
+            return new Rectangle(
+                cellX * TileWidth,
+                cellY * TileHeight,
+                TileWidth,
+                TileHeight);
+        }
+
+        static public Rectangle CellWorldRectangle(Vector2 cell)
+        {
+            return CellWorldRectangle(
+                (int)cell.X,
+                (int)cell.Y);
+        }
+
+        static public Rectangle CellScreenRectangle(int cellX, int cellY)
+        {
+            return Camera.WorldToScreen(CellWorldRectangle(cellX, cellY));
+        }
+
+        static public Rectangle CellSreenRectangle(Vector2 cell)
+        {
+            return CellScreenRectangle((int)cell.X, (int)cell.Y);
+        }
+
+        static public bool CellIsPassable(int cellX, int cellY)
+        {
+            MapSquare square = GetMapSquareAtCell(cellX, cellY);
+
+            if (square == null)
+                return false;
+            else
+                return square.Passable;
+        }
+
+        static public bool CellIsPassable(Vector2 cell)
+        {
+            return CellIsPassable((int)cell.X, (int)cell.Y);
+        }
+
+        static public bool CellIsPassableByPixel(Vector2 pixelLocation)
+        {
+            return CellIsPassable(
+                GetCellByPixelX((int)pixelLocation.X),
+                GetCellByPixelY((int)pixelLocation.Y));
+        }
+
+        static public string CellCodeValue(int cellX, int cellY)
+        {
+            MapSquare square = GetMapSquareAtCell(cellX, cellY);
+
+            if (square == null)
+                return "";
+            else
+                return square.CodeValue;
+        }
+
+        static public string CellCodeValue(Vector2 cell)
+        {
+            return CellCodeValue((int)cell.X, (int)cell.Y);
+        }
+
+
+
+        static public MapSquare GetMapSquareAtCell(int tileX, int tileY)
+        {
+            if ((tileX >= 0) && (tileX < MapWidth) &&
+                (tileY >= 0) && (tileY < MapHeight))
+            {
+                return mapCells[tileX][tileY];
+            }
+            else
+            {
+                return null;
+            }
+        }
+
+        static public void SetMapSquareAtCell(
+            int tileX,
+            int tileY,
+            MapSquare tile)
+        {
+            if ((tileX >= 0) && (tileX < MapWidth) &&
+                (tileY >= 0) && (tileY < MapHeight))
+            {
+                mapCells[tileX][tileY] = tile;
+            }
+        }
+
+        static public void SetTileAtCell(
+            int tileX,
+            int tileY,
+            int layer,
+            int tileIndex)
+        {
+            if ((tileX >= 0) && (tileX < MapWidth) &&
+                (tileY >= 0) && (tileY < MapHeight))
+            {
+                mapCells[tileX][tileY].LayerTiles[layer] = tileIndex;
+            }
+        }
+
+        static public MapSquare GetMapSquareAtPixel(int pixelX, int pixelY)
+        {
+            return GetMapSquareAtCell(
+                GetCellByPixelX(pixelX),
+                GetCellByPixelY(pixelY));
+        }
+
+        static public MapSquare GetMapSquareAtPixel(Vector2 pixelLocation)
+        {
+            return GetMapSquareAtPixel(
+                (int)pixelLocation.X,
+                (int)pixelLocation.Y);
+        }
+
+
+
+
+        public static void SaveMap(FileStream fileStream)
+        {
+            // Assumes mapCells is now a jagged array: MapSquare[][]
+            var options = new System.Text.Json.JsonSerializerOptions { WriteIndented = true };
+            using (var writer = new StreamWriter(fileStream, leaveOpen: false))
+            {
+                string json = System.Text.Json.JsonSerializer.Serialize(mapCells, options);
+                writer.Write(json);
+            }
+        }
+
+        public static void LoadMap(FileStream fileStream)
+        {
+            try
+            {
+                using (var reader = new StreamReader(fileStream, leaveOpen: false))
+                {
+                    string json = reader.ReadToEnd();
+                    mapCells = System.Text.Json.JsonSerializer.Deserialize<MapSquare[][]>(json);
+                }
+            }
+            catch
+            {
+                ClearMap();
+            }
+        }
+
+        public static void LoadMapFromStream(Stream stream)
+        {
+            try
+            {
+                using (var reader = new StreamReader(stream, leaveOpen: true))
+                {
+                    string json = reader.ReadToEnd();
+                    mapCells = System.Text.Json.JsonSerializer.Deserialize<MapSquare[][]>(json);
+                }
+            }
+            catch
+            {
+                ClearMap();
+            }
+        }
+
+        public static void ClearMap()
+        {
+            for (int x = 0; x < MapWidth; x++)
+                for (int y = 0; y < MapHeight; y++)
+                    for (int z = 0; z < MapLayers; z++)
+                    {
+                        mapCells[x][y] = new MapSquare(2, 0, 0, "", true);
+                    }
+        }
+
+
+
+        static public void Draw(SpriteBatch spriteBatch)
+        {
+            int startX = GetCellByPixelX((int)Camera.Position.X);
+            int endX = GetCellByPixelX((int)Camera.Position.X +
+                  Camera.ViewPortWidth);
+
+            int startY = GetCellByPixelY((int)Camera.Position.Y);
+            int endY = GetCellByPixelY((int)Camera.Position.Y +
+                      Camera.ViewPortHeight);
+
+            for (int x = startX; x <= endX; x++)
+                for (int y = startY; y <= endY; y++)
+                {
+                    for (int z = 0; z < MapLayers; z++)
+                    {
+                        if ((x >= 0) && (y >= 0) &&
+                            (x < MapWidth) && (y < MapHeight))
+                        {
+                            spriteBatch.Draw(
+                              tileSheet,
+                              CellScreenRectangle(x, y),
+                              TileSourceRectangle(mapCells[x][y].LayerTiles[z]),
+                              Color.White,
+                              0.0f,
+                              Vector2.Zero,
+                              SpriteEffects.None,
+                              1f - ((float)z * 0.1f));
+                        }
+                    }
+
+                    if (EditorMode)
+                    {
+                        DrawEditModeItems(spriteBatch, x, y);
+                    }
+
+                }
+        }
+
+        public static void DrawEditModeItems(
+            SpriteBatch spriteBatch,
+            int x,
+            int y)
+        {
+            if ((x < 0) || (x >= MapWidth) ||
+                (y < 0) || (y >= MapHeight))
+                return;
+
+            if (!CellIsPassable(x, y))
+            {
+                spriteBatch.Draw(
+                                tileSheet,
+                                CellScreenRectangle(x, y),
+                                TileSourceRectangle(1),
+                                new Color(255, 0, 0, 80),
+                                0.0f,
+                                Vector2.Zero,
+                                SpriteEffects.None,
+                                0.0f);
+            }
+
+            if (mapCells[x][y].CodeValue != "")
+            {
+                Rectangle screenRect = CellScreenRectangle(x, y);
+
+                spriteBatch.DrawString(
+                    spriteFont,
+                    mapCells[x][y].CodeValue,
+                    new Vector2(screenRect.X, screenRect.Y),
+                    Color.White,
+                    0.0f,
+                    Vector2.Zero,
+                    1.0f,
+                    SpriteEffects.None,
+                    0.0f);
+            }
+        }
+
+        // Helper to create a jagged array
+        private static MapSquare[][] CreateJaggedArray(int width, int height)
+        {
+            var arr = new MapSquare[width][];
+            for (int i = 0; i < width; i++)
+                arr[i] = new MapSquare[height];
+            return arr;
+        }
+    }
+}

+ 43 - 0
XNAGameDevelopmentbyExample/GemstoneHunter/Core/app.manifest

@@ -0,0 +1,43 @@
+<?xml version="1.0" encoding="utf-8"?>
+<assembly manifestVersion="1.0" xmlns="urn:schemas-microsoft-com:asm.v1">
+  <assemblyIdentity version="1.0.0.0" name="GemstoneHunter"/>
+  <trustInfo xmlns="urn:schemas-microsoft-com:asm.v2">
+    <security>
+      <requestedPrivileges xmlns="urn:schemas-microsoft-com:asm.v3">
+        <requestedExecutionLevel  level="asInvoker" uiAccess="false" />
+      </requestedPrivileges>
+    </security>
+  </trustInfo>
+
+  <compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1">
+    <application>
+      <!-- A list of the Windows versions that this application has been tested on and is
+           is designed to work with. Uncomment the appropriate elements and Windows will 
+           automatically selected the most compatible environment. -->
+
+      <!-- Windows Vista -->
+      <supportedOS Id="{e2011457-1546-43c5-a5fe-008deee3d3f0}" />
+
+      <!-- Windows 7 -->
+      <supportedOS Id="{35138b9a-5d96-4fbd-8e2d-a2440225f93a}" />
+
+      <!-- Windows 8 -->
+      <supportedOS Id="{4a2f28e3-53b9-4441-ba9c-d69d4a4a6e38}" />
+
+      <!-- Windows 8.1 -->
+      <supportedOS Id="{1f676c76-80e1-4239-95bb-83d0f6d0da78}" />
+
+      <!-- Windows 10 -->
+      <supportedOS Id="{8e0f7a12-bfb3-4fe8-b9a5-48fd50a15a9a}" />
+
+    </application>
+  </compatibility>
+
+  <application xmlns="urn:schemas-microsoft-com:asm.v3">
+    <windowsSettings>
+      <dpiAware xmlns="http://schemas.microsoft.com/SMI/2005/WindowsSettings">true/pm</dpiAware>
+      <dpiAwareness xmlns="http://schemas.microsoft.com/SMI/2016/WindowsSettings">permonitorv2,permonitor</dpiAwareness>
+    </windowsSettings>
+  </application>
+
+</assembly>

+ 46 - 0
XNAGameDevelopmentbyExample/GemstoneHunter/GemstoneHunter.sln

@@ -0,0 +1,46 @@
+
+Microsoft Visual Studio Solution File, Format Version 12.00
+# Visual Studio Version 17
+VisualStudioVersion = 17.0.31912.275
+MinimumVisualStudioVersion = 10.0.40219.1
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GemstoneHunter.Core", "Core\GemstoneHunter.Core.csproj", "{11111111-1111-1111-1111-111111111111}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GemstoneHunter.Windows", "Platforms\Windows\GemstoneHunter.Windows.csproj", "{22222222-2222-2222-2222-222222222222}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GemstoneHunter.DesktopGL", "Platforms\Desktop\GemstoneHunter.DesktopGL.csproj", "{33333333-3333-3333-3333-333333333333}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GemstoneHunter.Android", "Platforms\Android\GemstoneHunter.Android.csproj", "{44444444-4444-4444-4444-444444444444}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GemstoneHunter.iOS", "Platforms\iOS\GemstoneHunter.iOS.csproj", "{55555555-5555-5555-5555-555555555555}"
+EndProject
+Global
+	GlobalSection(SolutionConfigurationPlatforms) = preSolution
+		Debug|Any CPU = Debug|Any CPU
+		Release|Any CPU = Release|Any CPU
+	EndGlobalSection
+	GlobalSection(ProjectConfigurationPlatforms) = postSolution
+		{11111111-1111-1111-1111-111111111111}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+		{11111111-1111-1111-1111-111111111111}.Debug|Any CPU.Build.0 = Debug|Any CPU
+		{11111111-1111-1111-1111-111111111111}.Release|Any CPU.ActiveCfg = Release|Any CPU
+		{11111111-1111-1111-1111-111111111111}.Release|Any CPU.Build.0 = Release|Any CPU
+		{22222222-2222-2222-2222-222222222222}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+		{22222222-2222-2222-2222-222222222222}.Debug|Any CPU.Build.0 = Debug|Any CPU
+		{22222222-2222-2222-2222-222222222222}.Release|Any CPU.ActiveCfg = Release|Any CPU
+		{22222222-2222-2222-2222-222222222222}.Release|Any CPU.Build.0 = Release|Any CPU
+		{33333333-3333-3333-3333-333333333333}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+		{33333333-3333-3333-3333-333333333333}.Debug|Any CPU.Build.0 = Debug|Any CPU
+		{33333333-3333-3333-3333-333333333333}.Release|Any CPU.ActiveCfg = Release|Any CPU
+		{33333333-3333-3333-3333-333333333333}.Release|Any CPU.Build.0 = Release|Any CPU
+		{44444444-4444-4444-4444-444444444444}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+		{44444444-4444-4444-4444-444444444444}.Debug|Any CPU.Build.0 = Debug|Any CPU
+		{44444444-4444-4444-4444-444444444444}.Release|Any CPU.ActiveCfg = Release|Any CPU
+		{44444444-4444-4444-4444-444444444444}.Release|Any CPU.Build.0 = Release|Any CPU
+		{55555555-5555-5555-5555-555555555555}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+		{55555555-5555-5555-5555-555555555555}.Debug|Any CPU.Build.0 = Debug|Any CPU
+		{55555555-5555-5555-5555-555555555555}.Release|Any CPU.ActiveCfg = Release|Any CPU
+		{55555555-5555-5555-5555-555555555555}.Release|Any CPU.Build.0 = Release|Any CPU
+	EndGlobalSection
+	GlobalSection(SolutionProperties) = preSolution
+		HideSolutionNode = FALSE
+	EndGlobalSection
+EndGlobal

+ 15 - 0
XNAGameDevelopmentbyExample/GemstoneHunter/Platforms/Android/AndroidManifest.xml

@@ -0,0 +1,15 @@
+<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.cartblanche.gemstonehunter" android:versionCode="1" android:versionName="1.0">
+  <application android:label="GemstoneHunter" android:icon="@mipmap/icon">
+    <activity android:name=".MainActivity"
+              android:label="GemstoneHunter"
+              android:configChanges="keyboard|keyboardHidden|orientation|screenSize"
+              android:screenOrientation="landscape"
+              android:theme="@android:style/Theme.NoTitleBar.Fullscreen">
+      <intent-filter>
+        <action android:name="android.intent.action.MAIN" />
+        <category android:name="android.intent.category.LAUNCHER" />
+      </intent-filter>
+    </activity>
+  </application>
+  <uses-sdk android:minSdkVersion="28" android:targetSdkVersion="33" />
+</manifest>

+ 21 - 0
XNAGameDevelopmentbyExample/GemstoneHunter/Platforms/Android/GemstoneHunter.Android.csproj

@@ -0,0 +1,21 @@
+<Project Sdk="Microsoft.NET.Sdk">
+  <PropertyGroup>
+    <TargetFramework>net8.0-android</TargetFramework>
+    <OutputType>Exe</OutputType>
+    <RootNamespace>GemstoneHunter.Android</RootNamespace>
+    <AssemblyName>GemstoneHunter.Android</AssemblyName>
+  </PropertyGroup>
+  <ItemGroup>
+    <ProjectReference Include="..\..\Core\GemstoneHunter.Core.csproj" />
+    <PackageReference Include="MonoGame.Framework.Android" Version="3.8.*" />
+  </ItemGroup>
+
+  <ItemGroup>
+    <Content Include="..\..\Core\Content\**\*.xnb" Link="Content\%(RecursiveDir)%(Filename)%(Extension)">
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </Content>
+    <Content Include="..\..\Core\Content\**\*.MAP" Link="Content\%(RecursiveDir)%(Filename)%(Extension)">
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </Content>
+  </ItemGroup>
+</Project>

+ 23 - 0
XNAGameDevelopmentbyExample/GemstoneHunter/Platforms/Android/Program.cs

@@ -0,0 +1,23 @@
+using Android.App;
+using Android.Content.PM;
+using Android.OS;
+using Microsoft.Xna.Framework;
+using Gemstone_Hunter;
+
+namespace GemstoneHunter.Android
+{
+    [Activity(Label = "Gemstone Hunter", MainLauncher = true, Icon = "@drawable/icon", 
+              ConfigurationChanges = ConfigChanges.Orientation | ConfigChanges.ScreenSize | ConfigChanges.Keyboard | ConfigChanges.KeyboardHidden)]
+    public class Activity1 : AndroidGameActivity
+    {
+        private Game1 _game;
+
+        protected override void OnCreate(Bundle bundle)
+        {
+            base.OnCreate(bundle);
+            _game = new Game1();
+            SetContentView((Android.Views.View)_game.Services.GetService(typeof(Android.Views.View)));
+            _game.RunOneFrame();
+        }
+    }
+}

+ 4 - 0
XNAGameDevelopmentbyExample/GemstoneHunter/Platforms/Android/Resources/values/strings.xml

@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+    <string name="app_name">Asteroid Belt Assault</string>
+</resources>

+ 5 - 0
XNAGameDevelopmentbyExample/GemstoneHunter/Platforms/Android/Resources/values/styles.xml

@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+    <style name="AppTheme" parent="@android:style/Theme.Holo.Light">
+    </style>
+</resources>

+ 22 - 0
XNAGameDevelopmentbyExample/GemstoneHunter/Platforms/Desktop/GemstoneHunter.DesktopGL.csproj

@@ -0,0 +1,22 @@
+<Project Sdk="Microsoft.NET.Sdk">
+  <PropertyGroup>
+    <TargetFramework>net8.0</TargetFramework>
+    <OutputType>Exe</OutputType>
+    <RootNamespace>GemstoneHunter.DesktopGL</RootNamespace>
+    <AssemblyName>GemstoneHunter.DesktopGL</AssemblyName>
+    <ApplicationIcon>..\..\Core\Content\Game.ico</ApplicationIcon>
+  </PropertyGroup>
+  <ItemGroup>
+    <ProjectReference Include="..\..\Core\GemstoneHunter.Core.csproj" />
+    <PackageReference Include="MonoGame.Framework.DesktopGL" Version="3.8.*" />
+  </ItemGroup>
+
+  <ItemGroup>
+    <Content Include="..\..\Core\Content\**\*.xnb" Link="Content\%(RecursiveDir)%(Filename)%(Extension)">
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </Content>
+    <Content Include="..\..\Core\Content\**\*.MAP" Link="Content\%(RecursiveDir)%(Filename)%(Extension)">
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </Content>
+  </ItemGroup>
+</Project>

+ 13 - 0
XNAGameDevelopmentbyExample/GemstoneHunter/Platforms/Desktop/Program.cs

@@ -0,0 +1,13 @@
+using Gemstone_Hunter;
+
+namespace GemstoneHunter.DesktopGL
+{
+    public static class Program
+    {
+        public static void Main()
+        {
+            using (var game = new Game1())
+                game.Run();
+        }
+    }
+}

+ 23 - 0
XNAGameDevelopmentbyExample/GemstoneHunter/Platforms/Windows/GemstoneHunter.Windows.csproj

@@ -0,0 +1,23 @@
+<Project Sdk="Microsoft.NET.Sdk">
+  <PropertyGroup>
+    <TargetFramework>net8.0-windows</TargetFramework>
+    <OutputType>WinExe</OutputType>
+    <RootNamespace>GemstoneHunter.Windows</RootNamespace>
+    <AssemblyName>GemstoneHunter.Windows</AssemblyName>
+    <UseWindowsForms>true</UseWindowsForms>
+    <ApplicationIcon>..\..\Core\Content\Game.ico</ApplicationIcon>
+  </PropertyGroup>
+  <ItemGroup>
+    <ProjectReference Include="..\..\Core\GemstoneHunter.Core.csproj" />
+    <PackageReference Include="MonoGame.Framework.WindowsDX" Version="3.8.*" />
+  </ItemGroup>
+
+  <ItemGroup>
+    <Content Include="..\..\Core\Content\**\*.xnb" Link="Content\%(RecursiveDir)%(Filename)%(Extension)">
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </Content>
+    <Content Include="..\..\Core\Content\**\*.MAP" Link="Content\%(RecursiveDir)%(Filename)%(Extension)">
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </Content>
+  </ItemGroup>
+</Project>

+ 16 - 0
XNAGameDevelopmentbyExample/GemstoneHunter/Platforms/Windows/Program.cs

@@ -0,0 +1,16 @@
+
+using System;
+using Gemstone_Hunter;
+
+namespace GemstoneHunter.Windows
+{
+    public static class Program
+    {
+        [STAThread]
+        static void Main()
+        {
+            using (var game = new Game1())
+                game.Run();
+        }
+    }
+}

+ 21 - 0
XNAGameDevelopmentbyExample/GemstoneHunter/Platforms/iOS/GemstoneHunter.iOS.csproj

@@ -0,0 +1,21 @@
+<Project Sdk="Microsoft.NET.Sdk">
+  <PropertyGroup>
+    <TargetFramework>net8.0-ios</TargetFramework>
+    <OutputType>Exe</OutputType>
+    <RootNamespace>GemstoneHunter.iOS</RootNamespace>
+    <AssemblyName>GemstoneHunter.iOS</AssemblyName>
+  </PropertyGroup>
+  <ItemGroup>
+    <ProjectReference Include="..\..\Core\GemstoneHunter.Core.csproj" />
+    <PackageReference Include="MonoGame.Framework.iOS" Version="3.8.*" />
+  </ItemGroup>
+
+  <ItemGroup>
+    <Content Include="..\..\Core\Content\**\*.xnb" Link="Content\%(RecursiveDir)%(Filename)%(Extension)">
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </Content>
+    <Content Include="..\..\Core\Content\**\*.MAP" Link="Content\%(RecursiveDir)%(Filename)%(Extension)">
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </Content>
+  </ItemGroup>
+</Project>

+ 23 - 0
XNAGameDevelopmentbyExample/GemstoneHunter/Platforms/iOS/Info.plist

@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+    <key>CFBundleDisplayName</key>
+    <string>GemstoneHunter</string>
+    <key>CFBundleIdentifier</key>
+    <string>com.cartblanche.gemstonehunter</string>
+    <key>CFBundleVersion</key>
+    <string>1.0</string>
+    <key>CFBundleShortVersionString</key>
+    <string>1.0</string>
+    <key>UILaunchStoryboardName</key>
+    <string>LaunchScreen</string>
+    <key>UISupportedInterfaceOrientations</key>
+    <array>
+        <string>UIInterfaceOrientationLandscapeLeft</string>
+        <string>UIInterfaceOrientationLandscapeRight</string>
+    </array>
+    <key>UIRequiresFullScreen</key>
+    <true/>
+</dict>
+</plist>

+ 26 - 0
XNAGameDevelopmentbyExample/GemstoneHunter/Platforms/iOS/Program.cs

@@ -0,0 +1,26 @@
+using Foundation;
+using UIKit;
+using Gemstone_Hunter;
+
+namespace GemstoneHunter.iOS
+{
+    [Register("AppDelegate")]
+    public class AppDelegate : UIApplicationDelegate
+    {
+        public override UIWindow Window { get; set; }
+        public override bool FinishedLaunching(UIApplication app, NSDictionary options)
+        {
+            var game = new Game1();
+            game.Run();
+            return true;
+        }
+    }
+
+    public class Application
+    {
+        static void Main(string[] args)
+        {
+            UIApplication.Main(args, null, "AppDelegate");
+        }
+    }
+}

+ 60 - 0
XNAGameDevelopmentbyExample/GemstoneHunter/README.md

@@ -0,0 +1,60 @@
+# Gemstone Hunter
+
+Gemstone Hunter is a cross-platform 2D platformer game built with MonoGame 3.8.* and .NET 8.0. The project is organized for modern .NET SDK-style development, supporting Windows (DX), DesktopGL, Android, and iOS platforms.
+
+## Project Structure
+
+- **/Core**: Shared game logic and code, referenced by all platforms.
+- **/Platforms/Windows**: Windows-specific project using MonoGame.Framework.WindowsDX.
+- **/Platforms/Desktop**: DesktopGL project using MonoGame.Framework.DesktopGL.
+- **/Platforms/Android**: Android project using MonoGame.Framework.Android.
+- **/Platforms/iOS**: iOS project using MonoGame.Framework.iOS.
+
+## Building and Running
+
+### Prerequisites
+- .NET 8.0 SDK or newer
+- MonoGame 3.8.* NuGet packages (restored automatically)
+- Visual Studio 2022+ (for Windows/iOS/Android) or VSCode (all platforms)
+
+### Windows
+```
+dotnet build Platforms/Windows/GemstoneHunter.Windows.csproj
+```
+Run:
+```
+dotnet run --project Platforms/Windows/GemstoneHunter.Windows.csproj
+```
+
+### DesktopGL
+```
+dotnet build Platforms/Desktop/GemstoneHunter.DesktopGL.csproj
+```
+Run:
+```
+dotnet run --project Platforms/Desktop/GemstoneHunter.DesktopGL.csproj
+```
+
+### Android
+```
+dotnet build Platforms/Android/GemstoneHunter.Android.csproj
+```
+
+### iOS
+```
+dotnet build Platforms/iOS/GemstoneHunter.iOS.csproj
+```
+
+## Content
+This project uses pre-built .xnb files in the `Content/` directory. No Content.mgcb file is required.
+
+## VSCode Usage
+- Use the provided `.vscode/tasks.json` and `.vscode/launch.json` for building and running Windows and DesktopGL targets.
+
+## Solution File
+Open `GemstoneHunter.sln` in Visual Studio for full IDE support.
+
+---
+
+For more details, see the source code and platform-specific project files.
+

+ 8 - 0
XNAGameDevelopmentbyExample/GemstoneHunter/Tools/MapMigration/MapMigration.csproj

@@ -0,0 +1,8 @@
+<Project Sdk="Microsoft.NET.Sdk">
+  <PropertyGroup>
+    <OutputType>Exe</OutputType>
+    <TargetFramework>net8.0</TargetFramework>
+    <ImplicitUsings>enable</ImplicitUsings>
+    <EnableUnsafeBinaryFormatterSerialization>true</EnableUnsafeBinaryFormatterSerialization>
+  </PropertyGroup>
+</Project>

+ 52 - 0
XNAGameDevelopmentbyExample/GemstoneHunter/Tools/MapMigration/Program.cs

@@ -0,0 +1,52 @@
+using System;
+using System.IO;
+using System.IO.Pipes;
+using System.Runtime.Serialization.Formatters.Binary;
+using System.Text.Json;
+using System.Xml.Serialization;
+using Tile_Engine;
+
+class Program
+{
+	static void Main(string[] args)
+    {
+		MapSquare[,] mapCells = new MapSquare[TileMap.MapWidth, TileMap.MapHeight];
+
+		string mapDir = Path.Combine("..", "..","..", "..", "..", "Core", "Content", "Maps");
+        string[] mapFiles = Directory.GetFiles(mapDir, "*.MAP", SearchOption.TopDirectoryOnly);
+        Console.WriteLine($"Found {mapFiles.Length} .MAP files.");
+        foreach (var mapFile in mapFiles)
+        {
+            try
+            {
+                using var fileStream = File.OpenRead(mapFile);
+
+				BinaryFormatter formatter = new BinaryFormatter();
+				mapCells = (MapSquare[,])formatter.Deserialize(fileStream);
+				fileStream.Close();
+
+				string jsonPath = Path.ChangeExtension(mapFile, ".json");
+
+				// Convert MapSquare[,] to MapSquare[][]
+				int width = mapCells.GetLength(0);
+				int height = mapCells.GetLength(1);
+				var jagged = new MapSquare[width][];
+				for (int x = 0; x < width; x++)
+				{
+					jagged[x] = new MapSquare[height];
+					for (int y = 0; y < height; y++)
+						jagged[x][y] = mapCells[x, y];
+				}
+				string json = JsonSerializer.Serialize(jagged, new JsonSerializerOptions { WriteIndented = true });
+				File.WriteAllText(jsonPath, json);
+
+				Console.WriteLine($"Converted: {Path.GetFileName(mapFile)} -> {Path.GetFileName(jsonPath)}");
+            }
+            catch (Exception ex)
+            {
+                Console.WriteLine($"Failed to convert {mapFile}: {ex.Message}");
+            }
+        }
+        Console.WriteLine("Done.");
+    }
+}