As far as it looks like... an object is a kind of ds_map, but with a lot of pre-built stuff in it...
we could make it look like a data holder if we do something like
var a = instance_create_depth(0, 0, 0, object_data)
instance_deactivate(a);
and then use "a" just for data storage;
and it would be easier to access variables like this a.weapon.attack (where weapon is another object);
but then again a lot of builtin variables are there and.. it uses more memory... :/
what if we could disable (deactivate) the update/draw/(and every other event) and make the object "empty" with no variables at all... other than the ones defined within the create event of the object?? it would no be needed to place the object in a x and y because it would not be drawn... is for data only!!
this would be the closest thing to a OO class design... is it too bad?! (sorry if it is.. just though it would be a good ideia)
PS: another thing... accessing a none existing variable... example: a.adsfsdf (could result in a: undefined).. much like it happens with javascript (like a json object).
we could make it look like a data holder if we do something like
var a = instance_create_depth(0, 0, 0, object_data)
instance_deactivate(a);
and then use "a" just for data storage;
and it would be easier to access variables like this a.weapon.attack (where weapon is another object);
but then again a lot of builtin variables are there and.. it uses more memory... :/
what if we could disable (deactivate) the update/draw/(and every other event) and make the object "empty" with no variables at all... other than the ones defined within the create event of the object?? it would no be needed to place the object in a x and y because it would not be drawn... is for data only!!
this would be the closest thing to a OO class design... is it too bad?! (sorry if it is.. just though it would be a good ideia)
PS: another thing... accessing a none existing variable... example: a.adsfsdf (could result in a: undefined).. much like it happens with javascript (like a json object).