Elysian Shadows
All posts with the tag: entities

Invoke Engine, Entities, Components, and Falco’s Wrath

Originally posted by GyroVorbis (Falco Girgis) in our Private Development forum on 12.30.10.

Okay, so for those of you who didn't know, I have been extremely sick this entire last week. Actually, today is the first day since then that I can finally say that I've recovered. I even had a 103 degree fever on Christmas... but that's enough bitching. This hasn't slowed any of my progress in the slightest. I have continued my faithful pursuit of the Policy of Pristinity rather than opting to follow the Requiem of Reest. I have a lot of exciting new stuff to show off for you gents.

Read More

Dynamic Component Registration

Originally posted in our Private Development Forums on 5.10.10.

So I have found the absolute [i]best[/i] way to solve the whole "run-time Component allocation" fiasco. I'm very pleased with myself. :D

[b]Problem[/b]:

Let me give you a description of our problem. Have a look here:

The cause of frustration may not be immediately apparent. When the entity is constructing itself, it must construct each of its own components. So what's wrong with that?

The Entity has no way of knowing every component type. The solution for the time being was to hard-code cases into the ugly switch statement so that we can manually initialize individual components at load-time. 

This solution is pretty undesirable, as this means that every time we create a new component, we must also add its case to the Entity's component construction list. Fuckin' gross.

Read More