Posted: 23rd Aug 2021 13:58
Which is better, loading things in memblocks and deleting stuff when not needed or just loading into memory the conventional way and deleting when not needed?
Posted: 23rd Aug 2021 14:22
It makes no difference, its still in memory regardless, the only difference is the way you interact with it.
Posted: 23rd Aug 2021 14:30
@PartTimeCoder

Thank you
Posted: 25th Aug 2021 9:51
I insert all my assets into an array in an init function and assign global variables to them for control later.

+ Code Snippet
img = LoadImage("gfx_shoot.png")
gameImages.insert(img)
img_fireball = img


In the deinit function, I do this:

+ Code Snippet
for i = 0 to gameImages.length
	DeleteImage(gameImages[i])
next
gameImages.length = -1


Works for me and keeps everything tidy.
Posted: 27th Aug 2021 13:24
I insert all my assets into an array in an init function and assign global variables to them for control later.


Thank you, I will probably end up doing that. I'm ok at basic arrays I guess, but need practice on more complex arrays lol
Posted: 27th Aug 2021 16:19
Conventional is better as Memory Blocks are VERY Slow Commands in AGK...
This is especially true in regards to Creation and Destruction scaling somewhat exponentially with size.

Try timing loading 1920x1080 Images as Images., then as Memblock Images; you'll see what I mean.
In Dark BASIC Professional they're fast enough to really be an excellent and powerful too... functionally in AppGameKit they're just as versatile, but performance wise; it's so bad that you'll want to avoid using them as much as possible.
Posted: 5th Sep 2021 5:20
n Dark BASIC Professional they're fast enough to really be an excellent and powerful too... functionally in AppGameKit they're just as versatile, but performance wise; it's so bad that you'll want to avoid using them as much as possible.


Thank you Raven, that's good to know