Game Development Community

Codeonce

by Jason Ravencroft · in Torque Game Builder · 01/07/2008 (10:46 am) · 5 replies

On the TGB Product page, it states that you can code in TGB and use it in TGE or something to that extend.

Quote:
CodeOnce in TorqueScript, then run your game on PC, OSX, or even XBox360 (with separate license)... or bring your game into other Torque products, such as TGE or TGEA.

Has anybody actually done this?

#1
01/07/2008 (11:59 am)
The CodeOnce feature is because TGE/A/B all use TorqueScript. All of your game logic can be programmed there. For example, a good a* pathfinding algorithm in TGB could be used and extended into 3D inside of TGE/A with minimal change if you use TorqueScript. Features that are not available in the engines (such as TGE terrain functionality that is not a part of TGB) will not be accessible, however. You have to match featureset.
#2
01/07/2008 (12:05 pm)
Yeah, I figured as much.

I've never bothered with trying it, I just assumed I'd get a ton of errors. At some point, I considered porting a 2D game to 3D and just keeping a lot of the classes with modification. Mostly, curiosity has me wondering how much has been directly tossed into another and how much worked.
#3
01/11/2008 (4:54 am)
You can import your torque game builder games as 2d 'windows' inside a TGE game. You could play them on mac osx if the game logic code leads to exactly the same game in the mac osx version of TGB, which it should...

I don't know about Xbox 360, as I thought that you had to use TorqueX for that and it uses a different language than torquescript, I have zero real knowledge of this though so take this sentence with a grain of salt.
#4
01/11/2008 (6:16 am)
Has that worked for you, Jacob? My current project is rules-based, so I was just going to redo a lot of the camera and display work, but keep much of the rules if I move it to TGE.
#5
01/11/2008 (7:26 am)
The codebase for TGB has made it much more difficult to integrate directly into TGE. It used to be a direct project import solution. Now it is much more complex.

On the 360 front, if you are developing in TorqueX, then you cannot use any TorqueScript. But if you are developing using Torque 360, you can. I do not know if TGB has been ported to the 360 XDK.