This is a read-only archive of the old Scratch 1.x Forums.
Try searching the current Scratch discussion forums.

#1 2011-08-05 16:24:20

midnightwine
Scratcher
Registered: 2008-12-28
Posts: 14

Save game

If you're making a long game, it can be tiring to start the game over. How do you create a pause, unpause, and save game mechanic?

Offline

 

#2 2011-08-05 16:46:24

MoreGamesNow
Scratcher
Registered: 2009-10-12
Posts: 1000+

Re: Save game

Pausing/unpausing is something you have to build in to all/most of your scripts by yourself.  That is, you change a variable that all of your scripts call upon each time they're run, and if the variable isn't a certain value, they "wait until" it is again.  There isn't a "pause" block.

Saving is impossible if you mean that the user reloads the page and is back where they left off.  This is because all of the script is restarted when the page is reloaded, and scratch can't access external data.


http://images2.layoutsparks.com/1/218929/rubiks-cube-animated-rotating.gif
"Cogito ergo sum" --  I think, therefore I am

Offline

 

#3 2011-08-05 17:20:33

GP1
Scratcher
Registered: 2009-07-06
Posts: 1000+

Re: Save game

actually, yes there is, but its in Rocket. And you can save a game by writing things to a file, then reading them later. Panther and Bingo has this


I am currently http://blocks.scratchr.org/API.php?user=GP1&action=onlineStatus&type=imagehttp://blocks.scratchr.org/API.php?user=GP1&action=onlineStatus&type=text and I finally got over 1000 posts.

Offline

 

#4 2011-08-05 18:38:13

midnightwine
Scratcher
Registered: 2008-12-28
Posts: 14

Re: Save game

Really? do you know any link on scratch or anywhere for that matter that can help me save a game?

Offline

 

#5 2011-08-05 22:17:46

GP1
Scratcher
Registered: 2009-07-06
Posts: 1000+

Re: Save game

I could help you. Tell me what you want and I'll make you a project in Panther with comments and scripts to how to do it.


I am currently http://blocks.scratchr.org/API.php?user=GP1&action=onlineStatus&type=imagehttp://blocks.scratchr.org/API.php?user=GP1&action=onlineStatus&type=text and I finally got over 1000 posts.

Offline

 

#6 2011-08-05 22:31:42

Death_Wish
Scratcher
Registered: 2011-07-26
Posts: 1000+

Re: Save game

Midnight, remember that you can't upload Panther or any mod games to the Scratch website, so if you make the long game in Panther, let's say, you will only be able to upload it to sites that support Panther (2, 3, I don't know).


With a straight flush.
http://4.bp.blogspot.com/-FlUhnzmIROE/TgtpjdJl4tI/AAAAAAAABCM/W19pvFTZFaU/s1600/save_the_world.png http://blocsonic.com/images/special/rip-stevejobs.jpg

Offline

 

#7 2011-08-05 22:45:00

imnotbobguy101
New Scratcher
Registered: 2011-08-03
Posts: 64

Re: Save game

what you do, is one of two things.
1. make a test account. upload it there as "title name (unfinished)" or something like that.
2. do the same as step 1, but on your regular account

Offline

 

#8 2011-08-05 22:48:45

imnotbobguy101
New Scratcher
Registered: 2011-08-03
Posts: 64

Re: Save game

imnotbobguy101 wrote:

what you do, is one of two things.
1. make a test account. upload it there as "title name (unfinished)" or something like that.
2. do the same as step 1, but on your regular account

i forgot the "--imnotbob"
--imnotbob

Offline

 

#9 2011-08-05 23:00:38

awsomemaster
Scratcher
Registered: 2008-04-10
Posts: 83

Re: Save game

well one thing you can do is have a "save" button that when clicked gives a code that can be written down. each letter/number relating to a certain variable.

though this means someone who knows what variable each letter/number represents could then pretty much put the game into any scenario, for example if you had a shooter where one variable was the level the player was on and another variable was the weapon they had then they could set the level to 1,2,3,ect and set their weapon to some super gun you don't get till the last level and be using it on the first level ect...

but i don't think this is something to be real worried about since they would most likely need to play the game many times to figure out how the password worked.
AND you could always put some kind of sensor that detects to make sure all other variables are something you could actually have depending on the level at that point in the game.


scar the REAL 3d fps we've all been waiting for

Offline

 

#10 2011-08-05 23:01:31

Death_Wish
Scratcher
Registered: 2011-07-26
Posts: 1000+

Re: Save game

imnotbobguy101 wrote:

imnotbobguy101 wrote:

what you do, is one of two things.
1. make a test account. upload it there as "title name (unfinished)" or something like that.
2. do the same as step 1, but on your regular account

i forgot the "--imnotbob"
--imnotbob

That seriously wasn't necessary xD
But I think he meant he wanted the user to be able to save his game because it's long, and it'd be a hassle to need to do the story again if you refresh the browser.


With a straight flush.
http://4.bp.blogspot.com/-FlUhnzmIROE/TgtpjdJl4tI/AAAAAAAABCM/W19pvFTZFaU/s1600/save_the_world.png http://blocsonic.com/images/special/rip-stevejobs.jpg

Offline

 

#11 2011-08-05 23:07:06

GP1
Scratcher
Registered: 2009-07-06
Posts: 1000+

Re: Save game

Yeah. Just do it on panther, and upload it to mod share. Then you can upload a project to scratch with the link to the modshare page that has the project on it. That would work.


I am currently http://blocks.scratchr.org/API.php?user=GP1&action=onlineStatus&type=imagehttp://blocks.scratchr.org/API.php?user=GP1&action=onlineStatus&type=text and I finally got over 1000 posts.

Offline

 

#12 2011-08-05 23:11:54

veggieman001
Scratcher
Registered: 2010-02-20
Posts: 1000+

Re: Save game

I have seen games that just don't reset the variables when you reset.


Posts: 20000 - Show all posts

Offline

 

#13 2011-08-05 23:33:30

Death_Wish
Scratcher
Registered: 2011-07-26
Posts: 1000+

Re: Save game

veggieman001 wrote:

I have seen games that just don't reset the variables when you reset.

O_o That could be a rare glitch, that would save the project, but I don't know, I've never seen anything like that before... You're talking about a project on Scratch, not Mod Share or sites like that, right?


With a straight flush.
http://4.bp.blogspot.com/-FlUhnzmIROE/TgtpjdJl4tI/AAAAAAAABCM/W19pvFTZFaU/s1600/save_the_world.png http://blocsonic.com/images/special/rip-stevejobs.jpg

Offline

 

#14 2011-08-06 10:22:11

ImagineIt
Scratcher
Registered: 2011-02-28
Posts: 1000+

Re: Save game

veggieman001 wrote:

I have seen games that just don't reset the variables when you reset.

Yeah, that works but when you refresh the page it won't save.

Offline

 

#15 2011-08-06 11:14:31

Death_Wish
Scratcher
Registered: 2011-07-26
Posts: 1000+

Re: Save game

ImagineIt wrote:

veggieman001 wrote:

I have seen games that just don't reset the variables when you reset.

Yeah, that works but when you refresh the page it won't save.

Wait, by reset does he mean press green flag again or refresh page? O_o


With a straight flush.
http://4.bp.blogspot.com/-FlUhnzmIROE/TgtpjdJl4tI/AAAAAAAABCM/W19pvFTZFaU/s1600/save_the_world.png http://blocsonic.com/images/special/rip-stevejobs.jpg

Offline

 

#16 2011-08-06 12:15:57

ImagineIt
Scratcher
Registered: 2011-02-28
Posts: 1000+

Re: Save game

Death_Wish wrote:

ImagineIt wrote:

veggieman001 wrote:

I have seen games that just don't reset the variables when you reset.

Yeah, that works but when you refresh the page it won't save.

Wait, by reset does he mean press green flag again or refresh page? O_o

Green flag

Offline

 

#17 2011-08-06 12:26:50

Greenatic
Scratcher
Registered: 2009-05-03
Posts: 1000+

Re: Save game

An alternative is to have your project generate a password.  Of course, people would figure out the code, then hack the game...

Offline

 

#18 2011-08-06 16:33:32

johnnydean1
Scratcher
Registered: 2010-02-12
Posts: 1000+

Re: Save game

Claw has a save block built in...

Just saying  wink


You can now reach me on Twitter @johnnydean1_

Offline

 

#19 2011-08-06 19:12:53

Shin23
Scratcher
Registered: 2011-01-30
Posts: 100+

Re: Save game

If your talking about saving in-game, so when you die you dont start all over, then just have a variable for level, x position, health, etc. If your talking if you want to exit the game then comback later, then you will need to use a code people can write down, say a level code.


http://scratch.mit.edu/static/projects/Shin23/1957329_med.png New Super Mario Bros. Scratch! (beta)
PSN: shauthegreat23

Offline

 

#20 2011-08-09 09:49:04

robocos987
Scratcher
Registered: 2011-04-08
Posts: 3

Re: Save game

Look,saving ia possible,my game "A Ball's Adventure II" has a save script in it using one variable. Save only works when you download a game. A Ball's Adventure II link:http://scratch.mit.edu/projects/robocos987/1852534


Reply back if you think saving is impossible!
Robocos987

Offline

 

#21 2011-08-09 09:50:12

Servine
Scratcher
Registered: 2011-03-19
Posts: 1000+

Re: Save game

Unfortunately, save is possible. BUT, save codes could be edited to cheat. I suggest encrypting it.


http://bluetetrarpg.x10.mx/usercard/?name=Servine

Offline

 

#22 2011-08-09 10:33:57

MoreGamesNow
Scratcher
Registered: 2009-10-12
Posts: 1000+

Re: Save game

Yes, there are ways.  Codes for instance.   And downloaded projects can be saved, quit, and loaded.  But what I was trying to say is that short of asking for user input, there is not way to save a project online, refresh the page, and load the game at the saved point.


http://images2.layoutsparks.com/1/218929/rubiks-cube-animated-rotating.gif
"Cogito ergo sum" --  I think, therefore I am

Offline

 

#23 2012-09-30 17:19:59

julepdashgabriel
Scratcher
Registered: 2011-11-25
Posts: 2

Re: Save game

There is a way to save the game you did online, then use the save on downloaded game without typing any word in.
http://scratch.mit.edu/projects/julepdashgabriel/2808841
This number saver turns numbers in to pictures so you can take screen shot of the picture and put it on downloaded project as a new sprite, then make the project read the picture.

Offline

 

Board footer