From 74aa15f6d126f694bb807751562a07dce4d125bc Mon Sep 17 00:00:00 2001 From: jme9 Date: Sat, 15 Mar 2025 14:35:20 -0700 Subject: [PATCH] Ultra minor updates. Added an notes folder. --- .gitignore | 5 ++++- Game1.cs => LunaLightGame.cs | 14 +++++++++----- Platform.cs | 4 ++-- Program.cs | 2 +- UpdateNotes/Camera.md | 10 ++++++++++ 5 files changed, 26 insertions(+), 9 deletions(-) rename Game1.cs => LunaLightGame.cs (97%) create mode 100644 UpdateNotes/Camera.md diff --git a/.gitignore b/.gitignore index 9491a2f..d5ee485 100644 --- a/.gitignore +++ b/.gitignore @@ -360,4 +360,7 @@ MigrationBackup/ .ionide/ # Fody - auto-generated XML schema -FodyWeavers.xsd \ No newline at end of file +FodyWeavers.xsd + +# vscode history +.history/ diff --git a/Game1.cs b/LunaLightGame.cs similarity index 97% rename from Game1.cs rename to LunaLightGame.cs index 25dd42b..108c28f 100644 --- a/Game1.cs +++ b/LunaLightGame.cs @@ -8,7 +8,7 @@ using System.Collections.Generic; namespace LunaLightXMG { - public class Game1 : Game + public class LunaLightGame : Game { // Class Objects private Player player; @@ -21,7 +21,9 @@ namespace LunaLightXMG // Native retro scale private int retroWidth = 320; private int retroHeight = 180; - + // private int retroWidth = 480; + // private int retroHeight = 270; + // Test Render Target private RenderTarget2D renderTarget; private Rectangle renderDestination; @@ -46,7 +48,7 @@ namespace LunaLightXMG // Utility private static Random random; - public Game1() + public LunaLightGame() { graphics = new GraphicsDeviceManager(this); Content.RootDirectory = "Content"; @@ -173,7 +175,7 @@ namespace LunaLightXMG base.Draw(gameTime); } - // Method Implementation ------------------------------------------------------------------------------- + #region Methods private List SpawnEnemies(int numberOfEnemies) { List enemies = new List(); for (int i = 0; i < numberOfEnemies; i++) @@ -214,7 +216,7 @@ namespace LunaLightXMG private void CalculateRenderDestination() { Point size = GraphicsDevice.Viewport.Bounds.Size; - + // Calculate the integer scale factor int scaleX = size.X / renderTarget.Width; int scaleY = size.Y / renderTarget.Height; @@ -260,5 +262,7 @@ namespace LunaLightXMG // Regenerate platforms platforms = PlatformGenerator.CreatePlatforms(numOfPlatforms); } + + #endregion } } diff --git a/Platform.cs b/Platform.cs index adc3c9c..055d707 100644 --- a/Platform.cs +++ b/Platform.cs @@ -52,7 +52,7 @@ namespace LunaLightXMG new Platform(new Vector2(288, 164), 16, 16), new Platform(new Vector2(304, 164), 16, 16) }; - + // Left side wall (static) List leftSidePlatforms = new List { @@ -69,7 +69,7 @@ namespace LunaLightXMG new Platform(new Vector2(0, 132), 16, 16), new Platform(new Vector2(0, 148), 16, 16) }; - + // Right side wall (static) List rightSidePlatforms = new List { diff --git a/Program.cs b/Program.cs index 8240b0a..043c548 100644 --- a/Program.cs +++ b/Program.cs @@ -1,3 +1,3 @@  -using var game = new LunaLightXMG.Game1(); +using var game = new LunaLightXMG.LunaLightGame(); game.Run(); diff --git a/UpdateNotes/Camera.md b/UpdateNotes/Camera.md new file mode 100644 index 0000000..d56b219 --- /dev/null +++ b/UpdateNotes/Camera.md @@ -0,0 +1,10 @@ +## March 15th, 2025 - JME + +Currentlly the camera is static, or non-existtent really.. we need to create a camera class that handles creating and managing a viewport that follows the player wihin the level. + +- If the level is the same size as te viewport then the camera is static. + +- We also want to have a zoom capability that zooms between 320x180 and 480x270. The current view is 320x180. + +- We should be able to use a lot of the code from LunaLightGML however we will need to create the class objects and restructure to work with MonoGame. +