Pages: 1 2 3 4 5
Author Topic: Tierable Systems  (304,919 Views)
Offline (Unknown gender) Micah

Resident Troll
Joined: Jun 2008
Posts: 128
View profile
Reply #60 Posted on: May 08, 2010, 12:33:44 AM
Quote from: Josh @ Dreamland on May 06, 2010, 09:44:38 PMI'm thinking I didn't come across clear enough. The difference between the tiering and component system is in two places.
1) The tier system doesn't require me to parse in accessors nor tax the CPU To lookup, store, push, and jump to that accessor.
I'm thinking that you didn't pay any attention at all to the component system. You would not need accessors. The component system simply requires one extra pointer dereference for the stuff in components.

Quote from: Josh @ Dreamland on May 06, 2010, 09:44:38 PM2)  If you remove the Graphics Tier, the Collision Tier goes with it; that's the only problem. It is very easily removed, and doesn't leave residue, unlike a component system.

So, the only drawback of mine is that you can't have collisions without graphics. I don't even see that as a problem.
And you completely fail to understand why you'd use the component system. The tier system lets you do a few optimizations when you need certain combinations of systems and only those combinations. The component system allows you to do those optimizations in many more cases with a single extra pointer dereference for each property inside a component, and beside this, it affords an enormous amount of flexibility, which has already been explained above, and which the tier system simply does not provide.

You completely misunderstand why you would use the component system. YOUR ARGUMENTS ARE IN VAIN.
Offline (Unknown gender) Josh @ Dreamland

Prince of all Goldfish
Developer
Joined: Feb 2008
Posts: 2,950
View profile
Reply #61 Posted on: May 08, 2010, 03:39:50 AM
I didn't realize we'd defined accessor to imply a function. Operator-> is an accessor that I would need to parse in, instead of using the implicit this->. Assuming there is no function (which would be necessary in some cases), the push is dropped.

Once again, the need for specific combinations in the tier system is not a problem for flexibility simply because there is no other order the tier system could operate in. I failed to understand this when I opened this for discussion. Adding, for example, a "z" variable to the "planar" tier makes it no longer a "planar" tier; it doesn't make sense for the lower tiers to inherit from it, as the lower tiers are intended for access by a system designed around the game being 2-Dimensional. Having a component for this won't matter; it'll just change the position of the "`z' is not a member" error if a source file tries to access that local. I don't see any amount of flexibility; changing a lower tier for any good reason implies a need to change the systems inheriting from them. Find a counter example instead of screaming "Flexibility" and I might consider what you are saying.

Also, understand that in this discussion, my arguments are never in vain. I am the only one coding for this project; that's the sad fact about it. Our friends at Canonical recently asserted, "This isn't a democracy." Granted, that's an assholish move, but that's what it comes down to. You have the burden of proof, always, because I'm coding. You are the one that needs to enumerate plenty of examples of where your system outperforms mine. "Flexibility," as a general term applied to nothing, doesn't count.

I've made large changes in the past when someone has provided a genuinely better idea; usually the fact of the idea being better has been obvious, but I know Luda threw me at least one instance where that wasn't the case. As it stands, each tier uses variables from -every- inherited tier. Meaning recompile rates for the systems would be the same anyway if, for example, the type of "x" was changed from "double" to "int." I in fact see no gain with respect to recompilation from using a component system, except in the case that you are only -adding- to a specific component, and each component is tiered itself. That's a decent-sized if, not to mention that I'd consider that an ugly system.

Moreover, a component system for a number of wild, so far unconceived systems can easily be added as a bottom tier, anyway. Not that I can name such a system. A simple variable could be used for bottom_tier_size to skip to the end of the essentials and locate such a system.

What you need to see is that the undefined residuum of flexibility you claim the component system offers is inapplicable to the lower tiers. The -first- instance of a tier that does not depend on every lower tier would be the path tier, which needs to implement path_index but does not need access to the collision tier nor the graphics tier. In this special case, bottom_tier_size would be valued as sizeof(collision_tier) if the graphics and collision systems are in use, or just sizeof(planar_tier) otherwise. There, it would perhaps be logical to implement a component system, which would take up, in itself, 33% of the space used if no component system existed (or 50% on 64 bit systems). The hope would of course be that as more components emerged (which doesn't seem likely), the system would pay for itself. Regardless, there's a lot to consider as far as what is hard coded.
Offline (Unknown gender) Micah

Resident Troll
Joined: Jun 2008
Posts: 128
View profile
Reply #62 Posted on: May 08, 2010, 04:39:56 PM
"Decorator" components are a huge benefit of components. I believe that these have already been explained sufficiently. There have actually been many other useful cases for components to which you evidently did not pay any attention.

Quote from: Josh @ Dreamland on May 08, 2010, 03:39:50 AMYou are the one that needs to enumerate plenty of examples of where your system outperforms mine. "Flexibility," as a general term applied to nothing, doesn't count.
If that's your mentality for the project--"Speed is the only thing that matters. Flexibility doesn't even exist"--which has been illustrated by your overoptimization and C++ evangelism already quite a bit, then wow.

You don't always need the graphics tier to have a collision system. What if you wanted to use a completely different vector graphics system but wanted to reuse the collision system? What if you wanted to exchange anything along the whole entire tier system but wanted to keep the old systems things that use that tier? Completely reprogram everything that uses it, or use components? Hmm.
Offline (Unknown gender) Josh @ Dreamland

Prince of all Goldfish
Developer
Joined: Feb 2008
Posts: 2,950
View profile
Reply #63 Posted on: May 08, 2010, 05:01:54 PM
"Completely reprogram everything that uses it"
If you mean a sixteen line header, then yes. That's exactly what you do.

Code isn't stored in the tiers, only locals. Each tier implements roughly ten original lines. Other lines include the previous tier, license the file, declare the structure by name, and call the parent constructors.

The sole purpose of the tier system is to organize local variables so that concerned systems, stored in separate, non-tiered files, can access them in an object without needing to know what all is included. Using a component system, we still need a list of components to store a pointer for. Your idea of a decorator is quite similar to what is actually going on, from one parent point.
Forking a tier is not a difficult task.

Also, I meant "outperform" in an all-inclusive sense, not just in the sense that mine is faster. Your idea of "over optimization" pisses me, and a number of others, off.
Offline (Unknown gender) Micah

Resident Troll
Joined: Jun 2008
Posts: 128
View profile
Reply #64 Posted on: May 08, 2010, 05:42:25 PM
Quote from: Josh @ Dreamland on May 08, 2010, 05:01:54 PMYour idea of "over optimization" pisses me, and a number of others, off.
Your premature optimization and destruction of flexibility and good design to save a cycle or two pisses me, and many, many other people, off. Pretty much every good programmer except for those who come from Game Maker (and perhaps Linus and a few other silly people--although even he has said on occasion how much nicer higher-level programming is :P) agrees with this.

Name this "number of others."
Offline (Unknown gender) Josh @ Dreamland

Prince of all Goldfish
Developer
Joined: Feb 2008
Posts: 2,950
View profile
Reply #65 Posted on: May 08, 2010, 05:44:51 PM
Here's a better idea; instead of wasting time arguing with words, why don't we get back to the purpose of this venture and start demonstrating with code? See the nearby poll under this forum and submit your idea of this system in a similar fashion.
Pages: 1 2 3 4 5