main]
projects
opinion
humor
links
sitemap
mail
about
résumé
misc

memory management

I have a bit of a history with muds, rom2.x derived ones, especially. I remember back in my 486/4mb ram days, I would have to shut down windows and go into dos mode, and run a non-networked version of the code to wander about due to the limited amount of ram. It annoyed me since I couldn't chat or go online at the same time, and it amazed me that a text based game could take up so much ram. So, in answer to these horrible memories I'll be instituting a memory management system, in case this project ends up with 40,000 rooms, plus keeping track of characters, inventory, and space exploration. This way while you run the game, it won't take up 7mb of ram.

general outline

  • only one area file (and/or including areas connected to that area) will be loaded into memory at a time (optional)
  • in order to keep up with the changes that are usually made, the areas are usually modified while in memory, and if the player quits, these changes may be lost, which would screw up the continuity of the game, so when the player quits, I had been thinking of creating a copy of all the area files and saving changes to them, but that would take up disk space unnecessarily, so changes to specific rooms and items will be saved to the player's savefile, then when the game is started up, the regular area files will be loaded, then the player file will be read, and the area files in memory will be changed accordingly

$Id: memory.html,v 1.5 2000/12/20 05:56:33 djk Exp $