Before you start:
Change the Turtle into a Mario:
Click Edit Breeds
Select the People menu
Select Mario
Rename the turtle as 'Mario'
Create a setup procedure:

The Create Mario and Scatter Mario blocks are in the
Create a movement procedure in a Forever block:

Complete the procedure so that Mario can move forward, back, left and right. How many degrees should Mario turn left or right? Large numbers will produce large jumps and the game will run fast; smaller steps will make the game run more smoothly and slowly.
Rename the procedure from 'Forever' to 'movement'
Create a new breed called Luigi (select the Luigi character)
In the setup procedure add a 'Scatter Luigi' (or remove 'Scatter Mario' and use Scatter All)
Under the Luigi tab of the Movement procedure create instructions to control the movement of Luigi
Hint: You will have to use the ‘a’, ‘s’, ‘d’, and ‘e’ keys instead of ‘up’, ‘down’, ‘left’ and ‘right’.
Easy: Alter the terrain to create a more interesting landscape
Medium: Change the speed and turning properties so each character is different
Hard: Make the characters jump (they must also fall after each jump)
The aim this time is to create weapons for Mario and Luigi that are executed by new keys.
The statements to produce the balls is tacked onto the end of the existing code block:
Add a new if..test..then block after the keyboard right arrow if block. Test a new key press e.g. space: this will be the Fire button.
The new if block will ‘hatch’ a new breed called ‘ball’ which is a simple sphere. Note that you can change the colour of simple shapes like the sphere. Accept the default green for now.
When the new key is pressed the Hatch procedure will be triggered – this produces a new copy of the specified breed. Hatch is in the Logic section of the Factory.
In the Hatch do section you will need to move the character 2 steps forward and then breed a new ball. To do this you will need a Set Breed block and a Breed. The Set Breed block is under Traits while the required breed block is in My Blocks under the breed specified (ball). Finally add a set size block with a value appropriate to the game (experiment).
Repeat the hatch code you have created for Luigi (if, key press, hatch, set breed, breed).
Finally, you will need to add a single instruction to the ball section of the Movement block. What does the ball do when released?
Change the colour of the balls produced by Luigi so you can tell them apart from those of Mario.
Experiment with different sizes of ball.
We now need to add routines to determine what happens when collisions take place between the three characters (Mario, Luigi, balls).
Three collisions are possible: Ball/Mario, Ball/Luigi, Mario/Luigi (we ignore ball/ball, though we could add something later).
The collision blocks can be found in My Blocks under each character.
When Mario and Luigi collide you could make them retreat 10 steps and make a suitable sound. To do something 10 times use a Repeat block.
When a ball collides with either character they should die.
The collisions between Mario, Luigi and balls are simple: the characters die. The balls can die too.
Most of the balls don’t die, they just hang around and clutter up the playing area. Can you think of a way to make them go away?
Add new characters to interact with the existing objects in the game. How many players can you fit in?
Monitor the effectiveness of the ball killing routine by counting them. Add a line chart and set it to count the number of balls in the game.