Persistant Storage Options
by Rob Sandbach · in Torque Game Builder · 06/06/2009 (10:21 am) · 4 replies
Hello all,
I'm looking at the best way to implement storage between sessions (high scores, profiles etc.). The requirements are:
1) Local storage, no network connection required.
2) Cross platform (Win/osx/iPhone(iTGB))
I currently have 3 lines of thinking:
1) Integrate a local DB solution (SQLite or SimpleDB?)
2) Write out a custom file using the file read/write stuff (blurgh..)
3) Save out a scriptObject, compile the CS then delete it to leave a DSO we can load next startup
I've always used option 3) but it's hellishly clunky and open to abuse. Would option 1 work with iTGB and the iPhone? Are there any options I've overlooked?
Any help would be greatly appreciated!
Thanks,
Rob
I'm looking at the best way to implement storage between sessions (high scores, profiles etc.). The requirements are:
1) Local storage, no network connection required.
2) Cross platform (Win/osx/iPhone(iTGB))
I currently have 3 lines of thinking:
1) Integrate a local DB solution (SQLite or SimpleDB?)
2) Write out a custom file using the file read/write stuff (blurgh..)
3) Save out a scriptObject, compile the CS then delete it to leave a DSO we can load next startup
I've always used option 3) but it's hellishly clunky and open to abuse. Would option 1 work with iTGB and the iPhone? Are there any options I've overlooked?
Any help would be greatly appreciated!
Thanks,
Rob
#2
Use the cypher resource so you can just store the AESed data of your savegame
06/06/2009 (11:10 am)
2 is the only one that will work on all platforms because you are not allowed to compile cs to DSO on the iphoneUse the cypher resource so you can just store the AESed data of your savegame
#3
06/06/2009 (11:54 am)
Thanks very much guys, will look into it.
#4
06/06/2009 (5:25 pm)
SQLite will work on all platforms. It's integrated into both Mac OS X and iPhone OS.
Torque Owner Isaac Barbosa
IQ Games