1 decade ago by lucascaro
Hi all! This is my first post; I've recently bought impactjs and I'm a very satisfied customer :D so my congratulations to dominic for the great engine.
I've used impact for one project so far and was wondering if there are any plans in the roadmap to improve the Entity lifecycle, to make it more flexible, like this article:
The Life Cycle and Processing Architecture
Correct me if I'm wrong, but as I understand, the entitie's life cycle now is
init -> update / draw -> kill
What this article proposes is something like:
Construction -> Init -> Resolve -> Update / Draw -> Deinit -> Destruction.
I particularly would love to separate construction from initialization and / or have a way to initialize my entities after all of the entities are created (so I don't need to get a pointer to the player on update, for example).
Well this is just a thought, and maybe there is already a way to do this, which I don't know.
So far, I'm doing something like
But I think this adds unnecessary overhead to the update function for a call that I need to do just once.
I don't know how the rest of you feel about this, but I'd like to know your opinion on this matter.
Thanks!
I've used impact for one project so far and was wondering if there are any plans in the roadmap to improve the Entity lifecycle, to make it more flexible, like this article:
The Life Cycle and Processing Architecture
Correct me if I'm wrong, but as I understand, the entitie's life cycle now is
init -> update / draw -> kill
What this article proposes is something like:
Construction -> Init -> Resolve -> Update / Draw -> Deinit -> Destruction.
I particularly would love to separate construction from initialization and / or have a way to initialize my entities after all of the entities are created (so I don't need to get a pointer to the player on update, for example).
Well this is just a thought, and maybe there is already a way to do this, which I don't know.
So far, I'm doing something like
update: function() { if(!this.initialized) { this.initialize(); this.initialized = true; } }
But I think this adds unnecessary overhead to the update function for a call that I need to do just once.
I don't know how the rest of you feel about this, but I'd like to know your opinion on this matter.
Thanks!