Game Development Community

Frustrated with the documentation :(

by FruitBatInShades · in Torque X 2D · 11/16/2009 (5:12 pm) · 3 replies

I can't seem to find the information I need to find. It's like the core concepts aren't in the documentation. I've read through Torque X Core and Torque X 2d documentation, gone through all the examples and am still no closer to:

1. Understanding the scene graph
2. How objects get rendered
3. How to populate the torque object database from the objects in the scene. It's always empty.

Does anyone have a copy of the image that should be on this page, the image url is incorrect.

http://docs.garagegames.com/torquex/official/content/documentation/TorqueX%20Core/Concepts/Object%20Hierarchy.html#HeaderLink0

I see these a lot in the demo's but how do they get in the render pipeline? Are they pulled from their name (auto-magically)
public T2DSceneObject SceneObject
        {
            get { return Owner as T2DSceneObject; }
        }
        public T2DAnimatedSprite AnimatedSprite
        {
            get { return Owner as T2DAnimatedSprite; }
        }

I could do with a few examples or links to the relevant bit of documentation with conceptual explanations. Examples such as:

Create a component that renders a static sprite.
Create a component that renders an animated sprite.
Create a component that renders an animated sprite and changes between animations.
Create a component that adds link-points and attaches other objects from the scene graph.

I see all this going on in the demo's but just can't get the underlying methodology. I'm sure its simple once you get it but the tutorials don't fully explain what's going on.

Any help or links to the higher level documentation most gratefully recieved :)


#1
11/16/2009 (5:13 pm)
Just to point out I'm frustrated with myself, not the system (which is great)
#2
11/16/2009 (6:09 pm)
What you're actually looking for is *lower* level documentation :)

As you've discovered TX abstracts a lot of the low level work so you don't have to worry about it. You don't have to know how animations are rendered - you just need to know how to use T2DAnimatedSprite and so forth. That's the whole idea though - you can make games without needing to handle the rendering pipeline or scenegraph yourself (which is especially useful for quick prototyping of game concepts).

For a lot of people this will be just fine. If you want to delve deeper then you'll need to start examining the source for yourself. If you can't understand the source then you probably shouldn't be messing with engine internals anyway though.


Regarding the TorqueObjectDatabase always being empty? It's not empty - when you load a scene that is where the objects are registered. In fact, scene objects have to be registered to be able to appear on the screen. The database provides a range of methods for getting objects from it if you need to. A common use is to get a named object:

TorqueObjectDatabase.Instance.FindObject<T2DStaticSprite>("myBadAssSprite");
#3
11/18/2009 (6:31 am)
Docs? There isn't any, it's just a list of methods and properties with no explanations.

It works fine but you need to dig the examples and starter kits to understand how it works and how to do what you want, you'll not find any answers in the docs.

In this forum I see that they just not answer to newbies, so if you have specific questions (not that general as in here) I'll do my best to help you out (I'm a newbie as well, dragging myself out of the hole).

Cheers,
Pino