Qbasicnews.com

Full Version: Graphics Memory Manager
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Weeks ago Pritchard asked a question and I suggested a method of managing graphics where the system loads/unloads the graphics as needed. The system had to be smart enough to only unload them after a certain amount of time that way they were still available for a while if needed. Tonight I took the time to make an example of this. While it doesn't use a particularily good look-ahead for graphics to be needed, it works fairly well all the same.

Anyway, here it is!

http://ecowles.dyndns.org/download.php?f...anager.zip

Everything is controlled through the defines at the top as to how it works.

Feel free to steal my code.
Haven't looked at your code yet, but wouldn't it make sense for the program to load/unload as it goes? It ought to know when its done with a graphic, for example once the user has gone through the main menu, the title screen graphics can be unloaded, when a new level is loaded, some of the monster graphics can be unloaded etc. For a while seems pretty unreliable...but maybe I should look at your code first Tongue