Three reasons why Torque 3D needs components
by Daniel Buckmaster · 10/09/2013 (8:00 pm) · 19 comments
The Campaign
I'm at the stage of personally begging people to help fund this project. At $750 total, with only $200 remaining, we'd be crazy not to push it over the line somehow. I guess this is coming a little late, at 5 hours before the campaign closes, but frankly, I thought we as a community would have pulled together before now.
I'm not sure why people haven't been funding the project. It seems to me there are two potential reasons. The first being they don't know about it. I can't really help that, beyond posting the campaign in a couple of places I frequent. The second is that people don't understand what a component/entity system is or why it'd be beneficial to Torque. That, I can try to do something about.
So, without further ado: three reasons why T3D needs this upgrade. I'll be basing most of this post on this excellent article by Mick West that introduced me to the component/entity model.
1. T3D is falling into the blobject trap
Okay, I don't think anyone else calls it blobject - it's technically known as a blob anti-pattern, god object or god class. It means a single class that accumulates a bunch of different functionality, becoming incredibly bloated and difficult to maintain. Sound familiar? Spoilers: ShapeBase matches this definition exactly, and Player is also a good example. Here's what Mick has to say about blobjects:
Quote:Even fairly simple objects such as rocks or grenades can end up with a large amount of additional functionality (and associated member variables, and possibly unnecessary execution of member functions). ... Functionality now becomes compartmentalized, so that only the objects specifically programmed for that particular functionality can use it. Programmers often duplicate code to mirror functionality already implemented in a different object. Eventually messy re-factoring is required by re-structuring the class hierarchy to move and combine functionality.To paraphrase slightly, when the blobject appears, it makes the engine less flexible (because functionality is compartmentalised), less performant (because of classes derived from the blobject that don't need all its features), and more difficult to fix later (because code inside the blobject tends to be tricky to unravel).
2. T3D is FPS-focused
I'm not going to beat about the bush. You can make any type of game you want in T3D. Heck, you could rewrite the entire engine so it's identical to idTech 4. But the reason people use a game engine is so they don't have to do that. The question is not whether you can make any type of game in T3D, it's whether you'd want to. Because if you wouldn't, you move on to another engine that doesn't require lots of C++ hacking and workarounds.
Where I'm going with this is that T3D is not conducive to creating new styles of gameplay. It makes lots of assumptions and optimisations for FPS/TPS games, which were obviously necessary and desirable in Tribes 2, but aren't in a general-purpose game engine. A good example that's bitten me recently is the way tabled Player action animations interact poorly with custom ones. This is a useful paradigm if you want your code to be stable and efficient when using those tabled animations, and you don't use the untabled ones for anything significant. But for me, it was just an impediment to making the specific custom animations I wanted for my little AI men.
Here's Mick again on the benefits they discovered after implementing their component/entity model:
Quote:We created a system of data-driven object creation, so that entirely new types of object could be created by the designers. This proved invaluable in the speedy creation and configuration of new types of objects.Sound like something you'd like T3D users to be able to do? Does to me.
3. T3D is difficult to add on to
(I mean the scripts, mostly - the engine code itself I can forgive a bit more.)
Partly because of the way the script templates are organised, and parly because of the deep class hierarchy, it's not extremely easy to go about adding changes to T3D. Add-ons, even script-only ones like the UAISK, typically require detailed installation instructions that have many points of failure for inexperienced (and even experienced!) users, and need to change with every new version of the script templates.
For example, my script addon might want to do something every time a character dies. Like make a burst of confetti. This requires adding code to the Armor::onDeath (or whatever it's called) function, modifying the existing code, which has to be done by the user (unless they've made no changes of their own to the scripts). Assuming they're even using the default script template!
With a component/entity system, adding this functionality would be a matter of defining a new component in an entirely separate file that can be added to anybody's project, and then, with Jeff's editor plugin, modifying the object template to include the new component. And if I wanted the same effect to happen when vehicles are destroyed, I add the component to the Item template, rather than duplicating the code, or adding it to ShapeBase and having it apply to Vehicles when I don't want it to.
So please,
Support this campaign. I'm imploring you. If you haven't pledged yet, now is the time. If you have, and you can spare a few more dollars, IGG allows you to pledge multiple times!
The Campaign
About the author
Studying mechatronic engineering and computer science at the University of Sydney. Game development is probably my most time-consuming hobby!
#2
My points still stand...
10/10/2013 (12:45 am)
Looks like it went in, but the campaign failed. :( Appreciated though :).My points still stand...
#3
If everyone could add in $5.28 more we would have it funded.
10/10/2013 (1:49 am)
I saw it's a shame maybe we need to see if the people who sent in something are willing to continue the payment they had and we can try to get the last bit?If everyone could add in $5.28 more we would have it funded.
#4
I was going to add another $25 to my donation but missed the deadline, wish you had put this up a day or 2 earlier we may have hit the target then :-(
Where do we go now? going to try another crowd fund thing?
I would be willing to cough up $50 right now, T3D needs this so badly!
10/10/2013 (3:00 am)
Heck it failed by about $150 :-(I was going to add another $25 to my donation but missed the deadline, wish you had put this up a day or 2 earlier we may have hit the target then :-(
Where do we go now? going to try another crowd fund thing?
I would be willing to cough up $50 right now, T3D needs this so badly!
#5
10/10/2013 (3:28 am)
Yeah, it was a bit late. I guess we see what Jeff wants to do now!
#6
It is kinda sad that this pass didn't pan out, but this project isn't dead.
I'll be doing a post-mortem on the campaign and I'll figure out what the plan is forward.
10/10/2013 (3:55 am)
Hey guys, thanks for the support.It is kinda sad that this pass didn't pan out, but this project isn't dead.
I'll be doing a post-mortem on the campaign and I'll figure out what the plan is forward.
#7
how about a simple dirty donate button?
and give it a week - to see what happens
and you could let ppl support your work directly
give the current component system out as a base - part1
and future developement can be marked as part2...
That would be a way to go
10/10/2013 (4:43 am)
Hey Jeffhow about a simple dirty donate button?
and give it a week - to see what happens
and you could let ppl support your work directly
give the current component system out as a base - part1
and future developement can be marked as part2...
That would be a way to go
#8
I think you will have a bit more luck funding your system if we try round 2 (I personally would at least double my contribution.)
The donation button could work as well, by using J0linar's idea or using it to infinitely extend the deadline for donations (I don't think the community would let it sit around unfunded for too long)
10/10/2013 (8:04 am)
@ JeffI think you will have a bit more luck funding your system if we try round 2 (I personally would at least double my contribution.)
The donation button could work as well, by using J0linar's idea or using it to infinitely extend the deadline for donations (I don't think the community would let it sit around unfunded for too long)
#9
Kind of on a budget and giving another couple weeks (giving the U.S economy doesn't default)I would've donated something.
10/10/2013 (8:52 am)
Yeah I was planning on contributing but in my opinion the timeframe was a little short.Kind of on a budget and giving another couple weeks (giving the U.S economy doesn't default)I would've donated something.
#10
Also, I'm a bit leery about throwing money at something like this when there's no transparency into the implementation. A true entity-component system in T3D would be optimal, but I have no idea how close to that Jeff's implementation comes. I've seen implementations of supposed entity-component systems out there that appear very kludgy, i.e. they approximate an entity-component system but don't quite get there.
10/10/2013 (9:27 am)
I'm in the same boat with Kory. I wanted to support this, but now wasn't the best time for me. Also, I'm a bit leery about throwing money at something like this when there's no transparency into the implementation. A true entity-component system in T3D would be optimal, but I have no idea how close to that Jeff's implementation comes. I've seen implementations of supposed entity-component systems out there that appear very kludgy, i.e. they approximate an entity-component system but don't quite get there.
#11
I think you need to be a little more aggressive in terms of actually showing what your add-on will bring to the table, and by this I mean showing some TS code that demonstrates the ease of use of the system, maybe show off some new behaviors, and anything else that might stick.
One other thing, this campaign seemed to me like it was only advertised here on GG, and while we do get some people here, it doesn't do the whole community justice. I think what you need to do is reach out to other locations about your add-on first, try to muster up some support for it, and then start a campaign.
EDIT: I must have some very evil conversation killing powers or something, nobody else have anything to add to that?
10/10/2013 (9:49 am)
I'm thinking the reason this didn't go through was pointed out a while back. The demo video was there, but it really didn't do this add-on much justice I believe. It only showed a few behaviors and a kind of low-res view of the editor so we didn't see much going on there.I think you need to be a little more aggressive in terms of actually showing what your add-on will bring to the table, and by this I mean showing some TS code that demonstrates the ease of use of the system, maybe show off some new behaviors, and anything else that might stick.
One other thing, this campaign seemed to me like it was only advertised here on GG, and while we do get some people here, it doesn't do the whole community justice. I think what you need to do is reach out to other locations about your add-on first, try to muster up some support for it, and then start a campaign.
EDIT: I must have some very evil conversation killing powers or something, nobody else have anything to add to that?
#12
I think a better idea on how it can improve and how it is used would be most helpful in making it easier for people to understand.
I think another round and improved information on what it does will get it through.
10/10/2013 (5:36 pm)
I will be honest this post did give me a somewhat better idea of what this system was about but the original video and info didn't really portray to me what this would do for T3D.I think a better idea on how it can improve and how it is used would be most helpful in making it easier for people to understand.
I think another round and improved information on what it does will get it through.
#13
I hope it does happen in the future and that we can continue to grow the engine but with this not getting through I am disappointed. But I also understand that a lot just didn't see what it was going to do.
10/11/2013 (12:50 am)
The main reason I put money up for as soon as I could was to support T3D as a whole. But to be honest from the blogs I had no idea how it worked or what it really did. Until others talked about it, and that made me release how great it would be to have.I hope it does happen in the future and that we can continue to grow the engine but with this not getting through I am disappointed. But I also understand that a lot just didn't see what it was going to do.
#14
I work every day with component based engines and personally dislike that approach. I also dislike multiple collections of static data that is proven to work quite slow in combination with stl and boost.
Components are hard for support (many files , many conflicts) and usually lead to secondary tools which also need to be supported.
In-lining or using injection systems (the same as shadergen) seems to be a better solution.
It's just my opinion.
10/11/2013 (1:18 am)
Not everyone would want to see T3D as a component based system. This is the way the big companies work.I work every day with component based engines and personally dislike that approach. I also dislike multiple collections of static data that is proven to work quite slow in combination with stl and boost.
Components are hard for support (many files , many conflicts) and usually lead to secondary tools which also need to be supported.
In-lining or using injection systems (the same as shadergen) seems to be a better solution.
It's just my opinion.
#15
Not quite sure what you mean by "many files, many conflicts", or secondary tools. I'm only familiar with injection in AngularJS, which I suspect is a little different to what you're talking about. But like I said I'd be really interested to discuss this at length elsewhere.
10/11/2013 (3:56 am)
Ivan: I'd love to see some discussion on this. Maybe we should continue it in Jeff's existing thread, or make a new one. Why do you dislike the component/entity model? I would counter by saying I really, really like it, but I also think there are very good technical reasons to use it, which I outlined in the blog.Not quite sure what you mean by "many files, many conflicts", or secondary tools. I'm only familiar with injection in AngularJS, which I suspect is a little different to what you're talking about. But like I said I'd be really interested to discuss this at length elsewhere.
#16
10/11/2013 (4:19 am)
Yes it sounds like we definitely need to figure out what is best for T3D and way the various options are and what they will look like.
#17
but look into unity,they have filled that gap by making unity the best user friendly engine.
without component it would have been tough.
at a sum i do belive:
if u are not a programmer
or
do not want to spend time on scripting
or
do not want to use winmerge to integrate several addon together
then
go for component based solution.
it is some kind of drag and drop solution.
try out with unity.u will have some realization.
if u r a programmer then you can go for non component based solution.
but your work is not going to attract others to t3d,
because,it is hard to grasp without learning programming.
10/11/2013 (5:29 am)
honestly,i also think,component based structure have some problem in case of performance.but look into unity,they have filled that gap by making unity the best user friendly engine.
without component it would have been tough.
at a sum i do belive:
if u are not a programmer
or
do not want to spend time on scripting
or
do not want to use winmerge to integrate several addon together
then
go for component based solution.
it is some kind of drag and drop solution.
try out with unity.u will have some realization.
if u r a programmer then you can go for non component based solution.
but your work is not going to attract others to t3d,
because,it is hard to grasp without learning programming.
#18
I agree that a component model is better for non-programmers and people who don't want to spend much time on scripting. And if you're a coder, you can go for a non-component-based system. But a component model would actually make it easier for coders as well. Not necessarily because you have to write less - but what you do write is more reusable, maintainable and shareable.
I say this ahving developed vlrtt primarily in TorqueScript with T3D 3.0, and having used other component-based engines including T2D.
10/11/2013 (5:55 am)
Ahsan: the performance hit or benefit has yet to be seen. Mick, who wrote the article I linked, reported a performance gain in the Tony Hawk series of games after implementing components, because blob functionality was no longer being wasted on objects that didn't need it. It all depends on the implementation, I suppose.I agree that a component model is better for non-programmers and people who don't want to spend much time on scripting. And if you're a coder, you can go for a non-component-based system. But a component model would actually make it easier for coders as well. Not necessarily because you have to write less - but what you do write is more reusable, maintainable and shareable.
I say this ahving developed vlrtt primarily in TorqueScript with T3D 3.0, and having used other component-based engines including T2D.
#19
10/22/2013 (2:40 am)
Another great reference/tutorial on the component pattern and how it can help you. 
NiN-NiN
It's off but it hasn't changed from $568 when i sent the money and i'm not showing up in the contributors yet paypal says $50 was sent.