I had previously been acquainted with Scratch, but was introduced this year to Snap! through a computer science class. I forgot how much fun it is to code! I was on a time crunch, and this is my first time making a more complex game without any kind of instruction, so apologies if it’s a little rough around the edges. The code is pretty bloated, there is a definite lack of procedures where there probably should be procedures, and there are probably too many variables, but yeah…at least you can’t tell from the outside maybe? Anyway, this seems like a positive, tight-knit, and very, very smart (almost too smart for me and my simple coding!) community, so I will definitely return in the future if I need some help!
Instructions are in the game and descriptions, but it’s basically a memorization game where you have to remember people’s orders correctly. If you play, I’m curious to know your strategy or approach - I’ve heard a multitude of different ones across friends and family.
Pretty cool game! It definitely gets harder towards the end, and I began to forget some orders.
You should add an extra difficulty level by making the customer change their mind about an item (could you remove 2 of the apples?).
Thank you! And thanks for the advice as well! I attempted to do something similar, but was having trouble when updating the list as the user keeps pressing different food items - in retrospect, there’s definitely a more elegant solution that I didn’t see at the time (maybe with the “replace item” block?). In any case, the feedback is much appreciated, I’ll probably get to experiment once I have time.
That sounds fun! Definitely another level of difficulty and complexity - my memory is poor enough as it is, so I know I would have a tough time remembering those orders haha. Thanks for the suggestion and the welcome!
Oh man :,D I was actually thinking about adding that but I ended up not…maybe it’s a bottomless bowl?? An audio clue probably would make things clearer too. Anyway, thanks a lot!
If ITEM is one item from INVENTORY, it’ll never be equal to all of INVENTORY, will it?
Also, you keep setting the ORDER CORRECT variable back and forth between True and False. Don’t you need to AND all those settings to know if the entire order is correct?
The game works, so apparently this code works, but I can’t figure out how!
Thanks for the response and feedback! I really appreciate how you and other developers are engaged in the forums.
Had to delete my message and rewrite it upon further consideration - sorry for the second reply! I think these parts of code are irrelevant - I tested it out and don’t see any problems in removing them:
I think originally it was a test to see if a one food item order was correct or not, but 1) it’s not needed and 2) I don’t think it would have worked anyway. My intention must have been to switch around the ORDER and INVENTORY variables in those portions of code, but I think I goofed. Darn the younger me who thought I didn’t need documentation here.
The second part I understand a little better, this is how I thought of it: assuming that the order is correct, it iterates through, checking each time that the order matches up. If it doesn’t, only then is ORDER CORRECT? set to false and no other checks are made. There is probably a more elegant way of doing the same thing, but that’s what I came up with at the time, I suppose. coder_07 is definitely right in terms of redundancy at least no errors popped up
Since there are 3 bananas in the banana costume, I would suggest you make the customers want 3s of bananas if they want bananas. Or, maybe make a chopping machine that cuts the costume in 3rds if you’re really smart and know how to work with [pixels V] of costume [bananas V] .
How to type the blocks
This is something called Snapblocks, and ego-lay_atman-bay made and implemented it in the forums. there’s guide on how to type snapblocks on the forum. to make a script, either go to (+) → </> Snapblocks, or type [snapblocks] and [/snapblocks] for snapblocks and [sb] and [/sb] for inline snapblocks.
Oh no if you don’t mind, do you remember what screen you were at when you tried to click the bowl? If you were at the kitchen screen, it was intentional, but if you were at the customer screen, I think some debugging is needed… though as a note I made the bowl un-draggable, perhaps that’s the problem? Thanks for the feedback!
Ah, I didn’t even consider that! Thank you for the constructive feedback! Maybe “hands of bananas”? Or is that too wordy/confusing… Maybe I’ll just switch bananas out with watermelon or something haha.
(Also much thanks for the aside on how to type the blocks! That is a much clearer way of doing what I was originally doing, so I will definitely check that out.)
Oh yeah, that’s probably why my code was confusing in the first place! I have now moved that instruction to the same hat block that the “check food” procedure is in.
Wow! That is a lot clearer! (I definitely need to investigate all the blocks in Snap! - there’s a lot my class didn’t go over in detail.) I was reluctant to add the feature that changes the timing based on the difficulty because I thought it cluttered up my code (which I guess it did), but implementing your suggestions will make it look a lot more streamlined.
For larger scripts or scripts you’ve already built in Snap, you may want to use a “script pic”.
You can right click (or two-finger click on Mac) on the script you want a picture of and click “script pic”. This will save a picture of that script, which you can then post on the forums. The great part about script pics? You can drag them back into Snap to get their blocks! You can try that here:
Note: You may have to click on the image and download it first (because the forums will compress the image removing the metadata), it depends on your device and the mood of the forums :P.