Game Development Community

Torque X without XML - myschema.txschema

by Greg Smith · in Torque X 2D · 08/07/2008 (12:50 pm) · 6 replies

Hi folks

does anybody have a template or an example of using TX without the XML file..
I dont want to code in XML :(


// load our scene objects from XML. Torque X is designed to load game data from XML, but this is not strictly required;
// anything in an XML file can also be created manually in C# code. The SceneLoader is provided by TorqueGame and can be
// used to load and unload XML files.

i want to do so... i dont want to use the xml file...
how do i have to start?

#1
08/07/2008 (7:43 pm)
Hey Greg, we've accomplished a lot with as little xml as possible but still rely on a simple scene file that loads the camera

I'll add to this thread with hopefully some useful code regarding this, I'll also try to make a tutorial for it
#2
08/07/2008 (8:21 pm)
@David

Were you able to incorporate the physics states without using XML? I too like to go through code for everything rather than XML, and noticed that there is a property called _xmlstates that is loaded to upon deserialization for the scene file. I was not able to through code create a groundcontrol component and add it to an object.
#3
08/07/2008 (11:40 pm)
@David,

perhaps you can make a tutorial how to
-load a sprite
-scale it
-add physics
-using tilelayer
-...
without using XML.
#4
08/08/2008 (5:01 am)
I can't do it today, but I'll be able to post code snippets, a full tutorial would be a bit much, but I'll show you the parts necessary for 1) initializing a scene with a barebones file 2) loading a sprite and 3) adding physics

haven't used the tile layer yet
#5
08/08/2008 (5:38 am)
Sounds great..

:)

thanks in advance
#6
08/16/2008 (10:45 am)
Hey,any news about this here?

thanks