octothorpe : An entity value will always be a very large value as the OS chugs up the first umpteen megs of RAM. Handle() should never equal an Entity value unless you have several million entities. A quick test shows a sprite created at 10615232 and a sphere created at 21826408. That's 10 million entities before Handle starts to encroach! It also looks like different entity types are stored in different locations, as the mesh was stored much deeper in the memory than the sprite.
Regards using Handle(), looking at your List code I see the entity can be retrieved through Object(). So Blitz is storing the pointers to entities and types in it's own array, and Handle() returns which array index a given entity is, and Object() returns the pointer held at that index? I've just tried...
c.cat=New cat
h=Handle(c)
p=Object(h)
Text 320,250,"Handle "+p
...and I get a compilation error 'Expecting Identifier'. Can you explain a bit more about Object()? A linked list might be an excellent addition to my current program. I currently use an array of types but deleting entities leaves holes in my array that it'd be awkward to manage. A linked list a much more sensible solution to the problem I think.
Regards using Handle(), looking at your List code I see the entity can be retrieved through Object(). So Blitz is storing the pointers to entities and types in it's own array, and Handle() returns which array index a given entity is, and Object() returns the pointer held at that index? I've just tried...
c.cat=New cat
h=Handle(c)
p=Object(h)
Text 320,250,"Handle "+p
...and I get a compilation error 'Expecting Identifier'. Can you explain a bit more about Object()? A linked list might be an excellent addition to my current program. I currently use an array of types but deleting entities leaves holes in my array that it'd be awkward to manage. A linked list a much more sensible solution to the problem I think.