Game data storage

Talk among developers, and propose and discuss general development planning/tackling/etc... feature in this forum.
Post Reply
hsoj
Just a tourist with a frag'd nav console
Just a tourist with a frag'd nav console
Posts: 3
Joined: Thu Nov 22, 2007 2:13 am

Game data storage

Post by hsoj »

I was taking a look at the new methods that vegastrike uses in order to store its game data, and was wondering if other options where looked at as appose to csv files. From my experience, flat files like this take a lot of resources when manipulating them. Have options like sqlite, and cdb been explored to store this data?
loki1950
The Shepherd
Posts: 5841
Joined: Fri May 13, 2005 8:37 pm
Location: Ottawa
Contact:

Post by loki1950 »

Welcome hsoj you missed lots of XML as well :wink: the problem with the db backends you mention is query time tie will it fit into the the physics frame for a playable frame rate.and are they properly supported in the three platforms we run on.The cvs files are not new really they have been part of the engine since the start.they are a pain to edit though but a dedicated editor has been developed which make it a doodle 8)

Enjoy the Choice :)
my box::HP Envy i5-6400 @2Q70GHzx4 8 Gb ram/1 Tb(Win10 64)/3 Tb Mint 19.2/GTX745 4Gb acer S243HL K222HQL
Q8200/Asus P5QDLX/8 Gb ram/WD 2Tb 2-500 G HD/GF GT640 2Gb Mint 17.3 64 bit Win 10 32 bit acer and Lenovo ideapad 320-15ARB Win 10/Mint 19.2
hsoj
Just a tourist with a frag'd nav console
Just a tourist with a frag'd nav console
Posts: 3
Joined: Thu Nov 22, 2007 2:13 am

Post by hsoj »

It seems that using this format of files would actually take more time to search for the data that is contained. Of course, this depends on the amount of times these resources are used and how they're stored. For example, you may not need to load the data that contains a ship's price when you view one in the universe; but in the logic, you will need to know important information on the ship (e.g, armor, speed, etc.).

I have benchmarked using data stored in this manner, against using something with a DB back end (i.e, sqlite). My findings are that using flat files like csv or xml, actually take longer time to manipulate. I previously used the CDB example, as a pointer to projects that are capable of running in the same manner of a flatfile, but add to lowering the cost of accessing them.

Also, it may turn out that it really does not provide enough of an improved performance to implement it into the client. But, it may prove beneficial to the server daemon if it is designed to handle a multitude of NPC/players.
ace123
Lead Network Developer
Lead Network Developer
Posts: 2560
Joined: Sun Jan 12, 2003 9:13 am
Location: Palo Alto CA
Contact:

Post by ace123 »

Actually CSV support is a relatively new addition compared to what we had before.

It used to be done with XML files everywhere, which took forever to load (XML is really slow to read). CSV is much faster since it's all array indices and associative maps compared to a complex tree structure and parser in XML.
jackS
Minister of Information
Minister of Information
Posts: 1895
Joined: Fri Jan 31, 2003 9:40 pm
Location: The land of tenure (and diaper changes)

Post by jackS »

I'd be tempted to believe the file format isn't actually of key importance to performance, given that we read the entire file and transform it into in-memory structures. Since all of the entries are read only, this task is further simplified.
ace123
Lead Network Developer
Lead Network Developer
Posts: 2560
Joined: Sun Jan 12, 2003 9:13 am
Location: Palo Alto CA
Contact:

Post by ace123 »

True... the main problem I remember were the XMeshes before we converted to binary formats...
GoldenGnu
Bounty Hunter
Bounty Hunter
Posts: 155
Joined: Fri Jan 27, 2006 6:58 pm
Location: Denmark

Post by GoldenGnu »

I like the CSV files.. It makes editing/reading the files by hand (notepad, openoffice etc.) and help programs (Like VSTrade) a lot easier.... If the data was kept in a database, editing by hand wouldn't be an options, It would require a dedicated editor...

That's just my 2 cent...
Image
VSTrade - A Merchants Guide to Intergalactic Trading!
0.3.0.0 Stable (3 july 2008)
hsoj
Just a tourist with a frag'd nav console
Just a tourist with a frag'd nav console
Posts: 3
Joined: Thu Nov 22, 2007 2:13 am

Post by hsoj »

I agree that the CSV format is great for the ease of manipulation, but that is only to the human eye. It seems that the way that this data is maintained from within the client could be changed to lower overhead (Possibly?). Mind you, I am strictly speaking from a standpoint of programming in the UNIX environment.

I really do not see this subject being something that would arise any type of importance at this state, but I do feel that it might be something that would want to be visited down the road when more data is being implemented into the game.
Post Reply