Password guessing minigame. Can someone suggest how to do it better?
KaiSD
19 Apr 2019, 20:37Hi!
I was trying to make a simple password guessing minigame.
The link to the source code: https://pastebin.com/raw/rqe7byG8
Suggestions and pieces of advice are very appreciated.
I have some game development experience, but I'm new to Squiffy, and I'm not a programmer.
![](https://i.imgur.com/vjdH3t6b.jpg)
DarkLizerd
20 Apr 2019, 03:53Not up on Squiffy, but I do know code... (Mostly Basic, and learning Quest...)
A "normal" password system would reply on a wrong entry "Wrong, try again"...
Without a clue somewhere, no one could guess it...
But, you do have a few choices:
- Mastermind:
Enter selection:
program responds with colored light for # of right letters and number of correct locations... - Hangman:
The password is 6 letters long... _ _ _ _ _ _
Enter selection: (Say "labors")
Number of tries: 1 out of 10.
Password: L _ _ _ O _ _
Then try new word.... - Puzzle:
You try to answer a limerick:
As I was going to Saint Ives,
I met a man with seven wives,
Each wife had seven kids,
Each kid had seven cats,
Each cat had seven kittens,
Each kitten had seven mittens.
How many were going to Saint Ives?
(I'm sure you could answer that one...) - Puzzle #2:
To find the password, you need to find clues to what it could be around the room, or building...
There is a picture of the old man with his dog, several in fact.
Several clues later, you find a dog collar with the name "Spike" on it...
(SPIKE is the password.)
![](https://i.imgur.com/vjdH3t6b.jpg)
DarkLizerd
20 Apr 2019, 03:55I think your link is to your personal page and requires a password.
KaiSD
20 Apr 2019, 21:08Thanks, I didn't know it. The post is unlisted, but for some reason, Pastebin requires login...
This one should work
https://pastebin.com/raw/rqe7byG8
![](https://i.imgur.com/vjdH3t6b.jpg)
DarkLizerd
20 Apr 2019, 23:26OK, that one works...
If I read your code correctly...
You have 3 thumbwheels with 7 letters each?
Cool idea... I didn't think of that.
Betrayal at Krondor had lockboxes that had the thumbwheel locks on them and a key hint for the code.
Some were as short as 3 letters, some as long as 8, maybe...
maybe 7 letters on the wheels, but different wheels had different letter combo...
That aside...
I think your code checks each letter and tells you right/wrong just like master mind...
Right???
Not knowing Squiffy (at all) but it looks like your code looks good as it is.
For Quest, I could have done it a little differently...
The display would look like this:
^ ^ ^
A A A
v v v
The "^" would be a command link to increase the letter (Looks like you used rotate)
The "v" would be a command link to decrease the letter (Looks like you used rotate)
And, then the display is correct, the lock would open...
(No Earthly idea if Squiffy can come anywhere near that!!!)
![](https://i.imgur.com/vjdH3t6b.jpg)
DarkLizerd
21 Apr 2019, 07:32Here is how I did it in Quest.
http://textadventures.co.uk/games/view/_yzqjd-200uxjoitdnolwg/thumbwheel-lock
But I think you would need to download Quest to run it, Squiffy is different from Quest...
(AND, more powerful, has more tools, and toys, but don't let that scare you off...)
Just a simple "turn the wheel" demo, with out a check for the right combo.
KaiSD
21 Apr 2019, 14:56I think your code checks each letter and tells you right/wrong just like master mind...
Right???
It's based on "bulls and cows". If I understand it correctly, the Mastermind uses the same idea.
I'm not sure if I know how to implement your thumbwheel lock in Squiffy without writing the whole thing in JS.
![](https://i.imgur.com/vjdH3t6b.jpg)
DarkLizerd
22 Apr 2019, 03:26This could be a reason to learn Quest...