3rd party framework/DLL used in C++ compatible with TGB?
by CresCoJeff · in Torque Developer Network · 10/26/2009 (11:18 pm) · 7 replies
Hey all,
Is it possible to use C++ code that has implemented 3rd party frameworks [like ClanLIB] or DLLs [I'm interested in making card games and I have a C++ DLL specifically made to facilitate CG creation] in TGB? It would make scripting a thousand times more useful if it was possible to incorporate the extended capabilities these libraries offer C++ into the code torquescript calls!
JC
Is it possible to use C++ code that has implemented 3rd party frameworks [like ClanLIB] or DLLs [I'm interested in making card games and I have a C++ DLL specifically made to facilitate CG creation] in TGB? It would make scripting a thousand times more useful if it was possible to incorporate the extended capabilities these libraries offer C++ into the code torquescript calls!
JC
#2
10/26/2009 (11:50 pm)
With the source code you can integrate whatever third party software you like. Of course, the more complex the software the more difficult and time consuming the integration would take.
#3
10/27/2009 (3:51 am)
Thanks for the replies. Adding to the Torque engine functionality isn't what I meant however. Consider the following case: I have programmed a script in C++ using ClanLIB as a framework. It works on its own to do whatever it needs to do, but now I want to put it into my Torque game- if I call the C++ file in torquescript will it work properly, despite having been created with ClanLIB specific functions? It seems like it should, as long as all the ClanLIB files are in the proper location alongside the C++ code that utilizes them...
#4
10/27/2009 (10:19 am)
Not really sure I follow completely, but the problem as I see it is that you need to expose C++ functions to Torque Script in specific ways- the script doesn't just reach into the code and call any function that's in there. Because of that, you need to touch Torque code so that you can create the wrappers needed to expose the DLL functions to Torque Script.
#5
10/27/2009 (10:53 am)
Specific ways, eh? How exactly does the C++ calling work then? From the site's feature description I got the idea Torque Script had the ability to call external C++ code and run whatever was there for the purpose of extensibility... I can see though how, if the C++ code itself would have to cater specifically to Torque's whims, tweaking the source code would be necessary for the implementation of extra resource libraries. A shame that even the basic indie license for TGB is ludicrously overpriced and the price for the source is downright laughable. I think they should change the name of the site to Golden-Garage Games, lol.
#6
Well, if it's so overpriced and laughable, then why are you not going with another solution that provides those features as well as the source code? You can get Unity Indie with iPhone support for $400- but that doesn't include source code, so you can't accomplish what you want there either without spending much more money...
10/27/2009 (11:05 am)
In any event, Torque Script uses special functions to expose functions to script so that they can be called. This is in addition to the ability to create functions in script itself. Script is generally used for gameplay and such- if you want to do things like rendering or really math-intensive functionality, you should use C++, because the features that make Torque Script easy to use also make it inefficient for a lot of heavy-lifting.Quote:A shame that even the basic indie license for TGB is ludicrously overpriced and the price for the source is downright laughable
Well, if it's so overpriced and laughable, then why are you not going with another solution that provides those features as well as the source code? You can get Unity Indie with iPhone support for $400- but that doesn't include source code, so you can't accomplish what you want there either without spending much more money...
#7
JC
10/27/2009 (4:23 pm)
Heh, what with medical insurance at 5k a year and my full time job coming to an end this winter due to Graduate School I won't be spending much of anything for awhile anyway. I have a few tools, some free some relatively inexpensive that I plan to use... I was just curious about TGB for the future. It really does seem great, so I hope to give it the run it deserves eventually. Implementing 3rd party DLLs and frameworks for C++ really isn't so crucial anyhow given I'd already be working within the TGB environment. Righto, well thanks all for the replies!JC
Torque 3D Owner Ted Southard