Sign in to follow this  
scipio7

Question about player interaction with data

Recommended Posts

scipio7    122
I've been designing a game that is a space sim. In my game I want to have a computer system through which the player on a ship can access files in the computer called "elements". Elements include charts, numbers, graphs, documents, and many other things. Its the basic element of data in the computer system. I want to have it where players can make their own elements and modify elements. The elements will be stored in an in-game file system like windows explorer, where players can load different elements and work with them. For example, a player could take a chart from the filesystem to help him navigate a system. The question that I have is: what is the best way to implement this? I've though about it for a while now. The easiest way seems to be to load all of the elements in a particular filesystem when the player logs on. Then all of these elements are always there in RAM. But I would think that the larger the elements are in size and the more elements there are, the less likely this is to work. I also have thought about maybe having it where you have a core filesystem which is for long-term storage that doesn't allow fast access. The elements within this core would be represented by files on the hard drive. From a console a player could then load elements from the core to work with them, which would involve the program accessing the files when loading them into the console, and then having the elements available to the user. I'm not sure what kind of problems I'd encounter using different approaches, so I thought it would be good to post in here to ask people's opinions. --Scipio

Share this post


Link to post
Share on other sites
Valderman    513
Just how much data are we talking here? If it's too much to keep in RAM, you could implement a caching system. Keep track of the last time an object was accessed. When memory is getting scarce, you simply push the X least used objects to disk.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this