I’m writing a code for an inventory manager for my game, and I was wondering what would be the best way to handle all the items that would be in the game. I came up with two solutions for this.
- load all items from a text/xml file, and keep them in memory for the duration of a game session.
- Load the Item text/xml file retrieve the item that I want to get then dispose of the list.
So which method would be better. I’m not sure since I have never made a game that needed an inventory system before. Also I should mention that in my game I will be considering skills that my character use as items as well.