T2D and C
by Melv May · in Torque Game Builder · 12/06/2005 (12:11 am) · 46 replies
Who, what, where, when and how?
So I admit it, I'm a C++ developer that's writing an engine that's typically driven via scripts. All day long I talk to people; script this and script that but what about C++? Scripts work extremely well for lots of games and used correctly, can reduce the development cycle but there's always the need to write your own C++ routines, objects, simple frameworks etc.
To this end, I'm interested in knowing what specific aspects of getting up and running writing C++ code in T2D you'd like to understand. By this I'm talking about myself writing code-examples, tutorials and/or a simple example of using the T2D framework as a whole. I'd like to get a good feel for a natural progression of examples/tutorials that would help here.
There are many frameworks out there that offer a simple and clean layout but don't provide all the wonderful goodies that T2D provides because, in the end, it's an engine, not a basic framework. One isn't necessarily better than the other from different peoples perspectives and I'm not here to start a discussion over which is "best" because that's subjective and to be honest, dull.
In the end, what I'd genuinely like to do is make the "C++ Engine" forum much more active and the only way that'll happen is if people are comfortable working at a lower-level. It's essential that people can do this, especially if they only want to add some simple construct such as a bit of AI code, path-finding, fancy render-fx etc.
So let me start; what I'd like to see explained is the following:-
- Simple, clean example of the basic T2D engine framework (this is essentially the TGE) to build on.
- From "main()" to T2D.
- Using events in T2D.
- The basics of Sound / User-Input.
- Creating GUI objects.
- Creation of console scriptable objects (not necessarily T2D scene-objects).
- Extending the core T2D object (including objects that render).
What I'm definately not interested in here is requests for specific objects so "I'd like C++ path-finding" is going to be ignored. Rather I'd like to talk about the fundamentals of coding T2D at the C++ level. The engine is a huge mass of code but in the end, you can discount 95% of what you see and what's left is what I'd like to explain as best I can.
On a side-note; this isn't an official GG request (I'm not GG) but a personal request as I'd like to attract people who are happy to work with T2D at the C++ level and feel that there's enough information to understand the core-framework of T2D to be able to inject their own code into it for whatever reason. My time to do this is limited but I do get time to work on side-projects and exposing the C++ side of things is something I'd really like to do. This could also serve as a great way for people who own the TGE to learn some stuff as well.
Help in organising this list would be appreciated.
- Melv.
So I admit it, I'm a C++ developer that's writing an engine that's typically driven via scripts. All day long I talk to people; script this and script that but what about C++? Scripts work extremely well for lots of games and used correctly, can reduce the development cycle but there's always the need to write your own C++ routines, objects, simple frameworks etc.
To this end, I'm interested in knowing what specific aspects of getting up and running writing C++ code in T2D you'd like to understand. By this I'm talking about myself writing code-examples, tutorials and/or a simple example of using the T2D framework as a whole. I'd like to get a good feel for a natural progression of examples/tutorials that would help here.
There are many frameworks out there that offer a simple and clean layout but don't provide all the wonderful goodies that T2D provides because, in the end, it's an engine, not a basic framework. One isn't necessarily better than the other from different peoples perspectives and I'm not here to start a discussion over which is "best" because that's subjective and to be honest, dull.
In the end, what I'd genuinely like to do is make the "C++ Engine" forum much more active and the only way that'll happen is if people are comfortable working at a lower-level. It's essential that people can do this, especially if they only want to add some simple construct such as a bit of AI code, path-finding, fancy render-fx etc.
So let me start; what I'd like to see explained is the following:-
- Simple, clean example of the basic T2D engine framework (this is essentially the TGE) to build on.
- From "main()" to T2D.
- Using events in T2D.
- The basics of Sound / User-Input.
- Creating GUI objects.
- Creation of console scriptable objects (not necessarily T2D scene-objects).
- Extending the core T2D object (including objects that render).
What I'm definately not interested in here is requests for specific objects so "I'd like C++ path-finding" is going to be ignored. Rather I'd like to talk about the fundamentals of coding T2D at the C++ level. The engine is a huge mass of code but in the end, you can discount 95% of what you see and what's left is what I'd like to explain as best I can.
On a side-note; this isn't an official GG request (I'm not GG) but a personal request as I'd like to attract people who are happy to work with T2D at the C++ level and feel that there's enough information to understand the core-framework of T2D to be able to inject their own code into it for whatever reason. My time to do this is limited but I do get time to work on side-projects and exposing the C++ side of things is something I'd really like to do. This could also serve as a great way for people who own the TGE to learn some stuff as well.
Help in organising this list would be appreciated.
- Melv.
About the author
#43
How about examples on how to safely override the engine without breaking future releases?
Say I want to implement native isometric stuff, but I dont want have to spend weeks merging after a new update comes out, maybe some instructions on what to touch, what not to touch, etc for those of us who are capable enough to do the munge, but not sure how not to break the product doing it, especially in pre release state, I know what I've learned playing, but an official answer on overriding, changing, and merging would be nice.
Things like derive from this class for x reasoning, instead of munging y directly...
--Rod
04/25/2006 (5:24 pm)
Melv,How about examples on how to safely override the engine without breaking future releases?
Say I want to implement native isometric stuff, but I dont want have to spend weeks merging after a new update comes out, maybe some instructions on what to touch, what not to touch, etc for those of us who are capable enough to do the munge, but not sure how not to break the product doing it, especially in pre release state, I know what I've learned playing, but an official answer on overriding, changing, and merging would be nice.
Things like derive from this class for x reasoning, instead of munging y directly...
--Rod
#44
@Rodney: Unfortunately, until we've got a final release, it's practically impossible to put out some standard method for overriding core functionality that's guaranteed not to change. With that said, I was including within the document, a description of how to get a scene-object up and running as well as a non-scene object (simobject) but due to the amount of changes, I found that I was rewriting the document more than I was writing it, hence the delay.
I can't wait until we get a final release, at which point I'll try to type out as much info on the C++ side of things as my poor fingers can take.
In the meantime, use the C++ engine side of things to ask specific questions (as concise as possible) and I'll do my best to answer them.
- Melv.
04/25/2006 (11:51 pm)
@Adam: I've a half-baked document that I've still to finish. So much to do, sorry!@Rodney: Unfortunately, until we've got a final release, it's practically impossible to put out some standard method for overriding core functionality that's guaranteed not to change. With that said, I was including within the document, a description of how to get a scene-object up and running as well as a non-scene object (simobject) but due to the amount of changes, I found that I was rewriting the document more than I was writing it, hence the delay.
I can't wait until we get a final release, at which point I'll try to type out as much info on the C++ side of things as my poor fingers can take.
In the meantime, use the C++ engine side of things to ask specific questions (as concise as possible) and I'll do my best to answer them.
- Melv.
#45
I dont want to implement something that could drastically change, and I personally refuse to modify any of the c++ files delivered with the engine, I think thats just bad project management if I ever want to be stable. Instead I would rather rely on deriving classes and linking custom stuff in, so I guess I was wondering if there were some instructions already generated for doing such a thing. While the code is clean and readable, I was just fishing for examples of maybe cleanly overriding the scene object, etc to give me more native isometric features while never touching your core. I certainly appreciate whats already there, I'll post specific questions in their respective threads. Thanks for Taking the time to respond.
Rodney
04/26/2006 (12:22 am)
Even if its not guaranteed, really for me its the chicken vs egg problem ,I dont want to implement something that could drastically change, and I personally refuse to modify any of the c++ files delivered with the engine, I think thats just bad project management if I ever want to be stable. Instead I would rather rely on deriving classes and linking custom stuff in, so I guess I was wondering if there were some instructions already generated for doing such a thing. While the code is clean and readable, I was just fishing for examples of maybe cleanly overriding the scene object, etc to give me more native isometric features while never touching your core. I certainly appreciate whats already there, I'll post specific questions in their respective threads. Thanks for Taking the time to respond.
Rodney
Torque Owner Jason Swearingen