Page 1 of 1

2.0.1 entityID and geomID

PostPosted: Sat Dec 31, 2011 2:56 pm
by Matten
I just noticed that on reloading (and maybe simply loading) a scene, all the geomID's and enityID's change. I don't think this makes Scene.entityByID very useful...

Re: 2.0.1 entityID and geomID

PostPosted: Sat Dec 31, 2011 5:25 pm
by tatt61880
Yeah.
And now I thought the randomness of the ID:s can cause non-deterministic/randomness of simulation.
i.e. Doesn't entityID/geomID affect to simulation?

Re: 2.0.1 entityID and geomID

PostPosted: Sun Jan 01, 2012 9:31 am
by Kilinich
It's fine since you can read IDs via readable on the fly so no matter is it changed or not. Besides, entityID is not changing on undo.

Re: 2.0.1 entityID and geomID

PostPosted: Mon Jan 02, 2012 12:18 pm
by Matten
But what if I want to for example have a spring that has a length based on the color of a box? (the spring can be connected to the box if that's easier)

Re: 2.0.1 entityID and geomID

PostPosted: Sat Jan 07, 2012 1:36 am
by tatt61880
Kilinich wrote:It's fine since you can read IDs via readable on the fly so no matter is it changed or not. Besides, entityID is not changing on undo.


1. You need to use onCollide etc. when you get ID:s via readable, don't you? If ID:s is not changed, you can easily script deleting the entity, for example. Scene.RemoveEntity(Scene.entityByID(50))
2. I thought entityID is one of the cause of randomness. I believe there are many causes of randomness, and none of them should remain in the future.

Re: 2.0.1 entityID and geomID

PostPosted: Sun May 13, 2012 7:38 pm
by tatt61880
I've uploaded scene which reproduce this issue.
[scene]62556[/scene]

Re: 2.0.1 entityID and geomID

PostPosted: Sat Jun 02, 2012 12:16 pm
by tatt61880
[scene]62995[/scene]
Saving scene seems to change geomID's order.
I don't know the order affects calculating order or not, but I think this change is something to do with randomness issue.
I guess that C++'s map(hash table) changes the order.

NOTE: When you re-saved scene after reloading scene, this issue seems not to be occurred.