Wednesday, December 24, 2008

How to Make Random Movement

Random movement appear everywhere. From school of fitutor 4-1sh under the sea, flies and bees in the air to molecules of water in the bottle. Random movement is complex matter and we must define specifically for every kind of object.

There are three types of random movement. First, random speed of object. Object that move with non constant speed. In 2D animation, the ant movement maybe fall into this category. Second, random turn or changing direction of object. We can see it from fish and other animals. Fish will move with constant speed but they change their direction of movement in sudden. And the third category is random speed and turn. Many kind of insect that can fly fall into this category, like butterfly, bumblebee, and flies.

The key to build random movement lies on this "pick random ... to ..." blockpick random. But this random number must be convert into random movement or random turn with IF THEN rule. There are many way to make conversion. The basic rule is to define how frequently the changing happens. If the smaller occurrence chance of a change , the smaller value of the fraction of possible change that will occurred. The change occurrence value of 1/2 to 1/6 represent that it happens very often, and the change occurrence value of 1/10 or 1/15 represent that it rarely happens. Divisor number showed by the value of picking random number. So if more rarely change happens, the value of picking random number will be greater.

Maybe it is too technical, so we will learn this concept through example of fish movemtutor 4-2ent. This is the second type of random movement, so we only have to randomize the turning behavior. Many fish changing their direction of swimming frequently so we choose random number between 1 to 6. Now we can develop the stack of random movement completely. Is it easy?

Click Here to Read More..

How to Make Object Following Mouse Pointer

Do you ever play FishChomp games in Scratch that the big fish have to eat small fish by following the mouse pointer? Or have tutor 3-1 you imagined your bee looking for pollen in the flower by following the movement of the mouse pointer? Interaction between mouse pointer and Sprite objects are very important in creating video games. But we are only know how to build behavior of single Sprite until now. We still don't understand how script from one Sprite could interact with other object.

Now let's we try. This interaction can be build with three step of logics. First, we must changing the direction of the Sprite object towards the mouse pointer. We can do this by using "point towards mouse-pointer" blockpoint towards. Don't forget to click the down-arrow and choose mouse-pointer from the list. Second, we have to move the Sprite object in that direction several steps. We can get this by picking "move ... steps" block move. And the last step is adjusting the distance and speed between the movement of mouse pointer and the movement of our Sprite object. This can be done with delay block wait . But we have to make some experiment to determine how much step and how long the delay every cycle of program, to find the best response of our object to the movement of our mouse pointer.

We have develop program that produces the effectstutor 3-2 of the interaction. Now you can feel how easily the program interaction between Sprite objects and mouse pointer in the Scratch. You can use this stack for various effect in your games.

Click Here to Read More..

How to Make Walking and Flying Object

Almost every games need a walking and flying objects. In 2D animation, walking and flying object is very easy to make. Basically, you have to draw several costumes for every walking and flying position of your object. For this time, I will show you how to make walking object and flying object with just twtutor 2-1o costumes only. This is enough for beginner.

From the default Costumes Folder of Scratch, you can find simple two different image of moving objects. I will pick flying bat for my example. You can use many kind animals within that folder.

The technique is to switch the display of our object's costumes so that we can imagine that it is moving. You can do this by using this simple blocknext costumesfrom Looks Palette. If we have more than two costumes, this block still can be used too. But you must remember that execution time of computer is very fast. If we are switching between costumes without delay, our object will move so quickly that can not be seen. So we must insert delay block wait between costumes. How long we must delay? It depends on your purpose. But typically not more than 1 second. Don't forget, at every turn of the costumes, we also moved the objects to step forward. You should use this blockmove from Motion Palette.

Now come the last question. How to automatically changing the direction of our objeSprite featurects when they are touching the edge? The answer is simple. You can insert block "if on edge, bounce", like what we have done with bouncing ball. But you must pay attention on the Rotation Style of Sprite which located in the top middle of Scratch console. There are three button from the top: can rotate, only face left right, and don't rotate. You must stutor 2-2elect the middle button that showed by red arrow so that the Sprite only can move left and right. If you choose the top button, every time our Sprite bouncing on the edge, it will be rotated 360 degree and become upside down. You can see how funny it is look.

Finally we should get complete stack of blocks for our sprite that make a whole walking or flying animation, like this. There are other way too, and ytutor 2-3ou can find it, but it is the easiest way. Remember, the more costumes you are using for walking or flying animation, you will get the result more smooth and compelling. In the professional games, animator can use tens of costumes for only just one Sprite!

Click Here to Read More..

How to Make Bouncing Ball

If asked, most children would said they play video games for the first time in their life as a game of hitting the ball to the wall. Making bouncing ball is very easy to do in Scratch. I would teach you step on how to make it, step by step. tutor1-1

First, we have to make a new Sprite for a ball. The ball will always bounce back when hitting the wall to the appropriate direction. It's easy to draw the costume for a ball.

Now it's time to make a new Script for your Ball Sprites. Remember that we have to start play our games when the Green Flag being clicked. So we have to use this block green flagto control our games. Don't forget to set the coordinate of the ball every time we play the games so that the ball never loss to the outside of the Stage. Now I wedge bounceill show you, that Scratch have very nice block that can do our job automatically. Look at the Motion Blocks Palette and you will see the block "if on edge, bounce". This is very useful block and you can use it for many kind activity in usual games. Finally you must use that blocks within forever forever block, so that Scratch will evaluate this block, as long as we don't click Stop button. But it's not enough. What the ball will do after it bounces? They have move some steps away from initial position without ending. So we have our conclusiontutor 1-2 right now. The complete blocks, or we call stack, for our ball sprite is the combination of all the blocks I have described. Now you can build your own bouncing ball games. For the next time, I will show you how to complete this game with racket for hitting the ball. Bye.

Click Here to Read More..

Monday, December 22, 2008

Now is Time for Spreading Scratch

Scratch is an amazing universal software. It is not just a free educational program from MIT Media Laboratory, but also a program that will change the face of the digital world in the future. When Mitchel Resnick think this program for the first time, he only moved by two major motivations: the children must be able to create their own games and that kind of program should also favored by adults. Now all the ideas that proved true as he successfully combine the two things that contradict each other that is non scripting way to reveal the ideas in digital media and the opportunity to build structures of complex logic.

Unfortunately, adults who belittle to the Scratch, now seemed more eager to play with that program. In such a busy exploration of the simple features in the Scratch that can generate unlimited logic structures, they forget to teach children to understand that program step by step. The children will lose their exhilaration to create new games, when they read too technical and over generalized explanations from many articles.

This blog is present to fill the void and provide a simple tutorial on not only the techniques of Scratch programming, but also the whole environment of Scratch. The children will be led to understand how the logics behind simple stacks in the Sprites, which cause certain effects to games. They will also get tips that have been frequently discussed in the Scratch Forum, but in a more simple and more detailed. Hopefully this way, learning curve time will be shorter, and the children will concentrate more on how to bring their own imaginations into reality.
Click Here to Read More..