TorqueX/Platformer20Update

From TDN


Contents

Introduction


Hello everyone! In this tutorial, I will teach you guys how to upgrade the platformer kit for Torque X to Torque X 2.0. I'll try to be as clear as possible but if you have a problem feel free to contact me and I'll work with you personally to ensure that your problem is solved.

Materials Needed

- Torque X 1.0.5.1 - Version 1.0 of Torque X. Please remove Torque X 2.0 for right now.
- Platformer Starter Kit
- Torque X 2.0 Install - Have this ready to go so you can run it.
- XNA 1.0 Refresh - Needed for Torque X 1.0.5.1 to install.

Uninstalling/Installing the needed stuff


Follow these instructions to install all the necessary stuff to get started (Make sure you have XNA Refresh 1.0 and XNA 2.0 installed).

1. Uninstall Torque X 2.0 (Only do this if you have it installed).
2. Install Torque X 1.0.5.1
3. Install Platformer Starter Kit

Upgrading the Platformer Starter Kit to Torque X 2.0


Now comes the fun part, upgrading the platformer starter kit to 2.0! Follow these steps.

1. Go to the directory where you install the platformer starter kit (Mine would be C:\Program Files\GarageGames\Torque X Platformer Kit\v1.0.5.1\)
2. Open Visual C# Express 2005 and create a new Platformer Demo project. Remember where you created the project.
3. Uninstall the platformer starter kit and Torque X 1.0.5.1
4. Install Torque X 2.0
5. Open up the project you created in step 2.
6. First we will upgrade the Platformer Framework project. If you extend the references you'll see that there is a exclamation mark in a yellow sign next to GarageGames.TorqueX.Framework. Right click on that and choose Remove.
7. Now right click on References and click Add New Refrence. Choose browse and then go to the directory where the TankBuster Demo is located. You need to get that dll from there or from any other demo. Mine for example would be C:\Program Files\GarageGames\Torque X 2.0 for XNA Creators Club\v2.0.0.0\Demos\TankBuster\bin\x86\Debug
8. Once you have added that reference added remove both Microsoft.Xna.Framework and Microsoft.Xna.Framework.Game references and the 2.0 versions of those.
9. Now build the Platformer Framework project. You'll get some errors.
10. Open up LadderComponent.cs. We need to make some changes to the code.
11. In this block of code

    [TorqueXmlSchemaType]
    [TorqueXmlSchemaField(Name = "Enabled", Export = false)]
    [TorqueXmlSchemaField(Name = "CollidesWith", Export = false)]
    [TorqueXmlSchemaField(Name = "OnEnter", Export = false)]
    [TorqueXmlSchemaField(Name = "OnStay", Export = false)]
    [TorqueXmlSchemaField(Name = "OnLeave", Export = false)]


Change it to this:

    [TorqueXmlSchemaType]
    [TorqueXmlSchemaField(Name = "Enabled", ExportField = false)]
    [TorqueXmlSchemaField(Name = "CollidesWith", ExportField = false)]
    [TorqueXmlSchemaField(Name = "OnEnter", ExportField = false)]
    [TorqueXmlSchemaField(Name = "OnStay", ExportField = false)]
    [TorqueXmlSchemaField(Name = "OnLeave", ExportField = false)]


12.

Conclusion

This concludes the upgrade of the platformer starter kit to Torque X 2.0. Hope you enjoyed the tutorial.
If you have any questions you can contact me at bluefoxentertainment (at) gmail (dot) com
--Dro Sarhadian