CompY8_3_GameMaker.docx - Lady Lumley's School 8/ICT...  · Web viewTutorials (See GameMaker...

35
LLS ICT Dept 2014-15 Year 8 - Computing CompY8_3_GameMaker Summary In this unit pupils will be introduced to the GameMaker Game Editor/programming environment and begin by reverse-engineering an existing game. They will then progress to planning and developing their own games, learning to incorporate variables, events and actions, and making use of object-orientated programming techniques. Finally they will learn to test and debug their programs. Assessment will be by means of an Assessment Portfolio. The material supplied for this unit includes: 6 PowerPoint presentations, each designed to cover one lesson 2 worksheets 8 tutorials (PowerPoint) 11 extension tasks and 4 challenge tasks (in a PowerPoint document) 2 homework tasks 8 sample GameMaker projects (one for the end of each tutorial) 3 completed GameMaker projects and compiled games Core game with no extensions Core game with extensions Core game with extensions and challenges completed Assessment portfolio document for assessment purposes Extra game resources for pupil games By the end of the unit pupils should as a minimum have created a fully working game with: A Controllable Player Character that can: detect and react to collisions with obstacles, enemies and projectiles collect and carry a flag or other object which is dropped when destroyed reset to the start after it has been hit An Enemy Character that can: start in a random position move around the level on its own reacting to collisions with obstacles destroy the player by touching it 1

Transcript of CompY8_3_GameMaker.docx - Lady Lumley's School 8/ICT...  · Web viewTutorials (See GameMaker...

Page 1: CompY8_3_GameMaker.docx - Lady Lumley's School 8/ICT...  · Web viewTutorials (See GameMaker Tutorials folder) For each of the practical elements in the unit there are tutorials

LLS ICT Dept 2014-15 Year 8 - Computing

CompY8_3_GameMaker

SummaryIn this unit pupils will be introduced to the GameMaker Game Editor/programming environment and begin by reverse-engineering an existing game. They will then progress to planning and developing their own games, learning to incorporate variables, events and actions, and making use of object-orientated programming techniques. Finally they will learn to test and debug their programs. Assessment will be by means of an Assessment Portfolio.

The material supplied for this unit includes:● 6 PowerPoint presentations, each designed to cover one lesson● 2 worksheets● 8 tutorials (PowerPoint)● 11 extension tasks and 4 challenge tasks (in a PowerPoint document)● 2 homework tasks● 8 sample GameMaker projects (one for the end of each tutorial)● 3 completed GameMaker projects and compiled games● Core game with no extensions● Core game with extensions● Core game with extensions and challenges completed● Assessment portfolio document for assessment purposes● Extra game resources for pupil games

By the end of the unit pupils should as a minimum have created a fully working game with:

A Controllable Player Character that can:● detect and react to collisions with obstacles, enemies and projectiles● collect and carry a flag or other object which is dropped when destroyed● reset to the start after it has been hit

An Enemy Character that can:● start in a random position● move around the level on its own reacting to collisions with obstacles● destroy the player by touching it● be destroyed by the player’s projectiles

A Fully Playable Level that:● contains the player character, enemy character, game obstacles, collectable flag or other object and player base● is editable and expandable by the pupil● can be one of several additional levels along with a title screen and win screen created by the pupil

Extension and challenge tasks are available for high ability pupils to expand and improve their games.

1

Page 2: CompY8_3_GameMaker.docx - Lady Lumley's School 8/ICT...  · Web viewTutorials (See GameMaker Tutorials folder) For each of the practical elements in the unit there are tutorials

LLS ICT Dept 2014-15 Year 8 - Computing

CompY8_3_GameMaker

New Attainment Targets (partially covered in this unit)● design, use and evaluate computational abstractions that model the state and behaviour of real-world problems and physical systems● understand several key algorithms that reflect computational thinking (for example, ones for sorting and searching); use logical reasoning to compare the utility of

alternative algorithms for the same problem● use two or more programming languages, at least one of which is textual, to solve a variety of computational problems; make appropriate use of data structures

(for example, lists, tables and arrays); design and develop modular programs that use procedures or functions● undertake creative projects that involve selecting, using, and combining multiple applications, preferably across a range of devices, to achieve challenging goals,

including collecting and analysing data and meeting the needs of known users

Previous LearningNo previous learning is necessary with this unit but most pupils will have had experience of programming or sequencing instructions from units studied in previous years using software such as Logo, RoboMind, Kodu or Scratch. They should be familiar with using screen objects.

Suggested ResourcesThe GameMaker SoftwareThe free version of the GameMaker Studio software from YOYO Games is used in this unit. It is available to download from YoYo Games; visit them at http://www.yoyogames.com/studio

Worksheets 1 and 2Worksheet 1 – A game analysis document for pupils to complete (answer sheet provided)

Worksheet 2 – Pupils are instructed to create a level design for their game

Homeworks 1 and 2Homework 1 – Pupils have to decide which statements are Events and which are Actions

Homework 2 – Pupils show their understanding of IF statements and variables

Tutorials 1 to 8

Tutorial 1 The first level (a how to guide for creating the first room/level)

Tutorial 2 Player Character (a how to guide for creating the player sprite)

2

Page 3: CompY8_3_GameMaker.docx - Lady Lumley's School 8/ICT...  · Web viewTutorials (See GameMaker Tutorials folder) For each of the practical elements in the unit there are tutorials

LLS ICT Dept 2014-15 Year 8 - Computing

CompY8_3_GameMakerTutorial 3 Player Object (a how to guide for creating and programming the player object)

Tutorial 4 Programming Collision Detection (a how to guide for programming collision detection)

Tutorial 5 Programming enemies (a how to guide for creating and programming enemies)

Tutorial 6 Creating a Projectile (a how to guide for creating a projectile)

Tutorial 7 Firing Projectiles (a how to guide for programming the player firing)

Tutorial 8 Capturing the flag (a how to guide for programming the ‘capture the flag’ mechanism)

Extensions 1 to 11Extension 1 – Import a sprite

Extension 2 – Add a player exhaust effect

Extension 3 – Increase the size of a level

Extension 4 – Create fake walls

Extension 5 – Add moving walls

Extension 6 – Add an enemy exhaust effect

Extension 7 – Add more enemies

Extension 8 – Add a starting screen

Extension 9 – Create a second level

Extension 10 – Create a ‘win’ screen

Extension 11 – Add lives and scoring

Challenge Tasks 1 to 4Challenge Task 1 – Add Enemy Turrets (GML Scripting)

Challenge Task 2 – Add Player Turrets (GML Scripting)

Challenge Task 3 – Add a second player

Challenge Task 4 – Create Locked Doors

Vocabulary

3

Page 4: CompY8_3_GameMaker.docx - Lady Lumley's School 8/ICT...  · Web viewTutorials (See GameMaker Tutorials folder) For each of the practical elements in the unit there are tutorials

LLS ICT Dept 2014-15 Year 8 - Computing

CompY8_3_GameMakersprite, object, event, action, variable, background, level, room, action property, STEP event

Learners will need to use structures that describe programming commands such as:

loops (STEP Event), If ... statements, event calls

Some pupils may wish to import images as game backgrounds or sprites which they can find using any online image search website.

AssessmentPupils will create a game that will be assessed using the Assessment Portfolio document provided.

They will answer questions on object oriented programming and include screenshots of the code they used and details of their testing. The final version of the game they create can be accessed separately to form the overall assessment for the unit.

The assessment describes grades as Basic, Intermediate, Advanced or Expert. It is expected that teachers will map these onto their own school assessment structure for Computing and ICT.

Preparation and additional informationPupils may wish to download GameMaker at home from YOYO Games. There are lots of additional tutorials on GameMaker available on the internet, many located on YouTube. There are also several forums located on the YOYO Games website for answering questions on GameMaker.

GameMaker is a professional game creation software package. Many professional developers use it to develop games for iPhone, IPad, Android Phones and tablets and for both Windows and Ubuntu. These additional export components can be purchased from YOYO games. Upgraded versions of GameMaker which contains additional features can be purchased and downloaded from YOYO Games.

Teachers will need to familiarise themselves with GameMaker, and it is recommended that they complete all of the tutorials themselves before teaching the unit.

It is important to allow pupils to take full ownership of their programs by giving them the freedom to choose their own game themes, characters and so on. This way, they become really engaged and keen to develop their games further using their own ideas.

Some pupils may want to import images as sprites from online websites. This may help shorten design time which they would otherwise spend creating sprites in the Paint Editor, although some pupils may spend a long time deciding on a suitable image.

Not all pupils will master all of the features in GameMaker in this short unit. Some may need more time to work on using some of the basic functions such as movement and using variables, whilst others in the same class may grasp concepts quickly and progress much faster. Extension and Challenge Tasks have been provided to extend pupils’ learning.

Using GML Scripting Language

4

Page 5: CompY8_3_GameMaker.docx - Lady Lumley's School 8/ICT...  · Web viewTutorials (See GameMaker Tutorials folder) For each of the practical elements in the unit there are tutorials

LLS ICT Dept 2014-15 Year 8 - Computing

CompY8_3_GameMakerWhilst not part of the core lesson sequence, it is possible to use the GameMaker Scripting Language in GameMaker. This is a built-in programming language that advanced users of GameMaker can use to achieve greater control and efficiency in their programming. Challenge Tasks 1 and 2 introduce pupils to the scripting language and how it is used.

Changing the GameMaker interface design or skinGameMaker Studio comes with a black background by default and the screenshots in this unit reflect this. Three different ‘skins’ are available to use under File, Preferences…. Selecting the GM8 skin will, after a restart of the software, display things with a more traditional ‘black text on white background’ style interface as in previous versions of the software. The interface setting should be remembered.

Preparation· Ensure the GameMaker software is available on all pupil machines

· Ensure the prototype game Example Game.exe can be accessed and run by all pupils

· Ensure GM Worksheet 1 Game Analysis is available to each pupil (digitally or printed)

· Ensure GM Worksheet 2 Game Design is available to each pupil (digitally or printed)

· Ensure all the Tutorials are available to each pupil (digitally or printed). They will need access throughout the unit to files in the GameMaker Tutorials folder.

HML (100mins)LOs (BTEL)

Activities Home Learning and Portfolio Evidence

Teacher Notes

Lesson 1 : first half assessment of previous unit / Gamemaker: Game analysisUnderstand your GameMaker projectAnalyse an existing gameDesign your own game for the projectUse GameMaker to

Previous Unit Assessment--------------------------------------------------------------------------------------------------------------------IntroductionIntroduce pupils to the project scenario by showing them the “Mission” slide. Highlight the game requirements. If their games are successful, they can save them or upload them to the web for others to play without any special software. A games publisher might just see them and be impressed!

These are some links to professional games created using GameMaker. You may prefer to save showing these to pupils until the end of the unit in order not to create

HL1 - Complete previous unit assessmentHL2 -Pupils are to design their first level on paper on a blank A4 piece of paper. They will need to draw:A home base where the player will start

PowerPoint GameMaker L1 Game Analysis

5

Page 6: CompY8_3_GameMaker.docx - Lady Lumley's School 8/ICT...  · Web viewTutorials (See GameMaker Tutorials folder) For each of the practical elements in the unit there are tutorials

LLS ICT Dept 2014-15 Year 8 - Computing

CompY8_3_GameMakercreate a single level with a background

false expectations of their own results in this unit.

Example Video 1: https://www.youtube.com/watch?v=MK0wkXNcuK4

Example Video 2: https://www.youtube.com/watch?v=fXArZxyX9O0#t=61

Example Video 3:

https://www.youtube.com/watch?v=jYQ2BazFFEg

Example Video 4: https://www.youtube.com/watch?v=mmJ31lDFe5U

Touch on the systems life cycle used by professional software developers and explain that pupils will be analysing an existing game, then designing, creating and testing their own games.

Explain that another game developer has already submitted a game.

Allow them to play the game for five minutes to give them a feel for the type of game they are going to produce and a focus for their efforts.

Note: This game contains a lot of features and some pupils may not find time to implement all of them, but they will all be able to choose those that suit their own game scenarios best. They will be able to produce a complete game that they can be proud of and which they can package for use and demonstration at home.

AnalysisStop the pupils and explain that they will be using GameMaker to make their games. There are some key terms that GameMaker uses that they must know. Take them through the terms sprite, object and room and give them examples within the demonstration game 01 CoreGame_Complete. An object has behaviours but no appearance, a sprite is physically visible, but does nothing. The two work together like a personality and a set of clothing. They will program the person (or object) and give it a set of clothes (or sprite) to ‘put on’ to make it visible. A room is a level, but can also be used, for example, to create a static screen used as a welcome screen for instructions or a final ‘You win/lose’ screen.

Ask the pupils to revisit the example game. This time they should analyse the game using GM Worksheet 1 Game Analysis. Pupils can complete a digital or printed

A flag or other object that can be collected by the playerA maze of obstacles that the player has to navigate aroundOne or more enemies that start in the level

Example Game.exe

(Editable game version is in the _Completed Game\00 Example Game folder)

01 CoreGame_Complete

GM Worksheet 1 Game Analysis.docx

GM Worksheet 2 Game Design.docx

6

Page 7: CompY8_3_GameMaker.docx - Lady Lumley's School 8/ICT...  · Web viewTutorials (See GameMaker Tutorials folder) For each of the practical elements in the unit there are tutorials

LLS ICT Dept 2014-15 Year 8 - Computing

CompY8_3_GameMaker

version.

Stop the class and gather answers from the pupils.

DesignAsk the pupils to start designing their own games by completing GM Worksheet 2 Game Design to outline their own ideas. The game created in this unit depends largely on having a player character that is viewed from above rather than side-on. Some ideas where this can work well are given below and in the PowerPoint guide.

● A boat at sea● A turtle swimming on the ocean floor● An ladybird on a large leaf● A tank in a desert● A mole in a network of tunnels● A police car on a road network● Pupils can complete a digital or printed version of the design sheet.

DevelopmentIntroduce the GameMaker developer software to the pupils. Show them where the Toolbar buttons are and explain the resource folder list on the left-hand side of the editor. They will only be concerned with the Sprites, Backgrounds, Objects and Rooms folders.

Demonstrate to pupils how to create their first room (level). Allow pupils to create their first room according to their design scenarios.

Demonstrate to pupils how to create their first room (level). Allow pupils to create their first room according to their design scenarios.

Tutorials (See GameMaker Tutorials folder)For each of the practical elements in the unit there are tutorials for pupils to work through, as they might otherwise find it difficult to follow or remember demonstrated instructions. These can be of great benefit to less able pupils, and act as reminders to all at a later date of how to do things. Pupils can use Tutorial 1 The First Level for help if needed.

Extension activityShow ‘Extension’ slide to pupils. They are to produce a hand-drawn design of their

Tutorial 1 The First level.pptx

7

Page 8: CompY8_3_GameMaker.docx - Lady Lumley's School 8/ICT...  · Web viewTutorials (See GameMaker Tutorials folder) For each of the practical elements in the unit there are tutorials

LLS ICT Dept 2014-15 Year 8 - Computing

CompY8_3_GameMaker

player character. It must be drawn from the top down and facing to the right.

PreparationEnsure all the Tutorials are available to each pupil (digitally or printed)Ensure Homework 1 Events and Actions is available to each pupil (digitally or printed)Ensure all the Extension and Challenge tasks are available to each pupil (digitally or printed) These are all held in Extension and Challenge Tasks.pptx in the GameMaker Tutorials folderEnsure the extra digital game resources are available to each pupil

HML (100mins)LOs (BTEL) Activities Home Learning and Portfolio Evidence

Teacher Notes

Lesson 2a (2) - Sprites and objectsCreate a sprite and object

Understand that GameMaker programming is based on Events and Actions

Program basic instructions

Remind pupils of the game requirements and refer them to the Game Design worksheets that they may have completed in the previous lesson.

Recap the key terms that GameMaker uses: Sprite, Object and Room.

---------------------------------------------------------------------------------------------------------

Creating sprites

A sprite is a simple image that is divided up into pixels – usually 32x32 pixels in GameMaker. Demonstrate to the pupils how to create their player sprite by:

• clicking the Create Sprite button

• setting up the sprite

• drawing or importing a sprite graphic

HL1: complete GameMaker Homework 1 Events and Actions.

Ensure all the Tutorials are available to each pupil (digitally or printed)

Ensure Homework 1 Events and Actions is available to each pupil (digitally or printed)

Ensure all the Extension and Challenge tasks are available to each pupil (digitally or printed) These are all held in Extension and Challenge Tasks.pptx in the GameMaker Tutorials folder

Ensure the extra digital game resources are available to each pupil

8

Page 9: CompY8_3_GameMaker.docx - Lady Lumley's School 8/ICT...  · Web viewTutorials (See GameMaker Tutorials folder) For each of the practical elements in the unit there are tutorials

LLS ICT Dept 2014-15 Year 8 - Computing

CompY8_3_GameMaker

• saving the sprite

It is important that pupils create a sprite that is viewed from above rather than the side. A sprite image viewed from the side will look odd when it rotates and would be programmed differently to the instructions in this unit. It would also involve multiple sprites for left, right, up and downward-facing versions.

More detailed instruction is available in Tutorial 2 Player Character, which should only take a few minutes to complete. (Instruction on how to import a sprite image from the web is given in Extension Task 1.)

Ask pupils to create a sprite for their player. Direct them back to their original plans for a game, in which they decided upon a player character. Help pupils who have not chosen a suitable character that can easily be represented/viewed from above.

Programming Events and ActionsIntroduce pupils to the Events and Actions programming system that is used by GameMaker. Events and actions are only attributed to objects. A sprite is also attributed to an object in order to give it a visible ‘cloak’. Events invoke actions and give an object its behaviours. An object will react and behave in a certain way when an external event happens, just like in the real world. It also has properties such

9

Page 10: CompY8_3_GameMaker.docx - Lady Lumley's School 8/ICT...  · Web viewTutorials (See GameMaker Tutorials folder) For each of the practical elements in the unit there are tutorials

LLS ICT Dept 2014-15 Year 8 - Computing

CompY8_3_GameMaker

as its speed or the direction it faces (known as Image_Angle in GameMaker).

Introduce the SPEED property to the pupils and explain how it can be used to move the player forwards and backwards by setting positive and negative values.

Introduce the IMAGE_ANGLE property and explain that its value determines which direction the sprite faces. Show that a value of zero faces to the right and a value of 90 faces up, a value of 180 faces left and a value of 270 faces down.

Introduce the STEP event to the pupils. This event is run continuously through the game, 30 times every second. If you want to repeat instructions throughout the game then you put them in the step event. For example, if you want the game to constantly assess whether the sprite is rotating and adjust the direction it calls ‘forwards’, a step event is needed.

Our own direction of travel and the way we face is not always the same – try walking backwards! In this game however, we want our object to always move in the direction it faces when we press the Up (‘forwards’) key. Therefore the direction must equal the sprite Image_angle. Image_angle is a reserved variable in GameMaker.

10

Page 11: CompY8_3_GameMaker.docx - Lady Lumley's School 8/ICT...  · Web viewTutorials (See GameMaker Tutorials folder) For each of the practical elements in the unit there are tutorials

LLS ICT Dept 2014-15 Year 8 - Computing

CompY8_3_GameMaker

Demonstrate how to add an event and program the behaviours for an object. Summarise the programming steps needed to complete the movement for the Player object and ask pupils to complete their own programming.

Programming MovementPupils are to follow Tutorial 3 Player Object to program movement for their player object.

ExtensionsShow ‘Need More’ slide to pupils. They could attempt Extension Tasks 2 and/or 3.

Preparation● Ensure all the Tutorials are available to each pupil (digitally or printed)● Ensure Homework 2 IF Statements and Variables is available to each pupil (digitally or printed)● Ensure all the Extension and Challenge tasks are available to each pupil (digitally or printed) These are all held in Extension and Challenge Tasks.pptx in the

GameMaker Tutorials folder● Ensure the extra digital game resources are available to each pupil

HML (100mins)LOs (BTEL) Activities Home Learning and Portfolio Evidence

Teacher Notes

Lesson 2b (3) - Enemies and collision detectionCreate and program obstacles

Create and program enemies

Learn the basic concepts of object

Recap – Events and Actions ProgrammingRecap the Events and Actions programming system with the pupils. E.g.:

When an EVENT occurs in the

The next lesson will focus on using IF statements in the code blocks. It is likely that some pupils will already have experience in using IF statements with either Spreadsheet software or other programming environments such as Scratch.

PowerPoint Guide: GameMaker L3 Enemies and collision detection

11

Page 12: CompY8_3_GameMaker.docx - Lady Lumley's School 8/ICT...  · Web viewTutorials (See GameMaker Tutorials folder) For each of the practical elements in the unit there are tutorials

LLS ICT Dept 2014-15 Year 8 - Computing

CompY8_3_GameMaker

oriented programming (OOP) game, a set of ACTIONS can be programmed that changes the game is some way

Stop the monster when it hits a wall

EVENT: a monster collides with a wall object

ACTIONS: make the monster bounce off

Creating Obstacles for your LevelDemonstrate to the pupils how to create the obstacles for their rooms/levels.

Demonstrate:● creation of the obstacle sprite● creation of the obstacle object● placing the obstacle objects in

the level● programming the collision with

the player

Tip: It is best not to have too many gaps that are less than two grid squares apart in order to give freer movement for the player sprite which is only just small enough to fit within one square itself.

Ask pupils to create and program the obstacles or ‘wall’ sprites for their games. Pupils can use Tutorial 4 Programming Collision Detection for help if needed.

Creating and Programming Enemies

Homework 2: IF statements and variables will serve as good preparation for the next lesson where they will begin creating and programing projectiles.

Homework 2 If Statements and Variables.docx

Homework 2 If Statements and Variables Answers.docx

12

Page 13: CompY8_3_GameMaker.docx - Lady Lumley's School 8/ICT...  · Web viewTutorials (See GameMaker Tutorials folder) For each of the practical elements in the unit there are tutorials

LLS ICT Dept 2014-15 Year 8 - Computing

CompY8_3_GameMakerExplain to pupils that they will have to create a sprite and object for their enemy. They can use one of the graphics provided for their enemy, or create one themselves using the Sprite Editor. You can advise pupils to use a pre-made enemy sprite in order to save some time here. Some pupils can spend an inordinate amount of time creating the ‘perfect’ sprite graphic!

Give a quick walkthrough of the ideas behind programming the enemies’ behaviour and resulting player behaviour on collision. Use the PowerPoint slides and demonstration game Tutorial_04_Complete.gmx to help explain the concepts.

Finish with the ‘Programing collisions’ slide that shows what needs to be programmed for the enemy and player objects.

Note: The Dice roll action on a Step event will force an object to change direction once in every n dice rolls creating a random movement effect so it is harder for the player to second guess enemy movement.

Allow time for pupils to make and program their enemy sprites and guide them in placing enemies in the room (level) so that they can test their game so far.

Pupils can use Tutorial 5 Programming Enemies for help if

Extension and Challenge Tasks.pptx in GameMaker Tutorials folder

13

Page 14: CompY8_3_GameMaker.docx - Lady Lumley's School 8/ICT...  · Web viewTutorials (See GameMaker Tutorials folder) For each of the practical elements in the unit there are tutorials

LLS ICT Dept 2014-15 Year 8 - Computing

CompY8_3_GameMaker

needed.

Once they have had a chance to try things out for themselves, refer to a completed demonstration game e.g. Tutorial_05_Complete with multiple instances of the same enemy object in the game – in the same way as there are multiple instances of the obstacle sprite.

Do all of the enemy objects do the same things at the same time or do they seem to be independent of each other? Do they all behave the same way when an event happens (e.g. bumping into a wall), but not together?

OOP Instantiation and encapsulation theoryThe Object Oriented Programming approach is different from that used in a procedural programming language such as Python or Basic. In OOP, an object can be given properties and behaviours, and the object can be duplicated so that there are many instances of the same object on the screen. In this case, there may be many instances of the enemy object. Although each instance is a copy of the first, they are not the same and their properties can change independently of each other. For example, one monster may die without the others dying at the same time. One monster’s speed or health may change, without affecting the speed or health properties of the other

14

Page 15: CompY8_3_GameMaker.docx - Lady Lumley's School 8/ICT...  · Web viewTutorials (See GameMaker Tutorials folder) For each of the practical elements in the unit there are tutorials

LLS ICT Dept 2014-15 Year 8 - Computing

CompY8_3_GameMaker

monsters, and each of them will simultaneously have different values for the image_angle and direction properties. This is a useful programming concept as it allows programmers to create multiple (or different) instances of the same object, without having to program each of them separately. How would the pupils feel if they had to program a new sprite and object for every monster in their games? What about all of the ‘Wall’ or obstacle objects?! Has OOP saved them time?

Another benefit of using objects is that all of the properties and behaviours are bundled up (or encapsulated) inside the object. This concept is called encapsulation. It means that if an object doesn’t work properly, it can be removed from the program (or game) without it having any effect on the rest of the program. Because of this, you can also import objects that you have previously programmed in a different game. This can help you build a library of objects that you can use to save time.You could also use an object that someone else has already created and import that.

Extensions:Pupils could attempt any or all of Extension Tasks 4-7 and 11:

1. Create fake walls2. Add moving walls

15

Page 16: CompY8_3_GameMaker.docx - Lady Lumley's School 8/ICT...  · Web viewTutorials (See GameMaker Tutorials folder) For each of the practical elements in the unit there are tutorials

LLS ICT Dept 2014-15 Year 8 - Computing

CompY8_3_GameMaker

3. Add an enemy exhaust effect4. Add more enemies1. Add lives and scoring

HML (100mins)LOs (BTEL) Activities Home Learning and Portfolio Evidence

Teacher Notes

Lesson 3a (4) - Firing projectilesCreate a projectile

Program your player to fire projectiles when the Space bar is pressed

Use variables and IF statements in GameMaker

Preparation● Ensure all the Tutorials are

available to each pupil (digitally or printed)

● Ensure all the Extension and Challenge tasks are available to each pupil (digitally or printed) These are all held in Extension and Challenge Tasks.pptx in the GameMaker Tutorials folder

● Ensure the extra digital game resources are available to each pupil

Note: This is a lesson involving a more in-depth understanding of GameMaker. Some weaker pupils may not understand the theory or the instructions. This lesson is by no means essential to completing a working game, but has been included to help those pupils who want to be able to include shooting in their games. As an

PowerPoint Guide: GameMaker L4 Firing projectiles

16

Page 17: CompY8_3_GameMaker.docx - Lady Lumley's School 8/ICT...  · Web viewTutorials (See GameMaker Tutorials folder) For each of the practical elements in the unit there are tutorials

LLS ICT Dept 2014-15 Year 8 - Computing

CompY8_3_GameMakeralternative, you may substitute this lesson with an opportunity for pupils to use some of the extension activities to enhance their games in other ways and to catch up on some of the activities already covered in earlier lessons.

Creating Player ProjectilesAsk pupils to create a projectile sprite and object, and then apply some programming to the object in order to

● point it in the correct direction before it fires

● destroy the projectile after a certain amount of time (self-destruct)

● cause it to bounce off walls

Give a quick walkthrough of the programming steps behind the projectile behaviours. Use the ‘Programming projectile behaviour’ slide to help.

Ask pupils to create and program the projectiles for their games. Pupils can use Tutorial 6 Creating a Projectile for help if needed.

Firing projectiles – Using IF statements and variables

In order to restrict the frequency of the fire rate, an IF statement can be used. Without this, projectiles will continue to stream out of the player character with an unlimited flow until the Space bar is released. Setting a timer between shots

Tutorial 6 Creating a Projectile.pptx

Tutorial 7 Firing Projectiles.pptx

Extension and Challenge Tasks.pptx in GameMaker Tutorials folder

17

Page 18: CompY8_3_GameMaker.docx - Lady Lumley's School 8/ICT...  · Web viewTutorials (See GameMaker Tutorials folder) For each of the practical elements in the unit there are tutorials

LLS ICT Dept 2014-15 Year 8 - Computing

CompY8_3_GameMaker

prevents this. A variable (called, for example, ‘can_fire’) can be set to TRUE when a set time between shots has elapsed, enabling another shot to be made. The variable is then immediately set to FALSE again and continuously tested until the set time has elapsed once more. A variable that can only hold two values, TRUE and FALSE, is known as a Boolean variable.

Introduce the concept of variables and IF statements to the pupils.

Variable: A small area of memory in which you can store a value in while the game is running. They enable your game to remember information.

IF statements: These allow your game to make decisions about what to do. The decision is often based on the value stored in a variable.

Programming the Firing of the ProjectilesRecap the programming theory behind the firing of the projectiles using the slides in the PowerPoint, particularly the ‘Programming the Player Object’ slide. Emphasise how the variables and IF statements are used to make it work.

Show pupils the overview of the events and actions slide which shows the actions that must be added to the player object, NOT the projectile object.

Ask pupils to program their player

18

Page 19: CompY8_3_GameMaker.docx - Lady Lumley's School 8/ICT...  · Web viewTutorials (See GameMaker Tutorials folder) For each of the practical elements in the unit there are tutorials

LLS ICT Dept 2014-15 Year 8 - Computing

CompY8_3_GameMaker

object to fire projectiles when a key, for example the Space bar, is pressed.

Pupils can use Tutorial 7 Firing Projectiles for help if needed.

ExtensionsShow ‘Need More’ slide to pupils. They may like to tackle one or more of the following extensions tasks if they have not done so already in previous lessons.

Extension Tasks 2, 3, 4, 5, 6 and 7.

HML (100mins)LOs (BTEL) Activities Home Learning and Portfolio Evidence

Teacher Notes

Lesson 3b (5) - Capturing the flag

Program the player to pick up the flag when it touches it

Program the game to end when the flag is returned to the base

Use Boolean variables and IF statements in GameMaker

Note: This lesson involves capturing an object and carrying it back to a base in order to ‘win’ the game or level. In doing so, pupils will reinforce their knowledge and practical application of using variables and IF statements. Some pupils may find that creating an object to collect, and placing several instances of that object in a room might be simpler to achieve in this lesson. ‘Collection’ can be done by ‘destroying the object on collision with the player’ in the programming. Extension 11 Lives and Scoring can also be used in conjunction with this in order to add a score onto a total when an object has

PowerPoint Guide: GameMaker L5 Capturing the flag

Extension and Challenge Tasks.pptx in GameMaker Tutorials folder

Tutorial 8 Capturing the Flag.pptx

19

Page 20: CompY8_3_GameMaker.docx - Lady Lumley's School 8/ICT...  · Web viewTutorials (See GameMaker Tutorials folder) For each of the practical elements in the unit there are tutorials

LLS ICT Dept 2014-15 Year 8 - Computing

CompY8_3_GameMaker

been collected. See below:

Pupils can also use the ‘Test Instance Count’ Action on the Control tab in combination with a Step Event to constantly monitor how many objects of a particular type remain. This can then trigger a ‘Win’ or a new level when they reach zero, for example.

StarterRecap the use of variables in programming generally by asking pupils to name the variable that might be used in a mobile phone unlock program. How might it work? What value(s) might it hold? (Answers: e.g. passcode_entered or number_of_attempts)

Capturing the flagExplain that pupils will need to create sprites and objects for the base and flag first. Use the ‘Creating the Base and Flag’ slide to help pupils. There are ‘Base’ and ‘Flag’ sprites provided in the Game Resources folder to help speed up this process. A ‘Base’ Sprite can be much larger than the player sprite, say

Extension and Challenge Tasks.pptx in GameMaker Tutorials folder

20

Page 21: CompY8_3_GameMaker.docx - Lady Lumley's School 8/ICT...  · Web viewTutorials (See GameMaker Tutorials folder) For each of the practical elements in the unit there are tutorials

LLS ICT Dept 2014-15 Year 8 - Computing

CompY8_3_GameMaker

64x64 pixels.

Explain the programming theory behind how the player will pick up the flag. Use the slides to help demonstrate how IF Statements are used to make it work.

Display the overview of the events and actions that shows what actions need to be programmed.

Ask pupils to create the sprites and objects for their base and flag/object. They then need to program them to work correctly.

Pupils can use Tutorial 8 Capturing the Flag for help if needed.

Pupils can tackle any of the extensions and challenges once the tutorials are complete. They may wish to look at creating an extra level.

Extensions8 – Add a Starting screen

9 – Create a Second level

10 – Create a ‘Win’ screen

11 – Add Lives and scoring

If some of the pupils complete all of the extensions, there is a set of four challenge tasks that explore some of the other possibilities with GameMaker and also introduce GameMaker’s own scripting language. With a class of very able pupils, you may want to extend this lesson series at this point to provide an

21

Page 22: CompY8_3_GameMaker.docx - Lady Lumley's School 8/ICT...  · Web viewTutorials (See GameMaker Tutorials folder) For each of the practical elements in the unit there are tutorials

LLS ICT Dept 2014-15 Year 8 - Computing

CompY8_3_GameMaker

opportunity to cover some of these features. The free edition of GameMaker is restricted to 15 objects, but an upgrade to the Standard edition will remove this cap.

HML (100mins)LOs (BTEL) Activities Home Learning and Portfolio Evidence

Teacher Notes

Lesson 4ab (6) - Testing and assessment / first half of next unitTest your game

Improve your game

Evaluate your game

Complete the Assessment Portfolio

Preparation● Ensure GameMaker

Assessment Portfolio is available to each pupil (digitally or printed)

● Ensure the extra digital game resources are available to each pupil

TestingEmphasise to the pupils that their games must be error free. Testing is an important part of any software development process. Explain that the purpose of testing is to find errors or ‘bugs’ in the code. Excellent testing is not to show what works perfectly – rather, it is to uncover errors in the program. Finding errors does not mean

PowerPoint Guide: GameMaker L6 Testing and Assessment

GameMaker Assessment Portfolio

22

Page 23: CompY8_3_GameMaker.docx - Lady Lumley's School 8/ICT...  · Web viewTutorials (See GameMaker Tutorials folder) For each of the practical elements in the unit there are tutorials

LLS ICT Dept 2014-15 Year 8 - Computing

CompY8_3_GameMaker

that they have done poorly – it is in fact a sign that they are good at testing. There will probably be errors of some kind in all their games.

Demonstrate the test table to the pupils so that they are clear on how to fill it in. Pupils will use a test table in the GameMaker Assessment Portfolio. Use the ‘Test Table’ Slide to demonstrate how to fill it in.

Ask pupils to test their game and record evidence of their testing in the test table. They should fix any bugs (errors) they find.

Peer AssessmentGiven time, pupils should get some feedback on their finished game. They can swap with someone else in the room and assess each other’s games, remembering to offer constructive feedback. They may wish to respond to any constructive criticism by making improvements to their game.

Complete and submit the Assessment PortfolioPupils are to submit their completed games to you using a system that is suitable for your school. You may have an area that pupils can upload their games and completed assessment portfolios to for marking online.

This could be an MLE such as Fronter, Frog, SharePoint or Moodle.

23

Page 24: CompY8_3_GameMaker.docx - Lady Lumley's School 8/ICT...  · Web viewTutorials (See GameMaker Tutorials folder) For each of the practical elements in the unit there are tutorials

LLS ICT Dept 2014-15 Year 8 - Computing

CompY8_3_GameMaker

24

Page 25: CompY8_3_GameMaker.docx - Lady Lumley's School 8/ICT...  · Web viewTutorials (See GameMaker Tutorials folder) For each of the practical elements in the unit there are tutorials

LLS ICT Dept 2014-15 Year 8 - Computing

CompY8_3_GameMaker

Acknowledgements

The authors and publisher would like to thank all contributors for their kind permission to reproduce their photographs or images, screenshots of their websites or other copyright material in the PowerPoint Guides.

Update graphic: http://openclipart.org/detail/178684

Ladybird, Parrot, Chequered flag, Bugs and Stopwatch images ©ShuttterStock www.shutterstock.com

Tutorial graphics and other slide diagrams © F Heathcote

Every effort has been made to trace the copyright holders and we apologise in advance for any unintentional omissions. We would be pleased to insert the appropriate acknowledgement in any subsequent edition of this publication.

This material contains links to relevant websites featured in the teacher’s guide. Every effort has been made to ensure that at the time of distribution, the links remain unbroken, the material remains up-to-date and that links are not inadvertently linked to sites that could be considered offensive. PG Online cannot be held responsible for the content of any website mentioned in this material. It is sometimes possible to find relocated sites by typing the original URL into a browser. Any errors should be reported directly to [email protected] and changes will be made in any subsequent editions of the material.

25