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

#1 2008-07-03 18:08:56

avanjasound
Scratcher
Registered: 2008-04-04
Posts: 5

is it possible to "keep high scores" in current SCRATCH?

Hey Everyone,

The students in my class are all working on creating a game in which they all can play and that "keeps" the highest scores and player names. Just like most console and coin-op video games.

I do not know of any way to "output" from SCRATCH while a game is running, so there is no way to send the relevant data outside the application. Also there is no "counter" either which could maybe store the data even after the application has been quit.

So I am stumped a bit. Been searching on the boards and have downloaded NetScratch client/server but still no real solution. The students (high school teens) are all pretty grumpy about it too and it seems so obvious that I overlooked that aspect of gaming while teaching the workshop.

I think the same value of authorship in programming needs to reflected in game playing skill so game players could chart progress on how well they played any game. I would love to hear from any of the advanced members ideas towards solving this problem or a neat workaround. Also would love to hear your thoughts on how other educators feel about the lack of being able to easily script a "high score board with player name" into any game.

thanks!

Offline

 

#2 2008-07-03 18:10:30

Bluestribute
Scratcher
Registered: 2008-01-24
Posts: 1000+

Re: is it possible to "keep high scores" in current SCRATCH?

Right now, you need to have them post comments and update the project (or have them tell you their score)


http://img247.imageshack.us/img247/1204/bluestributett4.jpg
That's my PSN ID. I know tons of COD4 glitches. Add me as your friend. Oh, and get a headset

Offline

 

#3 2008-07-03 18:24:25

avanjasound
Scratcher
Registered: 2008-04-04
Posts: 5

Re: is it possible to "keep high scores" in current SCRATCH?

I understand that method. This was more about SCRATCH in the classroom running fullscreen on a workstation. The students normally prefer to play that way. These are teens so there can be a bit of bragging going on but because there is no evidence things can get ugly!

Example: Player A plays game gets score "X". Quits app. Later player B plays game gets score "Y". Player A comes over and brags about score, they argue, etc.

Unless the students are watching each other play the above is the likely outcome. I honestly have not given it much thought because I focus heavily on creating games and trouble shooting scripts. So that aspect of "winning the game" slipped my mind. Now the kids want to specifically make a multiplayer game that has this feature at its core.

So sorry I didn't specify that this was more about SCRATCH in the classroom than online...my bad.

Offline

 

#4 2008-07-08 15:53:10

alien99
Scratcher
Registered: 2008-06-23
Posts: 44

Re: is it possible to "keep high scores" in current SCRATCH?

When netscratch comes out, it may hav a feature like dat  tongue


This is Terminator68's testing account

Offline

 

#5 2008-07-08 16:36:45

archmage
Scratcher
Registered: 2007-05-18
Posts: 1000+

Re: is it possible to "keep high scores" in current SCRATCH?

In order to save a score the user would have to save the project to save the value of the variable. So you can have a script that enters the highest score into a highscore variable and then just keep saving the project every time the highscore variable is updated. That way when player A gets their highscore, they can save it then send it to player B to brag about their highscores.

Unfortunately, there is no way to prevent player A from cheating to get this score since you can edit variable values very easily (ie slider).


Hi, I am Archmage coder extraordinaire. I do Scratch,pascal,java,php,html, AS2 and AS3. Leave me a message if you want coding advice. Also check out my personal website, lots of good stuff about web development, Flash, and Scratch (v1 and v2) !

Offline

 

#6 2008-07-08 16:47:19

Cyclone103
Scratcher
Registered: 2008-03-20
Posts: 500+

Re: is it possible to "keep high scores" in current SCRATCH?

If the browser reloads after a hi-score has been made, it will automatically  return all variables and objects to the state they were in when the person who uploaded uploaded the project. Unless you would have multiple players on the same computer, and none of them refreshed the browser you......kinda have a working hi-score. Until the Scratch team adds in "Saving" variables which would make, in this case, the highest score of any user appear on the screen, but it would stay at that score until the user who uploaded re-uploads with another value for that variable. If you want to create a hi-score list(for just one computer, saving the project to retain the scores), use Jens' lists and files hack. If you want to have names on a hi-score list, use the lists and files in tandem with Netscratch and use the text variables with the lists and regular variables.


All your base are belong to us

Offline

 

#7 2008-07-08 16:48:29

Bluestribute
Scratcher
Registered: 2008-01-24
Posts: 1000+

Re: is it possible to "keep high scores" in current SCRATCH?

Cyclone103 wrote:

If the browser reloads after a hi-score has been made, it will automatically  return all variables and objects to the state they were in when the person who uploaded uploaded the project. Unless you would have multiple players on the same computer, and none of them refreshed the browser you......kinda have a working hi-score. Until the Scratch team adds in "Saving" variables which would make, in this case, the highest score of any user appear on the screen, but it would stay at that score until the user who uploaded re-uploads with another value for that variable. If you want to create a hi-score list(for just one computer, saving the project to retain the scores), use Jens' lists and files hack. If you want to have names on a hi-score list, use the lists and files in tandem with Netscratch and use the text variables with the lists and regular variables.

Is that the write/read blocks? How would you use those?


http://img247.imageshack.us/img247/1204/bluestributett4.jpg
That's my PSN ID. I know tons of COD4 glitches. Add me as your friend. Oh, and get a headset

Offline

 

#8 2008-07-08 16:57:31

archmage
Scratcher
Registered: 2007-05-18
Posts: 1000+

Re: is it possible to "keep high scores" in current SCRATCH?

Cyclone103 wrote:

If the browser reloads after a hi-score has been made, it will automatically  return all variables and objects to the state they were in when the person who uploaded uploaded the project. Unless you would have multiple players on the same computer, and none of them refreshed the browser you......kinda have a working hi-score. Until the Scratch team adds in "Saving" variables which would make, in this case, the highest score of any user appear on the screen, but it would stay at that score until the user who uploaded re-uploads with another value for that variable. If you want to create a hi-score list(for just one computer, saving the project to retain the scores), use Jens' lists and files hack. If you want to have names on a hi-score list, use the lists and files in tandem with Netscratch and use the text variables with the lists and regular variables.

The OP said that he is referring to saving highscores in the class room NOT online.

Read the last bit of the OP's last post:
So sorry I didn't specify that this was more about SCRATCH in the classroom than online...my bad.


Hi, I am Archmage coder extraordinaire. I do Scratch,pascal,java,php,html, AS2 and AS3. Leave me a message if you want coding advice. Also check out my personal website, lots of good stuff about web development, Flash, and Scratch (v1 and v2) !

Offline

 

#9 2008-07-08 16:58:06

Cyclone103
Scratcher
Registered: 2008-03-20
Posts: 500+

Re: is it possible to "keep high scores" in current SCRATCH?

Bluestribute wrote:

Cyclone103 wrote:

If the browser reloads after a hi-score has been made, it will automatically  return all variables and objects to the state they were in when the person who uploaded uploaded the project. Unless you would have multiple players on the same computer, and none of them refreshed the browser you......kinda have a working hi-score. Until the Scratch team adds in "Saving" variables which would make, in this case, the highest score of any user appear on the screen, but it would stay at that score until the user who uploaded re-uploads with another value for that variable. If you want to create a hi-score list(for just one computer, saving the project to retain the scores), use Jens' lists and files hack. If you want to have names on a hi-score list, use the lists and files in tandem with Netscratch and use the text variables with the lists and regular variables.

Is that the write/read blocks? How would you use those?

Didn't you read the PDF that came with the hack? It explains everything about the list blocks.


All your base are belong to us

Offline

 

#10 2008-07-08 17:00:35

Bluestribute
Scratcher
Registered: 2008-01-24
Posts: 1000+

Re: is it possible to "keep high scores" in current SCRATCH?

Cyclone103 wrote:

Bluestribute wrote:

Cyclone103 wrote:

If the browser reloads after a hi-score has been made, it will automatically  return all variables and objects to the state they were in when the person who uploaded uploaded the project. Unless you would have multiple players on the same computer, and none of them refreshed the browser you......kinda have a working hi-score. Until the Scratch team adds in "Saving" variables which would make, in this case, the highest score of any user appear on the screen, but it would stay at that score until the user who uploaded re-uploads with another value for that variable. If you want to create a hi-score list(for just one computer, saving the project to retain the scores), use Jens' lists and files hack. If you want to have names on a hi-score list, use the lists and files in tandem with Netscratch and use the text variables with the lists and regular variables.

Is that the write/read blocks? How would you use those?

Didn't you read the PDF that came with the hack? It explains everything about the list blocks.

NO I have not  smile  But now I will


http://img247.imageshack.us/img247/1204/bluestributett4.jpg
That's my PSN ID. I know tons of COD4 glitches. Add me as your friend. Oh, and get a headset

Offline

 

#11 2008-07-08 17:01:55

Cyclone103
Scratcher
Registered: 2008-03-20
Posts: 500+

Re: is it possible to "keep high scores" in current SCRATCH?

archmage wrote:

Cyclone103 wrote:

If the browser reloads after a hi-score has been made, it will automatically  return all variables and objects to the state they were in when the person who uploaded uploaded the project. Unless you would have multiple players on the same computer, and none of them refreshed the browser you......kinda have a working hi-score. Until the Scratch team adds in "Saving" variables which would make, in this case, the highest score of any user appear on the screen, but it would stay at that score until the user who uploaded re-uploads with another value for that variable. If you want to create a hi-score list(for just one computer, saving the project to retain the scores), use Jens' lists and files hack. If you want to have names on a hi-score list, use the lists and files in tandem with Netscratch and use the text variables with the lists and regular variables.

The OP said that he is referring to saving highscores in the class room NOT online.

Read the last bit of the OP's last post:
So sorry I didn't specify that this was more about SCRATCH in the classroom than online...my bad.

Well, if everybody is using the same computer, then assuming that nobody cheats and changes the value of the hi-score, and the only script pertaining to the high score is:

<when green flag clicked>
<forever>
<if><( <{ Score }> <>> <{ High Score }> )>
<set{ High Score }to( <{ Score }>
<end>


All your base are belong to us

Offline

 

#12 2008-07-08 23:33:34

avanjasound
Scratcher
Registered: 2008-04-04
Posts: 5

Re: is it possible to "keep high scores" in current SCRATCH?

Just wanted to let everyone know that one of my students (a high school freshman) is EXTREMELY confident that he has figured out a workaround that can not fail. He is currently working on it right now but refuses to divulge his methodology until he gets it to do exactly what we want...namely to save scores.

I have a strong feeling he is going to "socially engineer" the scenario which would be pretty clever indeed. I could be wrong but I think he is going to add a screen at the end of game that simply instructs the user to do a manual save. Then when the game is launched again the end game high score will serve as input for the opening screen, so that players will see both names and scores. In fact, he drew me a diagram that looked like a spread sheet in which all the names would be accessible via variable slider. So I suppose at the start of the game you find your name with the slider and it would also show you the last saved score you had. Again, I am guessing somewhat and his final design may be different but this is what I think he is working on.

Essentially then a whole class could play the game and every player could have a "latest score" record kept of their gameplay.

I will definitely let you know more as I learn more!

Offline

 

#13 2008-07-08 23:35:18

Bluestribute
Scratcher
Registered: 2008-01-24
Posts: 1000+

Re: is it possible to "keep high scores" in current SCRATCH?

avanjasound wrote:

Just wanted to let everyone know that one of my students (a high school freshman) is EXTREMELY confident that he has figured out a workaround that can not fail. He is currently working on it right now but refuses to divulge his methodology until he gets it to do exactly what we want...namely to save scores.

I have a strong feeling he is going to "socially engineer" the scenario which would be pretty clever indeed. I could be wrong but I think he is going to add a screen at the end of game that simply instructs the user to do a manual save. Then when the game is launched again the end game high score will serve as input for the opening screen, so that players will see both names and scores. In fact, he drew me a diagram that looked like a spread sheet in which all the names would be accessible via variable slider. So I suppose at the start of the game you find your name with the slider and it would also show you the last saved score you had. Again, I am guessing somewhat and his final design may be different but this is what I think he is working on.

Essentially then a whole class could play the game and every player could have a "latest score" record kept of their gameplay.

I will definitely let you know more as I learn more!

Umm…  I kind of understand, but savings impossible in Scratch. Unless you NEVER reset the variable, which would be kind of strange


http://img247.imageshack.us/img247/1204/bluestributett4.jpg
That's my PSN ID. I know tons of COD4 glitches. Add me as your friend. Oh, and get a headset

Offline

 

#14 2008-07-09 08:08:03

Cyclone103
Scratcher
Registered: 2008-03-20
Posts: 500+

Re: is it possible to "keep high scores" in current SCRATCH?

avanjasound wrote:

Just wanted to let everyone know that one of my students (a high school freshman) is EXTREMELY confident that he has figured out a workaround that can not fail. He is currently working on it right now but refuses to divulge his methodology until he gets it to do exactly what we want...namely to save scores.

I have a strong feeling he is going to "socially engineer" the scenario which would be pretty clever indeed. I could be wrong but I think he is going to add a screen at the end of game that simply instructs the user to do a manual save. Then when the game is launched again the end game high score will serve as input for the opening screen, so that players will see both names and scores. In fact, he drew me a diagram that looked like a spread sheet in which all the names would be accessible via variable slider. So I suppose at the start of the game you find your name with the slider and it would also show you the last saved score you had. Again, I am guessing somewhat and his final design may be different but this is what I think he is working on.

Essentially then a whole class could play the game and every player could have a "latest score" record kept of their gameplay.

I will definitely let you know more as I learn more!

Actually, instead of using the workaround you mentioned, if you have a copy of the squeak source code, then you can develop your own method of saving using Smalltalk.
I do not know the code which would be used, but I am pretty sure there could be a way to create a secondary variable set, in which all regular variables which are labeled "Score" or "points" change the value of the high score, and you can just disable the watcher and assignment blocks, leaving only  the rounded <{ variable }> block. If you need help with Smalltalk, I recommend googling a syntax sheet. If an "autosave" function has not been declared as a method, you will have to code it yourself, otherwise you just have to create the blocks to enable it. Best of luck to you and your students!


All your base are belong to us

Offline

 

#15 2008-07-10 12:58:26

registeel
Scratcher
Registered: 2008-04-27
Posts: 500+

Re: is it possible to "keep high scores" in current SCRATCH?

why don't you keep it in the notes?

Offline

 

Board footer