Game Development Community

How do I preload specific images?

by Nicolai Dutka · in Torque Game Builder · 04/15/2008 (1:18 pm) · 1 replies

I have one GuiBitmapCtrl in my GUI and some function that has it change images 30x/second. This effectively creates animations via flip-book style. The problem is, none of the images are preloaded, so my framerates drop to a crawl on most machines.

How would I preload the images so the framerate doesnt take a hit? It's only about 22mb worth of info that can be dumped as soon as the game starts...

I guess I should ask, once preloaded, how would I dump those out of memory?

#1
06/27/2008 (7:24 am)
Why don't you use static sprites instead of GUI? If you do switch to preloading static sprites, it may take anywhere from 10-30 seconds to preload the textures. Perhaps that is preferable to lag in-game.