Please HELP With Loading and Saving !
Zenith_Gameworks
Member Posts: 310
Ok, so after weeks of working on my first game, I am finally ready to begin publishing, except for one issue: I can't seem to successfully save or load two vital aspects of my game. 1.) High Score and 2.) Unlocked characters after certain scored are achieved. I've tried everything. Here are some screenshots and I apologize for the length, as I tried to be as descriptive as possible:
The following screenshot shows my character select screen before any new characters are unlocked. This is symbolized by the question marks and the text that says the score you need to get to unlock that character:
https://photos-3.dropbox.com/t/0/AAB1QW2JDES180WRGydrVCvr1mKEesj7wlPHyn3EjfPfIA/12/144913578/png/32x32/6/_/1/2/Screen Shot 2013-03-03 at 10.58.53 AM.png/4J4ep69e2cs7fmXSDqzogdY_luq1XZmuTSYm158-2DA?size=1280x960&size_mode=2
In this next screenshot, you see what it looks like once you get a score of 100 to unlock the first character of the game. My rules for this particular character say something like if game.score is greater or equal to 100, change attribute cu1 to true (cu1 is just my code for character unlock and the numbers represent which character is unlocked i.e. cu3 is the third unlock). Then, I have it so that if cu1 is true, destroy the question mark actor and spawn the character button you unlocked in its place, along with the text being changed to the characters name instead of how much you need to unlock it.
https://photos-6.dropbox.com/t/0/AAALKy26V4T-GgK4jUSq0eNQClAagmJVp19d5NZlLM1YWQ/12/144913578/png/32x32/6/_/1/2/Screen Shot 2013-03-03 at 10.59.51 AM.png/63QS9iGzrPCw2fgf_sWQY6B0bdG16OJdoJh-No11HtM?size=1280x960&size_mode=2
In this third screenshot, you see the rules of unlocking and saving for one of my characters; the rest are the same except they use cu2, cu3, cu4, etc...
https://photos-4.dropbox.com/t/0/AAAbC2ZqVX8_P4dllRFnLOReH2piI_ovHioLzAIzzOi_3Q/12/144913578/png/32x32/6/_/1/2/Screen Shot 2013-03-03 at 11.00.29 AM.png/xEGxakHRm7WngIdGiNlGDPpXtodlreIe-fFBl-Q2vwI?size=1280x960&size_mode=2
In this fourth screenshot, I am just trying to show the little white actor that is in my very first screen (main menu) that is assigned to do the loading:
https://photos-4.dropbox.com/t/0/AABJzyAdVqpXj3zhfow-YIUoc2nGQgoGcrwXbeGxEyWTlg/12/144913578/png/32x32/6/_/1/2/Screen Shot 2013-03-03 at 11.01.15 AM.png/UyoYzl7kSXh9hylBGnj7QvacI7TZMoBhjBM0BvgIiPY?size=1280x960&size_mode=2
This next screenshot shows the rules for loading the 7 different actor unlocks as well as the best score. I only want it to load
the clickable images of the characters if I have unlocked them:
https://photos-2.dropbox.com/t/0/AABTK7uxNi19PCP0sYz2RG1yB8mhthZv69cJWx31A7hz0g/12/144913578/png/32x32/6/_/1/2/Screen Shot 2013-03-03 at 11.01.41 AM.png/JkFQazpQMMwpMsfgad-2LxRZzQfGgEb3ipXNIeuxymE?size=1280x960&size_mode=2
Finally, this screenshot shows what rule I put for each scene to save the best score:
https://photos-1.dropbox.com/t/0/AAD_gX557maAYmNKYsqhR5Eqasi3VKsmv9aVhhc4mS3gOg/12/144913578/png/32x32/6/_/1/2/Screen Shot 2013-03-03 at 11.02.16 AM.png/ASZkwObRKEqVjCvKoshRJHkYlxVa4gr09GmXHhSA_qU?size=1280x960&size_mode=2
Here are the issues I'm having when testing in adhoc: The score and character unlocks are saved ONLY if you do not clear the game memory from your cache (pressing the home button twice and pressing the minus sign). Otherwise, the following happens:
1.) The best score isn't saved
2.) Whether or not you have unlocked any characters, if I go to the character select screen after clearing the game from the cache, all I see is the original purple character with his name (which is correct) but also no image whatsoever for any of the other characters. Instead, there is just the name of the characters that is displayed under them (not to be confused with the ... to unlock text that is displayed if you haven't unlocked them).
The following screenshot shows my character select screen before any new characters are unlocked. This is symbolized by the question marks and the text that says the score you need to get to unlock that character:
https://photos-3.dropbox.com/t/0/AAB1QW2JDES180WRGydrVCvr1mKEesj7wlPHyn3EjfPfIA/12/144913578/png/32x32/6/_/1/2/Screen Shot 2013-03-03 at 10.58.53 AM.png/4J4ep69e2cs7fmXSDqzogdY_luq1XZmuTSYm158-2DA?size=1280x960&size_mode=2
In this next screenshot, you see what it looks like once you get a score of 100 to unlock the first character of the game. My rules for this particular character say something like if game.score is greater or equal to 100, change attribute cu1 to true (cu1 is just my code for character unlock and the numbers represent which character is unlocked i.e. cu3 is the third unlock). Then, I have it so that if cu1 is true, destroy the question mark actor and spawn the character button you unlocked in its place, along with the text being changed to the characters name instead of how much you need to unlock it.
https://photos-6.dropbox.com/t/0/AAALKy26V4T-GgK4jUSq0eNQClAagmJVp19d5NZlLM1YWQ/12/144913578/png/32x32/6/_/1/2/Screen Shot 2013-03-03 at 10.59.51 AM.png/63QS9iGzrPCw2fgf_sWQY6B0bdG16OJdoJh-No11HtM?size=1280x960&size_mode=2
In this third screenshot, you see the rules of unlocking and saving for one of my characters; the rest are the same except they use cu2, cu3, cu4, etc...
https://photos-4.dropbox.com/t/0/AAAbC2ZqVX8_P4dllRFnLOReH2piI_ovHioLzAIzzOi_3Q/12/144913578/png/32x32/6/_/1/2/Screen Shot 2013-03-03 at 11.00.29 AM.png/xEGxakHRm7WngIdGiNlGDPpXtodlreIe-fFBl-Q2vwI?size=1280x960&size_mode=2
In this fourth screenshot, I am just trying to show the little white actor that is in my very first screen (main menu) that is assigned to do the loading:
https://photos-4.dropbox.com/t/0/AABJzyAdVqpXj3zhfow-YIUoc2nGQgoGcrwXbeGxEyWTlg/12/144913578/png/32x32/6/_/1/2/Screen Shot 2013-03-03 at 11.01.15 AM.png/UyoYzl7kSXh9hylBGnj7QvacI7TZMoBhjBM0BvgIiPY?size=1280x960&size_mode=2
This next screenshot shows the rules for loading the 7 different actor unlocks as well as the best score. I only want it to load
the clickable images of the characters if I have unlocked them:
https://photos-2.dropbox.com/t/0/AABTK7uxNi19PCP0sYz2RG1yB8mhthZv69cJWx31A7hz0g/12/144913578/png/32x32/6/_/1/2/Screen Shot 2013-03-03 at 11.01.41 AM.png/JkFQazpQMMwpMsfgad-2LxRZzQfGgEb3ipXNIeuxymE?size=1280x960&size_mode=2
Finally, this screenshot shows what rule I put for each scene to save the best score:
https://photos-1.dropbox.com/t/0/AAD_gX557maAYmNKYsqhR5Eqasi3VKsmv9aVhhc4mS3gOg/12/144913578/png/32x32/6/_/1/2/Screen Shot 2013-03-03 at 11.02.16 AM.png/ASZkwObRKEqVjCvKoshRJHkYlxVa4gr09GmXHhSA_qU?size=1280x960&size_mode=2
Here are the issues I'm having when testing in adhoc: The score and character unlocks are saved ONLY if you do not clear the game memory from your cache (pressing the home button twice and pressing the minus sign). Otherwise, the following happens:
1.) The best score isn't saved
2.) Whether or not you have unlocked any characters, if I go to the character select screen after clearing the game from the cache, all I see is the original purple character with his name (which is correct) but also no image whatsoever for any of the other characters. Instead, there is just the name of the characters that is displayed under them (not to be confused with the ... to unlock text that is displayed if you haven't unlocked them).
Comments
Secondly, tables are really the way to go. Unfortunately if you haven't built your games with these already in mind, it might be difficult to reverse engineer it.
I would suggest doing some searches on google about gamesalad tables. They tripped me up at first, but now they make so much sense.
1.) https://www.dropbox.com/s/tz7sril6d3p9v3z/Screen Shot 2013-03-03 at 10.58.53 AM.png?m
2.) https://www.dropbox.com/s/bk0benutazw2dv1/Screen Shot 2013-03-03 at 10.59.51 AM.png?m
3.) https://www.dropbox.com/s/edg2i9pyjafymgo/Screen Shot 2013-03-03 at 11.00.29 AM.png?m
4.) https://www.dropbox.com/s/nxsbqagx14m807p/Screen Shot 2013-03-03 at 11.01.15 AM.png?m
5.)https://www.dropbox.com/s/vb1c7coqddots3u/Screen Shot 2013-03-03 at 11.01.41 AM.png?m
6.)https://www.dropbox.com/s/6uvsqz5jr8cxli5/Screen Shot 2013-03-03 at 11.02.16 AM.png?m
Send and Receive Data using your own Server Tutorial! | Vote for A Long Way Home on Steam Greenlight! | Ten Years Left
much much much easier to work with.
you save a table after altering it. it loads automatically.
Send and Receive Data using your own Server Tutorial! | Vote for A Long Way Home on Steam Greenlight! | Ten Years Left