1024 DataBlocks
by fire513 · in Torque 3D Professional · 05/17/2011 (5:28 pm) · 11 replies
Is there any plans to increase the number of available DataBlocks? It seems that 1024 is quite low considering the fact that they are used for several things such as sounds, particles, etc.... I have heard that you can increase this number but at the same time you are taking away from the available number of object IDs.
I know you can use several of these daablocks over and over again but still 1024 is pretty low in my opinion but I could be wrong.
I know you can use several of these daablocks over and over again but still 1024 is pretty low in my opinion but I could be wrong.
About the author
#2
However, i think that i will resolve in due course. At least i hope =)
05/18/2011 (6:33 pm)
Yes Sean, but it is a big problem when you want to put a game online with lots of weapons and hundreds of items.However, i think that i will resolve in due course. At least i hope =)
#3
change
05/18/2011 (7:48 pm)
in sim.hchange
DataBlockObjectIdBitSize = 10,to
DataBlockObjectIdBitSize = 20,
#4
05/18/2011 (8:11 pm)
20bit = 1.048.576 unique IDs?
#5
05/18/2011 (8:58 pm)
something like that, and I've seen no real impact on playability. I still wouldnt now load up a million+ datablocks, any engine would suffer under a load like that.
#6
05/19/2011 (11:43 am)
..that datablock count is 1 outdated thorn.
#7
The method that you show above decreases the total number of object IDs available correct?
Can you expand on that Sean H. I thought that all data blocks were loading at the beggining.
05/19/2011 (12:34 pm)
@deepscratchThe method that you show above decreases the total number of object IDs available correct?
Can you expand on that Sean H. I thought that all data blocks were loading at the beggining.
#8
The 10 bit lenght expose 1023+1 unique IDs.
The 20 bit lenght expose 1.048.575+1 unique IDs.
EDIT: Maybe, a 16 bit lenght is good, reserve 65.535+1 object's IDs.
05/19/2011 (12:53 pm)
No... INCREASE the number of objectID available. The 10 bit lenght expose 1023+1 unique IDs.
The 20 bit lenght expose 1.048.575+1 unique IDs.
EDIT: Maybe, a 16 bit lenght is good, reserve 65.535+1 object's IDs.
#9
I thin there are two different IDs
dataBlockIDs and ObjectIDs
When you increase this "DataBlockObjectIdBitSize = 20" I have been told you decrease the number of ObjectIDs that you can have. Yes it increases the number of datablocks but it is taking the space from somewhere elses.
05/19/2011 (2:08 pm)
@ Alfio I thin there are two different IDs
dataBlockIDs and ObjectIDs
When you increase this "DataBlockObjectIdBitSize = 20" I have been told you decrease the number of ObjectIDs that you can have. Yes it increases the number of datablocks but it is taking the space from somewhere elses.
#10
datablocks are created and deleted. when they are created and when they get deleted depends on the script. just be sure a datablock exists before you try to create an object that uses it. =)
in the default script base, in scripts/server/game.cs, the datablocks are created in onServerCreated() function. they remain in memory until the game ends at core/scripts/server/server.cs in destroyServer(). destroyServer() is eventually called from clicking the quit button.
deleteDataBlocks() is called to delete all of the existing datablocks, but you can always say datablockNameOrId.delete(). you could probably call that while loading a new mission.
05/20/2011 (11:36 pm)
@fire513datablocks are created and deleted. when they are created and when they get deleted depends on the script. just be sure a datablock exists before you try to create an object that uses it. =)
in the default script base, in scripts/server/game.cs, the datablocks are created in onServerCreated() function. they remain in memory until the game ends at core/scripts/server/server.cs in destroyServer(). destroyServer() is eventually called from clicking the quit button.
deleteDataBlocks() is called to delete all of the existing datablocks, but you can always say datablockNameOrId.delete(). you could probably call that while loading a new mission.
#11
With this method it seems like I could easily delete all of the datablocks that are made for an outdoor evniorment (waterfall sounds, particles, etc...) when the player goes into a cave for example. Once entering the cave all of the datablocks made for it could be loaded.
05/21/2011 (5:42 am)
Thanks for the explanation. That clears up a lot for me. I was afraid that I would be stuck with a cartain number. With this method it seems like I could easily delete all of the datablocks that are made for an outdoor evniorment (waterfall sounds, particles, etc...) when the player goes into a cave for example. Once entering the cave all of the datablocks made for it could be loaded.
Torque 3D Owner Sean H.