otterZ
Member
I am interested in how texture memory on a device is influenced by instances using sprites in different ways. I can't quite put into words exactly what I mean here, so here are some example scenarios below . . .
Example A) If I were to create an instance that drew a large sprite, let's say for example's sake the sprite had 300 images within that sprite. I created that instance and my device took a performance hit uploading it to texture memory. Let's say it was laggy.
Then, if I destroyed that instance, then created another instance (from a different object) in the same room / level which also used the exact same large sprite . . . would my device have to upload it to texture memory again? Or would it already be preloaded into my device's texture memory?
____________________________________
Example B) If I created an instance which used a large sprite, then drew it to the screen scaled down to 20% of its full size and my device took a small performance hit. Then drew it immediately full size (within the same draw event using conditionals and an alarm) to the screen. Would the full sized sprite take a performance hit, or is the sprite already drawn into the texture memory on my device for full size too, or would it have only the 20% version saved in my device's texture memory?
____________________________________
I don't want to know about sprite_prefetch here - l'm just interested in how texture memory is stored in relation to instance behaviour.
I am interested because the project I am working on is very much centred around large sprites; the game is working just fine, but I don't quite understand how GM is organising texture memory in regards to instance behaviour in the background.
I'd appreciate more experienced GM programmers' advice on how to understand this better
Example A) If I were to create an instance that drew a large sprite, let's say for example's sake the sprite had 300 images within that sprite. I created that instance and my device took a performance hit uploading it to texture memory. Let's say it was laggy.
Then, if I destroyed that instance, then created another instance (from a different object) in the same room / level which also used the exact same large sprite . . . would my device have to upload it to texture memory again? Or would it already be preloaded into my device's texture memory?
____________________________________
Example B) If I created an instance which used a large sprite, then drew it to the screen scaled down to 20% of its full size and my device took a small performance hit. Then drew it immediately full size (within the same draw event using conditionals and an alarm) to the screen. Would the full sized sprite take a performance hit, or is the sprite already drawn into the texture memory on my device for full size too, or would it have only the 20% version saved in my device's texture memory?
____________________________________
I don't want to know about sprite_prefetch here - l'm just interested in how texture memory is stored in relation to instance behaviour.
I am interested because the project I am working on is very much centred around large sprites; the game is working just fine, but I don't quite understand how GM is organising texture memory in regards to instance behaviour in the background.
I'd appreciate more experienced GM programmers' advice on how to understand this better