Datablock Limit
by Derk Adams · in Torque Game Engine · 04/18/2005 (1:31 pm) · 4 replies
Greetings,
Through some readings, it was mentioned about a limit to the number of datablocks in a game. So, my questions are this, 1. what is the limit if any? 2. Can the model be separated from the datablock (I have over 300 character models and the only significant thing different in the datablocks are the models)? 3. Can I only load the datablocks needed for the current mission, and how?
Thanks.
Through some readings, it was mentioned about a limit to the number of datablocks in a game. So, my questions are this, 1. what is the limit if any? 2. Can the model be separated from the datablock (I have over 300 character models and the only significant thing different in the datablocks are the models)? 3. Can I only load the datablocks needed for the current mission, and how?
Thanks.
About the author
#2
04/18/2005 (2:54 pm)
Thanks, my mind is at ease. I only planning on having 64 characters at most in a mission. Even with 2-3 times that number of static objects the ghost limit shouldn't be a problem.
#3
3. You can verify if the datablock you need is existing by isObject(NPC0). If failed, you call buildNPCDataBlock(0) to create one.
04/18/2005 (10:57 pm)
2. If you are talking about creating datablock without typing (in a .CS file). The following may help you:function buildNPCDatablock(%id)
{
eval("datablock PlayerData(NPC" @ %id @ ") {shapeFile = \"game/data/sprites/npc/npc" @ %id @ ".dts\";};");
%db = NPC @ %id;
%db.emap = false;
%db.boundingBox = "0.5 0.5 2.3";
%db.pickupRadius = 0.5;
}3. You can verify if the datablock you need is existing by isObject(NPC0). If failed, you call buildNPCDataBlock(0) to create one.
Torque 3D Owner Stephen Zepp
There -is- a limit on the number of ghosted objects, but this is simply for performance shaving (and it's a pretty small shave)--you can increase it with no major issues--just don't go overboard if you even find the need to do so. It's at either 1024 or 4096 currently.