From: Ben Beltran Date: Wed, 23 Oct 2013 04:11:13 +0000 (-0500) Subject: First commit. Starting with MonoGame. X-Git-Url: https://git.r.bdr.sh/rbdr/super-polarity/commitdiff_plain/63a61ee2be3a902c27cd000d41b1a3a0280be21a?ds=inline First commit. Starting with MonoGame. --- 63a61ee2be3a902c27cd000d41b1a3a0280be21a diff --git a/README.md b/README.md new file mode 100644 index 0000000..e69de29 diff --git a/Super Polarity.sln b/Super Polarity.sln new file mode 100644 index 0000000..20fcaa8 --- /dev/null +++ b/Super Polarity.sln @@ -0,0 +1,20 @@ + +Microsoft Visual Studio Solution File, Format Version 11.00 +# Visual C# Express 2010 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Super Polarity", "Super Polarity\Super Polarity.csproj", "{2585188B-339D-44CD-9599-1A80AA30DE13}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|x86 = Debug|x86 + Release|x86 = Release|x86 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {2585188B-339D-44CD-9599-1A80AA30DE13}.Debug|x86.ActiveCfg = Debug|x86 + {2585188B-339D-44CD-9599-1A80AA30DE13}.Debug|x86.Build.0 = Debug|x86 + {2585188B-339D-44CD-9599-1A80AA30DE13}.Release|x86.ActiveCfg = Release|x86 + {2585188B-339D-44CD-9599-1A80AA30DE13}.Release|x86.Build.0 = Release|x86 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/Super Polarity.suo b/Super Polarity.suo new file mode 100644 index 0000000..5f14b6d Binary files /dev/null and b/Super Polarity.suo differ diff --git a/Super Polarity/Content/Graphics/player.xnb b/Super Polarity/Content/Graphics/player.xnb new file mode 100644 index 0000000..55c6d4c Binary files /dev/null and b/Super Polarity/Content/Graphics/player.xnb differ diff --git a/Super Polarity/Icon.ico b/Super Polarity/Icon.ico new file mode 100644 index 0000000..13be62a Binary files /dev/null and b/Super Polarity/Icon.ico differ diff --git a/Super Polarity/MainShip.cs b/Super Polarity/MainShip.cs new file mode 100644 index 0000000..51d1eb3 --- /dev/null +++ b/Super Polarity/MainShip.cs @@ -0,0 +1,49 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; + +namespace SuperPolarity +{ + class MainShip + { + public Texture2D PlayerTexture; + public Vector2 Position; + public bool Active; + public int Lives; + public int Multiplier; + public int Score; + public float Angle; + + public int Width + { + get { return PlayerTexture.Width; } + } + + public int Height + { + get { return PlayerTexture.Height; } + } + + public void Initialize(Texture2D texture, Vector2 position) + { + PlayerTexture = texture; + Position = position; + Active = true; + Multiplier = 1; + Lives = 3; + Score = 0; + } + + public void Update() + { + } + + public void Draw(SpriteBatch spriteBatch) + { + spriteBatch.Draw(PlayerTexture, Position, null, Color.White, Angle, Vector2.Zero, 1f, SpriteEffects.None, 0f); + } + } +} diff --git a/Super Polarity/Program.cs b/Super Polarity/Program.cs new file mode 100644 index 0000000..6c3f614 --- /dev/null +++ b/Super Polarity/Program.cs @@ -0,0 +1,26 @@ +#region Using Statements +using System; +using System.Collections.Generic; +using System.Linq; +#endregion + +namespace SuperPolarity +{ +#if WINDOWS || LINUX + /// + /// The main class. + /// + public static class Program + { + /// + /// The main entry point for the application. + /// + [STAThread] + static void Main() + { + using (var superPolarity = new SuperPolarity()) + superPolarity.Run(); + } + } +#endif +} diff --git a/Super Polarity/Properties/AssemblyInfo.cs b/Super Polarity/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..91a7e87 --- /dev/null +++ b/Super Polarity/Properties/AssemblyInfo.cs @@ -0,0 +1,36 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("Super Polarity")] +[assembly: AssemblyProduct("Super Polarity")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyCopyright("Copyright © 2013")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("7f0aa81c-c9ab-4b87-97eb-3b788199ed3e")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Build and Revision Numbers +// by using the '*' as shown below: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/Super Polarity/Super Polarity.csproj b/Super Polarity/Super Polarity.csproj new file mode 100644 index 0000000..dd5e1cd --- /dev/null +++ b/Super Polarity/Super Polarity.csproj @@ -0,0 +1,80 @@ + + + + Debug + x86 + 8.0.30703 + 2.0 + {2585188B-339D-44CD-9599-1A80AA30DE13} + WinExe + Properties + SuperPolarity + Super Polarity + 512 + + + x86 + true + full + false + bin\WindowsGL\Debug\ + DEBUG;TRACE;WINDOWS + prompt + 4 + + + x86 + pdbonly + true + bin\WindowsGL\Release\ + TRACE;WINDOWS + prompt + 4 + + + Icon.ico + + + + + + + + + + ..\..\..\..\..\..\..\Program Files (x86)\MSBuild\..\MonoGame\v3.0\Assemblies\WindowsGL\OpenTK.dll + + + ..\..\..\..\..\..\..\Program Files (x86)\MSBuild\..\MonoGame\v3.0\Assemblies\WindowsGL\MonoGame.Framework.dll + + + ..\..\..\..\..\..\..\Program Files (x86)\MSBuild\..\MonoGame\v3.0\Assemblies\WindowsGL\Lidgren.Network.dll + + + ..\..\..\..\..\..\..\Program Files (x86)\MSBuild\..\MonoGame\v3.0\Assemblies\WindowsGL\Tao.Sdl.dll + + + + + + + SDL.dll + Always + + + + + + + Always + + + + + \ No newline at end of file diff --git a/Super Polarity/Super Polarity.csproj.user b/Super Polarity/Super Polarity.csproj.user new file mode 100644 index 0000000..ace9a86 --- /dev/null +++ b/Super Polarity/Super Polarity.csproj.user @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/Super Polarity/Super Polarity.csproj~ b/Super Polarity/Super Polarity.csproj~ new file mode 100644 index 0000000..520cdc4 --- /dev/null +++ b/Super Polarity/Super Polarity.csproj~ @@ -0,0 +1,76 @@ + + + + Debug + x86 + 8.0.30703 + 2.0 + {2585188B-339D-44CD-9599-1A80AA30DE13} + WinExe + Properties + GameName1 + Super Polarity + 512 + + + x86 + true + full + false + bin\WindowsGL\Debug\ + DEBUG;TRACE;WINDOWS + prompt + 4 + + + x86 + pdbonly + true + bin\WindowsGL\Release\ + TRACE;WINDOWS + prompt + 4 + + + Icon.ico + + + + + + + + + ..\..\..\..\..\..\..\Program Files (x86)\MSBuild\..\MonoGame\v3.0\Assemblies\WindowsGL\OpenTK.dll + + + ..\..\..\..\..\..\..\Program Files (x86)\MSBuild\..\MonoGame\v3.0\Assemblies\WindowsGL\MonoGame.Framework.dll + + + ..\..\..\..\..\..\..\Program Files (x86)\MSBuild\..\MonoGame\v3.0\Assemblies\WindowsGL\Lidgren.Network.dll + + + ..\..\..\..\..\..\..\Program Files (x86)\MSBuild\..\MonoGame\v3.0\Assemblies\WindowsGL\Tao.Sdl.dll + + + + + + + SDL.dll + Always + + + + + + + + + diff --git a/Super Polarity/SuperPolarity.cs b/Super Polarity/SuperPolarity.cs new file mode 100644 index 0000000..40f1477 --- /dev/null +++ b/Super Polarity/SuperPolarity.cs @@ -0,0 +1,100 @@ +#region Using Statements +using System; +using System.Collections.Generic; +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Content; +using Microsoft.Xna.Framework.Graphics; +using Microsoft.Xna.Framework.Input; +using Microsoft.Xna.Framework.Storage; +using Microsoft.Xna.Framework.GamerServices; +using SuperPolarity; +#endregion + +namespace SuperPolarity +{ + /// + /// This is the main type for your game + /// + public class SuperPolarity : Game + { + GraphicsDeviceManager graphics; + SpriteBatch spriteBatch; + + MainShip player; + + public SuperPolarity() + : base() + { + graphics = new GraphicsDeviceManager(this); + Content.RootDirectory = "Content"; + } + + /// + /// 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. + /// + protected override void Initialize() + { + player = new MainShip(); + + base.Initialize(); + } + + /// + /// LoadContent will be called once per game and is the place to load + /// all of your content. + /// + protected override void LoadContent() + { + // Create a new SpriteBatch, which can be used to draw textures. + spriteBatch = new SpriteBatch(GraphicsDevice); + + Vector2 playerPosition = new Vector2(GraphicsDevice.Viewport.TitleSafeArea.X, GraphicsDevice.Viewport.TitleSafeArea.Y + GraphicsDevice.Viewport.TitleSafeArea.Height / 2); + + player.Initialize(Content.Load("Graphics\\player"), playerPosition); + } + + /// + /// UnloadContent will be called once per game and is the place to unload + /// all content. + /// + protected override void UnloadContent() + { + // TODO: Unload any non ContentManager content here + } + + /// + /// Allows the game to run logic such as updating the world, + /// checking for collisions, gathering input, and playing audio. + /// + /// Provides a snapshot of timing values. + protected override void Update(GameTime gameTime) + { + if (GamePad.GetState(PlayerIndex.One).Buttons.Back == ButtonState.Pressed || Keyboard.GetState().IsKeyDown(Keys.Escape)) + Exit(); + + // TODO: Add your update logic here + + base.Update(gameTime); + } + + /// + /// This is called when the game should draw itself. + /// + /// Provides a snapshot of timing values. + protected override void Draw(GameTime gameTime) + { + GraphicsDevice.Clear(Color.CornflowerBlue); + + spriteBatch.Begin(); + + player.Draw(spriteBatch); + + spriteBatch.End(); + + base.Draw(gameTime); + } + } +} diff --git a/Super Polarity/bin/WindowsGL/Debug/Content/Graphics/player.xnb b/Super Polarity/bin/WindowsGL/Debug/Content/Graphics/player.xnb new file mode 100644 index 0000000..55c6d4c Binary files /dev/null and b/Super Polarity/bin/WindowsGL/Debug/Content/Graphics/player.xnb differ diff --git a/Super Polarity/bin/WindowsGL/Debug/GameName1.vshost.exe b/Super Polarity/bin/WindowsGL/Debug/GameName1.vshost.exe new file mode 100644 index 0000000..bb84a51 Binary files /dev/null and b/Super Polarity/bin/WindowsGL/Debug/GameName1.vshost.exe differ diff --git a/Super Polarity/bin/WindowsGL/Debug/GameName1.vshost.exe.manifest b/Super Polarity/bin/WindowsGL/Debug/GameName1.vshost.exe.manifest new file mode 100644 index 0000000..061c9ca --- /dev/null +++ b/Super Polarity/bin/WindowsGL/Debug/GameName1.vshost.exe.manifest @@ -0,0 +1,11 @@ + + + + + + + + + + + diff --git a/Super Polarity/bin/WindowsGL/Debug/Lidgren.Network.dll b/Super Polarity/bin/WindowsGL/Debug/Lidgren.Network.dll new file mode 100644 index 0000000..fd45367 Binary files /dev/null and b/Super Polarity/bin/WindowsGL/Debug/Lidgren.Network.dll differ diff --git a/Super Polarity/bin/WindowsGL/Debug/MonoGame.Framework.dll b/Super Polarity/bin/WindowsGL/Debug/MonoGame.Framework.dll new file mode 100644 index 0000000..c087ac2 Binary files /dev/null and b/Super Polarity/bin/WindowsGL/Debug/MonoGame.Framework.dll differ diff --git a/Super Polarity/bin/WindowsGL/Debug/OpenTK.dll b/Super Polarity/bin/WindowsGL/Debug/OpenTK.dll new file mode 100644 index 0000000..b1cd2e9 Binary files /dev/null and b/Super Polarity/bin/WindowsGL/Debug/OpenTK.dll differ diff --git a/Super Polarity/bin/WindowsGL/Debug/SDL.dll b/Super Polarity/bin/WindowsGL/Debug/SDL.dll new file mode 100644 index 0000000..628cdfc Binary files /dev/null and b/Super Polarity/bin/WindowsGL/Debug/SDL.dll differ diff --git a/Super Polarity/bin/WindowsGL/Debug/Super Polarity.exe b/Super Polarity/bin/WindowsGL/Debug/Super Polarity.exe new file mode 100644 index 0000000..a73e117 Binary files /dev/null and b/Super Polarity/bin/WindowsGL/Debug/Super Polarity.exe differ diff --git a/Super Polarity/bin/WindowsGL/Debug/Super Polarity.pdb b/Super Polarity/bin/WindowsGL/Debug/Super Polarity.pdb new file mode 100644 index 0000000..adf5387 Binary files /dev/null and b/Super Polarity/bin/WindowsGL/Debug/Super Polarity.pdb differ diff --git a/Super Polarity/bin/WindowsGL/Debug/Super Polarity.vshost.exe b/Super Polarity/bin/WindowsGL/Debug/Super Polarity.vshost.exe new file mode 100644 index 0000000..bb84a51 Binary files /dev/null and b/Super Polarity/bin/WindowsGL/Debug/Super Polarity.vshost.exe differ diff --git a/Super Polarity/bin/WindowsGL/Debug/Tao.Sdl.dll b/Super Polarity/bin/WindowsGL/Debug/Tao.Sdl.dll new file mode 100644 index 0000000..d2e2d47 Binary files /dev/null and b/Super Polarity/bin/WindowsGL/Debug/Tao.Sdl.dll differ diff --git a/Super Polarity/obj/x86/Debug/DesignTimeResolveAssemblyReferencesInput.cache b/Super Polarity/obj/x86/Debug/DesignTimeResolveAssemblyReferencesInput.cache new file mode 100644 index 0000000..3cba31e Binary files /dev/null and b/Super Polarity/obj/x86/Debug/DesignTimeResolveAssemblyReferencesInput.cache differ diff --git a/Super Polarity/obj/x86/Debug/ResolveAssemblyReference.cache b/Super Polarity/obj/x86/Debug/ResolveAssemblyReference.cache new file mode 100644 index 0000000..d619ccb Binary files /dev/null and b/Super Polarity/obj/x86/Debug/ResolveAssemblyReference.cache differ diff --git a/Super Polarity/obj/x86/Debug/Super Polarity.csproj.FileListAbsolute.txt b/Super Polarity/obj/x86/Debug/Super Polarity.csproj.FileListAbsolute.txt new file mode 100644 index 0000000..b8ea3e8 --- /dev/null +++ b/Super Polarity/obj/x86/Debug/Super Polarity.csproj.FileListAbsolute.txt @@ -0,0 +1,11 @@ +C:\Users\Miau\documents\visual studio 2010\Projects\Super Polarity\Super Polarity\bin\WindowsGL\Debug\SDL.dll +C:\Users\Miau\documents\visual studio 2010\Projects\Super Polarity\Super Polarity\bin\WindowsGL\Debug\Lidgren.Network.dll +C:\Users\Miau\documents\visual studio 2010\Projects\Super Polarity\Super Polarity\bin\WindowsGL\Debug\MonoGame.Framework.dll +C:\Users\Miau\documents\visual studio 2010\Projects\Super Polarity\Super Polarity\bin\WindowsGL\Debug\OpenTK.dll +C:\Users\Miau\documents\visual studio 2010\Projects\Super Polarity\Super Polarity\bin\WindowsGL\Debug\Tao.Sdl.dll +C:\Users\Miau\documents\visual studio 2010\Projects\Super Polarity\Super Polarity\obj\x86\Debug\ResolveAssemblyReference.cache +C:\Users\Miau\documents\visual studio 2010\Projects\Super Polarity\Super Polarity\obj\x86\Debug\Super Polarity.exe +C:\Users\Miau\documents\visual studio 2010\Projects\Super Polarity\Super Polarity\obj\x86\Debug\Super Polarity.pdb +C:\Users\Miau\documents\visual studio 2010\Projects\Super Polarity\Super Polarity\bin\WindowsGL\Debug\Super Polarity.exe +C:\Users\Miau\documents\visual studio 2010\Projects\Super Polarity\Super Polarity\bin\WindowsGL\Debug\Super Polarity.pdb +C:\Users\Miau\Documents\Visual Studio 2010\Projects\Super Polarity\Super Polarity\bin\WindowsGL\Debug\Content\Graphics\player.xnb diff --git a/Super Polarity/obj/x86/Debug/Super Polarity.exe b/Super Polarity/obj/x86/Debug/Super Polarity.exe new file mode 100644 index 0000000..a73e117 Binary files /dev/null and b/Super Polarity/obj/x86/Debug/Super Polarity.exe differ diff --git a/Super Polarity/obj/x86/Debug/Super Polarity.pdb b/Super Polarity/obj/x86/Debug/Super Polarity.pdb new file mode 100644 index 0000000..adf5387 Binary files /dev/null and b/Super Polarity/obj/x86/Debug/Super Polarity.pdb differ