33
Game Maker – Getting Started What is Game Maker?

Game Maker – Getting Started What is Game Maker?

Embed Size (px)

Citation preview

Page 1: Game Maker – Getting Started What is Game Maker?

Game Maker – Getting Started

What is Game Maker?

Page 2: Game Maker – Getting Started What is Game Maker?

Introduction to Game Maker: Make Games Without Coding You want to make games so you've taken this

course. You may go and download Game Maker ( it is free)

Game Maker is built on the promise that you will be able to "make games without writing a single line of code."

The first thing you need to know about Game Maker is that this promise is almost absolute false.

Page 3: Game Maker – Getting Started What is Game Maker?

Drag and Drop Actions While it's true that Game Maker does allow you to

make games using "drag and drop" actions, these actions are limited in what they can do and are only suitable for the most basic and simple of games.

You won't be making any good games "without writing a single line of code."

Accepting that you will have to learn to program now will save you headaches in the future.

Those who insist on believing the "no coding myth" always fail.

But, don't worry. Learning to program is very easy.

Page 4: Game Maker – Getting Started What is Game Maker?

Game Maker is a Game Engine In various Game Maker communities, there is much talk

of building "game engines" using Game Maker. This is a bit redundant as Game Maker is a game engine

itself. This is very important to understand because when you

make a game using GM, you are really just manipulating parts of GM's game engine.

For example, no matter what kind of game object you create, you will use Game Maker's "object" resource as a base.

Whenever you need to create a level, you will use "room" resource as a base.

Therefore, you can say that any game or "game engine" you make is "built on top" of the GM game engine itself.

In other words you are using the resources Game Maker provides, you are not making any up on your own.

Page 5: Game Maker – Getting Started What is Game Maker?

Basic Resources Game Maker's game engine has several

"resources" that you will use to make a game. The basic resources are objects, sprites, and

rooms.

Page 6: Game Maker – Getting Started What is Game Maker?

Rooms Rooms are the most important resource — if

your game does not have at least one room your game will not even run.

Rooms provide the 2d space used to make game levels and worlds.

If your game doesn't have a room then your player object, enemies, and other characters have no space to exist in.

Page 7: Game Maker – Getting Started What is Game Maker?

Objects The player object, enemies, bullets, wall sections —

almost anything that can be termed an object — is built using the object resource.

Objects are prototypes or definitions of these game objects.

Whenever you need to use one in your game you will create an instance from the object prototype.

This is easily understandable if you consider the nature of bullets.

When creating bullets for your game, you will define the behavior for all the bullets in your game using an object.

Then, when you need to spray a large number of bullets, you will tell Game Maker to create a bunch of bullets, using the bullet object as a template.

Page 8: Game Maker – Getting Started What is Game Maker?

Sprites Sprites are images that are usually used to

represent objects. Sprites are what the player sees — they don't

see the object itself. You can assign a sprite to an object and it will

be displayed whenever the object is on the game screen.

Because different objects can have the same sprite and you can draw sprites independently of an objects assigned sprite, sprites are their own resource.

Page 9: Game Maker – Getting Started What is Game Maker?

Events and Actions The Game Maker game engine is event-based. That is, an event happens which triggers an action.

For example, consider this : If I slap a clown, chances are the clown will slap me back, or begin to cry.

When I slap the clown, that would be the clown slapping event.

The reaction to the clown being slapped could either be the clown slaps me back action or the clown begins to cry action.

Of course, this is an absurd example and these events and actions do not actually exist in Game Maker.

This description is only to illustrate what you should remember : Game Maker is event / action based. Events trigger actions.

Page 10: Game Maker – Getting Started What is Game Maker?

Practical Examples

Practical examples of the event driven model of Game Maker are : A collision event occurs when two objects collide.

The resulting action is that both objects are destroyed.

Pressing on the left arrow key causes a left arrow keyboard event. The resulting action is to move the player left.

Page 11: Game Maker – Getting Started What is Game Maker?

Conclusion That's the essentials of Game Maker. What you have learned here has given you a

conceptual framework of Game Maker to build on.

Page 12: Game Maker – Getting Started What is Game Maker?

Game Maker – Getting Started

Sprites

Page 13: Game Maker – Getting Started What is Game Maker?

How to Create a Sprite in Game Maker Tutorial Sprites are more than images — they are one

of the fundamental resources of Game Maker. To get Game Maker to display a sprite, you

first have to create the sprite resource. Then, you can Load a Sprite from your hard

drive into the sprite. If this confuses you, don't worry, it confuses many people.

Think of it this way : the sprite resource is backpack where Game Maker actually stores the image data.

First you have to have the backpack, then, you can put things in it.

This tutorial is about creating the backpack.

Page 14: Game Maker – Getting Started What is Game Maker?

Creating a Sprite Using the Resource Explorer

The Resource Explorer is the rectangular box on the side of the Game Maker IDE which contains folders named Sprites, Sounds, Backgrounds, etc.

Page 15: Game Maker – Getting Started What is Game Maker?

Method 1 : Right Click on the Sprites Folder 1. Right click on the Sprites Folder 2. Choose "Create Sprite“ 3. The Sprite Properties window will pop up.

When the Sprite Properties window pops up, it will have a default name for your sprite.

It will be something like sprite0, sprite1, etc., depending on how many sprites you have created.

Page 16: Game Maker – Getting Started What is Game Maker?

Con’t 4. Name the sprite.

You'll want to prefix your name with spr so that you will know it's a sprite resource when you are making your game.

For example, if you were creating a sprite for a spaceship, you'd name it sprSpaceship.

This is very important. If you don't prefix your sprite names, you could confuse the object which represents the spaceship with the sprite for the spaceship.

Good game programmers follow this practice. It will save you headaches later on.

5. Click the Ok button at the bottom of the Sprite Properties window. Congratulations. You have just created your first

sprite.

Page 17: Game Maker – Getting Started What is Game Maker?

Method 2 : Insert a Sprite If you have already created a sprite (and thus

there is already a sprite in the Sprites folder of the Resource Explorer), you can right click on the existing sprite and choose "Insert Sprite".

This will bring up the Sprite Properties window. Then, follow the steps above.

Page 18: Game Maker – Getting Started What is Game Maker?

Creating a Sprite from the Toolbar Clicking on the button that looks like a red

Pac-Man will bring up the Sprite Properties window. Then, follow the steps above.

Page 19: Game Maker – Getting Started What is Game Maker?

Next Steps After creating a "blank sprite" resource, you

might want to Load a Sprite from your hard drive.

Page 20: Game Maker – Getting Started What is Game Maker?

Game Maker – Getting Started

Objects

Page 21: Game Maker – Getting Started What is Game Maker?

How to Create an Object Tutorial Before you can have a spaceship for the

player to control, before you can have enemies, before you can have bullets to shoot at those enemies, you first have to have an object to represent them.

Objects are resources that hold all the actions that you want your graphics to do.

Page 22: Game Maker – Getting Started What is Game Maker?

Creating an Object Using the Resource Explorer

The Resource Explorer is the rectangular box on the side of the Game Maker IDE which contains folders named Sprites, Sounds, Backgrounds, etc. To create an object using the Resource Explorer :

Page 23: Game Maker – Getting Started What is Game Maker?

Method 1 : Right Click on the Objects Folder 1. Right click on the Object Folder 2. Choose "Create Object". The Object Properties window will pop up.

When the Object Properties window pops up, it will have a default name for your new object.

It will be something like object0, object1, etc., depending on how many objects you have created.

Page 24: Game Maker – Getting Started What is Game Maker?

Create an Object con’t 4. Name the Object.

You'll want to prefix your object name with obj_ so that you will know it's a sprite resource when you are making your game.

For example, if you were creating an object for a spaceship, you'd name it obj_spaceship or objSpaceship.

This is very important. If you don't prefix your object names, you could confuse

object which represents the spaceship with the sprite for the spaceship.

Good game programmers follow this practice. It will save you headaches later on.

5. Click the Ok button at the bottom of the Object Properties window. Congratulations. You have just created your first object.

Page 25: Game Maker – Getting Started What is Game Maker?

Method 2 : Insert an Object If you have already created a object (and thus

there is already an object in the objects folder of the Resource Explorer), you can right click on the existing object and choose "Insert Object".

This will bring up the Object Properties window. Then, follow the steps above.

Page 26: Game Maker – Getting Started What is Game Maker?

Creating an Object from the Toolbar

In the Toolbar, click on the button that looks like a blue ball. The Object Properties window will open. Then, follow the steps above.

Page 27: Game Maker – Getting Started What is Game Maker?

How to Set (or Assign) an Object's Default Sprite

Double click on the object you just created to bring up the Object Properties window.

You will see a box marked Sprite. Inside is a pull-down menu. Click on the pull down menu and choose the name of the sprite you

want to set as the object's default sprite. Click Ok at the bottom of the Object Properties window.

Page 28: Game Maker – Getting Started What is Game Maker?

Game Maker – Getting Started

Rooms

Page 29: Game Maker – Getting Started What is Game Maker?

How to Create a Room inGame Maker Creating a room is the first step in creating

your own levels. Rooms provide a blank canvas to place your

game objects such as the player object, walls, enemies, etc.

Page 30: Game Maker – Getting Started What is Game Maker?

Create a Room Using the Resource Explorer

1. Right click on the Rooms Folder in the Resource explorer2. Choose "Create Room"3. The Room Properties window will pop up.

Page 31: Game Maker – Getting Started What is Game Maker?

Create a Room con’t 4. Click on the settings tab of the Room Properties

window. There you will find a textbox labeled "Name".

5. Name the room. A note here about naming conventions. Even though the name of the room will automatically be

room0 by default, it is a tradition to name rooms with a rm_ prefix.

Therefore if you were creating a room that you were going to turn into a castle level, you would probably want to name it something like rm_castle.

6. Click on the green check mark in the top / left corner of the Room Properties window.

7. Congratulations, you have just created a room. But nothing is in it yet!

Page 32: Game Maker – Getting Started What is Game Maker?

Adding the Instance to the Room Double Click on the Rooms folder in the Resource Explorer

to expand the rooms list. This will allow you to see the rooms you have created. You can also open the Rooms folder by clicking once on the [+]

directly to the left of the it. Double click on the room to which you want to add an

instance. This will bring up the Room Properties window. Select the Objects Tab of the Room Properties window.

There you will see a pull down box labeled "Object to add with left mouse."

In the pull-down box, select the object for which you want to add an instance.

Left click in the room. An instance of the object you chose in the pull-down box will

appear in the room where you clicked. Click the green check mark in the top-left corner of the

Room Properties window.

Page 33: Game Maker – Getting Started What is Game Maker?