How to Make a Super Mario Game on Scratch
The First Art Newspaper on the Net    Established in 1996 Friday, November 22, 2024


How to Make a Super Mario Game on Scratch



Blue overalls, red cap, and trademark moustache? Does it ring a bell? Yes, you guessed it right, we are talking about Mario, the main hero of the Mushroom Kingdom.

We are sure you have played many Super Mario games, but have you ever tried making your own Super Mario adventure?

If you haven’t, then today is the day you will embark on a fun adventure and make your version of Super Mario games!

Whether you’re a beginner or have some coding experience, this guide will walk you through creating a Super Mario game using Scratch Programming.

As Mario would say, “Let’s-a go!”

Super Mario Games

Super Mario, otherwise known as Super Mario Bros, is a platform game series created by Nintendo. As you might know, there have been so many Super Mario games released worldwide and today your job is to recreate one of them.

First thing first, you need to decide what kind of Super Mario game you want to recreate, and which characters you want to use.

For the sake of simplicity, we are making a jumping-across platform game set in the mystical Mushroom Kingdom. This is just a basic game, which will help you create even more complex and entertaining Super Mario games in the future.

Mario will play as the main player character. (But if you like Brother Luigi more, then feel free to use him).

Choosing a Mario Sprite

Sign up on Scratch.org platform to create a new project. Click on the “Choose a Sprite” button and search for a Mario Sprite. You can draw your own or upload an image if you can't find one. Search the web for any Mario character image, and upload it on Scratch with just a few clicks.

Designing the Mushroom Kingdom

Mushroom word is so dynamic, huge and 3D, so it might be difficult to recreate the same. Instead, you can click the “Choose a Backdrop” button and select a backdrop resembling the classic Mario World. You can also draw your own.

But if you want a mushroom kingdom image as your background, search the web and import it on Scratch easily.

Adding Platforms

This is the point where you have to draw some obstacles and platforms for your Mario to climb. Either, you can use the “Paint” feature and draw out some obstacles or you can use different sprites as obstacles or platforms.

For example, you can use a “rectangular button” sprite as a platform. Or if you want to create an obstacle, then you can use stones, trees, scary animals, or even a door as an obstacle! You can find all of these by clicking on the “Choose a Sprite” button.

Program Mario’s Movements

Now that your game interface is all ready, you need to work on building logic for Mario’s movements. Mario must be able to move forward and backwards, and also jump over any obstacle or platform.

To do that, click on your Mario Sprite and add the following code blocks to make him move left and right on key presses.
when [right arrow] key pressed
change x by 10
switch costume to [walk right]

when [left arrow] key pressed

when [right arrow] key pressed
change x by 10
switch costume to [walk right]

when [left arrow] key pressed
change x by -10
switch costume to [walk left]

Great! Now, you can add the jumping code too:
when [space] key pressed
repeat 10
change y by 10
end
repeat 10
change y by -10
end


Do you think these are all the necessary movements you need? What happens when you jump? Do you jump and just stay in the air or do you land back on the ground?

What makes you land back? GRAVITY, that’s right. Similarly, you need gravity for our Mario, too, you can do that by simply adding this code block:
forever
if > then
change y by -5
end
end

Collisions

In this step, you must ensure that Mario interacts perfectly with the obstacles and collisions. You don’t want Mario to just walk into the obstacle without any consequences or fall off from a platform, right?

To detect collision with a platform after a jump, you can add the following code block:
forever
if then
set [y v] to (y position of [platform v])
else
change y by -5 // Gravity effect
end
end


And you can add this code block, whenever Mario bumps into any obstacle:
forever
if then
// Code to handle collision, e.g., stop movement or lose a life
set [x v] to (x position of [obstacle v] - 10) // Example: move Mario back slightly
end
end


Now, if you play the game, you should be able to move around, jump over, and avoid collisions with obstacles and platforms.

Do not stop! You can let your creativity soar and add more customisation, game levels, scoring and sound effects to your game!

Adding Enemies and Coins (optional)

One thig, Super Mario games are known for is those shiny gold coins. How cool would it be if you could add those coins to your game too?

You can create coin sprites and add code to make them disappear when Mario touches them. Not only this, but you can also add a score variable to keep track of collected coins.

To add a challenging and fun twist to your game, you can aso add Mario’s enemies and make it a multiplayer game!!!

You can add sprites for enemies like Goombas or Koopa Troopas and simply program their movements and interactions with Mario.

Test and Play

Yay! You have just made your Super Mario game. Click on the green flag in the top right panel and enjoy it fully! Make sure to challenge your friends and family members to play this game that you just created!

Conclusion

Scratch is a powerful tool that allows you to unleash your creativity and learn the basics of coding in a fun and engaging way. Begin your journey in scratch programming with Codingal’s coding courses for kids, where you can unlock your full potential and learn something new at every step.

Keep experimenting, keep learning, and most importantly, have fun with your coding journey! At Codingal, we’re here to support you every step of the way. Happy coding!










Today's News

August 18, 2024

Was that a James Turrell I just skied by?

Complexities of contemporary German identity explored in Harvard Art Museums' fall 2024 exhibition

Just weeks left to see Edward Hopper exhibition at Dayton Art Institute

How Tau Lewis channels the spirit world

Ancient scribes got ergonomic injuries, too

Joanna Piotrowska to open exhibition at Marian Goodman Gallery Paris

Kunsthaus Zürich and Zürcher Theater Spektakel present Walid Raad 'Cotton under my feet: The Zurich chapter'

Gallery Wendi Norris announces Chitra Ganesh: "Tiger in the Looking Glass"

de Young announces 'Paul McCartney Photographs 1963-64: Eyes of the Storm'

National Museum of American History adds Latino response to health-care needs to "Giving in America" exhibition

New exhibition "Rasheed Araeen: A British Story" opening in Cambridge, October 18

Greg Kihn, who scored hits with 'Jeopardy' and 'The Breakup Song,' dies at 75

London-based artist Johnny Abrahams' inaugural solo exhibition in Japan to open at MAKI Gallery

One of classical music's great builders prepares for the next step

Opening September 4 at Fridman Gallery: A Treatise On Color

Now on view at Gerald Peters Contemporary, Santa Fe: Steven J Yazzie

Queer photography on view at Kunstmuseum Brandts

Venus Over Manhattan announces representation of multidisciplinary artist Brad Kahlhamer

Pictureville Cinema to reopen in August with latest releases and return of popular film festival

The Henry Art Gallery announces an exhibition of work by interdisciplinary artist A.K. Burns

36 hours in Helsinki, Finland

Jerry Fuller, writer of 'Young Girl' and other hit songs, dies at 85

Everything You Need to Know About Debt Management Plans

Beyond Anime: Exploring the Diverse Themes and Designs of Dakimakura Body Pillows

How to Make a Super Mario Game on Scratch

Can Ants Be a Nuisance to Your Home?

How Can Virtual Reality Therapy Help Dementia Patients?

7 Reasons people seek legal advice from criminal defense attorney

How to Get LinkedIn Premium for Free: A Recruiter's Guide.




Museums, Exhibits, Artists, Milestones, Digital Art, Architecture, Photography,
Photographers, Special Photos, Special Reports, Featured Stories, Auctions, Art Fairs,
Anecdotes, Art Quiz, Education, Mythology, 3D Images, Last Week, .

 



Founder:
Ignacio Villarreal
(1941 - 2019)
Editor & Publisher: Jose Villarreal
Art Director: Juan José Sepúlveda Ramírez
Writer: Ofelia Zurbia Betancourt

Attorneys
Truck Accident Attorneys
Accident Attorneys
Holistic Dentist
Abogado de accidentes
สล็อต
สล็อตเว็บตรง

Royalville Communications, Inc
produces:

ignaciovillarreal.org juncodelavega.com facundocabral-elfinal.org
Founder's Site. Hommage
to a Mexican poet.
Hommage
       

The First Art Newspaper on the Net. The Best Versions Of Ave Maria Song Junco de la Vega Site Ignacio Villarreal Site Parroquia Natividad del Señor
Tell a Friend
Dear User, please complete the form below in order to recommend the Artdaily newsletter to someone you know.
Please complete all fields marked *.
Sending Mail
Sending Successful