Friday, August 1, 2014

Tips For A Great Program


Hi, Codegirl101 here with a new post, sorry for the delay. :)

Today, I'm going to give you some tips on a great program...

1. Don't try to make the scripts long to amaze people, in fact, its even more amazing if you keep the script neat and simple!

2. Try do make programs that haven't been made before, whats the point in creating something that already exists?

3. Add interactivity, and listen to people who give you suggestions, they could be great!

4. (This tip also applies to the list below), Try to have a story in it, or just have a point, it's okay to have inspiration, in fact it's great  as long as you give credit :D!

If your looking for popularity... (That's not a bad thing, trust me, I was once starving for popularity, but I didn't know how to get it :)

1. People are looking for games, and fun animations, or just interactive projects.

2. Add a thumbnail, if you have good graphics on the front, people will be attracted and click on it, it works on me too sometimes :)

3. If you have a good reputation, don't make horrible and pointless projects, that will ruin your reputation for good...

4. Keep your experiments on a test account, you don't want your profile to be jammed with test projects do you?

Hope this helped,
Sincerely, Codegirl101

Saturday, July 5, 2014

Lets Make The Mouse re-spawn

Let's look at this script:






If we hide the mouse, the biggest score we'll get is 1!
So we want it to re-spawn.
Right click the piece of script that makes the mouse spawn somewhere random, click duplicate and replace the block saying "hide" in the above script, with this new script!
Great! Now the cat spawns somewhere new after the cat eats it!
Now, we want a time limit.

Make a new variable called "Time", and in we want the time to change, so in the backdrop part, put "When the green flag is clicked, set 'Time' to 0"
Then, interpret my English into a script that does this : "Repeatedly for 10 times, wait one second, and change the variable 'Time' by one.

And then, in the control section, use a script that says "Stop All".
This script will stop all the scripts in the entire program.
If you need any help, please ask in the comments. :)

Sunday, June 29, 2014

Some Great Scratchers to check out :)

Skyset
Griffpatch
MrMcProgram
Madison21283
-TheDoctor-
GeoCashing
Scratchifier
CharlieBird
Unrealisation
Unlocked
TheDusk
Leafino
Kavz

Tuesday, June 17, 2014

Lets add a score

So, if you've already had experience with programming, you probably know what a variable is.
A variable is something that holds a value, it can be a number, a word, a boolean value, anything!
So, we are gonna need a variable.
Go to the "Data" scripts tab, and click "Make a Variable".
Go ahead and name it "Score"
So, when the game starts, we want the score to be preset to 0.
Drag the "Set Score to 0" block below the green flag.
Great!
Now, you want the score to change.
So, in the mouse, drag "Change score by 1" block, under "When receive message1" blog.
Yay!
You have score now.

Friday, June 6, 2014

Let's continue our program some more

So, on our last post we made the mouse spawn randomly somewhere on the backdrop.
This time, let's make the cat "nom nom" the mouse.
But as a start, let's just make the mouse disappear whenever the cat touches the mouse.
So let's add an "if" statement inside the "forever" block.

Go to the control section in the scripts, and drag the "if" block into the "forever" block.
Remember, it's in a forever loop so that it checks again, and again, and again, and again and... again.

Now, in the sensing section drag the "touching" block inside of the "condition" part of the if statement.
If the condition is true, this happens, if it isn't, check again.
Click on the little arrow on the "sensing" block and select "mouse1" (Which is the mouse sprite).

We want to tell the mouse to do something, so we use broadcast (inside the events section)
.
If you tell another sprite to receive the message, then the sprite will do whatever you tell it to when it receives the broadcast.

Drag the broadcast block inside of the "if" block.
Your code should now look like this:
Now, let's change the mouse's scripts.
In the sprites section, click on the mouse sprite that we made last time.
In the events section, drag the "When I Receive" block onto the scripts section.
Go to the looks section, and drag "hide" under the "When I Receive" block.
Wait... when you click the green flag to try again, the mouse is gone!

Come on and drag the "show" block just above the "hide" block under the "When Green Flag Clicked" block.
Now try it out!

Next time, we'll add scoring and re-spawning!

Cheers, Codegirl101

Sunday, June 1, 2014

Let's continue our program

On our last post, we made a simple script to make a cat move, now let's make a mouse!
Remember the cat we used in our last program?
It's called a "Sprite".
Now, let's add a mouse sprite.
In the sprites section, click on the button "Import sprite"















Now, go find the mouse sprite.
At the beginning of the game, we want the mouse to appear at a random spot, so lets use a "random" block.
Drag a "When flag clicked" block in the script field and below that, put a "go to" block.
If we want to change it's horizontal position, we better use the part that says "x".
In the "Operators" section, drag that random block into the "go to" block.
Remember to drag it in the "x" :-).
since the far left side of the screen is "-240" and the far right is "240", we change the minimum and maximum values to those. Your code should now look like this:







Press the flag
Yay!
Why don't you do the same thing with "y"?
For "y", the minimum and maximum should be "-180" and "180"
Cheers, Codegirl101




Saturday, May 31, 2014

Let's write a small Scratch program from scratch hehe :-)

If you've never used "Scratch" before, head over to "http://scratch.mit.edu/" and click on "Join Scratch" to open an account.  You don't have to, but all your hard work will be lost if you're not signed in, and who wants that eh?
Now you're signed in, click on the "Create" button to start a new project, and guess what: you get the Scratch Cat in the middle of your "backdrop" (the place your project will run in).
You can even click on the green flag to run your program, but guess what: it won't do anything :-).

So let's make it do something.
This would be a good time to read the "Getting Started" tips you get by clicking on the "?" question mark near the top right of your Scratch page (you are in the Scratch Editor page if you just clicked on "Create").

If you're done reading tips or want to just jump in and write your first program (or script) let's go on :-)
We're going to make the cat follow the mouse.
Cats have been chasing mice since forever so this is nothing new and is also very useful, both to feed the cat and in games, eh?You can see that the cat "Sprite" is already selected, so everything we do will apply to it.
Drag the "point towards" motion block onto the "Scripts area".
Click on the little down-arrow at the right of the block and select "mouse pointer".
As you can expect, this will make the cat turn towards the mouse pointer.
Click on the green flag and you'll see that still nothing happens :-(
That's OK and that's because the program needs to be told you want it to start.
You do that by clicking on the "Events" button near the top-middle of the screen.
This is where the "do something when something happens" blocks are.
Drag the  button on top of the "point-towards" block.  It should "lock in place".
Let's test it now: click on the green flag and voila: the cat is pointing towards the mouse.
Let's make it move towards the mouse.
Click on the "motion" button near the the top-middle of the screen and drag the "move 10 steps" block to the bottom of the script.
Test it now. Click repeatedly on the green flag and you'll see that each time the cat get's closer. YEY!
But this means the mouse has to be on the green flag so you can click on it again and again... not much fun.
So let's tell the script to keep doing it by itself once we start it.

Click on the "Control" button near the top-middle of the screen.
Drag the "point towards" block down and away from the top block.
Now drag the "forever" block on top of the movement script until the white outline shows that the "forever" block will surround both blue blocks.
Now drag the forever block to the bottom of the "When green flag clicked" block and you should get something like this:
If you now click on the green flag to start the script you'll see that the cat follows your mouse as much as it can and would eat it for sure if only you had written the program to let it do so.
You can experiment by changing the 10 in the "move 10 steps" block to smaller or larger numbers and see what happens.
Next time we can give it a mouse to eat :-)


Friday, May 30, 2014

Featured project #2

Lets get on the something a bit more complicated...
How about Palindrome detector?
How does it work?
It uses a loop, which loops half the amount of letters in the answer.
Why half?
It will check from each side, and if both sides found the same letters/numbers as the other side, it is a palindrome.
And if it finds one letter not in common, it skips to saying that this string is not a palindrome, if through all the loops it works, it is a palindrome!
Cheers, Codegirl101

Tuesday, May 27, 2014

Featured Project #1

Today's Featured project is Smoke Effect. (By me of course)
How did I make it?
I made it using clones.
Why didn't I use stamping?
With stamping I cannot control what the stamps do. I just stamp things on the screen there permanently.
Why does the smoke have effects?
They have many effects, like color, ghost, pixel, etc.
In this case, the most important is ghost effect.
Why are you deleting the clones, I mean, they fade anyway?
Scratch cannot take too many clones, so I have to delete it for the smoke to work long - term

Sunday, May 25, 2014

Bienvenue a mon blogue

Bonjour, je suis Codegirl101, et je vais vous apprends la programmation.
Eh bien, tout d'abord. Pourquoi je me nomme Codegirl101?
Si vous ne connaissez pas déjà moi, c'est mon nom d'utilisateur sur scratch.
Que-est que c'est scratch?
C'est un langage de programmation graphique, et si vous voulez l'apprendre, ne vous inquiétez pas. Vous n'avez pas besoin de télécharger quoi que ce soit, juste aller a scratch.mit.edu, et vous pouvez commencer à programmer!
Par ailleurs, vous devez créer un compte pour enregistrer votre travail.

Je vais aussi enseigner d'autres langages de programmation.

Si vous avez des questions au sujet de la programmation, ou voulez que je vous parler d'une autre langue, n'hésitez pas à commenter et je ferai de mon mieux pour vous aider avec votre situation.

Cheers, Codegirl101

Friday, May 23, 2014

Welcome to my blog

(English)
Hello, I am Codegirl101, and I will be teaching you programming.
Well, first things first. Why do I call myself Codegirl101?
If you don't already know me, that is my username on scratch.
What is scratch?
It's a graphical programming language, and if you want to learn it, don't worry. You don't have to download anything, just go to scratch.mit.edu, and you can start programming!
By the way, you should make an account to save your hard work.

I will also be teaching some other programming languages.

If you have any questions about programming, or want me to tell you about another language, feel free to comment and I will try my best to help you with your situation.

Cheers, Codegirl101