LoadAnimImage
BlitzMax Forums/BlitzMax Programming/LoadAnimImage
| ||
i have an image that has 64x64 tiles on it the tiles are of size 40x40 pixels. It take forever to load it using LoadAnimImage. Here is the statement w/o the variables: TileImages = LoadAnimImage("t.png", 40, 40, 0, 64*64) Is there a way toi speed the loading up? |
| ||
Is there a way toi speed the loading up? Well you're loading roughly 26 megabytes into memory at once, it'll take a while. It shouldn't take forever, tho'. How much time is forever in this case? 20 Seconds? 1 minute? 5 minutes? 20 minutes?As for speeding it up, one way would be to save it without using compression. You're preforming decompression of 6.5 million pixels. |
| ||
In the game I am porting over I use to use just load image a then use DrawImageRect. but that function's params have changed. that use to take care of my speed issue. |
| ||
i dont really see how that would've changed the speed... loadanimimage doesnt actually break up the image... that's probably done with texcoords when you draw the object. maybe try a smaller image? or many images that you load and unload when you need them cuz that seems a bit excessive, what your talking about is 4096 tiles |
| ||
How much memory does your Mac's graphics card have, as opposed to your PC? |
| ||
Thanks for the help, I am changing stuff drastically in the game. I think this is more poor design on my part. |
| ||
Good point, James. 26MBs of tiles wont leave much Video Memory left, will it? |
| ||
It is just that the RPG I am creating has about 3000 tiles to it.... Oh well the next couple of days will be intertesting as I try to sort out this stuff. :-( |
| ||
yea but you're obviously not going to be using all of them at once so why not make different zones that only use a specific tile set then as you cross zone load/unload tilesets... |
| ||
ya that is what I am figuring out now.... |