Dower Posted November 6, 2013 Share Posted November 6, 2013 Hello everyone, I had an idea for a tool to create game data, like sprites or tiles. I'm going to attempt it in HTML5 and shoot for mobile devices. But I anted to get your thoughts on storage of this data? Since I would be dealing with potentially lots of small images as well as table like data... I suppose the game data can easily be stored as text via json, but should I even consider storing the images a base64 data, instead of binary? Then ultimately, what about storage locally on the device, like combining all the data into something like a a game save file (for transport later)? I know that indexedDB is not supported on IOS/Safari (so says caniuse.com) ... The one thought I did have was maybe wrapping this idea within PhoneGap and using a wrapper for Sqlite... Let me know your thoughts,Thanks,Dower Quote Link to comment Share on other sites More sharing options...
xerver Posted November 12, 2013 Share Posted November 12, 2013 You could always use lz-string to compress your data and store it in localstorage. http://pieroxy.net/blog/pages/lz-string/index.html Quote Link to comment Share on other sites More sharing options...
Dower Posted November 12, 2013 Author Share Posted November 12, 2013 Hey Xerver, Thanks for the sugggestion. That looks pretty interesting. I've been wondering if there were ways to compress local data. I was thinking about trying to use Phonegap to communicate with a Sqlite database, but I'm having a hard time getting that to work on the Windows side... I want to see if i can target the Windows side first, since my environment is setup for Windows development... Quote Link to comment Share on other sites More sharing options...
Chris Posted November 14, 2013 Share Posted November 14, 2013 You may want to take a look at taffy - a JavaScript based NoSQL database: http://www.taffydb.com/ Quote Link to comment Share on other sites More sharing options...
xerver Posted November 16, 2013 Share Posted November 16, 2013 You may want to take a look at taffy - a JavaScript based NoSQL database: http://www.taffydb.com/ IS this a memory-only DB? Where does it eventual write to? Quote Link to comment Share on other sites More sharing options...
Chris Posted November 16, 2013 Share Posted November 16, 2013 Yes, its memory-only. If you want to keep the data anywhere for persistent storage, you either need to write it to localStorage or send it to the server via AJAX. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.