GameMaker. A lot of Different Definitions Easier to Say What is NOT a Game Movie is Not a Game ...

61
INTRODUCTION TO GAMING GameMaker

Transcript of GameMaker. A lot of Different Definitions Easier to Say What is NOT a Game Movie is Not a Game ...

Page 1: GameMaker.  A lot of Different Definitions  Easier to Say What is NOT a Game  Movie is Not a Game  No Active Participation  Final Outcome is Fixed.

INTRODUCTION TO GAMING

GameMaker

Page 2: GameMaker.  A lot of Different Definitions  Easier to Say What is NOT a Game  Movie is Not a Game  No Active Participation  Final Outcome is Fixed.

What is a Game

A lot of Different Definitions Easier to Say What is NOT a Game

Movie is Not a Game No Active Participation Final Outcome is Fixed

A Toy is Not a Game You play WITH a toy, You Play a Game No Predefined Goals

A Drawing Program is Not a Game No Predefined Goals

A Puzzle is Not a Game Many Games contain Puzzle elements Puzzles are Static, Games are Dynamic – change as you

play

Page 3: GameMaker.  A lot of Different Definitions  Easier to Say What is NOT a Game  Movie is Not a Game  No Active Participation  Final Outcome is Fixed.

So What is a Game

A computer game is a software program in which one or more players make decisions through the control of game objects and resources, in the pursuit of a goal.

Does not include graphics, sounds, or movies These items make the game look nice but are

not essential to be a game

Page 4: GameMaker.  A lot of Different Definitions  Easier to Say What is NOT a Game  Movie is Not a Game  No Active Participation  Final Outcome is Fixed.

Computer Game

A software program Different from a board game or sports game

Involved Players Not something to watch Players are VERY Important – Must think about the

players when designing a game Kids games are different than Adult Games Create for your Audience

Is About Making Decisions Players Decisions can influence the rest of the

game Strategy is Important

Page 5: GameMaker.  A lot of Different Definitions  Easier to Say What is NOT a Game  Movie is Not a Game  No Active Participation  Final Outcome is Fixed.

Computer Game

Playing a Game is About Control Players should feel in control of the game

Includes Game Objects and Resources Objects - Main Characters, Cars, Planes, etc.

Players control some Game Objects Computer controls other Game Objects

Resources – Amount of food, Weapons, Gold Coins, etc. Resources can add interest to the game

Must have a Goal People want to WIN (Reach the Goal) Long Games should have Sub-Goals / Levels

Page 6: GameMaker.  A lot of Different Definitions  Easier to Say What is NOT a Game  Movie is Not a Game  No Active Participation  Final Outcome is Fixed.

Types of Games

Arcade Games Reaction speed is very important

Puzzle Games Cleaver Thinking is Needed

Role Playing Games (RPG) Steer a Character through the Game / Worlds

Strategy Games Real Time or Turn-Based Player determines Character Strategy

Management Games Building Games Managing Resources

Page 7: GameMaker.  A lot of Different Definitions  Easier to Say What is NOT a Game  Movie is Not a Game  No Active Participation  Final Outcome is Fixed.

Types of Games

Adventure Games Storyline is Critical

Shooter Games 1st Person Shooter 3rd Person Shooter Fast Paced Action and Reaction Speed

Sports Games Racing Games Simulator Games

Page 8: GameMaker.  A lot of Different Definitions  Easier to Say What is NOT a Game  Movie is Not a Game  No Active Participation  Final Outcome is Fixed.

Creating a Game

Develop / Create the Idea for your Game Write a short description 1st Game – Simple Design

Catch the Clown – An action game where a clown moves around a playing field for a period of time. The goal of the player is to catch the clown by clicking with the mouse on him. The clown will move faster throughout the game making it harder to catch the clown. Points are awarded each time the user catches the clown. Goal - High Score

Page 9: GameMaker.  A lot of Different Definitions  Easier to Say What is NOT a Game  Movie is Not a Game  No Active Participation  Final Outcome is Fixed.

Creating A Game

Design Document Create a more specific design of the game Identify the Needed Objects and Resources Sounds Control Game Flow Levels

Page 10: GameMaker.  A lot of Different Definitions  Easier to Say What is NOT a Game  Movie is Not a Game  No Active Participation  Final Outcome is Fixed.

Catch the Clown – Design Doc.

Game Objects Clown (moves around the game)

Bounces off the wall Player earns 10 points for clicking on the clown

Clown moves somewhere else and speeds up Wall (controls the area of the game)

Sounds Bounce – used when clown hits a wall Click – when the player clicks on the clown

Page 11: GameMaker.  A lot of Different Definitions  Easier to Say What is NOT a Game  Movie is Not a Game  No Active Participation  Final Outcome is Fixed.

Catch the Clown – Design Doc.

Controls Player controls game with Mouse (left mouse

click) Game Flow

When game starts Score is set to 0 Room with moving clown is shown

Game ends when player closes window Levels

This game has just one level Game gets harder as clown moves faster each

time he is “caught”

Page 12: GameMaker.  A lot of Different Definitions  Easier to Say What is NOT a Game  Movie is Not a Game  No Active Participation  Final Outcome is Fixed.

Creating the Game

Open “Game Maker” Click on the Game Maker Icon

Click on the “New” Tab

New

Page 13: GameMaker.  A lot of Different Definitions  Easier to Say What is NOT a Game  Movie is Not a Game  No Active Participation  Final Outcome is Fixed.

Creating the Game

Save Game 1) Directory - Student’s Jump Drive 2) Name: Catch The Clown

1) Drive Location

2) File Name

Page 14: GameMaker.  A lot of Different Definitions  Easier to Say What is NOT a Game  Movie is Not a Game  No Active Participation  Final Outcome is Fixed.

Resources Needed

Copy the necessary Resources to the Same Location on the Student’s Jump Drive Desktop Folder: “GameMaker Files” Copy to Jump Drive

Sound Files Image Files

Page 15: GameMaker.  A lot of Different Definitions  Easier to Say What is NOT a Game  Movie is Not a Game  No Active Participation  Final Outcome is Fixed.

Creating the Game

Add Game Objects Sprites

Clown Wall

Resources Menu Create Sprites

Resources

Page 16: GameMaker.  A lot of Different Definitions  Easier to Say What is NOT a Game  Movie is Not a Game  No Active Participation  Final Outcome is Fixed.

Adding Sprites

Name: sprClown Load Sprite Button

Find Clown.png in Resources Folder

Click “Open”

Name

Load Sprite

Drive

Open

Page 17: GameMaker.  A lot of Different Definitions  Easier to Say What is NOT a Game  Movie is Not a Game  No Active Participation  Final Outcome is Fixed.

Adding Sprite

OK

Page 18: GameMaker.  A lot of Different Definitions  Easier to Say What is NOT a Game  Movie is Not a Game  No Active Participation  Final Outcome is Fixed.

Add the Wall Sprite

Follow the Same Steps to Add the Wall Name: sprWall Picture File: wall.png

Page 19: GameMaker.  A lot of Different Definitions  Easier to Say What is NOT a Game  Movie is Not a Game  No Active Participation  Final Outcome is Fixed.

Resources

Left Column shows Resources of Game sprClown sprWall

Can click on Resources to Edit, Copy or Delete

Page 20: GameMaker.  A lot of Different Definitions  Easier to Say What is NOT a Game  Movie is Not a Game  No Active Participation  Final Outcome is Fixed.

Add Sound Effects

Resources Menu Create Sound

Name: sndBounce

Click “Load Sound” button

Resources

Load Sound

Page 21: GameMaker.  A lot of Different Definitions  Easier to Say What is NOT a Game  Movie is Not a Game  No Active Participation  Final Outcome is Fixed.

Add Sound Effects

Locate bounce.wav file on Student Jump Drive

Click OK to Select File Click OK again to Add Sound Effect

Bounce.wav

Add Sound

Page 22: GameMaker.  A lot of Different Definitions  Easier to Say What is NOT a Game  Movie is Not a Game  No Active Participation  Final Outcome is Fixed.

Add Click Sound Effect Follow the same steps to add the sndClick

sound effect Name: sndClick Sound File: click.wav

Green “PLAY”Arrow Test Sound

Play

Page 23: GameMaker.  A lot of Different Definitions  Easier to Say What is NOT a Game  Movie is Not a Game  No Active Participation  Final Outcome is Fixed.

Objects and Actions

We need to create game objects to play the game One (or more) instances of the game object

will be on the screen during the game Can have multiple instances of the object

Many wall instances to surround the game field Only one Clown

You have to tell game objects what to do / how to act React to “Event” – things that happen

Page 24: GameMaker.  A lot of Different Definitions  Easier to Say What is NOT a Game  Movie is Not a Game  No Active Participation  Final Outcome is Fixed.

Events

Things that can happen during the Game Create Event – Start of the Game Collision Event – When 2 instances collide

Clown collides with wall) Mouse Event – When user clicks the Mouse

Actions Responses to these Events

Page 25: GameMaker.  A lot of Different Definitions  Easier to Say What is NOT a Game  Movie is Not a Game  No Active Participation  Final Outcome is Fixed.

Create Wall Object Resources Menu

Create Object May need to set

window to Full Screen Name: objWall Sprite: sprWall

Resources

Name

Sprite

Page 26: GameMaker.  A lot of Different Definitions  Easier to Say What is NOT a Game  Movie is Not a Game  No Active Participation  Final Outcome is Fixed.

Create Wall Object

Make Wall solid Don’t allow other objects to go through it

OK

SOLID

OK

Page 27: GameMaker.  A lot of Different Definitions  Easier to Say What is NOT a Game  Movie is Not a Game  No Active Participation  Final Outcome is Fixed.

Create the Clown Object Use the same steps to create the Clown

Object Resources

Create Object Name: objClown Sprite: sprClown Does Not need to be set to SOLID

Page 28: GameMaker.  A lot of Different Definitions  Easier to Say What is NOT a Game  Movie is Not a Game  No Active Participation  Final Outcome is Fixed.

Clown Object

Specify Behavior of Clown Events Window Add Events for Clown to Respond To

Buttons indicate available actions / movements

Add Events

Actions

Page 29: GameMaker.  A lot of Different Definitions  Easier to Say What is NOT a Game  Movie is Not a Game  No Active Participation  Final Outcome is Fixed.

Add Create Event

What to do when the clown is created Start moving in an random direction

1) Add Event

2) Create Event

Page 30: GameMaker.  A lot of Different Definitions  Easier to Say What is NOT a Game  Movie is Not a Game  No Active Participation  Final Outcome is Fixed.

Create Event

Move Fixed – Drag to “Actions” Window

Moved Fixed

Page 31: GameMaker.  A lot of Different Definitions  Easier to Say What is NOT a Game  Movie is Not a Game  No Active Participation  Final Outcome is Fixed.

Create Event

Applies to Self Random Direction

Select ALL 8 Directions Do Not Include Middle button

Set Speed to 4

Click OK

Clown will start moving in a random direction when created

Page 32: GameMaker.  A lot of Different Definitions  Easier to Say What is NOT a Game  Movie is Not a Game  No Active Participation  Final Outcome is Fixed.

Create Collision Event

Add Event Button Collision Event

objWall

Create event for Colliding with the Wall

Add Collision Event

Page 33: GameMaker.  A lot of Different Definitions  Easier to Say What is NOT a Game  Movie is Not a Game  No Active Participation  Final Outcome is Fixed.

Create Collision Event

Drag “Bounce” button to “Action” window

Bounce

Page 34: GameMaker.  A lot of Different Definitions  Easier to Say What is NOT a Game  Movie is Not a Game  No Active Participation  Final Outcome is Fixed.

Create Collision Event

Settings are Fine Click OK

Add Sound Click “Main 1” tab

Main 1

Page 35: GameMaker.  A lot of Different Definitions  Easier to Say What is NOT a Game  Movie is Not a Game  No Active Participation  Final Outcome is Fixed.

Create Collision Event

Select “Play Sound” Button Drag it below the “Bounce” Action in Action

Window

Play Sound

Page 36: GameMaker.  A lot of Different Definitions  Easier to Say What is NOT a Game  Movie is Not a Game  No Active Participation  Final Outcome is Fixed.

Create Collision Event

Play Sound Sound – select sndBounce object Leave Loop Set to False (play only once) Click OK

sndBounce

OK

Page 37: GameMaker.  A lot of Different Definitions  Easier to Say What is NOT a Game  Movie is Not a Game  No Active Participation  Final Outcome is Fixed.

Events

Clown Object now has 2 Events Create Collision

Page 38: GameMaker.  A lot of Different Definitions  Easier to Say What is NOT a Game  Movie is Not a Game  No Active Participation  Final Outcome is Fixed.

Add Mouse Click Event

Add Event Mouse Button

Left Pressed (when user clicks left mouse button)

Add

Mouse

Page 39: GameMaker.  A lot of Different Definitions  Easier to Say What is NOT a Game  Movie is Not a Game  No Active Participation  Final Outcome is Fixed.

Add Mouse Click Event

Select “Score” tab “Set Score” Action

1) Score

2) Set Score

Page 40: GameMaker.  A lot of Different Definitions  Easier to Say What is NOT a Game  Movie is Not a Game  No Active Participation  Final Outcome is Fixed.

Add Mouse Click Event

Set Score New Score: 10 Click “Relative”

Adds new score to existing score

OK

New Score

Relative

Page 41: GameMaker.  A lot of Different Definitions  Easier to Say What is NOT a Game  Movie is Not a Game  No Active Participation  Final Outcome is Fixed.

Add Sound Action Add Click Sound Follow Steps Add Before to Add sndClick

Sound Main1 Tab Play Sound

sndClick Loop - false

Play Sound

Main 1

Page 42: GameMaker.  A lot of Different Definitions  Easier to Say What is NOT a Game  Movie is Not a Game  No Active Participation  Final Outcome is Fixed.

Add Move Random Action Move Clown to a New Location Select “Move” Tab

“Jump to Random” Default settings are Good – Click OK

Move

Jump to Random

Page 43: GameMaker.  A lot of Different Definitions  Easier to Say What is NOT a Game  Movie is Not a Game  No Active Participation  Final Outcome is Fixed.

Add Move Fixed Event

Clown Needs to Start Moving Again Move Fixed – Drag to “Actions” Window

Moved Fixed

Page 44: GameMaker.  A lot of Different Definitions  Easier to Say What is NOT a Game  Movie is Not a Game  No Active Participation  Final Outcome is Fixed.

Create Event

Applies to Self Random Direction

Select ALL 8 Directions Do Not Include Middle button

Set Speed to .05 Click “Relative” to increase

Speed

Click OK

Clown will start moving faster in a new direction

Page 45: GameMaker.  A lot of Different Definitions  Easier to Say What is NOT a Game  Movie is Not a Game  No Active Participation  Final Outcome is Fixed.

Clown Object Clown object is now Ready

Create Event Collision Event (with Wall) Left Mouse Click Event

Click OK

OK

Page 46: GameMaker.  A lot of Different Definitions  Easier to Say What is NOT a Game  Movie is Not a Game  No Active Participation  Final Outcome is Fixed.

Create the Room

Rooms (also called Levels) Resources

Create Room

Resources

Page 47: GameMaker.  A lot of Different Definitions  Easier to Say What is NOT a Game  Movie is Not a Game  No Active Participation  Final Outcome is Fixed.

Create the Room

Settings Tab Name: rmMain

Settings

Page 48: GameMaker.  A lot of Different Definitions  Easier to Say What is NOT a Game  Movie is Not a Game  No Active Participation  Final Outcome is Fixed.

Create the Room

Objects Tab Check

SnapX = 32 SnapY = 32 Our sprites are

size 32 so this makes it easier to set them at specific locations

Snap

Page 49: GameMaker.  A lot of Different Definitions  Easier to Say What is NOT a Game  Movie is Not a Game  No Active Participation  Final Outcome is Fixed.

Create the Room

Add One Instance of Clown to Room Clown is the Selected Object Click any Gray Square to add Clown

Page 50: GameMaker.  A lot of Different Definitions  Easier to Say What is NOT a Game  Movie is Not a Game  No Active Participation  Final Outcome is Fixed.

Create the Room

Add the Walls Click on Clown

Object Select objWall Click all outside

Gray Boxes to Add the Walls around the room

Click to Change

Page 51: GameMaker.  A lot of Different Definitions  Easier to Say What is NOT a Game  Movie is Not a Game  No Active Participation  Final Outcome is Fixed.

Create the Room

Room is Created Click Green Check to Close Room

Close

Page 52: GameMaker.  A lot of Different Definitions  Easier to Say What is NOT a Game  Movie is Not a Game  No Active Participation  Final Outcome is Fixed.

Play the Game

Game is Ready Sprites have been Added Sound Effects in Place Game Objects Designed Rooms (levels) Created

2 More Things to Do SAVE TEST

Page 53: GameMaker.  A lot of Different Definitions  Easier to Say What is NOT a Game  Movie is Not a Game  No Active Participation  Final Outcome is Fixed.

Save

File Menu Save

Will Save Changes to Jump Drive

Creates a GameMaker file Not a stand alone

game file (yet)

File

Page 54: GameMaker.  A lot of Different Definitions  Easier to Say What is NOT a Game  Movie is Not a Game  No Active Participation  Final Outcome is Fixed.

Test

Test it yourself Allow others to

test your games

Run Menu Run Normally Catch the Clown

Does it Work Correctly

Speed Up Close Window to

Quit

Run

Page 55: GameMaker.  A lot of Different Definitions  Easier to Say What is NOT a Game  Movie is Not a Game  No Active Participation  Final Outcome is Fixed.

Finishing Touches

Background Music Resources Create Sound

Name: sndMusic File Name: music.wav OK

Page 56: GameMaker.  A lot of Different Definitions  Easier to Say What is NOT a Game  Movie is Not a Game  No Active Participation  Final Outcome is Fixed.

Finishing Touches Background Music

Create a PlaySound Event Reopen Clown Object (double click clown object) Edit the “Create” Event (click on it)

Main1 Page Play Sound – sndMusic (Loop set to True)

Clown

Create Event Main1

Page 57: GameMaker.  A lot of Different Definitions  Easier to Say What is NOT a Game  Movie is Not a Game  No Active Participation  Final Outcome is Fixed.

Finishing Touches

Background Image Resources Create Background

Name: backMain Load Background

Select file: background.png

Open OK

Load Background

Page 58: GameMaker.  A lot of Different Definitions  Easier to Say What is NOT a Game  Movie is Not a Game  No Active Participation  Final Outcome is Fixed.

Finishing Touches

Background Image Add to Room Open Room Object – rmMain (double click on

it) Click “Backgrounds” tab

Room

Backgrounds

Page 59: GameMaker.  A lot of Different Definitions  Easier to Say What is NOT a Game  Movie is Not a Game  No Active Participation  Final Outcome is Fixed.

Finishing Touches

Background Image Click “off” Draw

Background Color Select File for

Background Image backMain

Make sure “Tile Hor” and “Tile Vert” are checked to repeat for the entire room

Background Color

Background Image

Page 60: GameMaker.  A lot of Different Definitions  Easier to Say What is NOT a Game  Movie is Not a Game  No Active Participation  Final Outcome is Fixed.

Create Executable File

Save Game again to Save Changes Create an Independent Game Program

File Menu “Create Application”

Create on Jump Drive

This allows the game to be installed and played without the GameMaker software.

Page 61: GameMaker.  A lot of Different Definitions  Easier to Say What is NOT a Game  Movie is Not a Game  No Active Participation  Final Outcome is Fixed.

Questions