Game Development Community

Torque3D Questions?

by Ryan Zec · in Torque Game Engine Advanced · 02/01/2009 (5:24 pm) · 11 replies

Now I have a few questions about the design goals of the Torque3D Game Engine(I am guessing it is going to be the successor of TGEA) so that is why I am posting it in here(move it if there is a better forum for it).

Now another engine that has always interested me was the Unity3D engine, the demos were very nice, it seems to have very nice editors, and the minimum requirements to run game with it seems pretty low(which is good for indie games IMO).

So my first question is what is the goal for the minimum requirements to run game built with Torque3D?

Next question is what is the plan for scripting, is it going to stay with the proprietary scripting language(TorqueScript) or will they make a move to an existing language like c#(which is one of the languages the Untiy3D supports). I personally think it would be a great idea to use a language like c# as it is a language that is going to be around for a while and there are many on programmers constantly working on it(since microsoft is behind it) which i am sure is not true for TorqueScript(i mean you guys don't have the resources that micosoft has so i would not except it). Is also it makes it easier to get into scripting as a lot of people already know c# and people would not have to learn a proprietary language(and it would work with Mac and Linux under Mono with is how Untiy3D supports it for Mac and Windows).

My last question is, is Torque3D going to be designed for a specific type of game genre(like how TGE.TGEA is designed from the core for a FPS) and if you need to build another game type, like say a RPG, would it require a good amount of core engine modifications(like it currently would in TGEA for a RGP) or could at all be done with scripting(which is actually how the Unity3D engine is designed).

Answers on these questions would be great.
Thanks

#1
02/01/2009 (7:12 pm)
Why on earth would you want C# scripting? It's a nice language for working with .NET, sure, but what possible benefit would there be in using it in place of TorqueScript?

I really don't understand why so many people think it would be a good idea to replace TorqueScript with some other scripting language. I just don't get it. Usually, the only justifications given are that <insert preferred language> is already known by more people, or that it is in some undefined way "more powerful". Neither of those reasons stands up to scrutiny, in my opinion.

Getting into Torque scripting is a bit of a learning curve, sure, but that is mostly due to the way Torque works, i.e client-server architecture, heavy use of datablocks, etc. It would be just as much of a learning curve if it used a language that you already knew. All the functions would do the same things, all the start-up steps would be the same, pretty much everything would be exactly the same. Only the syntax would be slightly different. Wow.

And as far as "power" goes, isn't TorqueScript exactly as powerful as it needs to be? It does the job it was made to do. What more do you need from a game's scripting language? Do you really want a general purpose, un-sandboxed language that can control things outside the game engine? I sure as hell don't, particularly if I intend to let end users script their own mods. And in the case of .NET languages, you also have to consider that your code must be protected in some way so that it cannot be easily decompiled. Does Unity offer a simple way to do that, I wonder?

Certainly, there are some languages, such as GameMonkey, that are specifically designed for game scripting and provide some features of particular usefulness for games. A language like that (or, more specifically, those game-related features) might be pretty cool to have. But all I see are requests for general purpose languages, and I have yet to see any specific claims as to why a different language would be of any benefit whatsoever.
#2
02/02/2009 (10:50 am)
Well i think the biggest reason to use a language like C# is that it is always going to be improving. I mean unless something drastic happens and microsoft goes out of business(and I don't see that happening any time soon), microsoft is always going to be able put more resources into C# than GarageGames could with TorqueScript(I don't think any language is perfect and has no room for improvement).

Also about .NET being easily decompiled, while this might be true, you are acting like it is impossible to decompile C++ code. Grant you it might be easier to do it for a .NET language(and i know it is very very very easy) but there are tools out there that will decompile C++ pretty well and if someone want to get your source code they can find a way to decompile it or other ways to get it(I mean the Source Engine source code was hack right be it was first launched from a virus in a email or something like that).

Scripting language is also not a make or break deal for me, the first and third questions are more important to me.
#3
02/02/2009 (12:16 pm)
Quote:Well i think the biggest reason to use a language like C# is that it is always going to be improving.
But isn't that just another version of the "more power" argument?

And yes, I know that anything can be decompiled, but there's really nothing that can be done to prevent a skilled person from doing that. With .NET languages however, it is so easy that unless you take measures to protect it, your code may as well be open source. The question really is, if an engine allows you to use those languages, are those protective measures still available to you? Can you use any of the common protection tools, or does the engine need to provide the protection itself? My point was simply that it's something that needs to be considered carefully, and I bet that many Unity users never gave it a thought before purchasing.
#4
02/02/2009 (1:42 pm)
"With .NET languages however, it is so easy that unless you take measures to protect it, your code may as well be open source"

With that point of view, if I decompile the Crytek Engine, does that means it is open source? Just because someone decompiles something, that does not automatically remove the copyright of the code. The fight against pirating is and will allows be a futile battle because all it take is for your code to get cracked once(and there is really no way to prevent this, all you can do and maybe prevent it for a few more month if you pour a lot of resources into stopping it) and then everyone else has a super easy time to get access to it. Also what is the big deal if they crack my scripts, I mean the script's code by itself is useless without the engine so now all they have the ability to do it try to modify the game(and some game give you tools to do this anyways)? I mean i think the decompile issue you are talking about is just as trivial to me as the "more powerful" is trivial to you. It is just in the end, I think there is more benefit to using a language that is supported by it own team of developers unless you are a super huge issue that no other language can handle or you have the resources to continuously improve a custom language.
#5
02/02/2009 (2:50 pm)
I think C# is a great language for scripting, or even for full application development. Torque script is good for what it does, but it's clearly not suited for heavy lifting, wheareas C# is. I think would be a great addition. Unfortunately it's also a pretty big project and probably beyond the scope of T3D. Maybe we should start on it as a community project in TGEA (integrating Mono)?
#6
02/02/2009 (4:27 pm)
Quote:With that point of view, if I decompile the Crytek Engine, does that means it is open source? Just because someone decompiles something, that does not automatically remove the copyright of the code.
I think you know full well that I did not mean it like that. I just meant that is hardly different from distributing your source code, and most developers would want avoid that to the extent that it is possible.

Quote:The fight against pirating is and will allows be a futile battle because all it take is for your code to get cracked once(and there is really no way to prevent this, all you can do and maybe prevent it for a few more month if you pour a lot of resources into stopping it)
I agree completely. As I said, the important thing to consider is whether putting an effort into stopping it is even possible. If the engine works OK with code protection in place, then great, there's no problem. If you don't mind letting your source code be seen by anyone with a copy of Reflector, that's fine too. But if you want to hold on to your code, even for a little while, then there must be the option to do that. It's just something that people would need to be aware of, that's all.

Quote:I mean i think the decompile issue you are talking about is just as trivial to me as the "more powerful" is trivial to you
As it happens, I consider this to be the least significant issue in my list. But let me clarify how I feel about the "more powerful" issue. I am not saying that having a more powerful language is unimportant or trivial. What I am saying is that simply claiming that a language is more powerful, or still being actively developed, or anything along those lines, is a very vague and unconvincing argument for change if you can't cite specific features that would improve your ability to make games with Torque. I am saying that it is a bad argument, or least an incomplete one.

Quote:Torque script is good for what it does, but it's clearly not suited for heavy lifting, wheareas C# is.
And this gets directly to the heart of it. Do you really want to be able to do "heavy lifting" in your game scripts, and if so, what sort of thing are you thinking of, specifically? What benefits do you see from using .NET/Mono?


I may not have made it clear in my first post, but strictly speaking I am not really trying to defend TorqueScript here. I am not saying that there can be no better language for the job, and I am certainly not saying that C# is a bad language (I actually rather like it for application development). I am merely trying to understand why people think that other languages would be so much better for the purpose of scripting Torque games that it would be worth the considerable effort to switch. None of the arguments I have seen are even remotely compelling.
#7
02/02/2009 (7:16 pm)
Quote:Do you really want to be able to do "heavy lifting" in your game scripts, and if so, what sort of thing are you thinking of, specifically? What benefits do you see from using .NET/Mono?

Sure I do. Here's one: Think how easy it would be to add things like an A* pathfinder in C# as a drop in DLL, whereas now it requires an extensive modification to the engine source code and a bunch of cscript. With the engine changing all the time, and different sets of script for different game types, this becomes quite problematic, and indeed, beyond the ability of quite a few people. But with C#, all the implementation specifics get hidden behind interfaces, it becomes a breeze.

Another thing is, you could integrate other code without access to the engine. Such as adding database support for Microsoft SQL server or PostgreSql,or adding real encryption encryption. :)
#8
02/03/2009 (6:44 am)
I could see the value in dlls for implementing certain functions... though I wouldn't restrict it to just C#.

It'd work like this:
Torque (Engine) for backbone stuff like graphics & networking >
DLL for definitions of, say, a player class or vehicles, or maybe AI code >
TorqueScript for game logic (if GameEvent::x happens, do Player::y) kinda like it is now, but more focused

Of course, I'd be the exact opposite way as far as "securing" code. I'd prefer to keep the dlls themselves open for modders. That way, if they want to add in a feature that would make my game more desireable, they can. Then my game would sell more which makes me more money, as well as satisfying my users more than I could on my own.
#9
02/03/2009 (12:38 pm)
@Jaimi : Interesting idea, but that seems like a separate issue from scripting. It sounds like you're talking more about a plugin mechanism, which could just as well be done in C++ without adding any dependency on .NET/Mono. It would be cool, but it's a different issue, I think.

I can see that things like DB support from script would be useful, particularly if it could be added without source code access. I wonder though, if there is a way to add that sort of thing to TorqueScript. What if we had the ability to load and access arbitrary dlls from within TorqueScript? Or, if not arbitrary dlls, then perhaps dlls that are specifically made for TorqueScript access? That second option would probably be a lot more useful if the necessary header files were broken out into a separate, freely available, SDK. If we had that, then it would be easy to create packages that add things like DB access, and it would become a much more extensible language.

If we ask nicely, it seems much more likely that GG would put resources into adding that kind of functionality, rather than replacing TorqueScript entirely.
#10
02/03/2009 (1:57 pm)
@Tony - Yes, it could be done in C++ as plugins. But C# lets it be loaded and jitted, just like a script. Plus, you could easily load any DLL in C# with little to no performance penalties. It's the best of both worlds.

But I do think it would take a lot of work, and it's unlikely we would see this in Torque 3D.
#11
02/03/2009 (2:17 pm)
Quote:But C# lets it be loaded and jitted, just like a script.
Ah, I wondered about that but I wasn't certain it was possible. That does make a difference.