Make an Open World Game/ RPG in Scratch | Tutorial

Alphabets Sounds Video

share us on:

In this lesson, you will learn how to create an open world game in Scratch, where your character can explore and interact within a vast environment. The guide covers selecting a main character, designing a moving background, enlarging the map, and implementing controls for navigation using arrow keys. Additionally, you’ll discover how to add other characters and enable interactions, culminating in the creation of your own unique open world game.

How to Create an Open World Game in Scratch

Hey there! I’m excited to show you how to make your very own open world game using Scratch. By the end of this guide, you’ll have a game where your character can explore a vast world and interact with other characters. Let’s dive in!

Choosing Your Main Character

First, we need to pick a character for your game. Click on “Choose a Sprite” and select any character you like. For this example, I’ll use the Scratch Cat.

Creating a Moving Background

To make it look like your character is walking around a huge world, we’ll actually move the background instead of the character. Here’s how:

  • Hover over “Choose a Sprite” and click “Paint” to create a new Sprite.
  • Switch to “Convert to Bitmap” mode for easier drawing.
  • Use the rectangle tool to draw a big blue rectangle for the ocean.
  • Switch to green and draw land on top of the ocean using the paintbrush tool. Feel free to be creative!

Once your map is ready, make sure it goes to the back layer when you click the green flag, so it’s behind your main character.

Making the Map Bigger

To make your map large enough for exploring, try this trick:

  • Go to the costumes tab and paint a new costume with a tiny dot.
  • Switch to this small costume and set its size to a large number, like 1000%.
  • Switch back to your map costume, and voilà! You have a giant map.

Moving the Map with Arrow Keys

Let’s make the map move when you press the arrow keys:

  • Use the “Change X by 10” and “Change Y by 10” blocks from the motion category.
  • For moving down, use “Change Y by 20” when the down arrow is pressed.
  • For moving up, use “Change Y by -20” when the up arrow is pressed.
  • For moving left, use “Change X by -20” when the left arrow is pressed.
  • For moving right, use “Change X by 20” when the right arrow is pressed.

Now, your character can walk all around the map!

Adding Characters or Objects

To add more characters or objects to your world:

  • Duplicate the map Sprite to keep the same movement code.
  • In the costumes tab, keep the blank costume and delete the map costume.
  • Draw a new character, like a blob, and make sure it matches the map’s borders.

Remove the “Go to Back Layer” block so this character stays in front of the map. Switch the costume to your new character costume.

Interacting with Characters

To make your character interact with others:

  • Use the “When This Sprite Clicked” block to make the character say something when clicked.
  • Adjust the character’s location in the costumes tab to place it where you want on the map.

And there you have it! You’ve created an open world game in Scratch. Feel free to use the starter code linked in the description to get started. I can’t wait to see what amazing games you create. Happy scratching!

  1. What aspects of creating an open world game in Scratch did you find most intriguing, and why?
  2. Reflect on the process of choosing a main character for your game. How did this choice influence your overall game design?
  3. Discuss the challenges you faced while creating a moving background. How did you overcome these challenges?
  4. How did the technique of making the map larger by using a tiny dot costume enhance your understanding of Scratch’s capabilities?
  5. What insights did you gain about programming logic when implementing map movement with arrow keys?
  6. Consider the process of adding characters or objects to your game. How did this step contribute to the game’s interactivity?
  7. How did you approach designing interactions between characters in your game, and what did you learn from this experience?
  8. Reflect on the overall experience of creating an open world game in Scratch. What skills or knowledge do you feel you have developed through this project?
  1. Design Your Own Character

    Choose a character for your game by clicking on “Choose a Sprite” in Scratch. Use your creativity to design a unique character or modify an existing one. Think about what makes your character special and how they will interact with the game world.

  2. Create a Dynamic Background

    Paint a new Sprite to serve as your game’s background. Use the rectangle tool to draw an ocean and add land using the paintbrush tool. Experiment with colors and shapes to make your world interesting and engaging. Remember to send the background to the back layer so your character can explore it.

  3. Expand Your Game World

    Make your map larger by creating a new costume with a tiny dot and setting its size to 1000%. Switch back to your original map costume to see your expanded world. This will give your character plenty of space to explore and discover new areas.

  4. Program Map Movement

    Use Scratch’s motion blocks to move the map with the arrow keys. Practice using “Change X by” and “Change Y by” blocks to simulate your character walking around the map. Test different values to see how they affect the movement speed and direction.

  5. Add Interactive Characters

    Duplicate the map Sprite to add new characters or objects. Design a new character in the costumes tab and place it on the map. Use the “When This Sprite Clicked” block to make your character interact with others. Think about what your characters will say or do when clicked.

Sure! Here’s a sanitized version of the YouTube transcript:

Hi everyone, it’s Zia here. Today I wanted to show you how to make an open world game in Scratch. By the end of this tutorial, you’ll be able to create your own game where you can have a character walking around in an endless world that you design, and they can interact with other characters and more. Let’s get started!

First, let’s pick a character to be the main character of your project. You can click on the button that says “Choose a Sprite” and pick any character you want. For this example project, I will choose the Scratch Cat.

Now, how do we make this character walk around a giant, seemingly endless background? Actually, the character in the middle won’t move. Instead, we’re going to create a giant Sprite to serve as the background, and that Sprite will move around. Let me show you how to do that.

We can create a Sprite by hovering over “Choose a Sprite” and clicking “Paint.” I like to click “Convert to Bitmap” to switch to bitmap mode, where it’s easier to draw directly on the canvas. My simple way of making a map is to use the rectangle tool, set the color to something in the blue range, and create a large rectangle to represent the ocean as the base of the map.

Next, I will set the color to green and use the paintbrush tool to draw random pieces of land on top of the ocean. It can really be anything you want; I’m not following any particular pattern. I can use the fill bucket to fill in any spaces I want to be land, which gives us a basic map. You can use whatever colors you prefer.

Now, I will make this map go to the back layer when the green flag is clicked so that it’s behind the main character. Now that we have our map, how can we make it large enough for our character to walk around? You can click on size here and try increasing it, but it won’t let you go past a certain point.

Here’s a trick: let’s go to the costumes tab, paint a new costume, and draw a tiny dot. This small costume will allow us to set a large size. If I go back to the code tab, switch the costume to the blank costume, and set the size to something really big, like a thousand percent, it lets me do that. Now I can switch back to the map costume, and there you go! Now you have a giant version of the map.

Next, let’s make it so that when the player presses the arrow keys, the map moves underneath the character. To make the map move, we can go to the motion category and use the blocks “Change X by 10” and “Change Y by 10.” Let’s drag out the block “Change Y by 10” and see what happens.

Okay, that makes the backdrop move this way, which looks like the player is walking downward. So, when the down arrow key is pressed, I can go to the events category, drag out a “When Space Key Pressed” block, choose “Down Arrow” from the menu, and place it on top. Now, when I click the down arrow, it looks like the player is walking down the map.

I can increase the number to 20 to make it move a bit more each time I press the button. If I drag out another “Change Y” block and set it to negative 20, that will make the backdrop move in the opposite direction, making it look like the character is moving upwards.

Now, let’s make it so the player can move left and right. If you drag out the block “Change X by 10,” that will make the map move sideways. Let’s set that to 20 and make it happen when the left arrow key is pressed. If you change X by negative 20, it goes the other way, so we can make that happen when the right arrow key is pressed. Now it looks like the character can walk all around the map!

I’ll make the map start at zero when the green flag is clicked. Now let me show you how to add a character or an object to the world that the player can find as they walk through it. I will duplicate the map Sprite so that this character has all the same code as the map, allowing it to move around as the map moves.

Next, I’ll go to the costumes tab, keep the blank costume (which helps with the size trick), delete the map costume, and draw a new costume. I’ll convert to bitmap mode again to avoid blurriness when scaling up. I’ll zoom in to draw at a small size, set the size to one, and create a simple character, like a blob.

To ensure this character moves exactly the same as the map, the borders of the Sprite need to match the borders of the map Sprite. You can use the rectangle tool to create thin rectangles around the edges of your character.

Let’s check if the code from the map will still work for this character. There are a couple of changes we need to make. Since this character should be in front of the map, we need to remove the “Go to Back Layer” block. Also, we want to switch the costume to “Costume 1” instead of the map costume.

Now, let’s try it out! I’ll click the green flag, and there we go! Our character is in the world, and we can interact with them. We could also make it so this character says something when we click on it. If we put the “When This Sprite Clicked” block on top, we can walk up to the character, and it will say hello.

Lastly, if you want to change the location of this character within the map, go to the costumes tab and adjust the location of the Sprite within the costume. Wherever you place it in the costume is where it will appear.

That’s what I wanted to show you today! If you want to use the starter code for this project, the link is in the description below. I can’t wait to see the open world games that you create. I’ll see you next time, and happy scratching!

This version maintains the instructional content while removing any informal language and ensuring clarity.

ScratchA visual programming language used to create games and animations by connecting blocks of code. – In computer class, we used Scratch to make a fun game with moving characters.

CharacterA symbol or letter that can be used in coding, or a figure in a game or animation. – I designed a new character for my game that can jump over obstacles.

MapA layout or plan of a game level or environment that players can explore. – We created a map of the game world to help players find hidden treasures.

SpriteA graphic or image that represents a character or object in a game or animation. – I chose a cat sprite to be the main character in my animation project.

BackgroundThe image or color that appears behind the main objects or characters in a game or animation. – I changed the background to a sunny beach to make my game more colorful.

CostumeA different appearance or outfit for a sprite in a game or animation. – I gave my sprite a superhero costume to make it look more exciting.

KeysButtons on a keyboard that can be used to control actions in a game or program. – I programmed the arrow keys to move my character left and right.

GameAn interactive program designed for entertainment, often involving challenges or goals. – We worked in teams to create a new game that everyone could play on the computer.

ExploreTo move around and discover different parts of a game or program. – I love to explore new levels in the game to find secret areas.

InteractTo engage with or respond to elements in a game or program. – In the game, you can interact with other characters to get clues and solve puzzles.

All Video Lessons

Login your account

Please login your account to get started.

Don't have an account?

Register your account

Please sign up your account to get started.

Already have an account?