Discuss Scratch

mushroombubbles
Scratcher
100+ posts

PLEASE HELP!!!!!!!!!!!!!!!!!

I want to make a game where you make a user name and password and when you
Come back,it remembers your username and password .How do I do that?

Ackuna's BAD TRANSLATOR (click Here)
Salsa with peppers
43 translations later..
Hot chocolate

drmcw
Scratcher
1000+ posts

PLEASE HELP!!!!!!!!!!!!!!!!!

Just use the username block.

10 !
ScratchVaders or Galaga?
Maybe Eliza can help you decide?
bigpuppy
Scratcher
1000+ posts

PLEASE HELP!!!!!!!!!!!!!!!!!

Use cloud data. It is very hard to do, but it CAN be done. But it would be much easier if the scratch team added cloud lists.

“Change happens by listening and then starting a dialogue with the people who are doing something you don't believe is right.” -Jane Goodall
JAVAProgramming
Scratcher
100+ posts

PLEASE HELP!!!!!!!!!!!!!!!!!

I saw someone use:
If username = JAVAProgramming,
Ask “Password?”,
If Password = 10234,
Let him in.

The only flaw is that you need to add every single name and password to the script.. So it might be a drag.

My Newest Project, Come Check It Out
Dots, On Scratch
Want to change the way we count? The Dozenal System.

“The story so far:
In the beginning the Universe was created.
This has made a lot of people very angry and been widely regarded as a bad move.”
― Douglas Adams, The Restaurant at the End of the Universe
drmcw
Scratcher
1000+ posts

PLEASE HELP!!!!!!!!!!!!!!!!!

JAVAProgramming wrote:

I saw someone use:
If username = JAVAProgramming,
Ask “Password?”,
If Password = 10234,
Let him in.

The only flaw is that you need to add every single name and password to the script.. So it might be a drag.

If the username is set to JAVAProgramming, for example, then you're already logged in so no need for passwords within the project.

10 !
ScratchVaders or Galaga?
Maybe Eliza can help you decide?
JAVAProgramming
Scratcher
100+ posts

PLEASE HELP!!!!!!!!!!!!!!!!!

drmcw wrote:

JAVAProgramming wrote:

I saw someone use:
If username = JAVAProgramming,
Ask “Password?”,
If Password = 10234,
Let him in.

The only flaw is that you need to add every single name and password to the script.. So it might be a drag.

If the username is set to JAVAProgramming, for example, then you're already logged in so no need for passwords within the project.
Yeah, well, you could use:
Ask “Username?”
If username = JAVAProgramming
Ask “Password?”

I guess you still don't need the password though..

It adds to the feel of the game. You login with a username and a password, but in real life, you can't see the passwords in 1 click on the mouse.. Make sense?

My Newest Project, Come Check It Out
Dots, On Scratch
Want to change the way we count? The Dozenal System.

“The story so far:
In the beginning the Universe was created.
This has made a lot of people very angry and been widely regarded as a bad move.”
― Douglas Adams, The Restaurant at the End of the Universe
AlSweigart
Scratcher
98 posts

PLEASE HELP!!!!!!!!!!!!!!!!!

You would have to “hard-code” the password directly into the script, or let the user set it in a variable. But this wouldn't work when the user later comes back because the variable will have forgotten it's value.

Right now, you also can't use cloud variables since they can only store numbers and not text. (Though I guess this means you could have numeric passwords.)


My Scratch screencast tutorials: http://inventwithscratch.com/
DadOfMrLog
Scratcher
1000+ posts

PLEASE HELP!!!!!!!!!!!!!!!!!

I think the first question I would ask is what you actually want to do once the user has supplied name and password (assuming it's correct) for their in-game ‘account’?

i.e. what difference does it make to what happens next? Are you planning to set up some saved game data for that user's in-game ‘account’? (e.g. what level they have reached, what extra bonuses/power-ups/equipment/etc. they may have acquired so far…)

If so, you've got a fair bit of work on your hands to encode the in-game names, passwords, and in-game account data for a specific in-game account, and in particular then inserting it into cloud variables that contain the data for potentially lots of users (presumably with at least one account each, and maybe you want to allow a user to create more than one in-game account?)

Unless you're very careful, there are several ways this could very easily go very wrong (as multiple users potentially access/change the cloud data at the same time).

Above will be whole lot simpler once cloud lists are available.

Also, unless you use some form of encryption (rather than just encoding), anyone can look at your scripts to see how you've encoded the data, and therefore decode the whole lot (including passwords) - for every in-game account - making the idea of an in-game password-protected account rather worthless…

Once you add encryption into the mix, though, manipulating the cloud variables becomes a whole lot more ‘interesting’. That's because a particular in-game account can only operate on those parts of the cloud variables that account ‘owns’ and can therefore decrypt (the rest cannot be decrypted without the correct in-game username & password). -Not sayin' it can't be done, mind (I have an unshared project that already does all of that for a particular application), but it's certainly not for the faint-hearted!

Just some thoughts…

Last edited by DadOfMrLog (Sept. 6, 2013 10:37:21)



Alternate account: TheLogFather –– HowTos and useful custom blocks (see studio). Examples below…


- String manipulation - - - X to power of Y - - - Clone point to clone - Detect New Scratcher - Speed tests studio -

Powered by DjangoBB