# Visual Studio 2008\r
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CarFire", "CarFire\CarFire.csproj", "{FDDA5BCD-3616-400D-A40B-CFD57C54D0F2}"\r
EndProject\r
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CharacterTestBed", "CharacterTestBed\CharacterTestBed.csproj", "{757B5B2E-27C5-43E3-BF29-5025E9DDDBF1}"\r
+EndProject\r
Global\r
+ GlobalSection(SubversionScc) = preSolution\r
+ Svn-Managed = True\r
+ Manager = AnkhSVN - Subversion Support for Visual Studio\r
+ EndGlobalSection\r
GlobalSection(SolutionConfigurationPlatforms) = preSolution\r
Debug|x86 = Debug|x86\r
Release|x86 = Release|x86\r
{FDDA5BCD-3616-400D-A40B-CFD57C54D0F2}.Release|x86.Build.0 = Release|x86\r
{C115BBCA-D6FD-42AF-B2A1-3E895808BC14}.Debug|x86.ActiveCfg = Debug|x86\r
{C115BBCA-D6FD-42AF-B2A1-3E895808BC14}.Release|x86.ActiveCfg = Release|x86\r
+ {757B5B2E-27C5-43E3-BF29-5025E9DDDBF1}.Debug|x86.ActiveCfg = Debug|x86\r
+ {757B5B2E-27C5-43E3-BF29-5025E9DDDBF1}.Debug|x86.Build.0 = Debug|x86\r
+ {757B5B2E-27C5-43E3-BF29-5025E9DDDBF1}.Release|x86.ActiveCfg = Release|x86\r
+ {757B5B2E-27C5-43E3-BF29-5025E9DDDBF1}.Release|x86.Build.0 = Release|x86\r
+ {4F0BE90F-1E46-4959-80A5-E92B578F6A48}.Debug|x86.ActiveCfg = Debug|x86\r
+ {4F0BE90F-1E46-4959-80A5-E92B578F6A48}.Release|x86.ActiveCfg = Release|x86\r
EndGlobalSection\r
GlobalSection(SolutionProperties) = preSolution\r
HideSolutionNode = FALSE\r
--- /dev/null
+using System;\r
+using System.Collections.Generic;\r
+using System.Linq;\r
+using System.Text;\r
+using Microsoft.Xna.Framework;\r
+using Microsoft.Xna.Framework.Content;\r
+using Microsoft.Xna.Framework.Graphics;\r
+using Microsoft.Xna.Framework.Input;\r
+\r
+public class Character\r
+{\r
+ public Character()\r
+ {\r
+ }\r
+}\r
--- /dev/null
+using System;\r
+using System.Collections.Generic;\r
+using System.Linq;\r
+using System.Text;\r
+using Microsoft.Xna.Framework;\r
+using Microsoft.Xna.Framework.Content;\r
+using Microsoft.Xna.Framework.Graphics;\r
+using Microsoft.Xna.Framework.Input;\r
+\r
+namespace CarFire\r
+{\r
+ /// <summary>\r
+ /// Base class for all Characters, \r
+ /// includes: basic position information, \r
+ /// character Texture\r
+ /// health\r
+ /// damage\r
+ /// </summary>\r
+ public class Character\r
+ {\r
+ //Member Variables\r
+ Map theMap;\r
+ int movementSpeed;\r
+ int gridX;\r
+ int gridY;\r
+ Texture2D charModel;\r
+ int health;\r
+ int damage;\r
+ int range;\r
+ bool isMoving;\r
+ int pixelX;\r
+ int pixelY;\r
+\r
+ /// <summary>\r
+ /// Call this method to give the game a chance to load its content.\r
+ /// </summary>\r
+ /// <param name="_currentMap">The map that this character will interact with</param>\r
+ /// <param name="_charModel">The model for this character</param>\r
+ /// <param name="_baseMovementSpeed">How fast the character moves</param>\r
+ /// <param name="_baseHealth">The starting health of the character</param>\r
+ /// <param name="_baseDamage">The base damage of the character</param>\r
+ /// <param name="_baseRange">The range of the character attack</param>\r
+ public Character( Map _currentMap,\r
+ Texture2D _charModel,\r
+ int _baseMovementSpeed,\r
+ int _baseHealth,\r
+ int _baseDamage,\r
+ int _baseRange)\r
+ {\r
+ theMap = _currentMap;\r
+ movementSpeed = _baseMovementSpeed;\r
+ gridX = 100; //should be included in the map as a designated spawn point to begin map\r
+ gridY = 100; // \r
+ charModel = _charModel;\r
+ health = _baseHealth;\r
+ range = _baseRange;\r
+ isMoving = false;\r
+ pixelX = gridX * 1; // 1 needs to be changed to the size of the map grid, also someway need to be determined to change to screen cordinates from would the world cordinates \r
+ pixelY = gridY * 1; //\r
+ }\r
+\r
+ public void Draw(SpriteBatch spriteBatch)\r
+ {\r
+ spriteBatch.Draw(charModel, new Vector2(pixelX, pixelY), null, Color.White, 0, new Vector2(0f,0f), 1f, SpriteEffects.None, 0);\r
+ }\r
+\r
+ /// <summary>\r
+ /// Adjust Health of player\r
+ /// </summary>\r
+ public int Health\r
+ {\r
+ get { return health; }\r
+ set { health = value; }\r
+ }\r
+\r
+ public bool IsMoving\r
+ {\r
+ get { return isMoving; }\r
+ }\r
+ }\r
+\r
+ /// <summary>\r
+ /// A manager class to handle network interactions between peers and\r
+ /// lobby/game switching.\r
+ /// </summary>\r
+ public class Player : Character\r
+ {\r
+ //Member Variables\r
+\r
+ public Player( Map _currentMap, \r
+ Texture2D _charModel,\r
+ int _baseMovementSpeed,\r
+ int _baseHealth,\r
+ int _baseDamage, \r
+ int _baseRange) \r
+ : base(_currentMap,_charModel,_baseMovementSpeed, _baseHealth, _baseDamage, _baseRange)\r
+ {\r
+ }\r
+\r
+ public void Update()\r
+ {\r
+\r
+ }\r
+ }\r
+\r
+ /// <summary>\r
+ /// A manager class to handle network interactions between peers and\r
+ /// lobby/game switching.\r
+ /// </summary>\r
+ public class Monster : Character\r
+ {\r
+ //Member Variables\r
+ public Monster( Map _currentMap, \r
+ Texture2D _charModel,\r
+ int _baseMovementSpeed,\r
+ int _baseHealth,\r
+ int _baseDamage, \r
+ int _baseRange) \r
+ : base(_currentMap,_charModel,_baseMovementSpeed, _baseHealth, _baseDamage, _baseRange)\r
+ {\r
+\r
+ }\r
+\r
+ public void Update()\r
+ {\r
+\r
+ }\r
+ }\r
+\r
+ //this is for testing purposes only!\r
+ public class Map\r
+ {\r
+ public Map()\r
+ {\r
+\r
+ }\r
+ }\r
+}
\ No newline at end of file
--- /dev/null
+<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="3.5">\r
+ <PropertyGroup>\r
+ <ProjectGuid>{757B5B2E-27C5-43E3-BF29-5025E9DDDBF1}</ProjectGuid>\r
+ <ProjectTypeGuids>{6D335F3A-9D43-41b4-9D22-F6F17C4BE596};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>\r
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>\r
+ <Platform Condition=" '$(Platform)' == '' ">x86</Platform>\r
+ <OutputType>WinExe</OutputType>\r
+ <AppDesignerFolder>Properties</AppDesignerFolder>\r
+ <RootNamespace>CharacterTestBed</RootNamespace>\r
+ <AssemblyName>CharacterTestBed</AssemblyName>\r
+ <TargetFrameworkVersion>v3.5</TargetFrameworkVersion>\r
+ <XnaFrameworkVersion>v3.0</XnaFrameworkVersion>\r
+ <XnaPlatform>Windows</XnaPlatform>\r
+ <XnaCrossPlatformGroupID>b52464cd-8b86-4443-b045-7663f76abf6a</XnaCrossPlatformGroupID>\r
+ <ApplicationIcon>Game.ico</ApplicationIcon>\r
+ <Thumbnail>GameThumbnail.png</Thumbnail>\r
+ <PublishUrl>publish\</PublishUrl>\r
+ <Install>true</Install>\r
+ <InstallFrom>Disk</InstallFrom>\r
+ <UpdateEnabled>false</UpdateEnabled>\r
+ <UpdateMode>Foreground</UpdateMode>\r
+ <UpdateInterval>7</UpdateInterval>\r
+ <UpdateIntervalUnits>Days</UpdateIntervalUnits>\r
+ <UpdatePeriodically>false</UpdatePeriodically>\r
+ <UpdateRequired>false</UpdateRequired>\r
+ <MapFileExtensions>true</MapFileExtensions>\r
+ <ApplicationRevision>0</ApplicationRevision>\r
+ <ApplicationVersion>1.0.0.%2a</ApplicationVersion>\r
+ <IsWebBootstrapper>false</IsWebBootstrapper>\r
+ <UseApplicationTrust>false</UseApplicationTrust>\r
+ <BootstrapperEnabled>true</BootstrapperEnabled>\r
+ </PropertyGroup>\r
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">\r
+ <DebugSymbols>true</DebugSymbols>\r
+ <DebugType>full</DebugType>\r
+ <Optimize>false</Optimize>\r
+ <OutputPath>bin\x86\Debug</OutputPath>\r
+ <DefineConstants>DEBUG;TRACE;WINDOWS</DefineConstants>\r
+ <ErrorReport>prompt</ErrorReport>\r
+ <WarningLevel>4</WarningLevel>\r
+ <NoStdLib>true</NoStdLib>\r
+ <UseVSHostingProcess>false</UseVSHostingProcess>\r
+ <PlatformTarget>x86</PlatformTarget>\r
+ <XnaCompressContent>false</XnaCompressContent>\r
+ </PropertyGroup>\r
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">\r
+ <DebugType>pdbonly</DebugType>\r
+ <Optimize>true</Optimize>\r
+ <OutputPath>bin\x86\Release</OutputPath>\r
+ <DefineConstants>TRACE;WINDOWS</DefineConstants>\r
+ <ErrorReport>prompt</ErrorReport>\r
+ <WarningLevel>4</WarningLevel>\r
+ <NoStdLib>true</NoStdLib>\r
+ <UseVSHostingProcess>false</UseVSHostingProcess>\r
+ <PlatformTarget>x86</PlatformTarget>\r
+ <XnaCompressContent>true</XnaCompressContent>\r
+ </PropertyGroup>\r
+ <ItemGroup>\r
+ <Reference Include="Microsoft.Xna.Framework, Version=3.0.0.0, Culture=neutral, PublicKeyToken=6d5c3888ef60e27d, processorArchitecture=x86">\r
+ <Private>False</Private>\r
+ <SpecificVersion>True</SpecificVersion>\r
+ </Reference>\r
+ <Reference Include="Microsoft.Xna.Framework.Game, Version=3.0.0.0, Culture=neutral, PublicKeyToken=6d5c3888ef60e27d, processorArchitecture=MSIL">\r
+ <Private>False</Private>\r
+ <SpecificVersion>True</SpecificVersion>\r
+ </Reference>\r
+ <Reference Include="mscorlib">\r
+ <Private>False</Private>\r
+ </Reference>\r
+ <Reference Include="System">\r
+ <Private>False</Private>\r
+ </Reference>\r
+ <Reference Include="System.Xml">\r
+ <Private>False</Private>\r
+ </Reference>\r
+ <Reference Include="System.Core">\r
+ <RequiredTargetFramework>3.5</RequiredTargetFramework>\r
+ <Private>False</Private>\r
+ </Reference>\r
+ <Reference Include="System.Xml.Linq">\r
+ <RequiredTargetFramework>3.5</RequiredTargetFramework>\r
+ <Private>False</Private>\r
+ </Reference>\r
+ </ItemGroup>\r
+ <ItemGroup>\r
+ <Compile Include="Character.cs" />\r
+ <Compile Include="Properties\AssemblyInfo.cs" />\r
+ <Compile Include="Program.cs" />\r
+ <Compile Include="Game1.cs" />\r
+ </ItemGroup>\r
+ <ItemGroup>\r
+ <Content Include="Game.ico" />\r
+ <Content Include="GameThumbnail.png" />\r
+ </ItemGroup>\r
+ <ItemGroup>\r
+ <NestedContentProject Include="Content\Content.contentproj">\r
+ <Project>4f0be90f-1e46-4959-80a5-e92b578f6a48</Project>\r
+ <Visible>False</Visible>\r
+ </NestedContentProject>\r
+ </ItemGroup>\r
+ <ItemGroup>\r
+ <BootstrapperPackage Include="Microsoft.Net.Framework.2.0">\r
+ <Visible>False</Visible>\r
+ <ProductName>.NET Framework 2.0 %28x86%29</ProductName>\r
+ <Install>false</Install>\r
+ </BootstrapperPackage>\r
+ <BootstrapperPackage Include="Microsoft.Net.Framework.3.0">\r
+ <Visible>False</Visible>\r
+ <ProductName>.NET Framework 3.0 %28x86%29</ProductName>\r
+ <Install>false</Install>\r
+ </BootstrapperPackage>\r
+ <BootstrapperPackage Include="Microsoft.Net.Framework.3.5">\r
+ <Visible>False</Visible>\r
+ <ProductName>.NET Framework 3.5</ProductName>\r
+ <Install>true</Install>\r
+ </BootstrapperPackage>\r
+ <BootstrapperPackage Include="Microsoft.Windows.Installer.3.1">\r
+ <Visible>False</Visible>\r
+ <ProductName>Windows Installer 3.1</ProductName>\r
+ <Install>true</Install>\r
+ </BootstrapperPackage>\r
+ <BootstrapperPackage Include="Microsoft.Xna.Framework.3.0">\r
+ <Visible>False</Visible>\r
+ <ProductName>Microsoft XNA Framework Redistributable 3.0</ProductName>\r
+ <Install>true</Install>\r
+ </BootstrapperPackage>\r
+ </ItemGroup>\r
+ <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />\r
+ <Import Project="$(MSBuildExtensionsPath)\Microsoft\XNA Game Studio\Microsoft.Xna.GameStudio.targets" />\r
+ <!-- To modify your build process, add your task inside one of the targets below and uncomment it. \r
+ Other similar extension points exist, see Microsoft.Common.targets.\r
+ <Target Name="BeforeBuild">\r
+ </Target>\r
+ <Target Name="AfterBuild">\r
+ </Target>\r
+ -->\r
+</Project>
\ No newline at end of file
--- /dev/null
+<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="3.5">\r
+ <PropertyGroup>\r
+ <ProjectGuid>4f0be90f-1e46-4959-80a5-e92b578f6a48</ProjectGuid>\r
+ <ProjectTypeGuids>{96E2B04D-8817-42c6-938A-82C39BA4D311};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>\r
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>\r
+ <Platform Condition=" '$(Platform)' == '' ">x86</Platform>\r
+ <OutputType>Library</OutputType>\r
+ <AppDesignerFolder>Properties</AppDesignerFolder>\r
+ <TargetFrameworkVersion>v3.5</TargetFrameworkVersion>\r
+ <XnaFrameworkVersion>v3.0</XnaFrameworkVersion>\r
+ <PlatformTarget>x86</PlatformTarget>\r
+ <OutputPath>bin\$(Platform)\$(Configuration)</OutputPath>\r
+ </PropertyGroup>\r
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">\r
+ <XnaPlatform>Windows</XnaPlatform>\r
+ </PropertyGroup>\r
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">\r
+ <XnaPlatform>Windows</XnaPlatform>\r
+ </PropertyGroup>\r
+ <ItemGroup>\r
+ <Reference Include="Microsoft.Xna.Framework.Content.Pipeline.EffectImporter, Version=3.0.0.0, Culture=neutral, PublicKeyToken=6d5c3888ef60e27d, processorArchitecture=MSIL">\r
+ <Private>False</Private>\r
+ </Reference>\r
+ <Reference Include="Microsoft.Xna.Framework.Content.Pipeline.FBXImporter, Version=3.0.0.0, Culture=neutral, PublicKeyToken=6d5c3888ef60e27d, processorArchitecture=MSIL">\r
+ <Private>False</Private>\r
+ </Reference>\r
+ <Reference Include="Microsoft.Xna.Framework.Content.Pipeline.TextureImporter, Version=3.0.0.0, Culture=neutral, PublicKeyToken=6d5c3888ef60e27d, processorArchitecture=MSIL">\r
+ <Private>False</Private>\r
+ </Reference>\r
+ <Reference Include="Microsoft.Xna.Framework.Content.Pipeline.XImporter, Version=3.0.0.0, Culture=neutral, PublicKeyToken=6d5c3888ef60e27d, processorArchitecture=MSIL">\r
+ <Private>False</Private>\r
+ </Reference>\r
+ <Reference Include="Microsoft.Xna.Framework.Content.Pipeline.AudioImporters, Version=3.0.0.0, Culture=neutral, PublicKeyToken=6d5c3888ef60e27d, processorArchitecture=MSIL">\r
+ <Private>False</Private>\r
+ </Reference>\r
+ </ItemGroup>\r
+ <ItemGroup>\r
+ <Compile Include="pinball.png">\r
+ <Name>pinball</Name>\r
+ <Importer>TextureImporter</Importer>\r
+ <Processor>TextureProcessor</Processor>\r
+ </Compile>\r
+ </ItemGroup>\r
+ <Import Project="$(MSBuildExtensionsPath)\Microsoft\XNA Game Studio\v3.0\Microsoft.Xna.GameStudio.ContentPipeline.targets" />\r
+ <!-- To modify your build process, add your task inside one of the targets below and uncomment it. \r
+ Other similar extension points exist, see Microsoft.Common.targets.\r
+ <Target Name="BeforeBuild">\r
+ </Target>\r
+ <Target Name="AfterBuild">\r
+ </Target>\r
+ -->\r
+</Project>
\ No newline at end of file
--- /dev/null
+using System;\r
+using System.Collections.Generic;\r
+using System.Linq;\r
+using Microsoft.Xna.Framework;\r
+using Microsoft.Xna.Framework.Audio;\r
+using Microsoft.Xna.Framework.Content;\r
+using Microsoft.Xna.Framework.GamerServices;\r
+using Microsoft.Xna.Framework.Graphics;\r
+using Microsoft.Xna.Framework.Input;\r
+using Microsoft.Xna.Framework.Media;\r
+using Microsoft.Xna.Framework.Net;\r
+using Microsoft.Xna.Framework.Storage;\r
+using CarFire;\r
+\r
+namespace CharacterTestBed\r
+{\r
+ /// <summary>\r
+ /// This is the main type for your game\r
+ /// </summary>\r
+ public class Game1 : Microsoft.Xna.Framework.Game\r
+ {\r
+ GraphicsDeviceManager graphics;\r
+ SpriteBatch spriteBatch;\r
+ Player p;\r
+ public Game1()\r
+ {\r
+ graphics = new GraphicsDeviceManager(this);\r
+ Content.RootDirectory = "Content";\r
+ }\r
+\r
+ /// <summary>\r
+ /// Allows the game to perform any initialization it needs to before starting to run.\r
+ /// This is where it can query for any required services and load any non-graphic\r
+ /// related content. Calling base.Initialize will enumerate through any components\r
+ /// and initialize them as well.\r
+ /// </summary>\r
+ protected override void Initialize()\r
+ {\r
+ // TODO: Add your initialization logic here\r
+\r
+ base.Initialize();\r
+ }\r
+\r
+ /// <summary>\r
+ /// LoadContent will be called once per game and is the place to load\r
+ /// all of your content.\r
+ /// </summary>\r
+ protected override void LoadContent()\r
+ {\r
+ // Create a new SpriteBatch, which can be used to draw textures.\r
+ spriteBatch = new SpriteBatch(GraphicsDevice);\r
+\r
+ p = new Player(new Map(), Content.Load<Texture2D>("pinball"), 4, 100, 20, 10);\r
+ // TODO: use this.Content to load your game content here\r
+ }\r
+\r
+ /// <summary>\r
+ /// UnloadContent will be called once per game and is the place to unload\r
+ /// all content.\r
+ /// </summary>\r
+ protected override void UnloadContent()\r
+ {\r
+ // TODO: Unload any non ContentManager content here\r
+ }\r
+\r
+ /// <summary>\r
+ /// Allows the game to run logic such as updating the world,\r
+ /// checking for collisions, gathering input, and playing audio.\r
+ /// </summary>\r
+ /// <param name="gameTime">Provides a snapshot of timing values.</param>\r
+ protected override void Update(GameTime gameTime)\r
+ {\r
+ // Allows the game to exit\r
+ if (GamePad.GetState(PlayerIndex.One).Buttons.Back == ButtonState.Pressed)\r
+ this.Exit();\r
+\r
+ // TODO: Add your update logic here\r
+\r
+ base.Update(gameTime);\r
+ }\r
+\r
+ /// <summary>\r
+ /// This is called when the game should draw itself.\r
+ /// </summary>\r
+ /// <param name="gameTime">Provides a snapshot of timing values.</param>\r
+ protected override void Draw(GameTime gameTime)\r
+ {\r
+ GraphicsDevice.Clear(Color.CornflowerBlue);\r
+ spriteBatch.Begin(SpriteBlendMode.AlphaBlend);\r
+\r
+ p.Draw(spriteBatch);\r
+\r
+ // TODO: Add your drawing code here\r
+ spriteBatch.End();\r
+ base.Draw(gameTime);\r
+ }\r
+ }\r
+}\r
--- /dev/null
+using System;\r
+\r
+namespace CharacterTestBed\r
+{\r
+ static class Program\r
+ {\r
+ /// <summary>\r
+ /// The main entry point for the application.\r
+ /// </summary>\r
+ static void Main(string[] args)\r
+ {\r
+ using (Game1 game = new Game1())\r
+ {\r
+ game.Run();\r
+ }\r
+ }\r
+ }\r
+}\r
+\r
--- /dev/null
+using System.Reflection;\r
+using System.Runtime.CompilerServices;\r
+using System.Runtime.InteropServices;\r
+\r
+// General Information about an assembly is controlled through the following \r
+// set of attributes. Change these attribute values to modify the information\r
+// associated with an assembly.\r
+[assembly: AssemblyTitle("CharacterTestBed")]\r
+[assembly: AssemblyProduct("CharacterTestBed")]\r
+[assembly: AssemblyDescription("")]\r
+[assembly: AssemblyCompany("Microsoft")]\r
+\r
+[assembly: AssemblyCopyright("Copyright © Microsoft 2010")]\r
+[assembly: AssemblyTrademark("")]\r
+[assembly: AssemblyCulture("")]\r
+\r
+// Setting ComVisible to false makes the types in this assembly not visible \r
+// to COM components. If you need to access a type in this assembly from \r
+// COM, set the ComVisible attribute to true on that type.\r
+[assembly: ComVisible(false)]\r
+\r
+// The following GUID is for the ID of the typelib if this project is exposed to COM\r
+[assembly: Guid("fe5d617d-39d4-4c3a-bdb6-66ea297be779")]\r
+\r
+\r
+// Version information for an assembly consists of the following four values:\r
+//\r
+// Major Version\r
+// Minor Version \r
+// Build Number\r
+// Revision\r
+//\r
+[assembly: AssemblyVersion("1.0.0.0")]\r