If I have an empty object, no events, not visible... anything at all... should it create overhead?!
Right now if I create a lot of these (empty) objects:
1) Memory rises (it's normal they exist) so it's OK!!
2) FPS drops... ?? NOT OK!!
I already talked about something similar before... If there is no logic associated with this objects, there should be no FPS drop..
QUESTION::
Now there will be people coming here and asking "how many empty objects are you creating"?! Well I'm creating 100000 or more (but that's not the point) and I'm not using them it's for test purposes only! (to discuss about how engine works.. and ways to improve it)
If I'm correct and people told me this before... "empty objects (with no events) generate no code entries"... so, and once there is no way to dynamically add code to instances (I think there was once before but there is no more) there should not be any excuse to have this kind of performance lost. But why is there?! (I'm curious! @Mike maybe you can answer me )
What I think the problem is: I guess the problem relies in the "auto existing code" for updating: position; vspeed, hspeed; speed; direction; angle... take note this is not related to the physics engine.. this is the hidden update code inside the objects (even if the physics is turned off).
SUGGESTION::
Would it be possible to make this instances have no CPU impact?!
The suggestion is, creating a function that makes objects,
1) not generate collision events with others!
2) not "auto" update
3) not draw
4) STILL ABLE TO EXECUTE EVENTS MANUALLY!!
6) they would still have the variables but they would not use them (kinda like deactivated objects but you could execute events in them!!)
I present to you.....
(this does not exist! is a suggestion only)
DISCUSSION::
This objects should not to be in the "list" of per frame execution and if internally the objects stay out of the "execution stack", there should be no impact at all (apart from the memory impact).
I think this would be the biggest step towards "structs" (objects for just storing data that cause NO performance lost). I know some other engines... and creating 1000000000 of objects (to my knowledge) doesn't cause this kind of performance lost... because they are no being executed.
What do you think?!
Right now if I create a lot of these (empty) objects:
1) Memory rises (it's normal they exist) so it's OK!!
2) FPS drops... ?? NOT OK!!
I already talked about something similar before... If there is no logic associated with this objects, there should be no FPS drop..
QUESTION::
Now there will be people coming here and asking "how many empty objects are you creating"?! Well I'm creating 100000 or more (but that's not the point) and I'm not using them it's for test purposes only! (to discuss about how engine works.. and ways to improve it)
If I'm correct and people told me this before... "empty objects (with no events) generate no code entries"... so, and once there is no way to dynamically add code to instances (I think there was once before but there is no more) there should not be any excuse to have this kind of performance lost. But why is there?! (I'm curious! @Mike maybe you can answer me )
What I think the problem is: I guess the problem relies in the "auto existing code" for updating: position; vspeed, hspeed; speed; direction; angle... take note this is not related to the physics engine.. this is the hidden update code inside the objects (even if the physics is turned off).
SUGGESTION::
Would it be possible to make this instances have no CPU impact?!
The suggestion is, creating a function that makes objects,
1) not generate collision events with others!
2) not "auto" update
3) not draw
4) STILL ABLE TO EXECUTE EVENTS MANUALLY!!
6) they would still have the variables but they would not use them (kinda like deactivated objects but you could execute events in them!!)
I present to you.....
Code:
instance_make_inert();
DISCUSSION::
This objects should not to be in the "list" of per frame execution and if internally the objects stay out of the "execution stack", there should be no impact at all (apart from the memory impact).
I think this would be the biggest step towards "structs" (objects for just storing data that cause NO performance lost). I know some other engines... and creating 1000000000 of objects (to my knowledge) doesn't cause this kind of performance lost... because they are no being executed.
What do you think?!
Last edited: