• Hello [name]! Thanks for joining the GMC. Before making any posts in the Tech Support forum, can we suggest you read the forum rules? These are simple guidelines that we ask you to follow so that you can get the best help possible for your issue.

Question - Code instance_deactivate ...BROKEN (bug)?!

xDGameStudios

GameMaker Staff
GameMaker Dev.
This came across in another discussion, I just wanted to know if this is true, and if it is expected and why!!

but instance_deactivate... though stopping events from executing.... still produces massive fps drop (when there are too many objects)... manual says that instance deactivate would make objects been treated as non existing.

Is this some kinda bug? is the function broken?!

GMS1 would not drop fps... in this situation!
 
Last edited:

xDGameStudios

GameMaker Staff
GameMaker Dev.
Here in the image you can see that the fps is very low...
my code uses the room creation code and has the following code:

Code:
global.b = []

var  i = 0
repeat (100000) {
    global.b[i] = instance_create_depth(....);
    i++;
}

// the object I'm creating deactivates itself in creation code ;)
USING OBJECTS



another thing.... using ds_maps wich are very similar to objects.... uses a lot more memory.!!?

USING DS_MAPS



even though the objects have a lot of build-in variables.... YYG should really start to think on implementing
something like

Code:
struct_create();
this would create a object-ish structure...

1) with no build-in variables
2) deactivated
3) no graphics
4) and accessed as a object would ex: struct.variable = value; [...] and value = struct.variable;
5) accessing an non-existing variable would return ... undefined (for example);
6) no impact with fps
7) if it may need to be destroyed ex: struct_destroy(id);

and "replace" the ds_map (just saying though)
 
Last edited:
Top