Game Development Community

torque x 2D pro extension

by David Horn · in Torque X 2D · 08/15/2009 (10:28 am) · 10 replies

If I add a new function to the C:Program FilesGarageGamesTorque X 2D Pro 3.0v3.0.0.0Torque2DT2DT2DShape3D.cs
do I need to do anything to have my game recognize the new function?

Do I have to create a new dll file?

#1
08/16/2009 (1:54 pm)
Hey David,

It depends on how your game is referencing the dll that T2DShape3D is a part of in Visual Studio. If you have a project reference, then you shouldn't have to re-compile the project for your game to recognize the changes.

On the other hand, if your game is referencing this dll directly then you'll have to re-compile the project to create a new dll with your changes.
#2
08/16/2009 (4:25 pm)
How do I tell?

In my code, I have
using GarageGames.Torque.T2D;
using GarageGames.Torque.TS;

And in my Solution explorer, under the references, when I click on the GarageGames.TorqueX.Framework, the path says:

C:\Program Files\Common Files\GarageGames\Torque X\v3.0.0.0\References\x86\GarageGames.TorqueX.Framework.dll

GarageGames.TorqueX.Framework2D's path says

C:\Program Files\Common Files\GarageGames\Torque X\v3.0.0.0\References\x86\GarageGames.TorqueX.Framework2D.dll

#3
08/16/2009 (6:37 pm)
Quote:How do I tell?

There might be an easier way, but the only way I know how to tell between the two is to open up the *.csproj file that represents your project.

Inside the Xml file, project references will looks like this:

<ProjectReference Include="..\..\TorqueCore\TorqueCore.csproj">
      <Project>{89D2513D-3889-471E-806E-B160E65C844C}</Project>
      <Name>TorqueCore</Name>
    </ProjectReference>

And direct dll references will looks like this:

<Reference Include="Microsoft.Xna.Framework, Version=3.1.0.0, Culture=neutral, PublicKeyToken=6d5c3888ef60e27d, processorArchitecture=x86" />
    <Reference Include="Microsoft.Xna.Framework.Game, Version=3.1.0.0, Culture=neutral, PublicKeyToken=6d5c3888ef60e27d, processorArchitecture=x86" />
    <Reference Include="mscorlib">

When you added your references if you have never used the Project tab, then you most likely have direct dll references in your project(s).
#4
08/17/2009 (1:48 pm)
I think it's the latter. dll.
<ItemGroup>
    <Reference Include="GarageGames.TorqueX.Framework2D, Version=3.0.0.0" />
    <Reference Include="GarageGames.TorqueX.Framework, Version=3.0.0.0" />
    <Reference Include="System.Data" />
    <Reference Include="System.Xml" />
  </ItemGroup>

So can I change it so that I can put the core and 2D folders next to the project and have it reference them instead?
#5
08/17/2009 (7:32 pm)
Hey David,

Yeah you can copy them close to your other project if you like. Then add the projects to the same solution as your other project. And then when you finally re-add your references, click the Projects tab and select the project you wish to reference. Make sure you don't have any circular references, as it won't let you add any projects that create a circular reference.
#6
08/19/2009 (9:48 pm)
I did that and everything works perfectly fine.

However, when I go to debug on the Xbox, I get the following errors:

Error	20	Metadata file 'C:\AW\ArcadeWrestling\ArcadeWrestling\TorqueCore\bin\Xbox 360\Debug\GarageGames.TorqueX.Framework.dll' could not be found	Xbox 360 Copy of Game

Error	21	Metadata file 'C:\AW\ArcadeWrestling\ArcadeWrestling\Torque2D\bin\Xbox 360\Debug\GarageGames.TorqueX.Framework2D.dll' could not be found	Xbox 360 Copy of Game



Any idea why that would be?
Again, it works fine on Windows.




#7
08/19/2009 (11:21 pm)
Hey David,

I vaguely remember having this issue. I believe you need to copy the Xbox 360 projects over also and when you make your Xbox 360 copy of your game you will need to remove the remove the Windows TorqueX project references and add the 360 ones.
#8
08/20/2009 (9:17 am)
So strange.

I did exactly that.

I even just now started again. I deleted my xbox copy, made a new copy. This time, since the xbox versions of the core and the 2D were already there, it automatically added them. I ran it - same problem trying to debug on the xbox. so i deleted the references and added them manually. same thing.

Now I looked in the 'C:\AW\ArcadeWrestling\ArcadeWrestling\Torque2D\bin\Xbox 360\Debug\GarageGames.TorqueX.Framework2D.dll' folder and there are no dll files there. in the windows version, there are. would that have anything to do with it? Or would it be that I'm trying to debug on the xbox?
#9
08/21/2009 (8:40 am)
Hey David,

In the configuration manager have you set the Xbox 360 projects to build under the Xbox360 platform and not something like x86?
#10
08/21/2009 (10:16 am)
The strange thing is, now when I debug, I get TONS of red underlines as if it can't find a resource. However it does run on the Xbox. So I guess I'll just monitor it.