What is GameMaker?

GameMaker is a series of instructions and template files produced in Flash to teach students concepts in programming simple computer games using ActionScript 2.

The menu above shows the 14 games which are demonstrated. Each row of the menu increases the difficulty of the concepts involved, so that the Flying Saucer game is aimed at students who have had no experience of programming, while the Moon Lander game is suitable for students following an advanced level course. The final set of instructions gives advice, ideas and tips on designing your own games from scratch.

Try out the games

There are finished working versions of all the games which you can view by clicking on the icon on the menu above. Try them out before you investigate how to use the resources to create your own versions of the games.

What software is needed?

Each of the games has a template file which contains all the graphics and resources needed to create the game, so that the focus of attention is upon programming. These template files have been created in Flash, and use ActionScript 2. While this is not the latest version of ActionScript, it remains a good entry point for students, as it is more accessible than later versions of the language.

Any version of Flash from Creative Suite 2 (Flash 8) is therefore required to create the games from these template files.

How does it work?

Each game has its own slide presentation (also created in Flash) which gives stage by stage instructions explaining concepts, and giving examples of the code needed to create the game. Students download the template file (from the File button on the presentation) and then follow the instructions, either individually, or as a class activity.

There is also a separate presentation for each game which provides only the code required. This is to make it easier to enter code without having to keep minimising the main screen by having this smaller presentation open above the Flash file itself.

Try the examples

The instructions for the first three simple games are available for you (or your students) to try out. Download the zipped file which contains the three template files required from this link:

Template files

Once you have downloaded the templates, open them in Flash, and follow the instructions in the presentation to complete each game.

User interface

‘Game Maker' uses an interface common to Classmate Books on-line resources. The interface has been designed to be as intuitive as possible:

Right hand panel (from top to bottom):

  • Goto button (>>): Type the number of the slide you require, and click the Goto button (or press Enter).
  • End button (>|) Go to the last slide
  • Rewind button (|<) Go to the first slide
  • Next button (>) Go to the next slide
  • Back button (<) Go to the previous slide

In addition, ‘Game Maker' has the following links on the left hand panel of the Instructions presentations:

  • Home: Link back to the ‘Game Maker' main menu
  • File: Link to and download the Flash file required to create each game. Each file contains the basic document and graphic elements required to produce the game.
  • Game: Link to the final (working) version of the game.
  • Code: Link to the smaller sized presentation, which contains only the code sequences required for each game. The ‘code' presentation is provided so that it can be positioned above or below the re-sized Flash screen to make typing the code easier, without having to minimize and restore two screens continuously.
  • Help: Link to the Help presentation, which contains an interactive alphabetical listing of all the Actionscript concepts and code used to produce the games.

 

Instructions presentations

The Instructions presentations follow a consistent format:

  • The opening slide lists the main objectives of the presentation
  • General instructions, and planning guidance, are presented on navy background slides.
  • Key Actionscript concepts are presented on ‘blackboard' slides
  • Interactive demonstrations are used to illustrate key concepts where necessary
  • Screen-prints of the Flash environment are used to demonstrate how to use necessary tools, and to write the Actionscript code.
  • A Test (with Answers) is used at the end of many presentations to provide a focus for plenary revision of key concepts.

The presentations have been designed so that they can be used for whole class display on a whiteboard or projector, or for individual use by students.

Description of the games, and their teaching purposes

 

The majority of the games of based on well known examples commonly found on the Internet. Each game introduces new Actionscript concepts, with the exception of three games whose purpose is to consolidate what has already be learned, and to teach planning, problem solving and trouble shooting techniques.

Flying saucer

A simple flying saucer animation is used controlled by buttons, to teach the following basic ideas:

  • The Flash environment (layers, stage, Actions and Properties panels, library, play-head)
  • Frame by frame animation (timeline, frames, key-frames)
  • Flash symbols (movie clips, buttons, graphics)
  • Creating motion tweens (moving position and rotation)
  • Basic programming concepts (code, syntax, code prompts)
  • Mouse events (release, press, rollover, rollout)

Manic mouse

More of a 'joke' than a fully fledged game, this teaches some key Actionscript concepts which underpin all the other lessons:

  • Object properties (position, size, visibility)
  • Instance names (movie clips and buttons, naming conventions)
  • _X and _Y axes (object positions)
  • Document properties (stage size, frames per second, background colour)
  • Functions (defining, calling, random)
  • Event handler methods

Robot control

All computer games depend upon characters, which can perform several different actions when the user interacts with them. These characters are known as sprites. This central idea teaches the following:

  • Sprites (definition, examples)
  • Nested movies (independent timelines)
  • Editing movie clips (adding actions, frame labels)
  • Navigation functions (gotoAndStop, gotoAndPlay)
  • Frame labels (creating, purpose, use with code)
  • Comments (purpose and use)
  • Variables (types, purposes, code)

Speedball

This first fully fledged game is basically created by the use of seven lines of code, repeated for each of four buttons. Understanding how to run events continuously is a key idea here, which is subsequently used in every other game:

  • Organising games into sections (introduction, game on, game over)
  • Frame events (using onEnterFrame to run events continuously)
  • Using IF statements to test for conditions
  • Dynamic text (types of text boxes, naming conventions, purpose)
  • Root timeline (purpose, use in code)
  • Operators (mathematical, logical, use in IF statements)

Rally Pursuit

This navigation game imitates a board game which uses dice and chance cards. Two key ideas here are using keyboard keys to interact with the game, and using IF statements to test for conditions:

  • Using number variables
  • Using procedures and sub-procedures
  • Use of keyboard keys to control key events (use with IF statements, Key codes, isDown function)
  • Using the _rotation property of objects
  • Extending IF statements by using ELSE IF statement
  • Adding further conditions to IF statements using AND (&&) operator
  • Using the _alpha property to set visibility of objects

Jallopy Derby

This game is almost fully automated, except for the user interaction to start the race. The concept of using Boolean variables to test conditions is at the heart of this lesson:

  • Planning and structuring game design (procedures and sub-procedures)
  • Consolidation of previous concepts
  • Boolean variables (purpose, definition, use to test conditions)

Snail trail

This game contains no new Actionscript concepts, nor screen-prints on writing the code. It challenges students to put in to practice what they have learned already. In addition there is guidance on:

  • Problem solving strategies (identifying problem types and solving systematically)
  • Trouble shooting strategies (hierarchy of problems, testing code, using the ‘trace' method)

Fly swat

Basically a simple game, but containing three essential ideas, timing events, testing collisions, and attaching sound:

  • Using the modulo operator to time events
  • Testing for collisions between movie clips (hitTest method)
  • Using the NOT operator (!)
  • Sound objects (attaching manually, creating, linkage, controlling dynamically)

Shark diving

Scrolling terrain games are among the most popular, appearing in many different guises on the Internet. Many previous concepts are revised:

  • Creating a scrolling terrain (moving clips, testing position, replacing in original position)
  • Synchronising the position of movie clips on the stage
  • Using the OR operator in an IF statement
  • Creating a timer to keep score

Frog crossing

This game contains no new Actionscript concepts, nor screen-prints on writing the code. It challenges students to put in to practice what they have learned already. In addition there is guidance on:

  • Game development and problem solving (‘chunking' problems into solvable parts)
  • Extending the use of Boolean variables

Buzzwire

This game introduces loops to improve the efficiency of the code, taking Actionscript concepts to a higher level of complexity suitable for KS5 students:

  • Using loops to repeat processes a given number of times (purpose, demonstration, code)
  • Substituting the loop counter variable (‘i') in instance names to improve code efficiency
  • Making the mouse draggable
  • Using the increment operator (++i)
  • Extending the use of sounds
  • Using empty movie clips to create functions

Pacman

Based on probably the most famous computer game of all, this simplified version introduces the key concept of arrays as storage devices:

  • Using arrays to store data and objects (purpose of an array, creating an array)
  • Using FOR loops to populate arrays and detect collisions between movie clips in arrays

Alien invaders

Consolidating the concepts of the two previous lessons, this game is a version of the classic 'Space invaders'. The code is used to create movie clips dynamically as the game runs, and to test for collisions between two arrays of clips:

  • Duplicating movie clips dynamically
  • Use of ‘depth' to position movie clips within the layers of a Flash document
  • Using array methods to populate and de-populate arrays (push, splice)
  • Counting backwards through a FOR loop
  • Using the ‘length' property of an array as a condition in a loop
  • Using nested loops to detect collisions

Moon lander

This game contains no new Actionscript concepts, nor screen-prints on writing the code. It challenges students to put in to practice what they have learned already. The game is presented as a series of problems for students to solve. (Code is available on the Code presentation if students really get stuck).

'Moon Lander' requires just about every Actionscript concept taught by these lessons, to put students on their mettle, and to test their problem solving to the limit...

Design your own games

This presentation is divided into two main sections; designing graphics, and games ideas.

The graphics design instructions demonstrate how to create simple characters, animated movie clips, and scrolling terrains.

The games ideas show how to develop games from the code you already know, beginning with simple puzzles, then moving on to navigation games, collecting tokens games and shooting games.

Game examples and demonstrations are included.