So you can set the maximum number of objects on frame to any number. I was just wondering, what is the point of this? Is it purely to stop too many objects being created? Or does setting the number lower help speed up the application or something?
So you can set the maximum number of objects on frame to any number. I was just wondering, what is the point of this? Is it purely to stop too many objects being created? Or does setting the number lower help speed up the application or something?
Some games tend to lag with many objects on the screen, so that limit is in place. It can be changed if a game requires more though, so it is more of a safety precaution.

I think there should be a option to check (or not) "Use limit of object"










Someone please correct me on this, but I think MMF reserves an ammount of memory depending on the object limit. So if you set it to 10.000, it will use more memory and be slower even if you don't have 10.000 objects on screen.
That was what I was thinking Popcorn, if this is true then I will want to optimize the 'Number of Objects' for each frame.
i've never noticed any different memory usage or speed difference... it's probably just there to help prevent you from creating more objects than you need
From the Help file...
'Number of objects
Enter in this line the maximum number of objects of the frame. From 100 to 20000. Of course, 20000 objects will be slower than 100.'
I believe this is to say that having 20000 actual objects would be slower than having only 100, not that it would be slower only by setting the limit.Originally Posted by Mantoid
Now, two things must be separated.
First is the speed and the second is memory requirements.
If setting the limit to 20000 objects actually creates an array of pointers to later created objects, this would not make things any slower, it would only require more memory.
I am completely sure that by setting the limit, maybe (if at all) only memory for a pointer memory (4 bytes for each object). Since it is unknown what kind of object will be created, making only a pointer makes any sense, if needed at all. Maybe MMF is saving some kind of metadata so the memory taken is a bit larger than only a pointer, but that's not something I would know...
Setting the limit to the maximum didn't make any of my frames run slower, so I guess, nothing except limit actually happens.

MMF does reserve the space for all the objects at the start.
EDIT: Well, not quite. It reserves a very small amount of space to record common info for all the objects, because the objects themselves differ in size it can't preallocate space for them.
Yeah that's what I meant by "metadata"... some data that is relevant to any object...Originally Posted by Dynasoft