Game Development Community

problem to execute the very first project

by Eric FELGINES · in Torque X 3D · 11/07/2009 (2:05 pm) · 6 replies

Greetings,

I've just installed TX3D PRO after XNA 3.1 and VS2008 Pro and DirectX SDK March 2009

I just tried to create my first project from your VS2008 template Starter Game 3D (3.1) Pro

The build gave some warnings without errors.

Here is the problem I get on execution :

www.apportmedia.fr/erreur1.jpg
and inside the source code when I cancel the execution :

www.apportmedia.fr/erreur2.jpg
Do you have any idea what's wrong with my configuration ?

Thanks for your help.

Cheers ;-)

Eric

About the author

Recent Threads


#1
11/07/2009 (4:38 pm)
What you need is a Camera in your XML

<TorqueObject type="GarageGames.Torque.Core.TorqueObject" name="Camera">
<Components>
<CameraComponent type="GarageGames.Torque.T3D.T3DCameraComponent" name="CameraComponent" />
<T3DSceneComponent type="GarageGames.Torque.T3D.T3DSceneComponent" name="">
<Position>
<X>887.3721</X>
<Y>719.3167</Y>
<Z>239.6099</Z>
</Position>
</T3DSceneComponent>
</Components>
</TorqueObject>


Add that as a Torque Object. Then in your Code in Game.BeginRun():

camera = TorqueObjectDatabase.Instance.FindObject<T3DCameraComponent>("CameraComponent");
sceneView.Camera = camera;

It sounds like something along that line is broken, make sure both the camera is created in XML, and then that it is assigned on game initialization.

Edit: Just taking a quick look at it again, If you are doing a first person perspective, you can actually just add the Camera Component to an existing object in your scene; it doesn't have to be it's own Torque Object.
#2
11/08/2009 (10:23 am)
Thanks for your reply.
I verified my levelData.txscene file and the camera was clearly declared, but as a FreeCameraComponent rather than a T3DCameraComponent.

Anymway, I copied and paste your post inside my xml file, and changed my camera declaration in Game.cs file with a T3DCameraComponent too.

Unfortunately, I got the same result.
It seems to crash inside the OnRender function from GUISceneview.cs

I would like to focus you (may be I'm wrong) on some "Ignoring List subelement" lines when the execution process loads the XML file...
Just because these lines talks about camera, scenegraph...

Here is again some of my output which looks like the same than before :

...
Torque X engine component initialized.

Loading from XML: datalevelslevelData.txscene
Ignoring List subelement 'SceneGraph': no default type mapping, no type attribute, and list type 'System.Object' is not instantiable
Ignoring List subelement 'RigidManager': no default type mapping, no type attribute, and list type 'System.Object' is not instantiable
Ignoring List subelement 'Sky': no default type mapping, no type attribute, and list type 'System.Object' is not instantiable
Ignoring List subelement 'CameraComponent': no default type mapping, no type attribute, and list type 'GarageGames.Torque.Core.TorqueComponent' is not instantiable
Ignoring List subelement 'T3DSceneComponent': no default type mapping, no type attribute, and list type 'GarageGames.Torque.Core.TorqueComponent' is not instantiable
Ignoring List subelement 'Terrain': no default type mapping, no type attribute, and list type 'System.Object' is not instantiable
Took 31'Game.exe' (Managé) : 'D:ProjectsStarter Game 3D (3.1) Pro1Starter Game 3D (3.1) Pro1Gamebinx86DebugTorque3D.dll' chargé, symboles chargés.
ms to load.
'Game.exe' (Managé) : 'C:WindowsassemblyGAC_MSILSystem.Configuration2.0.0.0__b03f5f7f11d50a3aSystem.Configuration.dll' chargé
'Game.exe' (Managé) : 'C:WindowsassemblyGAC_MSILSystem.resources2.0.0.0_fr_b77a5c561934e089System.resources.dll' chargé
---- ÉCHEC DE L'ASSERTION DE DÉBOGAGE----
---- Message court d'assertion ----
GUISceneView.OnRender - No ISceneCamera object found: cannot view a scene without a camera!
---- Message long d'assertion ----
#3
11/08/2009 (2:22 pm)
Yeah If I remember, the FreeCamera was a version of T3D Camera in the demo.

It looks like it's ignoring the everything created, except maybe a player if he exists. That definitly seems like a good place to start on why it's not working.

It's either missing definitions of these objects, or possibly the XML is missing some early lines.

Are you calling Base.BeginRun() in game.BeginRun() before loading your scenes? Your right it's not the camera itself, that's just the first hitch, but rather it doesn't have the object types.

Your MySchema.txschema (In the Root directory of your project) should be exported upon the first build, and that holds the type definitions, that currently are lacking. If you can't get the TxSchema to work I can give you the one I've got, but it would take substantial editting, as it's got my classes defined in it as well.
#4
11/08/2009 (3:21 pm)
It seems I got everything fine. I don't understand yet.

Are you 3.1 or 3.0 ?

I'm 3.1 and may be this is the problem.
I should try to reinstall everything in 3.0
all the documentation speaks about 3.0 examples.

what do you think about that ?
#5
11/08/2009 (4:22 pm)
No, I'm using 3.1 at the moment, along with XNA redistributable 3.1.

You may have to step through until you find where it is getting the Data Types from, because for some reason its missing it's deserializer type definitions.
#6
11/10/2009 (8:57 pm)
never mind.
It works now, it seems I just needed SP1 for VS2008.

Regards.
Eric