by Ben Tyers
I would add, that the software has now reached a point that if you can design a 2D game, it is possible to make it in GameMaker Studio 2.
Overview
GameMaker is primarily intended for making games with 2D graphics, allowing out-of-box use of raster graphics, vector graphics (via SWF), and 2D skeletal animations (via Esoteric Software's Spine) along with a large standard library for drawing graphics and 2D primitives. While the software allows for use of 3D graphics, this is in form of vertex buffer and matrix functions, and as such not intended for novice users.
The engine uses Direct3D on Windows, UWP, and Xbox One; OpenGL on macOS and Linux; OpenGL ES on Android and iOS, WebGL or 2d canvas on HTML5, and proprietary APIs on consoles.
The engine's primary element is an IDE with built-in editors for raster graphics, level design, scripting, paths, and shaders (GLSL or HLSL). Additional functionality can be implemented in software's scripting language or platform-specific native extensions.
Supported platforms
GameMaker supports building for Microsoft Windows, macOS, Ubuntu, HTML5, Android, iOS, Amazon Fire TV, Android TV, Microsoft UWP, PlayStation 4, and Xbox One; support for the Nintendo Switch was announced in March 2018, with Undertale to be the first such title to be brought to the Switch.
In past, GameMaker supported building for Windows Phone (deprecated in favor of UWP), Tizen, PlayStation 3, and PlayStation Vita (not supported in GMS2 "largely for business reasons").
PlayStation Portable support was demonstrated in May 2010,but never made publicly available (with only a small selection of titles using it).
Raspberry Pi support was demonstrated in February 2016, but as of May 2018 not released.
Between 2007 and 2011, YoYo Games maintained a custom web player plugin for GameMaker games before releasing it as open-source mid-2011 and finally deprecating in favor of HTML5 export.
Drag and Drop
Drag and Drop (DnD) is GameMaker's visual scripting tool.
DnD allows developers to perform common tasks (like instantiating objects, calling functions, or working with files and data structures) without having to write a single line of code. It remains to be largely aimed at novice users.
While historically DnD remained fairly limited in what can be comfortably done with it, GameMaker Studio 2 had seen an overhaul to the system, allowing more tasks to be done with DnD, and having it translate directly to code (with an in-IDE preview for users interested in migrating to code).
GameMaker Language
GameMaker Language is GameMaker's scripting language. It is an imperative, dynamically typed language commonly likened to JavaScript and C-like languages.
The language historically tries to accommodate different programming backgrounds and styles - BASIC/Lua style "and" / "or" keywords can be used interchangeably with C-style "&&" / "||" operators; parentheses around conditions in if-statements and loops can be omitted; semicolons are largely optional (insertion happens at the end of statement; compile error is raised in case of ambiguity).
The language's default mode of operation on native platforms is via a stack machine; it can also be source-to-source compiled to C++ via LLVM for higher performance. On HTML5, GML is source-to-source compiled to JavaScript with optimizations and minification applied in non-debug builds.
History
GameMaker was originally developed by Mark Overmars. The program was first released on 15 November 1999 under the name of Animo (at the time, a graphics tool with limited visual scripting capabilities). First versions of program were being developed in Delphi.
Subsequent releases seen the name changed to Game Maker and software moving towards more general-purpose 2d game development.
Versions below 5.0 have been freeware; version 5.1 introduced an optional registration fee; version 5.3 (January 2004) introduced a number of new features for registered users, including particle systems, networking, and possibility to extend games using DLLs.
Version 6.0 (October 2004) introduced limited functionality for use of 3D graphics, as well as migrating the runtime's drawing pipeline from VCL to DirectX.
Growing public interest led Overmars to seek help in expanding the program, which led to partnership with YoYo Games in 2007.From this point onward, development was handled by YoYo Games while Overmars retained a position as one of company's directors. Version 7.0 was the first to emerge under this partnership.
The first macOS compatible version of program was released in 2009, allowing games to be made for two operating systems with minimal changes.
Version 8.1 (April 2011) sees the name changed to GameMaker (lacking a space) to avoid any confusion with the 1991 software Game-Maker. This version also had the runtime rewritten in C++ to address performance concerns with previous versions.
September 2011 sees the initial release of "GameMaker: HTML5" - a new version of software with capability to export games for web browsers alongside with desktop.
GameMaker: Studio entered public beta in March 2012 and enjoyed a full release in May 2012. Initial supported platforms included Windows, Mac, HTML5, Android, and iOS. Additional platforms and features were introduced over the years following; Late 2012 there was an accident with anti-piracy measures misfiring for some legitimate users.
In February 2015, GameMaker was acquired by Playtech together with YoYo Games. Announcement reassured that GameMaker will be further improved and states plans to appeal to broader demographic, including advanced developers.
November 2016 sees the initial release of GameMaker Studio 2 beta, with full release in March 2017. This version spots a completely redesigned IDE (rewritten in C#) and a number of new editor and runtime features.
Reception
The program currently holds a rating of 8.5/10 on Mod DB based on 223 user reviews; many cite its flexibility and ease of use as positives and instability, crashes, project corruption and outdated features as negatives. Douglas Clements of Indie Game Magazine wrote that the program "[s]implifies and streamlines game development" and is "easy for beginners yet powerful enough to grow as you develop", though noting that "resource objects have to be gathered if unable to create" and that licensing between Steam and the YoYo Games website is "convoluted".
Chapter 1 Starting With An Idea
Initial Idea
The idea for the game covered in this book was chosen by visitors to my website. The initial idea was a war themed side scrolling shooter.
Let’s start by defining a brief for the game, and list some of its features and elements. These are just initial ideas, we may drop some or add more as the design process progresses.
I’ll be taking ideas from other games that have been made in a similar genre. I feel that borrowing ideas from other games is perfectly OK, taking actual game mechanics or graphics is not OK.
So here are some ideas that I think would work with the game we are making:
Infinite Scroller – Survive as long as you can
Parallax Backgrounds – Give a sense of depth to the game
Moveable Player – Move the player and allow to shoot weapons
Basic Enemy – Moves across the screen
Advanced Enemy – Moves in circular path and shoots at the player
Boss Enemy – Formidable enemy
Multiple Weapons – Player can collect upgrades to their weapons
Set Health – Player has set amount of health, game over when all lost
Highscore System – Save and display the player’s best score
Game Aim – Survive as long as possible and get the highest score
That’s great as a starting point. Let’s dissect these ideas a bit further:
Please note that my initial sketches were pretty rough and have been re-done for the purpose of the book. So long as you understand your own sketches and what they represent, your sketches don’t have to be works of art.
Infinite Scroller – Survive as long as you can
There are couple of approaches that yo
u can be used to create the illusion of an ever-ending game. The approach that we will use is to create a static room the size of the game window, and have the elements move from the right to the left side of the room. We will do this for the backgrounds and enemies. Although a simplistic approach, when done well, it can give a great perception of depth, and can be easily tweaked. Sketch 1_1 shows a the basic ideas for this game.
Sketch 1_1: Initial Idea
Parallax Backgrounds – Give a sense of depth to the game
Using several backgrounds that are layered and move at different seeds, an effect of movement and depth can be created. Adding a foreground at the front can enhance this effect greatly. Parallax is a graphical effect where objects closer to you move quicker than those further away. The layers will be graphics with a transparent background, so layers below can be seen. The game elements will placed in front of these backgrounds, with a further foreground background in front of these to add a greater sense of depth.Sketch 1_2 shows the idea:
Sketch 1_2: Using different layers for a parallax effect
Moveabe Player – Move the player and allow to shoot weapons
We’ll set the player up so that it can be moved with WSAD keys, and left and right mouse buttons to fire the manual weaons. We will limit the area that the player can move in, and also make the player slowly move back to the middle of the movement area. We will want a smooth and responsive movement for the player. Player weapons will be set up to be used with the left and right mouse buttons (when weapon is available to use). Sketch 1_3 shows this idea:
Sketch 1_3: Player movement
Basic Enemy – Moves across the screen
A basic enemy that moves across the bottom of the screen. Give the enemy some health that reduces when shot at by the player. Create some cook effect when it loses all health. Shown in Sketch 1_4:
Sketch 1_4: Basic enemy
Advanced Enemy – Moves in circular path and shoots at the player
A more advanced enemy that moves in a circular pattern and shoots some sort of projectile at the player. We’ll make the enemy move into the game window, then following a closed circular path. This is shown in Sketch 1_5:
Sketch 1_5: Showing advanced enemy movement
Boss Enemy – Formiddable enemy
A big boss enemy that moves around the screen and shoots projectiles at the player. Have soft spot that the player must shoot at to damage it. Sketch 1_6 shows the basic idea:
Sketch 1_6: Boss movement ideas
Multiple Weapons – Player can collect upgrades to their weapons
Have collectibles that the player can collect to add new weapons (both manual and automatic) and power upgrades. The player will start with a primary weapon, and by collecting orbs can add new weapons and upgrades. Sketch 1_7 shows the initial idea:
Sketch 1_7: Player weapon ideas
Set Health – Player has set amount of health, game over when all lost
Have a health / hp system for the player. Player to lose heath if hit by enemy or enemy bullet. Gameover when all health has been lost.
Highscore System – Save and display the player’s best score
At end of each game, check player’s score and against saved score and update if bigger. Display the highscore at game start.
Game Aim – Survive as long as possible and get the highest score
The aim of this game will be to survive as long as possible and get the highest score.
Chapter 2 Initial Planning & Preparation
Let’s now draft what objects will be needed for the game, what they will do and some pseudo code.
By pseudo code I mean noting what the code will have to do, and how it will work, without yet writing any code. I consider this one of the most important steps in the overall design process, so when you get to the code writing stage you have a clear idea of what you need the code to do. Feel free to make as many sketches as you need, to visualize any sprites, movement or actions.
obj_player
This object is the one that the player will control.
The main features of this object:
Change y position on keypesses of W and S
Add or subtract to y position based on keypress.
Change x position on keypresses of A and D
Add or subtract to y position based on keypress.
Change the image angle based on y position
Check if y value is below or above the middile point, use this value to calculate the image angle. This is so the player’s image points up when going up, and down accordingly.
Keep player within a certain area
Use the clamp function to keep x and y within fixed values.
Move back to central point when no keypress
Check if no keypress, move back to middle point.
Control parallax backgrounds based on y position
Change the y position of backgrounds based on player’s y position. Have foreground move more to create a cool parallax effect.
Fire projectile on mouse left button press
Create a projectile at the player’s position when left mouse is pressed. Shoot this projectile based on the player’s image angle so it shoots in the direction the player is pointing.
Fire projectile on mouse right button press, if available
Create a projectile at the player’s position when right mouse is pressed, and weapon is available. This will be a homing missile that locks on the nearest enemy when fired.
Auto fire weapon 3 if active
Use an alarm to fire this weapon.
Level up on collision with level up object
Will be something like:
Start with standard projectile
Add to shooter 1 top
Add to shooter 1 bottom
Add to shooter 2 top
Add to shooter 2 bottom
Triple shot
Mine 1
Mine 2
Weapon 3
Mine 3 and 4
Faster Shots
Faster Shots
Homing Weapon
Increased power on all weapons
Additional power ups wil increase power.
Create a shield as active on collision with shield object
Activate the shield and reduce over time. We will set a flag to true or false whether the shield is active or not. If active we will draw the shield over the player and slowly fade its transparency, when totally faded the shield will no longer be active.
Damage self upon collision of enemy or enemy bullet (if shield is not active)
Reduce health to reflect damage.
Weapon 1
Automatically fire. Shoot 3 bullets if levelled up. Base the direction on the player’s image angle. Increase shoot speed and power based on player’s level.
Weapon 2
Auto fire when active. Base direction on the player’s image angle. Base the direction on the player’s image angle. Increase shoot speed and power based on player’s level.
Mine Weapon
Circle around the player when active. Damage enemy / enemy projectiles upon collision. This can be done by affixing an offset sprite origin that stays attached to the player. Rotating the image angle will make it orbit the player. When adding extra mines, set the image angle based on current mines so they space evenly.
Homing Weapon
Create a homing weapon on right mouse clicked, when active. Home in to enemy nearest mouse position. Slowly move direction to the target. Look for new target if original target has been destroyed. Give this weapon a timed life.
Shield Bonus
Move across the screen, player to pick up. Activate shield and destroy upon collision with the player.
Power Up
Move across the screen, player to pick up. Upgrade weapons upon collision with the player, as noted on page 14.
Ground Enemy
Moves along the bottom of the screen. Player to destroy by hitting with projectiles or mines. This enemy does not fire any proj
ectiles but will damage the player if the player collides with it. Setting movement with an initial horizontal speed should suffice. Remember to destroy after it has left the screen.
Flying Enemy
Flies in a circle motion and fires at the player. Do this by moving into the screen and then following a path. Have it shoot weapons, using an alarm system.
Boss Enemy
Flies around a set path and fires projectile at player. Has to be hit a certain area to take damage. The hit area could be another instance that moves relative to the boss enemy. A simple alarm system could be used to shoot projectiles. A nice feature would be if the boss has a weapon that always points towards the player, regardless of how the player moves, so that projectiles are fired to the player’s current position.
Player Projectiles
Damages enemy if hit. Remember to destroy once outside the room.
Enemy Projectiles
Damages player if hit. Remember to destroy once outside the room.
Explosion Objects
A cool explosion effect when hp of enemy has gone. The resources I’m using from GameDeveloperStudio.com include all the sprite parts in a separate folder. This could be loaded up as sub images. The object instance that has just died can then create multiple instances of another object, setting a fixed sub image, and have these move out in various sections. I’m confident that this effect will look pretty cool.
Score Objects
When the enemy has been destroyed, we can create some kind of coin that player can pick up to increase their score. We’ll set its value as the enemies starting hp value. An effect upon collection would be a good idea.
Control Objects
Various control objects to spawn enemies and draw player stats. For spawning enemies, a simple alarm system should suffice. The hp of the enemies will increase based on the level. Drawing HUD can be done with simple primitive shapes and formatted text.