Page 1 of 1
Many images loading
Posted: Thu May 18, 2006 12:22 am
by yabune
Hi!
I need to load a lot of images in a game with the LoadSprite.
What's the best way to have the images stored? What's the fastest way to load them?
In a directory with all bmp's I use, with some sort of database, a binary, etc?
Thank you!
Posted: Thu May 18, 2006 12:37 am
by netmaestro
Fastest loading would come via IncludeBinary and CatchSprite(), as the files don't have to be accessed individually from the disk.
Posted: Thu May 18, 2006 2:25 am
by Shannara
I have to agree, that is the fastest way and uses double the memory for each image as you have one set of memory for include and another set in the catched sprite

Another way is to load them from disk, and store the image data in a linklist.
Actually, I use the linklist and pack files for my images.
Posted: Thu May 18, 2006 10:20 am
by yabune
Shannara wrote:I have to agree, that is the fastest way and uses double the memory for each image as you have one set of memory for include and another set in the catched sprite

Another way is to load them from disk, and store the image data in a linklist.
Actually, I use the linklist and pack files for my images.
thank you for the tips!
what about loading images and store them in an array. Would it be faster than linklist, or is the same?
I liked the ideia of the IncludeBinary, but it will be many images, and I'm afraid it takes a lot of memory.
Posted: Thu May 18, 2006 11:21 am
by Comtois
you can load one or several sprites (Chipset Tile) , and use ClipSprite().
Posted: Thu May 18, 2006 3:19 pm
by Paul
Another option is to use something like VBin and place all your data/images in a VBin container.
This allows you to load whatever you want in whatever order you want, keeps everything in a single file instead of hundreds of files in different folders, allows you to encrypt your data for protection and VBin access is very fast.
Click for VBin Download Page