How to create a 2 D game in Scratch program in 5 minut?

Поделиться
HTML-код
  • Опубликовано: 9 сен 2024
  • Hello dear subscribers! Dear friends! Who visited my channel for the first time and the guests of the channel. Greetings to you! We get comfortable near the computers, brew delicious, strong coffee. In this video we will talk about creating 2D small games, I will show you a small screen, well, before I start the narration and the story about how to create such a funny game in the Scratch program. I ask you to like the subscription the least, click on the bell with the notification, write a good comment, so let's get started. Open the program- you can leave our cat as the main character by default, let's start assembling the script, but first, let's pick up the background in Scratch, that's what the evening forest is like.Next, let's start with the start block, we need to set a variable for scoring, let's call our variable "score", transfer our script for Sprite 1, determine the movement, since, as you saw at the beginning of the video, our hero must jump high to avoid obstacles, so we must, you can take the necessary coordinates directly from the video movements, or experiment, now let's go to Control, select the "Forever" block and in order for the picture to change, in one of the videos I used this method, I advise you to watch the animation of the battle dancers, I created the same script where the movements change within 0 1 seconds and we will constantly have our hero repeat the same the same movements imitating a step. So now we need to use the "conditions" block to set the condition when the "Space" key is pressed to change the score with a successful jump, for this we go back to the "change" block and write down, count 10 points when jumping. Next, we will go back to the "control" block and select repeat the kitten's movement interval with a step of 10 up, set 20 when jumping so that it is on the Y axis, we will again select the "repeat" block and already here we change the step to minus so that it returns to the original position of our game, from the video you can see when check, moves along the vertical Y axis, as intended. And now we have to create a negative character, we will pick up, there is also a large collection of characters in Scratch, we will go to the fantasy folder, This ghost is very suitable for us, but Pay attention, the ghost sprite looks in a completely different direction. Therefore, we will need to edit it a little bit, like this. So we have 2 Sprites ready, you can increase it a little.So for a negative character, we have Sprite 2 ready, let's put our negative character, he will move to the left side and return to his starting position when he touches the edge of the stage and if he does not touch the main character, the game will be interrupted. We will leave the coordinates as shown in the video, select the "Forever" block and set the movement block from the beginning of the scene to the left side, now in the "If" block we must set the conditions, if he reaches the edge, we will select changed to 210, we will repeat the same coordinates again, we use one condition if he touches the hero, let's go to the "sansing" Sprite1 block again, the game will be interrupted, for this you need to select a block, and at the end of the game the negative character will say something for example - "I'm hungry" or "You got caught!", after the character touches our hero so that the game is interrupted, let's go to "Block Control" and select the "Stop" block, probably you will still need to pause here, since the game ends quickly, it will be more correct to put the "Pausa" block" and I will do 1 second, please you can watch the game running on your screen, but everything happens very quickly, the inscription is shown for only one second, it also turns out to be very little. Now let's try to create a musical accompaniment with you, I interrupted the video and prepared it from the collection, picked up various sounds, musical accompaniment, tracks in the program itself.Now we are writing a script for music.In the script, if you touch Sprite 1, another melody is played to the end and I think here, after all, until it loses this melody, otherwise it will be interrupted and watch out, since in the main script of the Sprite 1 block is on the stop, in the "Pausa" block we will fix the time for 7 seconds will be enough. Please now demonstrated the full version on the widescreen version of our script is running, there is a delay until the melody of the ghost does not finish playing, then the game already stops. I would like to finish my story and do not forget to like it if you liked the video, Write a good review in the comments if you have any questions about this project, feel free to write in the comments I will try to answer your question and also subscribe to my channel and click the Bell with the notification have a nice viewing dear friends, all the best and until we meet again, I'll try to make the news interesting on my channel!!!

Комментарии •