Game Development Community

dev|Pro Game Development Curriculum

Entity/Component System Released!

by Jeff Raab · 07/18/2014 (6:12 pm) · 45 comments

Hey all!

github.com/Areloch/Torque3D/tree/EntityComponent_Experimental

BAM.

Wait, what? You're releasing it? With no community purchase campaign? Are you sick? Dying? IS THIS YOUR FINAL WILL AND TESTAMENT?!

What? No, that's stupid.

Whew, ok, yeah, that got a little dark there. But seriously, what's going on?

It pretty much boils down to the fact that no matter WHAT I did, it wouldn't be polished enough for me to be especially happy with a "release". This was compounded by the last week or so where I'd been beating my head on a wall trying to fix some "last bugs"(I've been doing that for a month now), and just could not, for the life of me, figure it out. I know I CAN, but it was taking far more time than it should, and I was making me hate myself over it.

That, and honestly, nothing I could charge in the Community Purchase campaign could ever REALLY make up the...what, like, 6 months of effort that's gone into this now?

So hey, whatever.

So...what, are you done with this then?

Oh God no. I plan to use this system in the games I work on, so even if no one ever touches the repo, I'll keep updating it.
This is pretty much just forcing me to let it go and get other people who are smarter than me working on it to fix crap I failed to.

The obvious endgoal is it gets polished to a mirror sheen, and then it gets rolled into the T3D development branch, and then eventually master. But it's got a lotta work to go before that's happening and I figure, why not start now.

So my repo could be considered the definitive Torque3D Entity/Component branch that we'll all(hopefully) collectively polish until we feel comfortable about rolling it into an official branch for proper testing pre-integration.

However, it's in a very, very rough state now. Tons and tons and tons of chaff from self comments, testing code and as-we-go rewrites of entire systems and implementations clog the current implementation. To say nothing of experimental behaviors I didn't get really working still sitting on my harddrive for later.

As such, I have no doubts, at all in my mind, that it'll be kinda crap to navigate or for people to really work with. But you know what? That's OK.

How is that OK? That's passing the buck, isn't it?

Shoosh, you. No, it's OK, because I'm throwing down an open invitation to talk to me here on the forums, in chat, or via email at any time for clarification, suggestions, or ideas.

This is a community project, and while I've got a pretty concrete idea of where it's going, the whole point is we'd work on it together to make it perfect.

Similarly, if any of you guys want to make your own components for stuff, or convert existing behavior in the engine/your projects into components/behaviors, feel free to ask. I'm absolutely happy to help brainstorm how to component-ize everything.

If you don't know what you want to componentize, but wanna do something, like said, I'm sitting on half-implemented stuff I think could be a pretty big deal if it was made to work right. So by all means, please fire me a line.

So it works out of the box then?

More or less, yeah.
In the branch is a new template. The EntityComponent template.
When making a new project with it, you'll have to add the missing folders/files in the engine/component directory as I haven't fixed the project template stuff yet, but after that it should compile and run fine.

The template is based on Dan Buckmaster's Torque3D Barebones template, only this has menus, editors and server/client functionality implemented as well. So it's a more "game ready" template.

Currently, it boots straight into the mission, but you can re-enable it going to the main menu by tweaking what it loads to in the main.cs.
(Again, if you have any questions, fire them at me)

So all that effort, for free?
More or less, yeah.

I mean, if you've got some extra cash and want to throw it at me? Sure, why not.
I've got a paypal, here:

https://www.paypalobjects.com/en_US/i/btn/btn_donateCC_LG.gif
www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=N3L6L64NGSDM8

Feel free to toss something my way if you think I deserve it.

With that said, grab the repo, balk at my coding atrocities, and once you get over the whiplash, lets get Torque'ing :D

-Jeff out
Page«First 1 2 3 Next»
#41
07/25/2014 (4:55 pm)
For now it is, yep!
#42
07/26/2014 (8:04 am)
@Daniel: Awesome! That means I can use this in the game I'm currently working on. Also, is there a binary version I can download?
#43
07/28/2014 (4:31 pm)
Yayy made some particle-components work:
new Entity(Particle) {
      position = "0 0 1.00967";
      rotation = "1 0 0 0";
      scale = "1 1 1";
      mountPID = "5ff82418-0691-11e4-a816-ca7e49241462";
      mountNode = "-1";
      mountPos = "0 0 1";
      mountRot = "1 0 0 0";
      canSave = "1";
      canSaveDynamicFields = "1";
      persistentId = "5ff82417-0691-11e4-a816-ca7e49241462";
      eulerRotation = "0 -0 -0";

      new ParticleEmitterBehaviorInstance() {
         template = "ParticleEmission";
      };
      
      new ParticleRenderBehaviorInstance() {
         template = "ParticleRender";
         textureName = "game/art/materials/bas19go.png";    
      };

   };
Results in white billboards with the given textures getting rendered. Haven't written a physics component yet.

I split it into 3 parts, simulation (or just management), physics and rendering.
So the simulation component doesn't actually know what kind of particles it is working with, it just adds and deletes particles and manages them over their lifespan. That means you can add any kind of "rendering" component you want and get different results! (Like I did with my IPS v1.1)
#44
07/28/2014 (6:25 pm)
Nice work! Can't wait to see what else people do with this :).
#45
07/29/2014 (6:35 am)
As Dan said: Very nice!

What are the chances of getting lit particles in there? I know that crap gets tricky real fast, but man does it look nice.
Page«First 1 2 3 Next»