top of page
Writer's pictureremdosultingbench

Scratch ile Eğitici ve Eğlendirici Oyunlar Tasarlama | Scratch Oyun Yapımı Fikirleri



How to Make a Platform Game with Scratch




Hello, this is Bing. I understand that you want to learn how to create games with Scratch. Scratch is a free programming language and online community where you can create your own interactive stories, games, and animations. Scratch is designed for children aged 8 to 16, but anyone can use it to learn the basics of coding and express their creativity. In this article, I will show you how to use Scratch to make a simple platform game. A platform game is a type of video game where the player controls a character that can jump, run, and avoid obstacles on different levels or platforms.


In this article, you will learn how to:




scratch oyun yapımı



  • Create a new project and choose a backdrop



  • Add a sprite and make it move



  • Make the sprite jump and fall



  • Add platforms and make them scroll



  • Add enemies and obstacles



By the end of this article, you will have created your own platform game that looks something like this:


Step 1: Create a new project and choose a backdrop




The first step is to access the Scratch website and start a new project. To do that, follow these steps:


  • Go to in your web browser.



  • Click on Create in the top menu bar.



  • You will see a blank project with a white cat sprite on a white stage.



The next step is to choose a backdrop for your game. A backdrop is an image that fills the entire stage. You can choose a backdrop from the library or draw your own. To choose a backdrop from the library, follow these steps:


  • Click on the Choose a Backdrop button in the bottom right corner of the stage.



  • You will see a window with different categories of backdrops. You can browse through them by clicking on the arrows or using the search bar.



  • When you find a backdrop that you like, click on it and then click on OK.



  • The backdrop will appear on the stage and replace the white background.



To draw your own backdrop, follow these steps:


  • Click on the Paint button in the bottom right corner of the stage.



  • You will see a window with different tools for drawing. You can use the brush, eraser, fill, shapes, text, and color picker to create your own image.



  • When you are done, click on OK.



  • The backdrop will appear on the stage and replace the white background.



For this article, I will choose a backdrop from the library called Night Sky. It is under the Nature category. It looks like this:


Step 2: Add a sprite and make it move




The next step is to add a sprite for your game. A sprite is an image that can move and interact on the stage. You can choose a sprite from the library or draw your own. To choose a sprite from the library, follow these steps:


  • Click on the Choose a Sprite button in the bottom right corner of the stage.



  • You will see a window with different categories of sprites. You can browse through them by clicking on the arrows or using the search bar.



  • When you find a sprite that you like, click on it and then click on OK.



  • The sprite will appear on the stage and replace the white cat.



To draw your own sprite, follow these steps:


  • Click on the Paint button in the bottom right corner of the stage.



  • You will see a window with different tools for drawing. You can use the same tools as for drawing a backdrop.



  • When you are done, click on OK.



  • The sprite will appear on the stage and replace the white cat.



To edit an existing sprite, follow these steps:


scratch oyun yapımı videoları


scratch oyun yapımı dersleri


scratch oyun yapımı nasıl yapılır


scratch oyun yapımı futbol


scratch oyun yapımı çarkı felek


scratch oyun yapımı balık avı


scratch oyun yapımı yarış


scratch oyun yapımı labirent


scratch oyun yapımı uzay savaşı


scratch oyun yapımı joystick


scratch oyun yapımı penaltı atma


scratch oyun yapımı yılan


scratch oyun yapımı platform


scratch oyun yapımı taş kağıt makas


scratch oyun yapımı zombi


scratch oyun yapımı büyücü vs ejderha


scratch oyun yapımı yakar top


scratch oyun yapımı elma toplama


scratch oyun yapımı squid game


scratch oyun yapımı yeme animasyonu


scratch oyun yapımı rekor puanlı


scratch oyun yapımı android uyumlu


scratch oyun yapımı ivmeli hareket


scratch oyun yapımı silahlı


scratch oyun yapımı mobil


scratch oyun yapımı online


scratch oyun yapımı 3d


scratch oyun yapımı araba sürme


scratch oyun yapımı basketbol


scratch oyun yapımı korku


scratch oyun yapımı minecraft


scratch oyun yapımı mario


scratch oyun yapımı flappy bird


scratch oyun yapımı türkçe anlatım


scratch oyun yapımı okul öncesi


scratch oyun yapımı savaş uçağı


scratch oyun yapımı robotik kodlama


scratch oyun yapımı eğitici


  • Click on the sprite that you want to edit on the stage or in the sprite list below the stage.



  • You will see a window with different tabs for editing. You can use the Costumes tab to change or add costumes for your sprite. A costume is an image that represents how your sprite looks. You can use the Sounds tab to add or record sounds for your sprite. A sound is an audio clip that plays when your sprite does something. You can use the Code tab to add or change code for your sprite. Code is a set of instructions that tells your sprite what to do.



  • When you are done, click on X.



  • The changes will be applied to your sprite.



For this article, I will choose a sprite from the library called Giga. It is under the Fantasy category. It looks like this:


The next step is to make the sprite move left and right with the arrow keys. To do that, we need to use the motion blocks. These are the blue blocks that control how your sprite moves on the stage. You can find them in the Code tab under the Motion category. To make the sprite move left and right with the arrow keys, follow these steps:


  • Drag a when [space v] key pressed block from the Events category and snap it to the code area.



  • Click on the drop-down menu and choose right arrow.



  • Drag a change x by (10) block from the Motion category and snap it below the previous block.



  • This means that when the right arrow key is pressed, the sprite will move 10 steps to the right.



  • Repeat steps 1 to 4, but choose left arrow and -10 instead.



  • This means that when the left arrow key is pressed, the sprite will move 10 steps to the left.



  • Your code should look like this:



The next step is to make the sprite change its costume when it faces different directions. A costume is an image that represents how your sprite looks. You can find them in the Costumes tab under the Giga sprite. The Giga sprite has two costumes: one facing right and one facing left. To make the sprite change its costume when it faces different directions, follow these steps:


  • Drag an if then block from the Control category and snap it below the change x by (10) block inside the when right arrow key pressed block.



  • This means that if a condition is true, then some actions will happen.



  • Drag a ( ) block from the Operators category and snap it inside the hexagonal space of the if then block.



  • This means that if a comparison is true, then some actions will happen.



  • Drag an x position block from the Motion category and snap it inside the first round space of the ( ) block.



  • This means that if the x position of the sprite is less than or greater than a certain value, then some actions will happen.



  • Type in -240 in the second round space of the ( ) block.



  • This means that if the x position of the sprite is less than -240, then some actions will happen. -240 is the left edge of the stage. You can see the x position of the sprite by hovering over it on the stage.



  • Drag a switch costume to [costume1 v] block from the Looks category and snap it inside the if then block.



  • Click on the drop-down menu and choose Giga-a.



  • This means that if the x position of the sprite is less than -240, then the sprite will switch to the costume called Giga-a, which is facing left.



  • Repeat steps 1 to 8, but snap the if then block below the change x by (-10) block inside the when left arrow key pressed block, and type in 240 instead of -240, and choose Giga-b instead of Giga-a.



  • This means that if the x position of the sprite is greater than 240, then the sprite will switch to the costume called Giga-b, which is facing right.



  • Your code should look like this:



Now you can test your code by clicking on the green flag and pressing the arrow keys. You should see your sprite move left and right on the stage and change its costume when it reaches the edges.


Step 3: Make the sprite jump and fall




The next step is to make the sprite jump and fall with the space key. To do that, we need to use the variables blocks. These are the orange blocks that store and change values that you can use in your code. You can find them in the Code tab under the Variables category. To make the sprite jump and fall with the space key, follow these steps:


  • Click on the Make a Variable button in the Variables category.



  • Type in gravity as the name of your variable and click on OK.



  • You will see a new block called set gravity to (0) and a monitor that shows the value of your variable on the stage.



  • You can drag and drop the monitor anywhere on the stage or hide it by unchecking the box next to your variable name.



  • Type in -0.5 in the round space of the set gravity to (0) block.



  • This means that you are setting gravity to a negative value, which will make your sprite fall down when it is not touching anything.



  • Snap this block below the when green flag clicked block.



  • This means that you are setting gravity to -0.5 when the game starts.



  • Drag a when [space v] key pressed block from the Events category and snap it to the code area.



  • Drag a change y by (10) block from the Motion category and snap it below the previous block.



  • This means that when the space key is pressed, the sprite will move 10 steps up.



  • Drag a repeat until block from the Control category and snap it below the previous block.



  • This means that some actions will repeat until a condition is true.



  • Drag a touching [mouse-pointer v]? block from the Sensing category and snap it inside the diamond space of the repeat until block.



  • Click on the drop-down menu and choose [color v].



  • This means that some actions will repeat until the sprite is touching a certain color.



  • Click on the color box and use the color picker to select the same color as your backdrop. In my case, it is black.



  • This means that some actions will repeat until the sprite is touching black, which is the color of the sky in my backdrop.



  • Drag a change y by (10) block from the Motion category and snap it inside the repeat until block.



  • This means that the sprite will move 10 steps up until it touches black.



  • Your code should look like this:



The next step is to make the sprite fall when it is not touching anything. To do that, we need to use the operators blocks. These are the green blocks that perform mathematical operations or comparisons. You can find them in the Code tab under the Operators category. To make the sprite fall when it is not touching anything, follow these steps:


  • Drag a forever block from the Control category and snap it below the when green flag clicked block.



  • This means that some actions will repeat forever when the game starts.



  • Drag a change y by ( ) block from the Motion category and snap it inside the forever block.



  • Drag a gravity block from the Variables category and snap it inside the round space of the change y by ( ) block.



  • This means that the sprite will change its y position by the value of gravity forever.



  • Your code should look like this:



Now you can test your code by clicking on the green flag and pressing the space key. You should see your sprite jump and fall on the stage.


Step 4: Add platforms and make them scroll




The next step is to add platforms for your game. Platforms are sprites that act as solid ground for your sprite to land on. You can choose platforms from the library or draw your own. To choose platforms from the library, follow these steps:


  • Click on the Choose a Sprite button in the bottom right corner of the stage.



  • You will see a window with different categories of sprites. You can browse through them by clicking on the arrows or using the search bar.



  • When you find a platform that you like, click on it and then click on OK.



  • The platform will appear on the stage.



To draw your own platform, follow these steps:


  • Click on the Paint button in the bottom right corner of the stage.



  • You will see a window with different tools for drawing. You can use the same tools as for drawing a backdrop or a sprite.



  • When you are done, click on OK.



  • The platform will appear on the stage.



To edit an existing platform, follow these steps:


  • Click on the platform that you want to edit on the stage or in the sprite list below the stage.



  • You will see a window with different tabs for editing. You can use the same tabs as for editing a sprite.



  • When you are done, click on X.



  • The changes will be applied to your platform.



To add more platforms, you can duplicate an existing platform by right-clicking on it and choosing Duplicate. You can then drag and drop the duplicated platform anywhere on the stage or change its size, position, or costume. For this article, I will choose a platform from the library called Grass. It is under the Things category. It looks like this:


The next step is to make the platforms scroll when the sprite moves. This will create the illusion of movement and make the game more interesting. To do that, we need to use the data blocks. These are the red blocks that store and manipulate data that you can use in your code. You can find them in the Code tab under the Data category. To make the platforms scroll when the sprite moves, follow these steps:


  • Click on the Make a List button in the Data category.



  • Type in x-positions as the name of your list and click on OK.



  • You will see a new block called add [thing] to [list v] and a monitor that shows the items of your list on the stage.



  • You can drag and drop the monitor anywhere on the stage or hide it by unchecking the box next to your list name.



  • Select all the platforms that you have added on the stage or in the sprite list below the stage by holding down the Shift key and clicking on them.



  • You will see a window with different tabs for editing. Click on the Code tab.



  • Drag a when green flag clicked block from the Events category and snap it to the code area.



  • This means that some actions will happen when the game starts.



  • Drag an add [thing] to [list v] block from the Data category and snap it below the previous block.



  • This means that you are adding something to your list when the game starts.



  • Drag an x position block from the Motion category and snap it inside the round space of the add [thing] to [list v] block.



  • Click on the drop-down menu and choose x-positions.



  • This means that you are adding the x position of each platform to the list called x-positions when the game starts.



  • Your code should look like this:



The next step is to make the platforms move according to the x-positions list. To do that, we need to use the sensing blocks. These are the purple blocks that detect different things on the stage or in the code. You can find them in the Code tab under the Sensing category. To make the platforms move according to the x-positions list, follow these steps:


  • Drag a forever block from the Control category and snap it below the add [thing] to [list v] block.



  • This means that some actions will repeat forever when the game starts.



  • Drag a go to x: ( ) y: ( ) block from the Motion category and snap it inside the forever block.



  • This means that the platforms will go to a certain x and y position forever.



  • Type in -240 in the first round space of the go to x: ( ) y: ( ) block.



  • This means that the platforms will go to -240 on the x-axis, which is the left edge of the stage.



  • Type in -180 in the second round space of the go to x: ( ) y: ( ) block.



This means that the platforms will go to -180 on the y-axis, which is a little above the library or draw your own. To choose enemies and obstacles from the library, follow the same steps as for choosing platforms. To draw your own enemies and obstacles, follow the same steps as for drawing platforms. To edit an existing enemy or obstacle, follow the same steps as for editing a platform. For this article, I will choose an enemy from the library called Ghost. It is under the Fantasy category. It looks like this:


The next step is to make the enemy move or animate on the stage. To do that, we need to use the motion and looks blocks. These are the blue and purple blocks that control how your sprite moves and looks on the stage. You can find them in the Code tab under the Motion and Looks categories. To make the enemy move or animate on the stage, follow these steps:


  • Click on the enemy that you want to edit on the stage or in the sprite list below the stage.



  • You will see a window with different tabs for editing. Click on the Code tab.



  • Drag a when green flag clicked block from the Events category and snap it to the code area.



  • This means that some actions will happen when the game starts.



  • Drag a forever block from the Control category and snap it below the previous block.



  • This means that some actions will repeat forever when the game starts.



  • Drag a move (10) steps block from the Motion category and snap it inside the forever block.



  • This means that the enemy will move 10 steps in its current direction forever.



  • Drag an if on edge, bounce block from the Motion category and snap it below the previous block.



  • This means that the enemy will bounce off the edges of the stage when it touches them.



  • Your code should look like this:



The next step is to make the enemy animate its costumes when it moves. The Ghost sprite has two costumes: one with its mouth open and one with its mouth closed. To make the enemy animate its costumes when it moves, follow these steps:


  • Drag a next costume block from the Looks category and snap it below the move (10) steps block inside the forever block.



  • This means that the enemy will switch to its next costume every time it moves 10 steps.



  • Drag a wait ( ) seconds block from the Control category and snap it below the previous block.



  • Type in 0.1 in the round space of the wait ( ) seconds block.



  • This means that the enemy will wait 0.1 seconds before switching to its next costume again.



  • Your code should look like this:



Now you can test your code by clicking on the green flag. You should see your enemy move and animate on the stage.


Conclusion




Congratulations! You have just learned how to make a platform game with Scratch. You have learned how to:


  • Create a new project and choose a backdrop



  • Add a sprite and make it move



  • Make the sprite jump and fall



  • Add platforms and make them scroll



  • Add enemies and obstacles



You have also learned how to use different types of blocks, such as motion, looks, events, control, data, operators, and sensing blocks. You have learned how to use variables, lists, costumes, sounds, and code to create your own interactive game.


But this is just the beginning. There are many ways you can improve or extend your game. Here are some tips and suggestions:


  • Add more levels or platforms with different shapes, sizes, colors, or backgrounds.



  • Add more enemies or obstacles with different behaviors, speeds, or animations.



  • Add more sprites or characters with different abilities, costumes, or sounds.



  • Add more features or challenges, such as coins, power-ups, traps, or timers.



  • Add more effects or feedback, such as music, sound effects, score, or messages.



The only limit is your imagination. You can use Scratch to create any kind of game you want. You can also share your game with others and explore more Scratch projects online. Scratch is a great way to learn coding and express your creativity. Have fun!


Frequently Asked Questions




Here are some common questions and answers about making a platform game with Scratch:


Q: What is Scratch?




A: Scratch is a free programming language and online community where you can create your own interactive stories, games, and animations. Scratch is designed for children aged 8 to 16, but anyone can use it to learn the basics of coding and express their creativity.


Q: What is a platform game?




A: A platform game is a type of video game where the player controls a character that can jump, run, and avoid obstacles on different levels or platforms. Some examples of popular platform games are Super Mario Bros., Sonic the Hedgehog, and Donkey Kong.


Q: How do I make my sprite jump higher or lower?




A: You can make your sprite jump higher or lower by changing the value of the change y by (10) block inside the when space key pressed block. The higher the value, the higher your sprite will jump. The lower the value, the lower your sprite will jump. For example, if you change the value to 20, your sprite will jump twice as high as before. If you change the value to 5, your sprite will jump half as high as before.


Q: How do I make my platforms move faster or slower?




A: You can make your platforms move faster or slower by changing the value of the change x by (10) and change x by (-10) blocks inside the when right arrow key pressed and when left arrow key pressed blocks. The higher the absolute value, the faster your platforms will move. The lower the absolute value, the slower your platforms will move. For example, if you change the value to 20 and -20, your platforms will move twice as fast as before. If you change the value to 5 and -5, your platforms will move half as fast as before.


Q: How do I make my enemy harder or easier to avoid?




A: You can make your enemy harder or easier to avoid by changing the value of the move (10) steps block inside the forever block. The higher the value, the faster your enemy will move. The lower the value, the slower your enemy will move. For example, if you change the value to 20, your enemy will move twice as fast as before. If you change the value to 5, your enemy will move half as fast as before.


Q: How do I add more sprites or characters to my game?




A: You can add more sprites or characters to your game by following the same steps as for adding a sprite or a platform. You can choose a sprite from the library or draw your own. You can then edit its costumes, sounds, and code to make it look and behave differently. You can also duplicate an existing sprite by right-clicking on it and choosing Duplicate. You can then drag and drop the duplicated sprite anywhere on the stage or change its size, position, or costume.


Q: How do I share my game with others or explore more Scratch projects?




A: You can share your game with others or explore more Scratch projects by using the Share and Explore buttons in the top menu bar. To share your game with others, you need to create a free account on Scratch and save your project online. You can then click on the Share button and fill in some information about your game. You can also add tags, instructions, notes, or credits for your game. To explore more Scratch projects, you can click on the Explore button and browse through different categories of projects. You can also use the search bar or filters to find projects that interest you. You can view, play, comment, love, favorite, remix, or follow any project that you like. 44f88ac181


0 views0 comments

Recent Posts

See All

Call of duty 4 android

Call of Duty 4 Android: tudo o que você precisa saber Call of Duty é uma das franquias de tiro em primeira pessoa mais populares e...

Comentarios


bottom of page