Game Development Community

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

#1
06/06/2009 (10:28 am)
I don´t know about iPhone since I just have used TGB, but option 2 works pretty well for me.
#2
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 iphone
Use 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.