Dynamic Datablocks?
by Magra Thea · in Torque Game Engine · 09/28/2007 (10:05 am) · 1 replies
From what I have seen so far, datablocks are hard-coded entities that the server sends to the client.
Is there a way to load these datablocks from a database or XML? Im building a system that could easily have 10,000 unique items and having 10,000 unique datablocks seems silly when all the data can be store in tables in MySQL and only loaded as needed.
Is there any work or examples in this area? I have done a search, but nothing popped out at me.
Thanks,
Magra
Is there a way to load these datablocks from a database or XML? Im building a system that could easily have 10,000 unique items and having 10,000 unique datablocks seems silly when all the data can be store in tables in MySQL and only loaded as needed.
Is there any work or examples in this area? I have done a search, but nothing popped out at me.
Thanks,
Magra
Torque 3D Owner Stephen Zepp
The very purpose of datablocks is two fold:
--optimize networking by transmitting data for a large group of objects once, at mission start, so you never need to deliver them again during a game execution.
--provide the ability for scripters (modders, etc) to re-define the behavior of the engine in a data-driven manner. You can completely change the behavior and qualities of an underlying class with datablocks simply by writing scripts, without changing the underlying source code.
Now, datablocks can be used in a dynamic manner if you have the same data on the clients already, prior to game execution (so that they don't have to be networked), but you really want to stay away from attempting to change the core design concept of networking optimization to using datablock generation "on the fly" during run time.