I've been wondering, where do all my save files go? I can reference them from code but can't find in any folder . I create files in game. I really need to see my custom created xml files. Thanks
Ok. Well how about player. I think it would be useful to file on my PC before testing on Actual device. For example in networking tutorial local out = io.open("|D|imageUnique.png", "wb") out:write(loader.data) out:close()
where can I see image on PC, to what folder does |D| lead for emulator
on Windows XP: C:\Documents and Settings\[YOUR USER NAME]\Local Settings\Temp\gideros\[YOUR APP NAME] on Windows Vista and Windows 7: C:\Users\[YOUR USER NAME]\AppData\Local\Temp\gideros\[YOUR APP NAME] on Mac OS X: Currently I don't know. Let me look at it
and another question, is there a way to set specific folder for saving data. I mean in projects folder data/ would seem logical. And everything stored in the folders you directed me looks like "bin/" for VisualC projects, which location would be cool to specify as well. Thanks
We can put an option to specify this directory or provide a way for easy accessing to it.
On the other hand, project directory may not be a good idea for this purpose. Because if somebody already creates a data/ directory for his/her own use and then we write on it, there would be problems.
On Android, on my phone, they end up in /sdcard/gideros/[YOUR APP NAME]/ at least when testing with the player.
This doesn't happen on my phone (Galaxy Nexus). I can't seem to find the file anywhere. Using the Player (Linux using Wine) I find the file in the Windows XP location atilim mentioned above, but it gets erase on every relaunch of the app.
If I want to save, for example, game progress, unlocked levels, scores etc in document directory: Is there some more secure storage, not accessible by phone user? Or it is better to encrypt data? Or I am paranoid?
@chipster123 both issues are interesting. Do you know where your sdcard is mounted? Is it mounted at /sdcard as usual?
@ar2rsawseen Most probably, I prefer not to spend time to encrypt the data. I've looked at a bunch of popular iOS games and see that they are usually using NSUserDefaults class (save their progress as .plist file) and I can see all their progress, etc. with Property List Editor. But you always have option to implement your own encryption algorithm.
Update: the files are save on my development machine running Linux/wine in Windows XP mode in the following location: /home/chip/.wine/drive_c/windows/profiles/chip/Temp/gideros/blockschedule/documents/
The save/load works now (thanks ndoss for the extra help)
But running it on the Galaxy Nexus/ICS there is no directory 'gideros' created in /sdcard (/sdcard/gideros/...) so the save/load doesn't work. I'm looking for where the save file may have gone because it didn't throw any errors at run time.
It couldn't have anything to do with the fact that this phone has no external sd card? It has two mount points /mnt/sdcard and /sdcard, both of which are the same "physical" directory.
If you can see the output of logcat, can you look for a log like: "externalDir: ****" and "internalDir: ***" Gideros Player uses the externalDir while exported application uses internalDir.
I've copy-pasted your code, exported as an Android application and run it. I can see that gid_doc.txt is created at: /data/data/com.giderosmobile.chipster123savefiles/files/gid_doc.txt and gid_tmp.txt is created at: /data/data/com.giderosmobile.chipster123savefiles/cache/gid_tmp.txt
Exported applications don't use sdcard, only player uses it.
If I run your code through Player, I can see the files at /sdcard/gideros/chipster123savefiles
[SOLVED] (BTW, @atilim - that worked for me.) The issue all along "> was that at some point the installed application didn't update the one I was clicking on. It installed another instance of the application. I figured it out when I found the application with the generic gideros icon instead of the one I made. I was selecting the one with my icon. Again "> I must have changed something I didn't realize.
Thanks for all your testing @atilim. Now, how should I go back through this post and denote [SOLVED] ?
This should be a sticky - or at least referenced in a FAQ somewhere.
Hmm - I wonder, could we have a forum category called "important s*** you'll need to know eventually" that is read only and then mod's could put important posts like this in it?
WhiteTree Games - Home, home on the web, where the bits and bytes they do play! #MakeABetterGame! "Never give up, Never NEVER give up!" - Winston Churchill
Go ahead - It wouldn't be the first time I've had "powers beyond that of mortal humans" - the power to spit the dummy faster than a speeding bullet, to leap to tall conclusions in a single bound and squash bugs with only the power of his mind
WhiteTree Games - Home, home on the web, where the bits and bytes they do play! #MakeABetterGame! "Never give up, Never NEVER give up!" - Winston Churchill
Comments
Likes: atilim
local out = io.open("|D|imageUnique.png", "wb")
out:write(loader.data)
out:close()
where can I see image on PC, to what folder does |D| lead for emulator
on Windows Vista and Windows 7: C:\Users\[YOUR USER NAME]\AppData\Local\Temp\gideros\[YOUR APP NAME]
on Mac OS X: Currently I don't know. Let me look at it
One addition to Stoffe's answer: There is no normal way to access these files on iOS
On the other hand, project directory may not be a good idea for this purpose. Because if somebody already creates a data/ directory for his/her own use and then we write on it, there would be problems.
Using the Player (Linux using Wine) I find the file in the Windows XP location atilim mentioned above, but it gets erase on every relaunch of the app.
How can I save an access on next startup?
I found a nice code package persistence.lua for saving and load tables http://the-color-black.net/blog/article/LuaTablePersistence
On IOS: Start Xcode Organizer. There you can download the content of your document directory.
But make sure, that you have saved your data into it. If you don't then read up on the file system:
http://www.giderosmobile.com/documentation/file_system.html
Likes: chipster123
http://www.macroplant.com/iexplorer/
Is there some more secure storage, not accessible by phone user?
Or it is better to encrypt data?
Or I am paranoid?
@ar2rsawseen Most probably, I prefer not to spend time to encrypt the data. I've looked at a bunch of popular iOS games and see that they are usually using NSUserDefaults class (save their progress as .plist file) and I can see all their progress, etc. with Property List Editor. But you always have option to implement your own encryption algorithm.
@atilim, i think the |D| will solve it.
/home/chip/.wine/drive_c/windows/profiles/chip/Temp/gideros/blockschedule/documents/
The save/load works now (thanks ndoss for the extra help)
But running it on the Galaxy Nexus/ICS there is no directory 'gideros' created in /sdcard (/sdcard/gideros/...) so the save/load doesn't work. I'm looking for where the save file may have gone because it didn't throw any errors at run time.
It couldn't have anything to do with the fact that this phone has no external sd card? It has two mount points /mnt/sdcard and /sdcard, both of which are the same "physical" directory.
If you can see the output of logcat, can you look for a log like:
"externalDir: ****" and "internalDir: ***" Gideros Player uses the externalDir while exported application uses internalDir.
Using a simple project and this simple test code demonstrates the problem.
On my dev machine
I've copy-pasted your code, exported as an Android application and run it.
I can see that gid_doc.txt is created at:
/data/data/com.giderosmobile.chipster123savefiles/files/gid_doc.txt
and gid_tmp.txt is created at:
/data/data/com.giderosmobile.chipster123savefiles/cache/gid_tmp.txt
Exported applications don't use sdcard, only player uses it.
If I run your code through Player, I can see the files at /sdcard/gideros/chipster123savefiles
EDIT: Update 4/1/2012 - the player works for ICS. Pilot error.
I can't navigate into the /data partition.
I'll have to re-read all the things related to gideros and building for android then get back to you.
Although you cannot get the directory listing, you can navigate through (at least on my Android phone):
The issue all along "> was that at some point the installed application didn't update the one I was clicking on. It installed another instance of the application. I figured it out when I found the application with the generic gideros icon instead of the one I made. I was selecting the one with my icon. Again "> I must have changed something I didn't realize.
Thanks for all your testing @atilim. Now, how should I go back through this post and denote [SOLVED] ?
+ (void) saveStat : (int) v : (NSString*) key
{
[[NSUserDefaults standardUserDefaults] setInteger:v forKey:key];
[[NSUserDefaults standardUserDefaults] synchronize];
}
+ (int) loadStat : (NSString*) key
{
id v;
int n = 0;
NSUserDefaults *standardUserDefaults = [NSUserDefaults standardUserDefaults];
if (standardUserDefaults) {
v = [standardUserDefaults objectForKey:key];
n = [v intValue];
}
return n;
}
c functions to call obj-c
static int saveStat(lua_State* L)
{
const char *s = luaL_checkstring(L, 1);
int v = luaL_checkinteger(L,2);
NSString *str = [NSString stringWithFormat:@%s,s];
[GameKitHelper saveStat:v :str];
return 0;
}
static int loadStat(lua_State* L)
{
const char *s = luaL_checkstring(L, 1);
NSString *str = [NSString stringWithFormat:@%s,s];
int v = [GameKitHelper loadStat:str];
lua_pushinteger(L, v);
return 1;
}
*Edit: OK, I was out of my mind. But digging this thread should bring good info for new members :-"
Hmm - I wonder, could we have a forum category called "important s*** you'll need to know eventually" that is read only and then mod's could put important posts like this in it?
Likes: hgvyas123
#MakeABetterGame! "Never give up, Never NEVER give up!" - Winston Churchill
Hmm, no scratch that, I just imagined what would happen if someone will take away his silver star
Website: http://www.castlegateinteractive.com
https://play.google.com/store/apps/developer?id=Castlegate+Interactive
#MakeABetterGame! "Never give up, Never NEVER give up!" - Winston Churchill