Datastorage and performance

Associate
Joined
7 Dec 2007
Posts
302
Location
Derbyshire, Tibshelf
For my game, I'm going to have data about the different building: costs, requirements, names, cost multipliers and other random data about buildings, that are only ever accessed and are never likely to change...

This also goes for unit information such as costs, requirements, HP, build times yadda yadda... which are also only ever going ot be accessed by users and are also never likely to change...

At the moment these were put into excel, converted to CSV and imported into an SQL table for users to SELECT when they were about to build something... but im sure this is probably the worst way to do it... performance wise?

In comparison to SQL, which is the best way of storing data that is never likely to change and just be accessed by users?

Perhaps XML? Textfile? some other form of flatfile database? SQL? CSV? and does anyone have some sort of reference that will explain in more detail? (as this is for my uni project and I need to explain them etc)

Thanks :)
 
its real time based, and im not in wolverhampton :D

Need it to be able to handle any amount of users :P 1million if need be ;D
 
cool :D thanks for the information.

Understand it better as well now, can add all this to my assignment :P Will show people my game sooner or later as well, people have helped enough to see it at least :D

The scope of my project is a little insane I think. Had to learn a language then code something like that... well I already had web and data skills to an extent, just had to learn PHP was really it... and design the game. It has been fun though :)

Apparently Travian started off with around 100 users by word of mouth as a hobby then grew into what it is now, of like 4.3million players :D
 
Could always use SQLite (http://www.sqlite.org/) instead of the full blown package. Probably save you hours of writing parsing routines too :p.

I guessssss I could at least have a look at it, but how much more work would it be? to just implement from a CSV file with data seperated by commas and rows ending with a ; or something?

When first reading about sql lite I was a bit... blerg! pointless! but after reading that page again I can see why someone would use it :P
 
its currently doing most of that using SQL. The users were making the updates... sooo there are 10 troop movements, everytime a user loads a page they check the troop movement table. If there are any records with a hit_target_time less than the current time, do all the updating etc.

I can imagine it would also be good for crontabs to sift through it every minute or something in the odd case that a user isn't online to make the updates.

Surely it would be quicker to check a flatfile structure such as CSV? building_ID indexed by the row number and then grabbing that information? because then there is no connection required... its only going to get read... but you know more than me :P

if you suggest using XML or SQL... out of three... Which is the quickest method for retrieving the building information?

CSV, XML, SQL. If the building information was within an XML surely it would be useful for fansites and the guide page to utilise this XML and display it elsewhere? Providing that it is the quickest way?

Also, if it is quicker than SQL having a flatfile system... how much quicker? and is that only going on the basis that the connection is always open using Apache pconnect?
Thanks :)
 
yeah, I noticed you were from Derbyshire and decided to fill mine in :P Where abouts are you from? Did work in Alfreton Tesco, girlfriend lives in Chesterfield and im from Tibshelf :D

There will probably be about 50 units... Is it only pconnect and apache that allow the database connection to stay open? and if so... why would anyone choose any other SQL package if it allows you to do that? :P
 
Back
Top Bottom