Game Development Community

Torque X 3D Update - July 10

by Thomas Buscaglia · in Torque X 2D · 07/10/2007 (6:29 pm) · 65 replies

It's that time again! After nearly a month, it's time for another Torque X 3D community status update. This one will be a little shorter than the first one, but hopefully just as interesting. If you haven't read the previous update, check it out first.

For this update I'll gab on a bit about what I've been working on. Adam will likely be posting soon with an update of his own, so I won't go into too much detail on what he's been up to.

First off, some pretty:

farm2.static.flickr.com/1166/772527983_66666b3485_o.jpg
You might recognize this patchy terrain from the the first update - now with one minor difference: a detail map. I was amazed how much it added to the apparent detail of the terrain. Another thing you might notice in this shot is the distance fog and fullscreen bloom effect. Adam worked on all the postprocessing stuff, so I'll leave it to him to post about that.

The fog can be used to create some pretty neat effects:

farm2.static.flickr.com/1073/773477442_975fa2bf0f_o.jpgfarm2.static.flickr.com/1190/772634523_f91d1b4470_o.jpg

Another major addition that wasn't covered in the last update was the inventory, pickup, and equipment system. Here you can see the new Torque X FPS robot dude holding his flag and gun on a hilltop:

farm2.static.flickr.com/1057/772528125_9d6e32f725_o.jpg
This can now be set up entirely in the scene file with simple interface. As Adam and I have mentioned before, everything is componentised. To give you an idea of exactly what that means (and also just how the inventory and equipment system is manipulated) here's the current player template from our FPS test scene with the inventory component definition expanded and all other component definitions collapsed:

<TorqueObject type="GarageGames.Torque.Core.TorqueObject" name="Player">
	<IsTemplate>true</IsTemplate>
	<Components>
		<ShadowCasterComponent type="GarageGames.Torque.Lighting.BlobShadowCasterComponent">
		<T3DInventoryComponent type="StarterGame.T3DInventoryComponent">
			<ItemDropSceneGroup>PlayerMesh</ItemDropSceneGroup>
			<ItemDropNode>cam</ItemDropNode>
			<ItemDropOffset>
				<X>0</X>
				<Y>2</Y>
				<Z>0</Z>
			</ItemDropOffset>
			<ItemSlots>
				<ItemSlot type="StarterGame.T3DMountedEquippableItemSlot">
					<ItemName>CTFFlag</ItemName>
					<EquipmentTemplate nameRef="FlagTemplate"/>
					<OwnerSceneGroupName>PlayerMesh</OwnerSceneGroupName>
					<OwnerAttachNode>LeftHandEnd</OwnerAttachNode>
					<DroppedObjectTemplate nameRef="FlagPickupTemplate"/>
				</ItemSlot>
				<ItemSlot type="StarterGame.T3DMountedEquippableItemSlot">
					<ItemName>UglyGun</ItemName>
					<EquipmentTemplate nameRef="GunWeaponTemplate"/>
					<OwnerSceneGroupName>PlayerMesh</OwnerSceneGroupName>
					<OwnerAttachNode>Mount0</OwnerAttachNode>
				</ItemSlot>
				<ItemSlot type="StarterGame.T3DMountedEquippableItemSlot">
					<ItemName>UglyGun2</ItemName>
					<EquipmentTemplate nameRef="GunWeaponTemplate2"/>
					<OwnerSceneGroupName>PlayerMesh</OwnerSceneGroupName>
					<OwnerAttachNode>Mount0</OwnerAttachNode>
				</ItemSlot>
			</ItemSlots>
		</T3DInventoryComponent>
		<T3DMountComponent type="GarageGames.Torque.T3D.T3DMountComponent">
		<InputComponent type="StarterGame.FPSPlayerInputComponent">
		<AnimationManager type="GarageGames.Torque.T3D.T3DAnimationComponent">
		<T3DTSRenderComponent type="GarageGames.Torque.T3D.T3DTSRenderComponent">
		<T3DSceneComponent type="GarageGames.Torque.T3D.T3DSceneComponent">
		<ControlComponent type="StarterGame.FPSPlayerControlComponent">
		<RigidComponent type="GarageGames.Torque.T3D.T3DRigidComponent">
		<PlayerCamera type="StarterGame.FPSPlayerCameraComponent">
	</Components>
</TorqueObject>

That's all from me for now. Thanks for reading. ;D

About the author

Formerly GarageGames designer and gameplay/engine programmer of 5 years. Founder and President at Flying Mongoose Labs, Lead Gameplay Engineer and Senior Designer at LumaArcade, head of the Las Vegas chapter of the IGDA.

Page «Previous 1 2 3 4 Last »
#1
07/10/2007 (6:32 pm)
*wipes tear from eye*

Beautiful man, just beautiful.
#2
07/10/2007 (6:43 pm)
This is awesome!
I'm just curious how UI will look like to work with 3d objects. Will there be a significant update to UI as well?
How do you place a 3d object and make an attachment? Is it simple drag an drop and choose attachment node?
Keep the good work.
Thanks.
#3
07/10/2007 (6:57 pm)
@Chris Kim:

The GUI overlays over 3D scene views the same way it does 2D scene views. The scene views are GUI controls themselves, after all.

As for mounting, you specify a TorqueObject or a T3DSceneComponent you want to mount. You can optionally pass a transform name that's looked up via the torque interface system. If a transform is returned by any of the components with a matching name, that's the transform it will mount to. This is extremely handy because the TS render component exposes named transforms for each of it's joints.

The equipment system takes advantage of this fully. You may notice the OwnerAttachNode property on the equipment item slots in the code snippet above. That corresponds to a transform on the owner (the robot). In this case, it's a specific joint (the hand joint). The EquipmentTemplate property seen on the equipment slots corresponds to another TorqueObject that will be cloned and mounted to that slot. On the equipment component there is a similar node property to allow you to specify a transform to line up with the owner attach node (on the guns, for example, this node is the handle of the gun).

Here's one of the gun equipment templates to give you an idea of how it all fits together:

<TorqueObject type="GarageGames.Torque.Core.TorqueObject" name="GunWeaponTemplate">
	<IsTemplate>true</IsTemplate>
	<Components>
		<T3DTSRenderComponent type="GarageGames.Torque.T3D.T3DTSRenderComponent">
		<T3DSceneComponent type="GarageGames.Torque.T3D.T3DSceneComponent">
		<GunWeaponComponent type="StarterGame.GunWeaponComponent">
			<SceneGroupName>WeaponMesh</SceneGroupName>
			<AttachNode>mountPoint</AttachNode>
			<AttackTimeout>5</AttackTimeout>
			<ProjectileTemplate nameRef="Projectile"/>
			<MuzzleNode>muzzlepoint</MuzzleNode>
			<ProjectileMuzzleOffset>
				<X>0</X>
				<Y>0</Y>
				<Z>-0.1</Z>
			</ProjectileMuzzleOffset>
		</GunWeaponComponent>
	</Components>
</TorqueObject>

The handle joint on the gun mesh is named "mountPoint" in this case.

The editor interface for equipment will likely be very similar (text box or possibly a drop-down list) because the templates themselves aren't always mounted. If an equipment item isn't flagged to be preloaded on the owner and it's never been equipped, it's equipment instance won't actually exist yet. It was done that way intentionally to allow for flexibility in loading assets. The interface for normal mounting, however, will probably be straight-forward drag-and-drop.
#4
07/10/2007 (7:08 pm)
I love these 3D updates. It gets me excited thinking someday hopefully in the near future I'll be able to make 3D XBox games with essentially a componentised version of TGE. Can't wait for the first 3D closed Beta.
#5
07/10/2007 (10:31 pm)
The Robot looks sweet! Does he have a name yet? Also, I'm not much of a coder, but If his weapon attachs to his hand node, can the weapon be detached from that node and then attached to say a back node? Just thinking out loud... Keep up the good work!
#6
07/10/2007 (10:35 pm)
@Britt: Yes. In fact, you'd just have to change the OwnerAttachNode of that equipment slot to a spine node and then unequip/re-equip the gun.
#7
07/11/2007 (4:13 am)
Thomas, good work. This is really cool. Now I'm curious as to how seperate or compartmentalized the 3d is from the 2d features and functionality. As in, is it possible to have them both in the same scene view, for a kind of 2d/3d hybrid game? From what I can tell about the engine architecture, I would assume that this will be possible and it is very exciting.

You know what else would be cool? Render to texture to put a 2d scene view in the 3d world. Muahahah! Play your TorqueX 2d game inside the 3d world on a virtual arcade machine.

My second question is related to the feature you explained about the attach node for the handle of the gun. Can we please get this feature for the TorqueX 2d side as well? I know something similar can be done with offsets, but it would be handy for me to have that specific feature you described so I can define the points at design time and hook them together at design time as well.

3d closed beta... drool
#8
07/11/2007 (4:27 am)
Looks fantastic. Cant wait to play around with this, wish i didnt have 10 other things to do at the same time :D


Id like to hear more about the post processing stuff your planning, can someone go give Adam a swift tap on the back of the head? ;)
#9
07/11/2007 (4:39 am)
Wow! Looks just fantastic! More screenshots please:)
#10
07/11/2007 (9:28 am)
Looking great guys, thanks for the update! can't wait to get my hands on this stuff (and stop having to create it my dang self from scratch XNA :P)
#11
07/11/2007 (2:38 pm)
@Kzoink: You should be able to do everything you described. You should be able to overlay multiple 2D and 3D scene views, and rendering a 2D scene to a texture and using that texture as the material for a 3D object should work aswell. The inverse should also work (3D scene rendered to a texture and used as a material for a 2D object ;). As for the attach nodes, that functionality is already present in 2D via link points.

@Josh/Alienforce: Adam is planning to post an update soon.
#12
07/11/2007 (3:18 pm)
Thomas, you mean I can already link an object to another object at the link point of the first object (mount object) using a link point on the second (object to mount) as the reference point in TXB as you are doing with the handle of the gun in this example? If so, how do I do it? I've never discovered a way to do that. I was under the impression you could only take an object and mount it to a link point on the mount and the origin of the mounted object would be placed at the link point on the mount in TXB. I'm sure you can probably do it in code, but I was interested in doing it in TXB at design time.
#13
07/11/2007 (4:14 pm)
Ah, I see what you're saying. Yea, you don't get the link point to link point allignment. That sounds like a very useful feature. I'll bring it up to the tools team.
#14
07/11/2007 (4:47 pm)
Thomas, thank you very much. That will be a very useful feature for the game I am making.
#15
07/13/2007 (6:54 am)
Wow, very nice

*just a noob question...if torque x is in c#.....does that mean no torque script at all? i mean tge and tsea are in c++ and use torque script...then again, i guess thats xna for u
#16
07/13/2007 (7:10 am)
Nope. TorqueX does not have any TorqueScript. It is pure C#.
#17
07/13/2007 (9:13 am)
Please correct me if I'm wrong. The reason for not supporting torque script is C# can support dynamic compilation, thus separate scripting language is not needed. Is this correct? I think one of the key advantage of using script is to recompiling within the game.
Can C# do that too? I'm asking this because I read C# is compilied to native code during runtime.
#18
07/13/2007 (3:02 pm)
Yes, C# is compiled to an intermediate code (MSIL) but if you run a debug build you can break, edit your code, and then continue running from within VS.
#19
07/13/2007 (4:08 pm)
Looking good guys, cannot wait to try it out!

Sean
#20
07/24/2007 (5:51 pm)
What's this TorqueX 3D i hear about at GameFest next month?
Page «Previous 1 2 3 4 Last »