# Oh Mummy!

6-7 yrs old

8-10 yrs old

11-13 yrs old

Computer Science

Gaming

Math & Economics

Use code to create an exciting game where the player needs to escape an arena with varying levels of difficulty while being chased by various mobs

Submitted By: Philip Golden

November 1, 2018

#### Skills

• Creativity
• Project Based Learning

### External References

This code implements the area. Ideally the co-ordinates should be derived from a pen and paper design. This is a self contained session.

This code starts from Session I and adds the game play options to create a single working level, again this is self contained.

This code has the full implementation of the game with multiple levels, building on previous sessions.

### Learning Objectives

• Co-ordinate geometry: Creating the arena involves 3D coordinate geometry. Ideally this starts with a pen and paper design, and is progressed to an implementation in code using loops
• Loops (computing): The cubes are created as a 2D array that is implemented using two for loops
• Game Design: Levels get progressively more challenging, significant scope to individualise the game with new features
• Arrays (computing): The final game uses arrays to control various levels

### Guiding Ideas

• The activity is intended to be run over three sessions, as there is a reasonably large amount of code. Each session is structured to cover (a) core concept(s) and give a clear deliverable at the end
• Excellent chance to cover co-ordinate geometry in some detail with a very engaging application. Important to emphasise both the initial planning which can be done using pen and paper, and then the translation of this into efficient code
• The benefits of using code can be discussed, including being able to auto generate different levels, add game playing features etc. using techniques such as loops and arrays

### Student Activities

• Discuss the layout of the arena and derive the coordinates of the walls and cubes using a pen and paper design. Open a 'Blocks of Grass' world. Create the walls, exit and cubes using functions (see attached code for Session I)
• Create the gameplay function, including setting the time to night, the difficulty to normal, the world to immutable and the mode to survival. Teleport the player to the start and 3 monsters to the other corner of the arena at the beginning of the game - you now should have a single level playable game (see attached code for Session II)
• Create levels of increasing difficulty, with arrays of monsters and block types (making the blocks less transparent as the levels get harder). Add messages to display level information to player, and finally add code to spawn another monster if the player kills on (see attached code for Session III)

### Performance Expectations

• A reasonable understanding of the co-ordinates used to build the walls and cubes - for advanced students a clear understanding of the offsets etc. required for gaps
• An intuition for the use of for loops to generate the cubes (compared to manually generating them or using repeat loops)
• Students should able to explain and justify the gameplay options being set, and also how the levels are being controlled and varied using the code
• Ideally students would individualise their game using different mobs, adding levels, adding timers, bonus items etc.

#### Skills

• Creativity
• Project Based Learning

### External References

This code implements the area. Ideally the co-ordinates should be derived from a pen and paper design. This is a self contained session.

This code starts from Session I and adds the game play options to create a single working level, again this is self contained.

This code has the full implementation of the game with multiple levels, building on previous sessions.