Game Development Community

Converting txscene objects from TX2D 2.0 to TX2D 3.0

by Talcott Langston · in Torque X 2D · 06/22/2009 (6:45 am) · 5 replies

I've rebuilt my project in VC# 2008 (no problems). I've reloaded my .txscene file in TXB2D 3.0 and saved it (no problems).

However, when I try to run the project I get an exception when the SceenLoader object tries to load the scene. It says it can't load one of the image files (any of the image files- if I remove the offending one, it just pukes on something else). It complains that the resource was compiled with an older version of Torque, so rebuild it in VC# 2008.

I did that, but no luck, so I took a look at the .txscene file, which says it's for TX 2.0- not 3.0. I'm assuming this is a versioning error. Anyone else seen this or know how to get by it?

Thanks,



#1
06/23/2009 (11:33 am)
So- is there anything you need to do to convert your .txscene files from TorqueX 2.0 to TorqueX 3.0?
#2
06/23/2009 (5:06 pm)
@Talcott - The only thing I had to do going from one to the other, was make sure references were updated to the correct version of TX. I never had to mess with the .txscene files. Actually, they shouldn't need modifications as far as I know because TXB2D 2.0 can read .txscene files that have been made with TX3.0 and edited TXB2D 3.0 since it's actually just XML.

Brian
#3
06/26/2009 (6:15 am)
Yeah- that's the odd thing. TXB2D reads it fine- I can open and edit the level data, but when I try to run it from TXB, I get an error stating that the sceneloader couldn't load levelData.txscene because the file GGlogo.png was built with the wrong version of XNA.

Last I checked, .png files weren't compiled. Also, I've removed all references to levelData.txscene and GGlogo.png from my project, rebuilt it, and still get this error.

However, when I try to run from VC# Express 2008, I get a similar, but different error: SceneLoader can't load level1.txscene because SimpleEffect was built with the wrong version of XNA.

I can't find any references to SimpleEffect in the project files and no amount of rebuilding will solve this problem. I've deleted all binaries and rebuild from scratch, no dice. I've also uninstalled XNA 2.0 to make sure there were no conflicts. Still doesn't work.

Anyone have any ideas?
#4
06/26/2009 (9:53 am)
For what it's worth, png files are supposed to be compiled into XNB (XNA Binary) files like all media in the Content folder. If you check the bin output folder, you should see them there. Don't suppose there is something not set right for the media's properties in VS?

Sounds like a pretty involved problem. Something fundamental probably. If nothing else, you could try going around the problem. If you project isn't too big, yet, you could try recreating it from scratch with 3.0 and 2008. At least then, nothing should be created from an old version.

Good luck on this one.

EDIT*** As I look at my project and think about your description, definitely check the properties of your images in Content in VC#2008. It should be set as: Build Action->Compile and Copy to Output Directory->Do Not Copy. If not, that would explain why rebuilding does not help, because it is leaving the old compiled versions in the output folder alone.
#5
06/26/2009 (11:46 am)
Thanks Scott,

Yeah, I checked that the images were set to Do Not Copy, although don't know if they were set to compile. I'll double check that. And I suspect I may have to rebuild my project from scratch. I was just hoping to avoid that.

Cheers,

Tao