Hello,
The next section is "Introduction to Game Planning".
It is about a very important lesson.
There are several concepts you need to learn in order to understand the next lessons.
I remind you once again. Freeze the screen and read again the important texts when you think it is necessary to.
Stevie, if you're ready, you can start.
Thank you Athena!
Indeed today’s lesson is very interesting and important.
Good evening to you all!
Games usually contain several objects that work together and are being controlled by their own script.
Below you can watch a few seconds of a SCRATCH game
We will create this game together in one of the following lessons.
The sprites in this game are the dog, the bones, the cars, the ghosts but as well as the walls that stop the course of the rest of the objects.
Let's have a quick look at the form of a script.
In this script the dog which is the leading character of the game we just saw is being controlled
Let's take a look at the instructions from the beginning one by one.
Once the game starts, we set the size of the dog that we want.
You see the starting size of the dog is this. ..
We change it into that ...
Also, the dog's starting position in the set will always be this. In this direction .. It will look right ..
With this code we control the dog's movement when the player pushes the up arrow on the keyboard.
This part of the code could be read as follows:
For all the duration of the game
If the player pushes the up arrow on the keyboard then
The puppy turns to direction
And moves 5 steps forward
If he touches the wall he will have to go 5 steps back.
5 steps forward minus 5 step back he stands still and the line works like a wall!
You see how scripts controlling objects are created exclusively based on logic.
You see how scripts controlling objects are created exclusively based on logic.
The instructions we need are ready and we just use them by creating puzzles with our mouse.