Mario: Escape From the Princess

by Vibes in Circuits > Software

817 Views, 1 Favorites, 0 Comments

Mario: Escape From the Princess

Mario.png

Coding a Game:- Mario: Escape from the Princess

Created by: Sambhav, Grade 6


In this project, we are going to make a game on M.I.T app inventor, a programming software that is quite easy to use.


In general, Mario games are quite easy to play and perform on M.I.T app inventor, but in this game, we will increase the level.


In this game too, it's not Mario that we're going to move, but the Princess and the grass, it will still give the impression that it's Mario who is moving.


Thanks for watching this project and happy viewing!

Supplies

MIT App Inventor

Steps to Create the Game

For this project, we will use the M.I.T inventor and I put the images that we will use, at the bottom of this text.










Step-1

Create 2 screens - info-screen and Main screen

Step 2 : 

Make the screens background black.


Step 3:

Add this icon:

 

Step 4:

Create a Horizontal Arrangement

Make its text color dark blue

Make its background color green

Create 2 labels beside each other


First one saying : Score:

Second one saying: 0

Also add a button and in the button’s picture option add this picture: 


Step 5: 

Add another Horizontal Arrangement

Inside it create 2 Labels 

First one saying : Countdown 

Second one saying: 5

Make the Text color white

Make the background color Red


Step 6:

Create another Canvas

Inside the canvas create a platform sprite:


Add the cloud sprite, restart sprite , start sprite , the enemy(princess) sprite, the mountain sprite and the mario sprite .

, ,

, , , and the

 Step 7: 

Add the Accelerometer sensor.


Step 8:

Add 5 clocks


Step 9: 

Add a jump sound

This is all for Main screen

 

Step 10 

Open info screen


Step 11

Add a horizontal Arrangement containing 1 Button and 1 Label

Remove the Text from the Button and in the image section add this image:

And in the Label Say:”Click here to start”

Make the font color white

Make the screen’s Background Black


Step 12 

Add another Horizontal Arrangement Containing 2 Labels 

1st one saying : “Instructions:”

2nd one saying :”Shake your phone to jump”

 That's all for the Designing.




CODE

First off, let's start with the code of the info screen.

1: Do this to move to the next screen and position the arrangements.


2: Let’s create a procedure called in game and add the code for the count down clock and the code to start



Code Details

The game code is published here: https://gallery.appinventor.mit.edu/?galleryid=bc237ad5-dedb-46ac-96f2-b68297856779