No history yet

GameMaker Basics

Your First Project

GameMaker is a tool for creating 2D games. When you first open it, you'll be prompted to start a new project. You'll see options for a "New Drag & Drop Project" or a "New GML Project." For now, think of these as two different paths to the same destination. Drag & Drop is a visual way to build game logic, perfect for beginners, while GML (GameMaker Language) is a more traditional coding language.

Starting with Drag & Drop is a great way to understand the core concepts without getting bogged down in syntax. You can even convert your visual code to GML later on.

Choose the Drag & Drop option and give your project a name. Once you do, you'll land in the main GameMaker interface.

Navigating the Workspace

The GameMaker interface can look complex, but it's organized into a few key areas. The large central area is your Workspace. Think of it as your main workbench, where you'll have different tools open at once. When you open an asset, like a character or a level, it will appear here in its own tab.

On the right side is the Asset Browser. This is your toolbox. It holds all the ingredients of your game, neatly organized into folders. These ingredients are called assets. Common assets include:

  • Sprites: The images for your characters, enemies, and items.
  • Sounds: Music and sound effects.
  • Objects: The brains of your game. An object takes a sprite, adds behavior, and becomes an interactive element in your game.
  • Rooms: The levels or screens where your game takes place.

Think of it this way: a sprite is the costume, and an object is the actor wearing it. The room is the stage where the actor performs.

When you double-click a room in the Asset Browser, it opens in the Room Editor within your Workspace. This is a visual editor where you place objects to build your game world. You can drag objects from the Asset Browser directly into the room to design your levels.

Adding Logic

Objects are just pictures until you give them instructions. You do this inside the Object Editor by adding Events and Actions.

An Event is a trigger, like "Create," "Key Press," or "Collision with another object." An Action is what happens when that event is triggered. In GameMaker's Drag & Drop system, actions are represented by blocks that you drag into the event's workspace.

/* 
  This is a Drag & Drop example in text form.
  Imagine dragging these blocks into the editor.
*/

EVENT: Key Press - Right Arrow
  ACTION: Set Speed
    Direction: 0 degrees (right)
    Speed: 5 pixels per step

The logic above tells the object to move right at a speed of 5 whenever the right arrow key is pressed. Each action block has fields you can modify, making it easy to build complex behaviors without writing a single line of code.

As you get more comfortable, you might want more direct control. That's where GameMaker Language (GML) comes in. It's the scripting language that powers everything behind the scenes. The same logic from above would look like this in GML:

// This code would go in the 'Step' event 
// for the right arrow key press.

if (keyboard_check(vk_right))
{
    x = x + 5;
}

You don't need to master GML right away. Starting with Drag & Drop is the best way to learn how GameMaker thinks. Once you understand events and actions, transitioning to GML becomes much easier.

Quiz Questions 1/4

In the GameMaker interface, where would you find all the ingredients of your game, such as Sprites, Objects, and Rooms, organized into folders?

Quiz Questions 2/4

What is the role of an 'Object' in GameMaker?