First Impression and Concerns
by Rainer Deyke · in Torque Game Builder · 08/13/2005 (6:31 pm) · 10 replies
I bought the Torque2D engine, and now I'm contemplating if I want to stick to my old 2D engine, switch to Torque2D, or somehow merge the two. On the plus side, Torque2D is mostly complete and has a lot of important features that I haven't gotten around to implementing for my own engine yet, as well as lots of cool features that I wouldn't have thought of myself. On the other hand... well, here is a list of some of the concerns I have about using Torque2D:
The documentation is woefully inadequate. In many cases, I don't know where to look to see if the engine even contains a certain feature, much less how to use it.
The scripting language is a horrible mess. I'm still trying to decide if it's a usable or unusable mess. Specific concerns:
- No real arrays that can be copied, passed as parameters, etc.?
- No way to define new classes at the scripting level?
Internationalization support: is there any? Specifically:
- Unicode text rendering
- Load text strings from language-specific resource file (where the language is selectable at runtime)
- Substitute real values for placeholder token in the strings
T2D doesn't seem to support pixel-accurate position of objects.
Does T2D have gamepad support?
I haven't investigated the serialization system in any detail. How much work is it to use it? How efficient is it? Will saved games be compatible with new version of the game? Will they work across different platforms?
How efficient is the whole thing, in terms of memory usage, CPU usage, GPU usage, and hard drive usage?
Does the simulation code run at a fixed rate or variable rate?
The documentation is woefully inadequate. In many cases, I don't know where to look to see if the engine even contains a certain feature, much less how to use it.
The scripting language is a horrible mess. I'm still trying to decide if it's a usable or unusable mess. Specific concerns:
- No real arrays that can be copied, passed as parameters, etc.?
- No way to define new classes at the scripting level?
Internationalization support: is there any? Specifically:
- Unicode text rendering
- Load text strings from language-specific resource file (where the language is selectable at runtime)
- Substitute real values for placeholder token in the strings
T2D doesn't seem to support pixel-accurate position of objects.
Does T2D have gamepad support?
I haven't investigated the serialization system in any detail. How much work is it to use it? How efficient is it? Will saved games be compatible with new version of the game? Will they work across different platforms?
How efficient is the whole thing, in terms of memory usage, CPU usage, GPU usage, and hard drive usage?
Does the simulation code run at a fixed rate or variable rate?
#2
you can use C++ instead of TorqueScript, or a few other 'conversion' projects exist, such as a T2D Python, or T2D.NET (i am writing t2d.net so dont ask me to objectivly compare what i think is best)
I do know however that a majority of the issues you raised are currently being worked on, and the next version of T2D should go a long way to address a lot of these issues. (but i dont know when it will be released, just soon)
For your question about simulation run speeds, it is variable, with a max of 300fps. (obtained from someone else's post)
08/13/2005 (7:29 pm)
All valid concerns, and for the most part, i think most of thse are still "open issues"you can use C++ instead of TorqueScript, or a few other 'conversion' projects exist, such as a T2D Python, or T2D.NET (i am writing t2d.net so dont ask me to objectivly compare what i think is best)
I do know however that a majority of the issues you raised are currently being worked on, and the next version of T2D should go a long way to address a lot of these issues. (but i dont know when it will be released, just soon)
For your question about simulation run speeds, it is variable, with a max of 300fps. (obtained from someone else's post)
#3
No offense but I agree with the OP to a point. The script is so close to C/C++ that I wonder what the benefits are compared to writing pure C++. In any case, TorqueScript is more efficiant for client<->server traffic which is nice for some games. I wouldn't remove it from the engine, but I prefer to do my game logic in Lua. Someone's making a Python wrapper, and another is developing a .NET wrapper. So we have alternatives if you really hate the script that much ;)
Plus (the obligitory answer to every complaint :o )
"it's still an Early Adoptor version, there are updates planned...so stay tuned!!!"
08/13/2005 (10:49 pm)
I also have my own 2D framework which I worked on for YEARS, but still is incomplete. I always wonder if I could make it useable in the same time it takes me to learn T2D, but I doubt it.No offense but I agree with the OP to a point. The script is so close to C/C++ that I wonder what the benefits are compared to writing pure C++. In any case, TorqueScript is more efficiant for client<->server traffic which is nice for some games. I wouldn't remove it from the engine, but I prefer to do my game logic in Lua. Someone's making a Python wrapper, and another is developing a .NET wrapper. So we have alternatives if you really hate the script that much ;)
Plus (the obligitory answer to every complaint :o )
"it's still an Early Adoptor version, there are updates planned...so stay tuned!!!"
#4
here:
http://www.garagegames.com/index.php?sec=mg&mod=resource&page=view&qid=6662
hope that helps you out a little :)
08/13/2005 (11:13 pm)
Actually, there was a resource here on GG that allows you to pass arrays in TS.here:
http://www.garagegames.com/index.php?sec=mg&mod=resource&page=view&qid=6662
hope that helps you out a little :)
#5
T2D is in EA so documentation is probably the last thing that will be worked on. Theres little point documenting what might change prior to release. That said, the existing reference docs give you all the information you need to get started, the rest can be gleaned by looking at the t2d source if you really need to.
With TDN coming in the future as well as ( I assume ) more documentation when T2D goes into final release, I think the documentation will be fine. Also don't discount the community submitted resources and forums which will hopefully (especially with TDN) pickup where the official docs leave off.
That was my first impression as well until I got used to the language. Arrays in TScript are not real arrays which is why you cannot pass them by default, however there is nothing stopping you embedding the array inside a scriptObject which is fully passable.
Class wise, you have a tscript namespace way to do this which allows up to 3 levels of namespaces. Theres several posts that cover this as well as the official tge script docs (if you have access). If not search the forums I'm sure there are posts about the namespaces. If this isn't enough you can add in full OO support with a bit of hacking using Bryan Edds OO resource. Although so far I've not found a need for more than a few levels of namespaces.
Loading a seperate languge file could be as simple as putting all your localised string into a english.cs french.cs german.cs file.Then just exec the appropriate file. All the global vars will have the same name in each file, so you just have to make sure you only exec the language you want.
Subsituting real values for placeholders could be done in many ways depending upon the final purpose. You can use strReplace to replace placeholders such as %1 and %2 in strings with other strings. Which could with a bit of leg work be made into a simple localisation system.
unicode wise, no idea.
Continued next post.. went over the post limit :P
08/14/2005 (6:20 am)
Quote:
The documentation is woefully inadequate. In many cases, I don't know where to look to see if the engine even contains a certain feature, much less how to use it.
T2D is in EA so documentation is probably the last thing that will be worked on. Theres little point documenting what might change prior to release. That said, the existing reference docs give you all the information you need to get started, the rest can be gleaned by looking at the t2d source if you really need to.
With TDN coming in the future as well as ( I assume ) more documentation when T2D goes into final release, I think the documentation will be fine. Also don't discount the community submitted resources and forums which will hopefully (especially with TDN) pickup where the official docs leave off.
Quote:
The scripting language is a horrible mess. I'm still trying to decide if it's a usable or unusable mess. Specific concerns:
- No real arrays that can be copied, passed as parameters, etc.?
- No way to define new classes at the scripting level?
That was my first impression as well until I got used to the language. Arrays in TScript are not real arrays which is why you cannot pass them by default, however there is nothing stopping you embedding the array inside a scriptObject which is fully passable.
%myobj = new ScriptObject(); %myobj.somearray[0] = 2; %myobj.somearray[1] = "hello"; %myobj.somearray[2] = "test"; mycustomplayer.somefunction( %myobj ); ...etc...
Class wise, you have a tscript namespace way to do this which allows up to 3 levels of namespaces. Theres several posts that cover this as well as the official tge script docs (if you have access). If not search the forums I'm sure there are posts about the namespaces. If this isn't enough you can add in full OO support with a bit of hacking using Bryan Edds OO resource. Although so far I've not found a need for more than a few levels of namespaces.
Quote:
Internationalization support: is there any? Specifically:
- Unicode text rendering
- Load text strings from language-specific resource file (where the language is selectable at runtime)
- Substitute real values for placeholder token in the strings
Loading a seperate languge file could be as simple as putting all your localised string into a english.cs french.cs german.cs file.Then just exec the appropriate file. All the global vars will have the same name in each file, so you just have to make sure you only exec the language you want.
Subsituting real values for placeholders could be done in many ways depending upon the final purpose. You can use strReplace to replace placeholders such as %1 and %2 in strings with other strings. Which could with a bit of leg work be made into a simple localisation system.
unicode wise, no idea.
Quote:This was probably a design choice.there is a lot of benefit to having an abstract coordinate system that T2D uses rather than relying on a pixel level. Then again, if you know the user is running in 800x600 and you set your world size to be 800x600 then you effectivly have pixel level positioning, T2D gives you the choice between abstract coordinates or pixel, you just need to set it up.
T2D doesn't seem to support pixel-accurate position of objects.
Continued next post.. went over the post limit :P
#6
Theres a resource that covers what is needed to get gamepads working in TGE and I assume this will also apply to T2D. Although if you only have t2d you may not have access to this, but I'm sure someone could post the relevant info.
I've not looked into this at all, so really I've no idea.
Again I'll leave this question to someone else who's done some real tests.
If you have time, try to read through the posts in the T2D forums especially some of the earlier ones as a lot of people will have had similar questions as you, and you may find a more official response in there.
08/14/2005 (6:26 am)
Quote:
Does T2D have gamepad support?
Theres a resource that covers what is needed to get gamepads working in TGE and I assume this will also apply to T2D. Although if you only have t2d you may not have access to this, but I'm sure someone could post the relevant info.
Quote:
I haven't investigated the serialization system in any detail. How much work is it to use it? How efficient is it? Will saved games be compatible with new version of the game? Will they work across different platforms?
I've not looked into this at all, so really I've no idea.
Quote:
How efficient is the whole thing, in terms of memory usage, CPU usage, GPU usage, and hard drive usage?
Does the simulation code run at a fixed rate or variable rate?
Again I'll leave this question to someone else who's done some real tests.
If you have time, try to read through the posts in the T2D forums especially some of the earlier ones as a lot of people will have had similar questions as you, and you may find a more official response in there.
#7
08/14/2005 (12:54 pm)
Quote:Although if you only have t2d you may not have access to this...That resource is accessible to the public AFAIK, and someone recently posted some script code to use joysticks with T2D.
#8
I did some casual performance stress tests with the current early adopter version, and the "perf" numbers (whatever that means) can/should be improved before leaving Early Adopter status.
08/14/2005 (1:06 pm)
Quote:How efficient is the whole thing, in terms of memory usage, CPU usage, GPU usage, and hard drive usage?
I did some casual performance stress tests with the current early adopter version, and the "perf" numbers (whatever that means) can/should be improved before leaving Early Adopter status.
#9
08/16/2005 (7:15 am)
The way I've gotten things done so far is by using the TGE documentation, the console commands list, and for T2D specific stuff, the docs that came with it. I can find most stuff in one of those resources :)
#10
-Peter
08/16/2005 (1:04 pm)
I've found torque script to be a dream come true. For instance to add life to a spirte I don't have to make a class or a struct or mess with a header file. I just need to write sprite.life and it has life. Torque script only suffers from being simple. If you've programmed with C++ for a long time you might expect certain things to be difficult. The longer I work with torque script the more I discover that I've been making things a lot harder than they need to be. I was worried about pixel perfection when I started, but now I just make my graphics any size I want and shrik/grow them in the game. No worries. This is how game making should be.-Peter
Torque Owner Alex Rice
Default Studio Name
However, you should definitely read the .plans for Melv May, Matthew Langley, and Josh Williams. Melv details many of the many, vast, improvements coming up in the next T2D release which also includes a new object serialization, new collision detection modes, and new documentation.
Do you have access to the Torquescript documentation that comes with TGE?
www.garagegames.com/docs/tge/general/index.php
After the new TDN (torque developer network) is finished, I guess there will be more quality documentation for Torquescript and T2D.
It supports the world position, which I guess could be more or less accurate than a pixel position, depending on the size of your world? Not sure...
Actually, it is not :-) ... In defence of torquescript it is highly dynamic (like Perl or Python for instance) but at the same time allows access deep into the C++ core of Torque (TGE, T2D, and TSE all use the same scripting language). It is designed from the ground up specifically for Torque. So things like datablocks, classes, instances, strings, which at first seem like a horrible mess, really are carefully designed for a low-latency client-server environment. TGE and TSE are client-server to the core, and eventually T2D will be as well, basically giving you multiplayer support for free if you want to use it.
I don't think it has that , but it wouldn't be hard to write your own format() or sprintf() type of function I guess.
It has real useful multidimensional arrays, but AFAIK there is no explicit array copying by assignment :-( Not being able to pass arrays into functions, unless I am missing something huge here, I think that is a limitation of torquescript functions in general they they don't support passing parameters by reference, only by value. The torquescript manual says "Parameters are passed by-value and by-reference." but does not elaborate about what it means by-reference.
Actually there is and its very convenient as much for datablocks, C++ objects, and script objects:
// In TorqueScript %var = new ObjectType(Name : CopySource, arg0, ..., argn) { <datablock = DatablockIdentifier;> [existing_field0 = InitialValue0;] ... [existing_fieldM = InitialValueM;] [dynamic_field0 = InitialValue0;] ... [dynamic_fieldN = InitialValueN;] }; e.g. $example_object = new SimObject(MyThing) { a_new_field = "Hello world!"; }; doItWith(myThing.a_new_field );I cannot say enough good things about T2D, the Garagegames community, and the value; the bang-for-the buck that is T2D.
Also check out Gold Fever for a very polished looking game developed with the 1.0 version of T2D, with very little help from the GG crew, apparently. I bought a license www.garagegames.com/news/8206