ThreadBoard ArchivesSite FeaturesActiveworlds SupportHistoric Archives |
Object Delete Event (Sdk)
Object Delete Event // SdkcanopusJan 4, 1999, 7:06pm
The documents state that an object is uniquely identified by its Object
Number, Object X, and Object Z attributes. But during an EVENT_OBJECT_DELETE, the only available attributes are Object Session, Object Number, Cell X, Cell Z, and Cell Sequence. Will Object Number, Cell X, and Cell Z also be sufficient to uniquely identify an object? roland vilettJan 5, 1999, 5:03am
decastro@cable.a2000.nl (xelag)Jan 5, 1999, 11:10am
I was wondering if the object number is unique for any object in a
given world. If so, I would see the use of the mentioned attributes as a method to speed up recovery of the object in the case of a search for the object in the server-database (object_x, object_z) or for maintenance of the sequence array (cell_x, cell_z). Am I correct in assuming the uniqueness of the object number for ID purposes? XelaG. On Mon, 04 Jan 1999 13:06:58 -0800, Canopus <aek2 at ix.netcom.com> [View Quote] >The documents state that an object is uniquely identified by its Object >Number, Object X, and Object Z attributes. But during an >EVENT_OBJECT_DELETE, the only available attributes are Object Session, >Object Number, Cell X, Cell Z, and Cell Sequence. Will Object Number, >Cell X, and Cell Z also be sufficient to uniquely identify an object? walter knupeJan 5, 1999, 12:56pm
i doubt that a integer's range is enough to assign a unique ID to all
objects in a world if you fill each cell to its maximum (consider a cell data limit of "huge"). So my guess is that Object IDs are unique in their cell only Walter XelaG schrieb in Nachricht <36930de6.1696679 at news.activeworlds.com>... >I was wondering if the object number is unique for any object in a >given world. If so, I would see the use of the mentioned attributes as >a method to speed up recovery of the object in the case of a search >for the object in the server-database (object_x, object_z) or for >maintenance of the sequence array (cell_x, cell_z). > >Am I correct in assuming the uniqueness of the object number for ID >purposes? > >XelaG. roland vilettJan 5, 1999, 6:23pm
Yes that's correct. Object numbers are guaranteed to be unique within a
cell only. In practice, objects are assigned random 32-bit numbers when they are placed, so it is somewhat unlikely that two objects anywhere within a single world would have the same number. Depending on your application, you may be able to rely on the "unlikeliness" of that event. Anybody out there well skilled in the field of probability? Care to work out what the chances are that in AlphaWorld, which currently has approximately 32 million objects total, there are two objects anywhere that have the same number, given that they are each assigned a random number somewhere in the range of 1 to 4.3 billion? -Roland [View Quote] dthknightJan 5, 1999, 8:44pm
I believe the answer is 0.0055381%
( (32 million) / (4.3 billion) ) * ( (32 million - 1) / (4.3 billion) ) [View Quote] |