Discuss Scratch

xxXPuppyGodXxx
Scratcher
11 posts

How Do You Make A Save Data System?!?!?!

I Have Been Using Scratch For A Long Time Now And I Have Cloud Data But I Need A Save Data System For My New Game I'm Making And I Don't Know How To Make One So Please Help.
ancientroboman
Scratcher
5 posts

How Do You Make A Save Data System?!?!?!

Are you looking for a way to save highscores, or something like rpg items?
xxXPuppyGodXxx
Scratcher
11 posts

How Do You Make A Save Data System?!?!?!

Its Sort'ave Hard to Explain, I'm Trying To Save Variables Into 1 profile and keep it in that players profile and do the same for other profiles
xxXPuppyGodXxx
Scratcher
11 posts

How Do You Make A Save Data System?!?!?!

Pretty Much What I'm Saying Is That I'm Trying To Make It So People Can Have Separate Data.
austin360
Scratcher
100+ posts

How Do You Make A Save Data System?!?!?!

I'm currently trying to find a way to save data , it involves making a account-like thing though.
austin360
Scratcher
100+ posts

How Do You Make A Save Data System?!?!?!

I will tell you if I find out how.
a9584
Scratcher
6 posts

How Do You Make A Save Data System?!?!?!

xxXPuppyGodXxx wrote:

I Have Been Using Scratch For A Long Time Now And I Have Cloud Data But I Need A Save Data System For My New Game I'm Making And I Don't Know How To Make One So Please Help.

Ok so, based on some testing you've got about 300 base-ten digits to play with per cloud variable, and a maximum of 10 cloud variables per project. You're going to be limited, but here is what I can come up, given these constraints, that might work for you:

User Flow
1) The user is asked if they want to create a new save file, or want to retrieve an old save.
2) If they want to create a new save file, you provide them with a “save number” that they need to remember. They are then prompted to choose a 4 digit password for that save file. Then the game begins.
3) If they want to load an existing save file, they need to enter their password. The game then starts at their last save point.

Behind the Scenes

1) Looks like for a cloud variable I can represent 10^288 and still work with it, so let's call each block a save file and say that the first two digits AB are the save number, the second four are the password CDEF that the user has chosen for his/her file, and the last 10 are your representation of save data GHIJKLMNOP. So that's 18 save files per variable. For arguments sake, let's say you make 6 cloud variables for save data– then you'll be able to have the 100 save files (00 to 99) available to your users represented by “AB”. Your save data can be whatever you break it up to be and you can tie it to different elements of your game based on how you've structured your game. For instance, if you want to save level, overall score, and lives left, for instance, then maybe “GH” is the level and “IJKLMN” is the score and “OP” is the number of lives left. Feel free to play with these as you feel fit, trading off the number of save slots with the level of detail you want to capture in your save file. It's really going to be important that you check and keep things within bounds (e.g. users between 00 and 99, passwords between 0000 and 9999, etc.) else you'll wind up with a bunch of corrupted and useless data for all your users.

2) You'll need at least one hidden cloud variable for yourself that represents the most recent save file number. You'd increment this each time a new save is created successfully. Let's call this “SaveFileNumber” and start it at 0 for the example in #1. When this hits 100, there are no more save files available for your users.

3) Ok so in the example given, let's say we've got “SaveFileGroup1” through “SaveFileGroup6”. You can store 18 save files and then you have to jump to the next one, so you'd store your new files based on SaveFileNumber (Group1 = 0 to 17, Group2 = 18 to 35, etc).

For save file 0, you're going to need to store SaveFileGroup1 = 00aaaaaaaaaaaaaa.
For save file 1, you've got SaveFileGroup1 = 01bbbbbbbbbbbbbb00aaaaaaaaaaaaaa.
…and so forth

I'll let you work out the math as to how to store and retrieve the numbers, but some use of powers, division and the floor function should do the trick. If you have trouble I'll try to help when I'm more awake. Good luck!

(This all said, you can use a similar digit-assignment assignment strategy to come up with a game password system rather than have saved-game files. Different values of different digits can be mapped to specific elements of the game. So in the example we used above, when a user is ready to quit you give them a password that represents their progress (level, score, and number of lives left). Of course, this now becomes a crackable element even if you come up with some way of obfuscating the correlation between progress and password, but you will no longer be limited by the number of save files you can provide and the clunky number manipulation won't be needed!)

Last edited by a9584 (Jan. 5, 2015 06:43:35)

Haycar8
Scratcher
95 posts

How Do You Make A Save Data System?!?!?!

I want to figure out how to make a cloud-based global high-score system, any ideas?
invisibowl
Scratcher
23 posts

How Do You Make A Save Data System?!?!?!

xxXPuppyGodXxx wrote:

Pretty Much What I'm Saying Is That I'm Trying To Make It So People Can Have Separate Data.
Have save data saved as a cloud variable, and have the game detect the player's username and unlock the save data depending on the player's username. I'll come up with a scratchblocks layout for it when I get home
LeedleMaster
Scratcher
55 posts

How Do You Make A Save Data System?!?!?!

Here , I have a sulotion: http://scratch.mit.edu/projects/47073008/

I hope it helps
LeedleMaster
Scratcher
55 posts

How Do You Make A Save Data System?!?!?!

Haycar8 wrote:

I want to figure out how to make a cloud-based global high-score system, any ideas?
This is the script

whenclickedforeverifscore>(Hiscore) thensetScoreto(Hiscore)

Exept the Hiscore varibale is cloud

Last edited by LeedleMaster (Feb. 10, 2015 13:21:30)

LSulin
Scratcher
8 posts

How Do You Make A Save Data System?!?!?!

whenclickedifscratch=epicthenbroadcast vuse scratchwhenIreceive vuse scratchusescratch
BenReck
New Scratcher
1 post

How Do You Make A Save Data System?!?!?!

https://scratch.mit.edu/projects/80040836/ Thats how to make one

Last edited by BenReck (Oct. 5, 2015 19:32:02)

Powered by DjangoBB