Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Content/Content.mgcb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

/outputDir:bin/$(Platform)
/intermediateDir:obj/$(Platform)
/platform:DesktopGL
/platform:WindowsGL
/config:
/profile:Reach
/compress:False
Expand Down
7 changes: 0 additions & 7 deletions Engine/Setup.cs
Original file line number Diff line number Diff line change
@@ -1,14 +1,7 @@
using System;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Content;

using FarseerPhysics;
using FarseerPhysics.Dynamics;
using FarseerPhysics.Collision;
using FarseerPhysics.Factories;
using FarseerPhysics.Dynamics.Contacts;
using FarseerPhysics.DebugView;

namespace RogueLikePlatfromer
{
Expand Down
2 changes: 0 additions & 2 deletions Game/Actor/Player.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,8 @@

using FarseerPhysics;
using FarseerPhysics.Dynamics;
using FarseerPhysics.Collision;
using FarseerPhysics.Factories;
using FarseerPhysics.Dynamics.Contacts;
using FarseerPhysics.DebugView;

namespace RogueLikePlatfromer
{
Expand Down
3 changes: 0 additions & 3 deletions Game/LevelObjects/Tile.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,7 @@

using FarseerPhysics;
using FarseerPhysics.Dynamics;
using FarseerPhysics.Collision;
using FarseerPhysics.Factories;
using FarseerPhysics.Dynamics.Contacts;
using FarseerPhysics.DebugView;

namespace RogueLikePlatfromer
{
Expand Down
39 changes: 19 additions & 20 deletions Game1.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
using Microsoft.Xna.Framework.Input;

using FarseerPhysics.Dynamics;
using FarseerPhysics.DebugView;
using FarseerPhysics;

using System;
Expand All @@ -17,7 +16,7 @@ public class Game1 : Game
{

public static World world { get; private set; }
public static DebugViewXNA DebugView { get; private set; }
//public static DebugViewXNA DebugView { get; private set; }
public static PhysicsDebugCam DebugCam { get; private set; }
public static Camera2D camera { get; private set; }

Expand Down Expand Up @@ -97,21 +96,21 @@ private void PhysicLoad()
}
}

void DebugDraw()
{
Matrix view2 = Matrix.CreateScale(32); //default 32
view2 *= Game1.DebugCam.view;

// debugActive = true;

DebugView = new DebugViewXNA(Game1.world);
// DebugView.AppendFlags(FarseerPhysics.DebugViewFlags.DebugPanel);
DebugView.DefaultShapeColor = Color.Red;
DebugView.SleepingShapeColor = Color.Green;
DebugView.StaticShapeColor = Color.Violet;
DebugView.LoadContent(Setup.graphics.GraphicsDevice, Setup.ContentDevice);
DebugView.RenderDebugData(ref Game1.DebugCam.projection, ref view2);
}
//void DebugDraw()
//{
// Matrix view2 = Matrix.CreateScale(32); //default 32
// view2 *= Game1.DebugCam.view;

// // debugActive = true;

// DebugView = new DebugViewXNA(Game1.world);
// // DebugView.AppendFlags(FarseerPhysics.DebugViewFlags.DebugPanel);
// DebugView.DefaultShapeColor = Color.Red;
// DebugView.SleepingShapeColor = Color.Green;
// DebugView.StaticShapeColor = Color.Violet;
// DebugView.LoadContent(Setup.graphics.GraphicsDevice, Setup.ContentDevice);
// DebugView.RenderDebugData(ref Game1.DebugCam.projection, ref view2);
//}


protected override void Draw(GameTime gameTime)
Expand All @@ -129,9 +128,9 @@ protected override void Draw(GameTime gameTime)
spriteBatch.End();


#if DEBUG
DebugDraw();
#endif
//#if DEBUG
// DebugDraw();
//#endif

//UI & HUD stuff here
spriteBatch.Begin(SpriteSortMode.Deferred, null, SamplerState.PointClamp, null, null, null, null);
Expand Down
27 changes: 14 additions & 13 deletions RogueLikePlatfromer.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<RootNamespace>RogueLikePlatfromer</RootNamespace>
<AssemblyName>RogueLikePlatfromer</AssemblyName>
<FileAlignment>512</FileAlignment>
<MonoGamePlatform>DesktopGL</MonoGamePlatform>
<MonoGamePlatform>WindowsGL</MonoGamePlatform>
<MonoGameInstallDirectory Condition=" '$(OS)' != 'Unix' ">$(MSBuildProgramFiles32)</MonoGameInstallDirectory>
<MonoGameInstallDirectory Condition=" '$(OS)' == 'Unix' ">$(MSBuildExtensionsPath)</MonoGameInstallDirectory>
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
Expand Down Expand Up @@ -66,27 +66,27 @@
</Compile>
</ItemGroup>
<ItemGroup>
<Reference Include="DebugView MonoGame">
<HintPath>C:\Users\Jan-Eric\Documents\GitHub\MonoGame_2DPlatformer\Libs\Release\DebugView MonoGame.dll</HintPath>
<Reference Include="FarseerPhysics.Portable, Version=3.5.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>packages\FarseerPhysics.Portable.3.5.1\lib\portable-net4+sl4+wp8+win8\FarseerPhysics.Portable.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="FarseerPhysics MonoGame">
<HintPath>C:\Users\Jan-Eric\Documents\GitHub\MonoGame_2DPlatformer\Libs\Release\FarseerPhysics MonoGame.dll</HintPath>
<Reference Include="MonoGame.Framework, Version=3.4.0.459, Culture=neutral, processorArchitecture=MSIL">
<HintPath>packages\MonoGame.Framework.WindowsGL.3.4.0.459\lib\net40\MonoGame.Framework.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="OpenTK">
<HintPath>$(MonoGameInstallDirectory)\MonoGame\v3.0\Assemblies\DesktopGL\OpenTK.dll</HintPath>
</Reference>
<Reference Include="NVorbis">
<HintPath>$(MonoGameInstallDirectory)\MonoGame\v3.0\Assemblies\DesktopGL\NVorbis.dll</HintPath>
</Reference>
<Reference Include="MonoGame.Framework">
<HintPath>$(MonoGameInstallDirectory)\MonoGame\v3.0\Assemblies\DesktopGL\MonoGame.Framework.dll</HintPath>
<Reference Include="OpenTK, Version=1.1.0.0, Culture=neutral, PublicKeyToken=bad199fe84eb3df4, processorArchitecture=MSIL">
<HintPath>packages\MonoGame.Framework.WindowsGL.3.4.0.459\lib\net40\OpenTK.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System" />
<Reference Include="System.Windows.Forms" />
<Reference Include="System.Xml" />
<Reference Include="System.Xml.Linq" />
</ItemGroup>
<ItemGroup>
<Content Include="Content\Levels\map.xml">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="Icon.ico" />
<Content Include="OpenTK.dll.config">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
Expand All @@ -100,6 +100,7 @@
</ItemGroup>
<ItemGroup>
<None Include="app.config" />
<None Include="packages.config" />
<None Include="Properties\Settings.settings">
<Generator>SettingsSingleFileGenerator</Generator>
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
Expand Down
5 changes: 5 additions & 0 deletions packages.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="FarseerPhysics.Portable" version="3.5.1" targetFramework="net45" />
<package id="MonoGame.Framework.WindowsGL" version="3.4.0.459" targetFramework="net45" />
</packages>