The update of GameMaker from the 2.2.x versions to 2.3.0 brings with it a couple of important changes to the workflow when using the product, so this guide summarises the changes you need to be aware of and update your teaching materials to reflect.
Each of these is covered in more detail below, but here are the quick bullet points to be aware of:
- The project format has changed. Be aware of this when saving projects, including to source control.
- The resource tree has actually been overhauled, has extra new functionality, and isn't called the Resource Tree anymore - it's the Asset Browser.
- New projects now no longer have to contain all the default folders for each resource type, so the asset browser can look quite different now.
- The asset browser has a new Quick Access section, which is where you can configure options for the project and control your asset browser searches.
- The way in which rooms are ordered and how you denote your starting room has had to change, now you can order the asset browser however you wish.
- Scripts have been changed so they are now "containers of functions". Accordingly, they run on startup (before any room has been created) and all their contents are in global scope.
- Functions have now been introduced, and you will call a function directly rather than calling a script as you did before. This means your script files will now have function declarations inserted when your 2.2.5 projects are converted.
- New asset types have been added, and the Sprite Editor now has a slightly tweaked UI.
We would recommend you review your teaching materials before you start using 2.3.0 in your classes, to see if they need to be updated regarding any of these above points. At the end of this article we will link to the general public blog posts detailing the new features, which you may also wish to add into your teaching materials going forward.
You should also review the Required SDKs FAQ before or immediately after installing 2.3.0, as a number of external SDKs have been changed since 2.2.5 was released and so 2.3.0 has support for newer external tool versions.
The Project Format Has Changed
It is very important to be aware that the GameMaker project format has changed completely between 2.2.5 and 2.3.0.
You can open an older project in the new version just fine, but this will actually create a new "converted" copy the first time you open the project and won't replace the old copy. Therefore, you may need to clean your computers of the old "legacy versions" of your students' projects (or remind each student to do it once they're happy their project is working fine in 2.3.0).
Similarly, if your school has students push their projects into git source control, then everything will look very different on the next commit.
You cannot take a 2.3.x or newer project back into 2.2.5 or older - GameMaker will simply tell you the project is in a newer format and will safely abort the load process. Accordingly, it is very important that students are using the correct version of GameMaker at home and it may be beneficial to you if all your machines are updated to 2.3.0 at the same time.
The Resource Tree Has Been Overhauled
The new Asset Browser replaces the old Resource Tree as where you can control all the assets that your project requires to run. You will notice that all of the manual and our recent helpdesk documentation also now calls "resources" as "assets".
By default, it still sits on the right of the IDE and initially looks a lot like the old tree (as shown in the image below), but Preferences exist to customise the layout and to turn the placeholder starting folders off, so be aware the browser can legitimately look "almost empty" if students send you a .yyz archive of their project.
While the asset browser might look similar to the old resource tree, there are a number of fundamental changes to how it works. To start with, the asset browser is more-or-less free-form now, meaning that you are no longer limited to having a fixed set of folders per-asset type and order of folders for each project. So, for example, if your project doesn't use timelines or extensions, you can remove those folders from the asset list.
You can of course name all folders as you require anyway, so now you can have your folders named for your gameplay requirements and in each one group all relevant assets regardless of type, such as shown below:
Note that a folder's right-click menu "Create..." command has changed. For example, if you right-clicked on the "Sprites" folder in 2.2.5 you'd immediately get "Create Sprite" because that was the only viable command. Now, because you could add any asset into that folder you need to right-click on the folder and select "Create" and then from the next menu select "Sprite". While this is a minor detail, it is worth noting as the previously-expected outcome does not match the current behaviour.
Colour-Coding For Identification
You have been able to do some of this in GameMaker for a while, but to make things easier to identify when mixing assets in folders "in the 2.3.0 way" you can assign colours to assets from the right mouse button menu or by using the right mouse button on the asset icon:
Doing this on a group folder will assign the colour to all of the assets in the group, and you can then go into the group and change any of them to a different colour if required.
A Quick Access Menu Has Been Added
There are now additional organisational tools available to you from the Quick Access menu at the top of the browser.
-
Recent: Here you can find a list of the most recently used assets.
-
Favourites: Once you have added some assets to the asset browser, you may have some that you access frequently at any given time and so to make things easier you can flag these assets as "favourites" from the right mouse button menu on the individual asset, which will then add it to this list.
-
Room Order: From here you can change the order that your rooms will run in. This is discussed in more detail below, as there are a few changes with how rooms work.
-
Saved Searches: Here you have a list of any saved search options that you can switch to instantly.
-
Tags: All assets in the Asset Browser can be assigned user-defined Tags. These will then be listed here and you can use them to filter the assets shown in the asset browser. This is discussed in more detail below, as Tags are a major new feature in 2.3.0.
-
Game Options: Here you can quickly access the various different Game options for your project.
You can collapse the Quick Access list if you wish.
Room Ordering and Inheritance Now Has a Manager Window
In the Quick Access list above, you'll have seen that we have an entry for Room Order. Previously, you had your "Rooms" folder in the resource tree and your rooms would be run in the order top-to-bottom as they were listed in that folder. Now, however, since you can place your room assets in any folder and in any order in 2.3.0, that's not possible. So there is a new system for ordering your rooms and saying which one is the "home" room to always launch at the start of the game.
You can quickly drag them up/down in the Quick Access menu itself or you can use the new Room Manager window if you require more control over your change or you want to modify the room inheritance settings.
You can open the room manager window by clicking the "Extras" button at the top of the Asset Browser and selecting it from the menu that opens, or you can simply click the icon to the left of a room in the asset browser:
Once open, the Room Manager presents you with two different tabs, one for Room Order and one for Room Inheritance.
The home icon will also be shown in the Asset browser so you can see clearly which room is set as the one to be launched on game startup.
The Sprite Editor Looks A Little Different
Under-the-hood, all sprites are actually now the new resource type Sequences. Whilst that won't make too much difference in general usage, it does mean that the abilities to manage them over their timeline have been increased and accordingly the UI for the Sprite Editor has changed a little to show the timeline. Note that you can now stretch frames to extend them and you can even insert gaps between frames - if you have issues with "flickering" sprites, ensure you haven't done this accidentally.
You Can Now Apply Tags To All Your Assets
The final IDE change we want to bring your attention to in the new asset browser is the use of Tags. Tags are a very powerful tool, not only for organising and filtering the assets listed in the asset browser, but also when writing your code, as you can still access and use your assigned tags in-game.
To create a tag you need to use the RMB menu on either a folder group or an asset and then select the Edit Tag option. This will bring up the Tag Editor where you can type in the tag you want to use, and then press to apply it:
You can assign multiple tags to a single item, and you can also select multiple assets and assign a tag to all of them at once. Tag can be assigned to a folder group too, which will apply it to all the assets within the group. Once added, all tags will be visible under the Quick Access menu and also in the Filter options and so can be used to quickly filter the asset list and show only those items with the chosen tag or tags.
As mentioned above, tags can also be used in your project code to identify any asset and then act on it in-game, making it a very powerful tool, as you can code behaviours based on a tag or group of tags. For example, imagine you have a project with a "DieOnTouch" tag. You can add this tag to all your "traps" objects and when programming your player object's collision behaviour you can check for the presence of this tag and code functionality accordingly.
Scripts Have Changed and Functions Have Been Introduced
Previously, a script was a single resource that was created on a global scope and used to create a single custom function which would then be called using the script name as the function name. This is no longer the case and scripts, while still global in scope, are now a type of "container" for one or more functions.
What this means is that when you compile your project, scripts are no longer called individually, but are actually all run at the start of the game in the global scope, so all variables that are defined in the script (outside of function definitions) will be considered global. That said, you should still use the global identifier to explicitly define and identify global variables in your code.
The reason for this change is that scripts can now contain multiple functions. A function is essentially the same as an old script resource, only instead of having code assigned to a script, we assign it to a variable, and this variable becomes the function that is called in GameMaker. This variable is called a method and is used to call the code that is in the function, the same as you would have previously called the script name. This is easier to visualise with an example, so let's look at one...
Consider this simple script "move_follow()", from a 2.2.x project:
/// @function move_follow(myObject, mySpeed);
/// @param {index} myObject The Object to follow
/// @param {real} mySpeed The speed to follow at
var myObject = argument0;
var mySpeed = argument1;
if (point_distance(x, y, myObject.x, myObject.y) > 0)
{
direction = point_direction(x, y, myObject.x, myObject.y);
speed = mySpeed;
}
else { speed = 0; }
Now, in 2.3.x, this would be defined as a function like this:
/// @function move_follow(myObject, mySpeed);
/// @param {index} myObject The Object to follow
/// @param {real} mySpeed The speed to follow at
function move_follow(myObject, mySpeed)
{
if (point_distance(x, y myObject.x, myObject.y) > 0)
{
direction = point_direction(x, y, myObject.x, myObject.y);
speed = mySpeed;
}
else { speed = 0; }
}
or like this (which would give the same results and is just a personal preference as to how you write things):
/// @function move_follow(myObject, _speed);
/// @param {index} myObject The Object to follow
/// @param {real} mySpeed The speed to follow at
move_follow = function(myObject, mySpeed)
{
if (point_distance(x, y myObject.x, myObject.y) > 0)
{
direction = point_direction(x, y, myObject.x, myObject.y);
speed = mySpeed;
}
else { speed = 0; }
}
You would then call this function in 2.3.0 just as you would have called the script in 2.2.5:
move_follow(obj_Player, 5);
One Script Can Contain Multiple Functions
So, as we mentioned above, scripts can now contain multiple functions and these should be defined with the format shown above: where you have the @function <name>(<arguments>) JS doc comment to identify the function, then the function definition below, and then the next JS Doc comment, and then the function, etc. You can see this below:
Accordingly, any course material explaining the use of scripts will need updating to include the "function" declaration - or additional explanation from educators. For most 2.2.5 scripts this will simply mean wrapping the entire script contents (minus any JSDoc comment at the top) in a function declaration like this:
function <script_name>(args)
{
<script_here>
}
If you import a project made in a version of GameMaker prior to 2.3.x, this will be done automatically for you, mitigating a lot of potential issues and showing students a base on which to understand the changes.
Another consequence of this that you should be aware of is if you have any "initialisation" scripts that set up things like global variables, macros or enums, then in 2.2.5 and older these scripts would need to be called from an object instance in your game. However, because scripts are now run all at once at the start of the game automatically, you can remove the calls to the script from your objects and let the script define these variables automatically when the game starts - or, if you want, you can edit the script to wrap its contents in a function declaration block and leave your object's code as-is.
Arrays Are Now Always 1D
One other change to GML Code that is worth pointing out here is that arrays are now all considered one-dimensional and the height/length functions for determining the size of a 2D array are now deprecated.
This should have minimal impact on previous educational material and when importing 2.2.5 projects, as all the old naming conventions for creating 1 and 2 dimensional arrays will still work, but going forward you should now use this format in your teaching materials:
array[0] = 1; // 1D array
array[0][0] = 1; // 2D array
array[0][0][0] = 1; // 3D array
etc...
In Summary...
The changes outlined above are the ones that have the most immediate impact on education resources, and should definitely be taken into consideration by educators when re-using 2.2.x course material and when preparing new material for 2.3.x.
However it is worth noting that the 2.3.x update also brings with it significant other changes that while they don't directly impact on previous material are worth considering for the future. Specifically, the addition of 2 new asset types (Animation Curves and Sequences), a new editor called the Inspector, as well as the expansion of GML Code to include structs, chained accessors and in-line functions.
You can find out more information about all the new features in the following two tech blogs:
We of course also highly recommend reviewing the manual inside 2.3.x to get a complete understanding of the new features and changes.