GameMaker Adrienne Decker School of Interactive Games and Media (MAGIC) adrienne.decker@rit.edu
Agenda Introductions and Installations GameMaker Introductory Walk-through Free time to explore and create
Introductions Name, School, Level of Students, Level of Experience with programming/gamemaker
GameMaker https://www.yoyogames.com/studio Current and most up to date version only available for Windows machines. Older version for Macs available: https://www.yoyogames.com/legacy
GameMaker Integrated Development Environment (IDE) designed for making games Tutorials are available within the environment for beginners and advanced. Two modes of interaction: Drag and Drop Ability to add source code text as well
Game Design Basics You should think about what you want the game to be about before you begin creating it. Some questions: What does the player have to do to be successful? What is the player trying to accomplish? Are there characters? Good, bad, indifferent? What is the world the game inhabits? And more
Game Design Documents Many different ways to document these choices/ideas. Draw it Write it in words in paragraphs/reports Create a PPT presentation Combine drawings and bullet points and explanation
Game Design There is much more to game design. If you are not trying to teach a course in game design (and most of you probably are not), the important take away for the students is that they should : THINK -> CODE/CREATE/MAKE
Our Example Game Clown moving around a room that the user needs to click on to score points.
Open GameMaker
Select Open
Navigate to file (Project1)
Get rid of news
Now we begin building We will start with the images we want to see in the game (the characters, the obstacles, the enemies, the world itself). We call these images Sprites
The birds and the bees Where do images for the sprites come from? GameMaker supports importing of images stored in files from the computer or has a built-in sprite editor (drawing program) to create your own. In the example file, there are image files.
Creating a Sprite
Sprite Properties Window
Window after loading image
Origin for the drawing of the sprite
Creating a collision mask
The Ugly Truth Sprites don t do anything they are just images. We need instances of game Objects to put in our game and do stuff. The instances will react to Events (things that happen within the computer). User does something Two objects collide on screen
Create Objects We will create one for each sprite. Again, same two methods as creating sprites menu item under Resources or a right click item when selecting Objects on the left pane.
Select the sprite for the object
To be solid or not to be solid For the wall, we are selecting for it to be solid so that other instances in the game can not penetrate them.
Create a Room The Room is the place where the game takes place. Can be equivalent to a level. Once again, menu item from the Resources menu or right click option when Room selected on the left pane.
Placing Instances in Room Left click to place SnapX and SnapY controls size of grid <Control> Right Click deletes the thing you click on <Shift><Control> Left Click allows you to place things rapidly
Save & Run
Adding Events
We started with a Creation event
Event Added, but no actions associated yet
Selecting the action brings up its property menu Our selections for moving
Run! A frequent coding best practice you made a change, now run and see what mess you ve made.
Adding a collision event to bounce
Mouse event added Note more than one action results from a left pressed on the instance.
Multiple Clowns in Room Simply add them to the room by adding more in the same window where we initially put the walls and first clown in the room.
Sound Can play a sound when events happen. When clown hits wall. When clown is clicked upon by mouse. Need to create the sound and specify a file for the sound. Add an action to the appropriate event to play the appropriate sound.
Alarms Create an alarm to have an action happen after a certain number of steps have occurred in the game loop. (Can make it so alarm every x steps continously.) Each instance in the game can have up to 12 alarms associated with it.
Alarms Need to set the initial delay for the alarm (in steps of the game loop). Create an event for when the alarm goes off to do a particular action. Add to that action a delay reset if you want the alarm to be continuous.
Transforms We are having the instance change direction. We can have the sprite change its orientation to match. It is an action available for an event. Can use same action for changing size of sprite.
Score GameMaker has built in support for score. Certain events can cause score to increment (or decrement). In order to see the score, it needs to be drawn to the game room.
Controller objects Objects that do not have sprites assigned to them that help control various aspects of the game that are not graphical. Simply create an object, but do not attach a sprite to it. You can then add events and actions. We will add one to display the score.
Controller Object Properties
Controller Objects But this object still must be added to the room in order for it to pay attention to events and perform the associated actions. Can add a global timer to this to keep adding clowns.
Properties of Objects x: the x coordinate of the instance y: the y coordinate of the instance hspeed: horizontal speed (in pixels per step) vspeed: vertical speed (in pixels per step) direction: current direction of motion in degrees, 0 being right, and going anticlockwise to 360 being right again speed: the current speed in this direction visible: whether the object is visible (1, or true) or invisible (0, or false) solid: whether the object is solid (1, or true) or not (0, or false)
Even More Can add variables to the instances that can update or be tested for certain values Can add actual code to the instances to perform certain tasks. Can export to phones and tablets (in professional and master version).