Hi,
first of all, sorry for my bad english, i try my very best :-)
i've been thinking about about an additional tag for the b3d file format to store more specific data to entitys.
I've thought about a tag called "PROP" for property where certain data can be stored.
Data like, wich sound should be played if a bulled hit this entity or wich particle system should be spawned on destruction. There are lots of data wich can be stored there.
I got two different approaches to this, first i've thought it should be like the "ANIM" or "BONE" directly into the "NODE"
BB3D
__TEXS
__BRUS
__NODE
____MESH
____ANIM
____NODE
______BONE
______KEYS
______PROP
______NODE
________BONE
________KEYS
________PROP
PROP:
int id ;a userdifined ID wich speciefied the type of property
int size ;the size of the property (integer would be 4, a string would be stringlen + 1)
bin property ;a bank like data chunk
but this could end up in a lot of extra filesize, because a lot of propertys could be shared by the entitys ! As example, every wooden entity would have the same impact sound !
Well, the other idea would be to store the propertys as a property list just like "TEXS" or "BRUS" and point to them. This gives the ability to share propertys.
The NODE could have a property reference list then.,
PROP{
int id ;a userdifined ID wich speciefied the type of property
int size ;the size of the property (integer would be 4, a string would be stringlen + 1)
bin property ;a bank like data chunk
}
BB3D
__TEXS
__BRUS
__PROP
__NODE
____MESH
____ANIM
____NODE
______BONE
______KEYS
______PROR
______NODE
________BONE
________KEYS
________PROR
where "PROR" is the property reference list
PROR:
int reference_count ;the number of property references
bin references ;a chunk 4 x reference_count long
what do you think about it .. any other approaches ... or is this whole thing about PROP-Tag nonsense ?
well, if this property thing could be implemented into the Blitz entity structure to gain a fast access to these propertys, i think this would be greatly improve Blitz3D.
Then all these workarounds to store the entitydata in types and reference them with the handle() into the entityname() is unnecessarily.
I think about something like a pointer to a bank containing the property data.
i would like to hear what Blitz-Community and Mark Sibly himself thinks about this.
first of all, sorry for my bad english, i try my very best :-)
i've been thinking about about an additional tag for the b3d file format to store more specific data to entitys.
I've thought about a tag called "PROP" for property where certain data can be stored.
Data like, wich sound should be played if a bulled hit this entity or wich particle system should be spawned on destruction. There are lots of data wich can be stored there.
I got two different approaches to this, first i've thought it should be like the "ANIM" or "BONE" directly into the "NODE"
BB3D
__TEXS
__BRUS
__NODE
____MESH
____ANIM
____NODE
______BONE
______KEYS
______PROP
______NODE
________BONE
________KEYS
________PROP
PROP:
int id ;a userdifined ID wich speciefied the type of property
int size ;the size of the property (integer would be 4, a string would be stringlen + 1)
bin property ;a bank like data chunk
but this could end up in a lot of extra filesize, because a lot of propertys could be shared by the entitys ! As example, every wooden entity would have the same impact sound !
Well, the other idea would be to store the propertys as a property list just like "TEXS" or "BRUS" and point to them. This gives the ability to share propertys.
The NODE could have a property reference list then.,
PROP{
int id ;a userdifined ID wich speciefied the type of property
int size ;the size of the property (integer would be 4, a string would be stringlen + 1)
bin property ;a bank like data chunk
}
BB3D
__TEXS
__BRUS
__PROP
__NODE
____MESH
____ANIM
____NODE
______BONE
______KEYS
______PROR
______NODE
________BONE
________KEYS
________PROR
where "PROR" is the property reference list
PROR:
int reference_count ;the number of property references
bin references ;a chunk 4 x reference_count long
what do you think about it .. any other approaches ... or is this whole thing about PROP-Tag nonsense ?
well, if this property thing could be implemented into the Blitz entity structure to gain a fast access to these propertys, i think this would be greatly improve Blitz3D.
Then all these workarounds to store the entitydata in types and reference them with the handle() into the entityname() is unnecessarily.
I think about something like a pointer to a bank containing the property data.
i would like to hear what Blitz-Community and Mark Sibly himself thinks about this.