When you first start up GameMaker Studio 2 you will be required to log in using your YoYo Account (this is the account that you made with YoYo Games when you first purchased or downloaded GameMaker Studio 2). Once logged in you'll be shown a start page with news, tutorials and the options to create a new project, load a project, or import a GMS project. Initially we imagine you'll want to create a new project so that you can dive in and start getting to know the new interface, but keep in mind that GameMaker Studio 2 is not like previous versions of GameMaker and the workflow and design of the IDE has been greatly improved and changed. So what has changed? What should you expect? Hopefully this article will serve to introduce you to the new way of working and ease you into the GameMaker Studio 2 era...
The first major change you'll see on starting a new project with GameMaker Studio 2 is that you are now presented with a workspace. This is an area that will hold the windows associated with the resources that you are working on and it can be zoomed and panned as if it was an actual desktop area. To move around the workspace you can click the middle mouse button and move - or hold down Space and left click - to pan around, with holding down Control and the mouse wheel being used to zoom in and out.
One of the main features of the workspace is that you aren't limited to just one of them, nor are you limited to having everything in the same window. If you click on the workspace tab at the top, you can drag it off of the main GameMaker Studio 2 window and it will create another sub-window for the project that can then be positioned elsewhere (like in another monitor, for example). You can also merge any secondary workspaces with the main window by clicking the tab and dragging it back onto the main IDE. Each workspace can also be named to easily identify it by double clicking on the tab name and typing the name you prefer to have.
Apart from having multiple workspaces, you can also dock windows to the sides and the bottom of any active workspace.
A docked window will remain fixed to the chosen workspace, and you can open and close the dock by clicking the small arrowed button on the side. In this way you can quickly get more space to see what's happening by closing a dock and then expand it again as required. Note that there is a button at the top of the IDE to quickly expand/collapse all docks at once.
Another great feature in GameMaker Studio 2 is the ability to visually "chain" things together. This is most obvious when dealing with objects, but is also a feature of the room editor and other areas of the workflow.
As you can see from the image above, GameMaker Studio 2 will chain together the object with its events and with the code associated with each event. In this way you can dedicate areas on your workspace to chains of objects and then navigate between them to get a far more visual representation of what's going on. Note that you can change some of the chaining properties from the GameMaker Studio 2 preferences, so if - for example - you would rather have the code for each event in multiple tabs in a single window rather than have a window for each one, you can change this.
Another feature of GameMaker Studio 2 is bookmarking. Due to the fact that you now have an infinite workspace to position things in, meaning that you could have various chains of objects and editors open at one time and all of them positioned at different points on the workspace, it is essential that you can quickly navigate from one to the other. This can be achieved using the zoom and pan controls as mentioned above, but it is much quicker to bookmark things and skip straight to them at the touch of a key.
To bookmark something you can hold down Control + Shift and press any number key from 1 to 9 and a bookmark will be assigned to the currently focused window. You can then press Control and the number key at any time again later to be taken to the bookmarked window.
When you bookmark something, the IDE will show a "flag" with the bookmark number on it, and if you are in a script or an object code editor, then the line number (or action) will also be bookmarked so that the IDE will jump to that position when you recall it (see the image above).
Most of the resource editors have been improved over previous versions of GameMaker in some way too, but it's worth giving special mention to the room editor and the image editor in particular, as the way they work has been greatly enhanced and a lot has changed. Rather than try and explain it all here, you can find separate articles which go through all the changes and improvements for each one from the following links:
You'll see that there is a new resource in the resource tree - tile sets. This is not a replacement for legacy GameMaker "backgrounds", which have been removed from GameMaker Studio 2 (all graphics resources are now sprites), but instead a separate resource taken from a base sprite. So, you load your tile set image into GameMaker Studio 2 as a sprite, then assign it to a tile set resource. There are a few things to note when using tile sets however...
The most important thing to note is that tile sets can only be rectangular. Unlike GameMaker, a tile set is heavily optimised and part of this optimisation requires that are all the same size and fit in a "box" (can be a square or rectangle). This will enable them to be drawn faster and (at a later date) to have fast bounding box collisions. You will also not need to have any "padding" in your tile set to prevent texture issues, as this is all done for you now from the tile set resource editor. With legacy GameMaker, if you were zooming the game view in or out then you could get artefacts around your tiles due to the way that the hardware chooses which pixels to draw, and this meant that you needed to pad your tile sets around the edges so that this wouldn't happen. Now in GameMaker Studio 2 you can set the output padding from the tile set editor itself and when the texture page is generated it will automatically pad the edges by the amount specified.
Another aspect of designing tile sets for GameMaker Studio 2 is that the very first tile of the image (in the top left corner) must be blank - see the example tile set above. Basically tiles in a set are stored in an array, with each tile being given an index in the array from 0 upwards, but the 0 index in the tile array is a reserved tile for "empty". So, any tile you create with an image at the top left corner (the 0 position) will not be drawn, as GameMaker Studio 2 interprets that as the empty tile. It may seem odd, but it's just one of the ways that the new system optimises things and is so much faster.
Apart from these optimisations, tilesets also permit you to make tile brushes, animated tiles, and auto-tiles. Covering all these features is a bit too much for this article, but we have a tutorial that covers everything (available from the GameMaker Studio 2 "Tutorials" section of the Start Page), and there is extensive documentation in the manual too (press F1 in GameMaker Studio 2).
GameMaker Studio 2 is not backwards compatible with Legacy GameMaker projects (those made with any version from 8.1 and below), but it will import projects made with recent versions of GameMaker: Studio 1.4 (v.157+ or ideally EA v.465+). However, that doesn't mean they will run without making some major changes to the project structure, as a lot has been done to optimise and improve things in GameMaker Studio 2. The most obvious changes are that D&D actions have been overhauled and the code they create on import must be rewritten to fit the normal GML functions, and also the removal of the background resource and the changes to tiles (as covered above already). The functions dealing with these things no-longer exist in GameMaker Studio 2, and a number of other functions have been changed or removed (relating to views and drawing in particular.
However all is not lost, as GameMaker Studio 2 has a very comprehensive import system for your 1.4 projects that will create Compatibility Scripts and report on all the changes that need to be made to your project. Hopefully what this means is that any 1.4 project can be imported into GMS2 and then run with little or no changes from you to the code or resources.
For more information on how this works, please see the section below: