Game code in C++, editing in TGB? Opinions / info. please :)
by darbotron · in Torque Game Builder · 09/15/2011 (4:22 am) · 6 replies
H
I realise this is possibly a N00B question, but I'm asking it anyway...
I've just looked through the tutorials for TGB and can't find any mention of how to interact with it from C++.
Essentially I want to get the editing benefits of the TGB, but write the game code in C++ and I'd like to know how easy it is to work like this.
I assume that it involves editing the source for the exe that runs the TGB games to include the new C++ code, and then exposing the relevant C++ functions through torquescript.
I'd really appreciate feedback from someone who's worked like this themselves :)
I have a full source license of T3d so I am fairly au fait with exposing code to torquescript etc.
I guess I'm looking for a fairly technical answer about how what is edited in the TGB GUI relates to the actual C++ code that runs.
cheers,
Alex
I realise this is possibly a N00B question, but I'm asking it anyway...
I've just looked through the tutorials for TGB and can't find any mention of how to interact with it from C++.
Essentially I want to get the editing benefits of the TGB, but write the game code in C++ and I'd like to know how easy it is to work like this.
I assume that it involves editing the source for the exe that runs the TGB games to include the new C++ code, and then exposing the relevant C++ functions through torquescript.
I'd really appreciate feedback from someone who's worked like this themselves :)
I have a full source license of T3d so I am fairly au fait with exposing code to torquescript etc.
I guess I'm looking for a fairly technical answer about how what is edited in the TGB GUI relates to the actual C++ code that runs.
cheers,
Alex
About the author
Technical Course Lead at Gamer Camp www.gamercamp.co.uk I was a founding member of FreeStyleGames, the creators of DJ Hero. I've been working in games since 1996, as both a programmer and a game designer.
#2
Welcome to the forum.
That's a good approach.
@Simon
Glad the tutorial was easy to follow. FYI, this forum has a MarkupLite language feature where you can put tags in the text, like URL's (just click above where it says "MarkupLite is enabled"); it just makes the text and the URL easier to navigate:
tdn.garagegames.com/wiki/TGB/Tutorials/The_Game_of_Life
and you also might want to check out this one, where the interface with the GUI Editor is explained too (that was actually the tutorial that I based my C++ interface from )
tdn.garagegames.com/wiki/TGB/Tutorials/Fill_Battle
09/15/2011 (4:31 pm)
@DarbotronWelcome to the forum.
Quote:Essentially I want to get the editing benefits of the TGB, but write the game code in C++ and I'd like to know how easy it is to work like this.
That's a good approach.
@Simon
Glad the tutorial was easy to follow. FYI, this forum has a MarkupLite language feature where you can put tags in the text, like URL's (just click above where it says "MarkupLite is enabled"); it just makes the text and the URL easier to navigate:
tdn.garagegames.com/wiki/TGB/Tutorials/The_Game_of_Life
and you also might want to check out this one, where the interface with the GUI Editor is explained too (that was actually the tutorial that I based my C++ interface from )
tdn.garagegames.com/wiki/TGB/Tutorials/Fill_Battle
#3
Sorry I didn't get back to you before, have been crazy busy and forgot to tick the "notify me of new replies" box...
Will check out the tutorials you mention.
Take care,
Alex
09/30/2011 (5:30 am)
Thanks for the info chaps! Sorry I didn't get back to you before, have been crazy busy and forgot to tick the "notify me of new replies" box...
Will check out the tutorials you mention.
Take care,
Alex
#4
You are a legend dude - that's exactly what I was looking for.
Hope I can repay the favour some day.
Alex
09/30/2011 (5:33 am)
@PedroYou are a legend dude - that's exactly what I was looking for.
Hope I can repay the favour some day.
Alex
#5
09/30/2011 (8:50 am)
@Pedro, you really are! That Game of Life tutorial is great!
#6
Thanks
ah ah, I'll add this "You are a legend dude" next time I'll update my resume. :-)
glad the tutorial is useful
10/01/2011 (12:53 am)
@Darbotron, PatrickThanks
ah ah, I'll add this "You are a legend dude" next time I'll update my resume. :-)
glad the tutorial is useful
Torque 3D Owner Simon Jensen
SwiftThought Games
it shows you how to extend some C++ classes and access them from the torquescript side of things. My C++ fu is pretty weak but it made sense to me..