Game Development Community


#1
03/02/2005 (10:26 am)
@Robert: Whilst you're partially correct, reading from the disk should be avoided, those files are miniscule. If you loaded ALL the effects in the example T2D directory, they total approximately 80K!

Also, it depends on how you use effects. If you're worried that you're creating lots of effects dynamically, it's always good to reuse effects, not destroy them and recreated them constantly. You could preload effects and just position/start/stop them when needed if needed, there are many options.

I'm not going to promise when here but I'm working on ideas for memory caching for stuff like this as well as a unified file-format for T2D.

- Melv.
#2
03/02/2005 (10:36 am)
Disclaimer: Unproven assumption here.

Assuming that Melv used the Torque Resource Management system for effects, Robert's concern isn't anything to worry about--the Resource Management system handles all of that caching IIRC. Basically, it decodes your filename, checks to see if it's already in memory, and if so uses that instead of re-loading from disk. This is my understanding of the RM anyway!
#3
03/02/2005 (10:59 am)
So there's no need for us to implement object pooling in script? :)
#4
03/02/2005 (11:40 am)
You could pre-allocate a pool of effect objects and then just have a pool manager hand out objects as you request them, allocating new ones only when the pool is empty (or deny creation if the object count is maxed out). When you're done with an effect, tell the pool manager. Or schedule an event to tell the pool manager after the object "dies".

This could be done in C++, but script might be just as well since it's mostly just shuffling around object references.

Unless you're having performance issues, though, it's probably best to let the system do its thing as there might be more going on under the hood than we're aware of. :)
#5
03/02/2005 (2:12 pm)
It is best to let T2D worry about the technology. We'll be addressing performance more and more as things move forward. For instance, we'll be adding batching support for the particle-system, making certain file reads go through the resource-manager (for the reasons Stephen mentions), tile-map efficiency and many other things.

We're in a sweet spot at the moment but as we start leaning more and more on T2D, we'll be making the system more and more efficient.

Rather than worrying about potential performance issues, roll yourself a long one, pour an iced one and have fun focusing on your games.

Let us worry for you. :)

- Melv.
#6
03/02/2005 (7:39 pm)
Quote:Rather than worrying about potential performance issues, roll yourself a long one, pour an iced one and have fun focusing on your games.

Let us worry for you. :)
That makes the engine worth about $10,000 all by itself. :)