Jan 05, 2016
Game Maker Getting StartedWhat is Game Maker?
Introduction to Game Maker: Make Games Without CodingYou 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.
Drag and Drop ActionsWhile 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.
Game Maker is a Game EngineIn 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.
Basic ResourcesGame Maker's game engine has several "resources" that you will use to make a game. The basic resources are objects, sprites, and rooms.
RoomsRooms 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.
ObjectsThe 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.
SpritesSprites 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.
Events and ActionsThe 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.
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.
ConclusionThat's the essentials of Game Maker. What you have learned here has given you a conceptual framework of Game Maker to build on.
Game Maker Getting StartedSprites
How to Create a Sprite in Game Maker TutorialSprites 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.
Creating a Sprite Using the Resource ExplorerThe Resource Explorer is the rectangular box on the side of the Game Maker IDE which contains folders named Sprites, Sounds, Backgrounds, etc.
Method 1 : Right Click on the Sprites Folder1. Right click on the Sprites Folder2. Choose "Create Sprite3. 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.
Cont4. 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.
Method 2 : Insert a SpriteIf 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.
Creating a Sprite from the ToolbarClicking on the button that looks like a red Pac-Man will bring up the Sprite Properties window. Then, follow the steps above.
Next StepsAfter creating a "blank sprite" resource, you might want to Load a Sprite from your hard drive.
Game Maker Getting StartedObjects
How to Create an Object TutorialBefore 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.
Creating an Object Using the Resource ExplorerThe 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 :
Method 1 : Right Click on the Objects Folder1. Right click on the Object Folder2. 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.
Create an Object cont4. 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.
Method 2 : Insert an ObjectIf 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.
Creating an Object from the ToolbarIn the Toolbar, click on the button that looks like a blue ball. The Object Properties window will open. Then, follow the steps above.
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.
Game Maker Getting StartedRooms
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.
Create a Room Using the Resource Explorer1. Right click on the Rooms Folder in the Resource explorer 2. Choose "Create Room" 3. The Room Properties window will pop up.
Create a Room cont4. 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!
Adding the Instance to the RoomDouble 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.