Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Graphics Memory Manager
#1
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.
Life is like a box of chocolates', hrm, WTF, no it isn't, more like, 'life is like a steaming pile of horse crap.'
Reply
#2
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
[Image: freebasic.png]
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)