Take the 2-minute tour ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

I am developing an mobile application (in HTML5) that will run on multiple platforms and will eventually have both single and multiplayer options. The current issue I have is the best method for storing many rows of data so that the user can access it either in single (no internet) or multiplayer.

I have a relational database for the multiplayer users to access the data, however I'm concerned about performance (keep trying to access to the server). I was wondering if there is any reasonable method (apart from localstorage and websql - as I understand, localstorage can't hold a lot of data and websql is only available on certain platforms) to store a lot of data locally on a mobile device so that any non-internet users can still access their data and do so quickly?

share|improve this question

1 Answer 1

It depends, whether you game will run in browser or wrapper (such as PhoneGap, or your custom). In latter case you can simply use device storage to store anything you need.

share|improve this answer
1  
I'm planning to use PhoneGap for the mobile version, however I don't want to rely totally on this in case of failure. I was just wondering if there was a certain way to store rows of data locally on a mobile for quick and guaranteed access to the data. –  Marb Apr 3 '13 at 19:33
1  
May I ask what kind of failure are you expecting? If you work with PhoneGap, you will be using native file/database access same as every other application. –  nirth Apr 4 '13 at 9:21
    
Isn't there certain platforms that do not yet support this though? I'm thinking the only errors that may occur if there is a phone OS update or just a rare occurrence of an error. I guess I'm asking for a suitable secure fall back so that I can store multiple rows of data that can always be accessed through HTML 5 rather than a third party. –  Marb Apr 4 '13 at 18:07
    
I would say, that even if there were something in browser, that would allow you to store more data than LocalStorage does, it's more likely to loose data than any other means. Browsers have a tendency to clean up old data, when it overflows afaik. Using native methods to store data on each platform provide solution as stable as it can get within platform permissions. –  nirth Apr 4 '13 at 18:12
1  
Ahh right ok, what that mean that HTML 5 would not be a fall back solution; and seeing that I am using the PhoneGap it would be better to tap into that to get hold of the local data? (in case connecting to server fails) –  Marb Apr 4 '13 at 18:35

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.