Joh
Member
Hi, Just started working with external/run-time generated assets and apparently GM is not a fan, since it throws them all on different texture pages.
I've tried being councious around it, load only a small portion of sprites. based on what is needed. I unload (sprite_delete and sprite_flush) when not needed.
(I'm kind of doing somthing like lazy load for infinite scrolling websites)
Anyways, mistakes in code made it so everything got loaded ~30 sprites at the same time. and to my surprise, there was little impact. FPS is still great, Memory usage went up a lot, but its still <100mb.
So now I'm wondering, how much added sprites can there be at a time before performance hit? I'll experiment with it myself, but perhaps its something others have faced before. maybe I'm missing something too, because I am very surprised an alledged ~30 page swaps (if i understood correctly) barely has an impact on performace.
Also, one of the issue I have with load/unload (on a very active basis) is it keeps creating new sprites and to my surprise, the indices dont get overwritten, thus after a while I'm in the 1K sprite indexes even if I obviously don't have that many.
So yeah, overall, just want to know how much added sprite is viable and if I'm missing anything about sprite_add, textures, deleting sprites and potential memory leaks.
Thank you!
I've tried being councious around it, load only a small portion of sprites. based on what is needed. I unload (sprite_delete and sprite_flush) when not needed.
(I'm kind of doing somthing like lazy load for infinite scrolling websites)
Anyways, mistakes in code made it so everything got loaded ~30 sprites at the same time. and to my surprise, there was little impact. FPS is still great, Memory usage went up a lot, but its still <100mb.
So now I'm wondering, how much added sprites can there be at a time before performance hit? I'll experiment with it myself, but perhaps its something others have faced before. maybe I'm missing something too, because I am very surprised an alledged ~30 page swaps (if i understood correctly) barely has an impact on performace.
Also, one of the issue I have with load/unload (on a very active basis) is it keeps creating new sprites and to my surprise, the indices dont get overwritten, thus after a while I'm in the 1K sprite indexes even if I obviously don't have that many.
So yeah, overall, just want to know how much added sprite is viable and if I'm missing anything about sprite_add, textures, deleting sprites and potential memory leaks.
Thank you!