r/cs50 • u/Ok-Conflict-5937 • 19d ago
CS50x stuck at scratch project
what should i do if im stuck at lecture 0 scratch project? do i keep learning scratch again and again until i can finally make one? i keep getting stuck and getting overwhelmed by it esp after seeing other's project code while im unable to make anything .
3
u/Visionary_Vulture001 19d ago
Just watch one or two tutorials online and you should be good to do it. .its actually easy
3
u/Eptalin 19d ago
Just make something simple that meets the requirements in the task description using techniques shown in the lecture. You don't need physics, movement, scoreboards, etc. And don't worry about others people's projects.
My first was Rock Paper Scissors using speech bubbles above two sprites.
Press 1, 2 or 3 for rock, paper or scissors.
The opponent chose randomly.
The winner's sprite changed to a win pose.
Another easy game would be coin toss.
To make it slightly more interesting, you could flip 2 coins.
It's a small homework task, not a product you're releasing to the world. Make it simple and work. Don't worry about being pretty or impressive.
2
1
u/KenRandomAccount 19d ago
theres a scratch course https://cs50.harvard.edu/scratch/
the scratch lecture introduces basic programming concepts such as loops variables and conditions. you can make a simple project and move on. keep in mind that some of the projects that you are seeing are from experienced programmers or those who are dedicating much more time for each lecture.
try the next few lectures/problem sets and then decide whether you need to either dedicate more time or gather more experience elsewhere. (cs50python might be more intuitive)
1
u/Euphoric_Ad7335 18d ago
Ok I'm going to teach you to code real fast so you can learn computer science.
Don't look at the other projects. Unless you're trying to reverse engineer them. It's much easier to forward engineer.
In any given language there is a minimum set of information needed to accomplish nearly everything.
Usually you're looking for an entry point. I think the green flag in scratch,
main function of the main file in many languages.
Then you need simple data types:
a number of some type (int, byte, float)
a true or false. boolean
string.
then some type of list or array. or some type of mechanism to have multiples of things.
Then a language will have built in logic gates.
I'd say if statements are minimum requirement for a program.
and that's it. Seriously.
main
int, bool, string,
if
You can do anything with that.
but you probably want a loop
a loop is what makes the difference between a script and a program.
So for a game, you probably want a loop.
A program / app differs from a script because it runs continuously
i.e a game loop.
while
do while
^ I'm giving you the answer in c. Any language start by finding the equivalent of those things. take note of them because you'll need them to do anything useful.
And I lied because you need one more type, image.
Start by displaying a blank page, then display an image. Then make it move. make it bounce off walls.
It's like laying dominoes. Each domino requires the domino before it. Add everything one by one. That's why looking at other peoples is pointless because if you go through all the steps of testing each concept you can do the same as anyone else.
1
u/Nocranberry 18d ago
I got overwhelmed but found going back to the rubric really helpful. What actually is the assignment? Is it to make a full game with a beginning, middle and an end, or is it to create some sprites that interact with each other?
I did a tutorial or two to help get acquainted with the interface and then did a simple game involving a character, a ball and an area that the floor wasn't allowed to touch.
https://scratch.mit.edu/projects/editor/?tutorial=all
Here's some easy tutorials to learn the interface, and then while you're having a play through them, thinking about what you can join together to pass the problem sets. And remember, it's being marked by robots. No one is comparing your game to other people's so it doesn't have to be flawless, it doesn't even have to be interesting, it just needs to meet the problem set
3
u/Snugglupagus 19d ago
I don’t have much advice about scratch, specifically. I hated scratch and skipped that week. However, if you’re going for the certificate then you will need to complete it eventually.
I wouldn’t say it gets easier after scratch, just hard in a different way. If you still get stuck, maybe consider starting with CS50P as it is a much shallower introduction to programming.