Game Development Community

Question about storing data

by Stephen · in Torque Game Engine · 05/26/2008 (8:29 pm) · 4 replies

I'm looking to create a simple MMO type game but don't want to have to worry about setting up a database to store the player's information. So I was thinking about having the server to save and store the player's information into a text file.

If this is possible would the server suffer lag from updating the information to the text file. And how many people could you have on one server with this type of storage?

#1
05/27/2008 (3:28 am)
I put user informations into flat text files - one file for each user using FileObject. Loading the file and parsing the file on login after that i keep the information in memory and save in an intervall and on logout.
How many people you can handle on this server depends not on the saving method. The disadvantage is if you have to scale your system to multiple machines you have to store the user files where all servers can read/write them. The advantage is you dont have to care about an sql server.
#2
05/27/2008 (11:08 am)
With using text file to save the player's information would be fine to do? So I can store the player's stats of their character, items, quest, etc..? I'm only looking to have maybe a few hundred players per server.

So you said you have a system like that already? Do you think you could show me how you have it set up?
#3
05/27/2008 (11:18 am)
@Tek0 - One of the greatest and most interesting books I've ever purchased is MUD Game Programming by Rob Penton.

I actually created a small MUD game a while back, and the experience was invaluable to me. I learned a lot of great programming concepts, and had a blast making the game.

Rob's code actually uses a text file database system. It's very, very slick and lightweight. I'd recommend the book to ANYONE who wants to make an MMO or MUD. Sans the graphics, just about everything in the book can be used for a MMO.
#4
05/27/2008 (11:32 am)
That's a pretty interesting book. But I'm not a programmer so I won't be able to create this myself. I'm mainly asking to see if it will work and if it would be dependable and support a few hundred players. I guess you can think of creating the text storage system would be a quick and easy to way create a test MMO project.