apotapov / gdx-artemis

Fork of artemis entity-system (http://gamadu.com/artemis/) refactored to integrate with Libgdx (http://libgdx.badlogicgames.com/)
Other
53 stars 5 forks source link

Deleted entities should be removed faster #13

Closed apotapov closed 10 years ago

apotapov commented 10 years ago

Need to investigate delete entity flow through the world. Currently there are some side effects when an entity is deleted at the beginning of the process cycle.

hnvn commented 10 years ago

Yes, this is an extremely serious error and difficult to predict, as occasionally happens. I think we should focus entirely to correct this error. I also encounter NullPointerException error for a component of an entity that has been added in the initialization process of entity, so I guess the problem may be due to the disposal of the entities in the system makes reference to the component may have been changed causing incorrect reference!?

apotapov commented 10 years ago

I think there are some bugs with that flow, but I'm reconsidering whether a faster delete makes sense. Need to investigate some more.

If you find a reproducible bug with this flow, please let me know.

Cheers

hnvn commented 10 years ago

I am concerned about the issue using the id in the system, problems can arise when an id has been assigned to another object in a system that they can not confirm this, leading to a actions that have been made based on this id but is on a new entity?!

apotapov commented 10 years ago

That shouldn't happen. The entities that are deleted get placed in a deleted collection and are all cleaned up the next time the game loops around. On Jan 24, 2014 9:30 PM, "hnvn" notifications@github.com wrote:

I am concerned about the issue using the id in the system, problems can arise when an id has been assigned to another object in a system that they can not confirm this, leading to a actions that have been made based on this id but is on a new entity?!

— Reply to this email directly or view it on GitHubhttps://github.com/apotapov/gdx-artemis/issues/13#issuecomment-33280030 .