Make an Open World Game RPG in Scratch Tutorial

Creative Games
7 followers
25 Video Views·Mar 29, 2025
Want to make your own open world game or RPG in Scratch? This tutorial will show you how! By the end of this video, you'll be able to make your own world full of characters, items, and more.
Remix this project (just go to the link and click the green "Remix" button or blue "See Inside" button):
https://scratch.mit.edu/projects/6749...
Comments are disabled for this video.
Hi everyone, it's Zinnia 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 make your own game like this one,
where you can have a character
walking around an endless world that you design,
and they can talk to other characters and more.
Let's get started.
So first, let's pick a character
to be the main character of your project.
You can just click on this button
that says choose a sprite,
and pick absolutely any character you want
to be the main character in your world.
I think for this example project,
I will pick the scratch cat.
So how do you make this character
walk around this giant, endless seeming background?
Well, actually, the way we can do it is
the character in the middle won't move.
We're going to make a giant sprite
to be the background, and that sprite will move around.
So let me show you how to do that.
We can make a sprite like that
by hovering over choose a sprite and clicking paint.
What I like to do is click convert to bitmap
to switch into bitmap mode,
where it's easy to draw directly on the canvas.
So my simple way of making a map is,
first, I'm just going to click on the rectangle tool,
and click on the color,
and set the color to something in the blue range,
because I'm just going to make a big sort of ocean
to be the base of the map.
And I will drag, click and drag out a rectangle,
and fill the whole screen.
Now, to draw some land on top of it,
I'll set the color to green,
and I will click on the paintbrush tool,
and I'm just going to scribble random pieces of land
on top of the ocean.
It can really be anything you want.
I'm not doing any particular pattern.
And now I can use the fill bucket to fill in any spaces
that I want to be land,
because basically this gives you a pretty basic map.
You could, of course, use whatever colors you want instead.
I'll make this map go to the back layer
when the green flag is clicked,
so that it's behind the main character.
Anyway, now that we have our map,
how can we make it big so that our character
can walk around a giant version of this map?
Well, you can click on size here
and try increasing the size,
but it won't let you increase the size past a certain point.
But here is a trick for getting around that.
Let's go to the costumes tab,
and let's paint a new costume,
and just draw one tiny dot.
So this is a costume that's really small.
If I go back to the code tab
and switch the costume to blank costume,
and then set the size to something really big,
like a thousand percent,
okay, it lets me set the size to be really big
of this still blank costume.
And now, I can switch the costume back to the map costume,
and there you go.
Now you have a giant version of the map.
So this is a trick that will let you
set any sprite to a large size.
Now, let's make it so that
when the player presses the arrow keys,
this map moves underneath the character.
To make the map move,
we can go to the motion category and use these 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, so that makes the backdrop move this way.
And it kind of looks like the player is walking downward.
So let's make this happen
when the down arrow key is pressed.
I can go to the events category
and drag out a when space key pressed block,
and choose down arrow from the menu,
and then put this on top of this.
And now, when I click the down arrow,
it looks like the player is walking down the map.
And I could put in a larger number like 20
to make it move a bit more every time I press the button.
And if I drag out another change Y block
and put in negative 20,
that will make the backdrop move in the opposite direction.
So that kind of looks like
the character is moving upwards on the map.
So I can drag out a when up arrow key pressed block
and put that on top.
So now you can walk up and down the map
with the up and down arrow keys.
And let's make it so the player can move left and right.
So if you drag out this block, change X by 10,
that will make the map move this way.
So let's make that 20 actually.
And let's make that happen
when the left arrow key is pressed.
And if you change X by negative 20, it goes this way.
So we can make that happen
when the right arrow key is pressed.
So now it looks like the character
can walk all around the map.
Oh, and I'll make the map start at zero, 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 could find as they walk through it.
What I do is I make a duplicate of the map sprite
so that this character has all the same code as the map
because we want this character or object to move around
as the map moves around.
And then the next thing I'll do is go to the costumes tab.
I'll keep this blank costume
because that will help us do the size trick,
but I'll delete the map costume
and I'll draw a new costume
and I'll convert to bitmap mode again
because in a vector mode,
sometimes when the drawings get set to a large size,
they get sort of blurry.
So anyway, I've converted to bitmap
and I'll zoom in to a really small level
so that I'm drawing at a really small size
and I'll click on the paintbrush and set the size to one
and I'll just draw, you could draw anything.
I'll draw my favorite kind of blob, pretty easy,
and do two lines for the eyes
and maybe I'll pick a lighter purple color
to be the color for the blob
and I'll use the fill bucket to fill it in.
And in Scratch, in order for this blob character
to move exactly the same as the map moves,
the borders of the sprite have to be the same
as the borders of the map sprite.
So basically it needs to have a border around this edge
and an easy way to do that is
you can just use the rectangle tool
and create thin rectangles all around the edges
of your blob or your character or object or whatever it is.
Now, let's check and make sure that the code
from the map will still work for this character
and there are a couple of changes we need to make
and these will be the same changes
for any character or item you want to add.
Since this character shouldn't be on the back layer,
it should be in front of the map,
we want to get rid of this go to back layer block
and then also this block that says switch costume to map,
we don't want to do that,
we want to switch the costume to costume one
because that's the costume that this character has.
So that's the other thing you'll need to change.
Anyway, let's try it out.
So I'll click the green flag and there we go,
there is our character
and we can run into them in the world.
And one thing we could add is we could make it
so that this character says something like hello
when we click on it.
So if we put the when this sprite clicked block on top,
now we can walk up to the character
and it says hello to us.
And one last thing I'll mention
for when you're making your projects,
if you wanted to change the location
that this character appears at within the map,
the way you can do that is go to the costumes tab
and you can change the location of this sprite
within the costume.
So wherever you put it within this costume,
that's where it will appear.
Anyway, that's what I wanted to show you today.
If you want to use the starter code for this project
that I just made, the link is in the description below.
And yeah, I can't wait to see the open world games
that you make.
I'll see you next time and scratch on.
