in , , ,

GameMaker Studio 2 Annouces official Mac version in newly released 2.1 milestone

GameMaker Studio 2 – v2.1

Released August 25th, 2017

It finally happened, yes GameMaker Studio 2 version 2.1 has been released and with it comes a whole bag of updates. Most important of the new features though, is the official support for Mac; this is something that has been not only lacking but asked for by the community for years. To top it off, YoYo Games has bundled the Mac version along with the Windows version under the same license, meaning you can freely switch between Windows and Mac when you need to (and use git to sync the code up between them). Some other notable features are, of course, the fabled region Code Folding that I had recently foretold would be “coming soon” and a cleaner Resource Management tree. As much as I was looking forward to Code Folding, I have to say the biggest surprise was the complete overhaul to the Debugger; I create a lot of bugs so anything that helps me track them down faster is a huge plus for me. Let’s get into some details and show off some of the updates in action.

Mac Attack

If anyone remembers my original post about purchasing GameMakerBlog, then it will be no surprise that I got my first taste of GameMaker Studio 2 on the Mac closed beta and even then I thought GMS2 was a step ahead of anything else I had used previously. Now though, the Mac version of GameMaker Studio 2 is just simply outstanding: it is easy to use, has clean UI interfaces and has great performance; seeing as I work on a MacBook Pro I was concerned with finding an editor that did not consume all my resources and had a large enough UI that I could work without needing to pull out my old Lightboy. Luckily, not only did GMS 2 fit the bill originally but it is incredible to work with now as I can easily try out build targets on HTML5, IOS and of course Mac; I am glad that YoYo Games not only created a fully functional Mac version but that they included it with the same licenses as the modules is very generous as most companies would have charged to support a new operating system.

Code Origami

So now that region code folding is officially live, I wanted to give a proper example of using it that should be acceptable to any party type, even the “code folding is bad mmkk” crowd. One of the areas I have been looking to use code folding in is the Async – Dialog events. Take the following code for instance:

[codesyntax lang=”gml” lines=”no” capitalize=”no”]

var _id = ds_map_find_value(async_load, "id");

if (_id == playerGender)
{
	if (ds_map_find_value(async_load, "status"))
	{
		if (ds_map_find_value(async_load, "result") != "")
        	{
			playerGender = ds_map_find_value(async_load, "result");
			show_debug_message("Gender Selected = "+string(playerGender));
        	}
    	}
}

if (_id == playerAge)
{
	if (ds_map_find_value(async_load, "status"))
	{
		if (ds_map_find_value(async_load, "result") != "")
        	{
			playerAge = ds_map_find_value(async_load, "result");
			show_debug_message("Age Selected = "+string(playerAge));
        	}
     	}
}

if (_id == playerName)
{
	if (ds_map_find_value(async_load, "status"))
	{
		if (ds_map_find_value(async_load, "result") != "")
        	{
			playerName = ds_map_find_value(async_load, "result");
			show_debug_message("Name Selected = "+string(playerName));
        	}
     	}
}

if (_id == playerClass)
{
	if (ds_map_find_value(async_load, "status"))
	{
		if (ds_map_find_value(async_load, "result") != "")
        	{
			playerClass = ds_map_find_value(async_load, "result");
			show_debug_message("Class Selected = "+string(playerClass));
        	}
     	}
}

[/codesyntax]

Now that is pretty long but not too hard to read or understand, though when we switch to code folding things shape up much nicer:

[codesyntax lang=”gml” lines=”no” capitalize=”no”]

var _id = ds_map_find_value(async_load, "id");

#region get player gender
if (_id == playerGender)
{
	if (ds_map_find_value(async_load, "status"))
	{
		if (ds_map_find_value(async_load, "result") != "")
        	{
			playerGender = ds_map_find_value(async_load, "result");
			show_debug_message("Gender Selected = "+string(playerGender));
        	}
     	}
}
#endregion

#region get player age
if (_id == playerAge)
{
	if (ds_map_find_value(async_load, "status"))
	{
		if (ds_map_find_value(async_load, "result") != "")
        	{
			playerAge = ds_map_find_value(async_load, "result");
			show_debug_message("Age Selected = "+string(playerAge));
        	}
     	}
}
#endregion

#region get player name
if (_id == playerName)
{
	if (ds_map_find_value(async_load, "status"))
	{
		if (ds_map_find_value(async_load, "result") != "")
        	{
			playerName = ds_map_find_value(async_load, "result");
			show_debug_message("Name Selected = "+string(playerName));
        	}
     	}
}
#endregion

#region get player class
if (_id == playerClass)
{
	if (ds_map_find_value(async_load, "status"))
	{
		if (ds_map_find_value(async_load, "result") != "")
        	{
			playerClass = ds_map_find_value(async_load, "result");
			show_debug_message("Class Selected = "+string(playerClass));
        	}
     	}
}
#endregion

[/codesyntax]

Which visually turns into:

 GMS 2 Region Code Folding

Now we are talking, this folded code is clean and lets you focus on exactly what you want; which in this case is checking out the method for getting the player’s name. Expanding and Collapsing the code is as easy as it looks as well, just click on the + sign to expand and the – sign to collapse it again.

Extreme Makeover: Resource Tree Edition

I always liked the GameMaker Studio 2 resource tree navigation, it is split up very well, easy to read and always responsive. I could not think of any possible way to improve it further, yet somehow YoYo Games managed to do it. The new resource tree is tighter, cleaner and more customizable than ever before. You can find the new Resource Tree settings in preferences:

  • Shift+Command+P (Mac) or Shift+Control+P (Windows)→ Resource Tree (about 11th option down the list)

I am currently trying out the following settings (I am not adventurous):

  • Only Show Horizontal Separators
  • Label → Default → Color = FFFF00, Font Name = Droid Sans Mono, Font Size = 14, Anti-Aliasing = On
  • Label → Resource Label → Color = CCCCCC, Font Name = NanumGothic, Style = Bold, Font Size = 12, Anti-Aliasing = On

The contrast between the label headers for each resource type and the actual resources inside make it easy to visually distinguish what I am looking at; my only gripe is that Group labels share the same exact formatting as Resource Labels, which I would have rather had use the Label Default settings instead, since they are logical grouping labels, not an actual Resource Label, maybe a future update will change that if enough people feel the same way. Overall, this was a positive change and when my eyes get tired of looking at my current scheme I can always change it up.

The only way to code without bugs is not to code at all

Nothing beats a good, fast, easy to use debugger; because the alternative (which is something I use extensively…) is putting a bunch of print lines whenever you want to check something and then hope you remember to remove those impromptu debug statements when it comes time to release. This is why I was pleasantly surprised to read about the new integrated debugger, I had no idea it was even coming in this update and I am glad it did. The new debugger interface is pretty slick, it shows up as a tab in the editor, has a very cool graph in the top right that shows current memory usage and frames per second and lastly has a great resource viewer to select from on the left-hand side. While using it, things work as you would normally expect it to with the ability to set breakpoints, enable live debug to watch every instance and even global variables, pause the running game and step into any part of the code and finally when an exception does happen the line of code is bought up and highlighted with a nice pop-up box describing the error. Now, this is nice and appreciated but what really impressed me was the all new HTML5 debugger, this is truly a step-up as we can see all instances in a separate browser window and track every instance; put the real app side by side with the debugger console window and things get so much easier to deal with. Here is a quick screenshot trying to capture as much as possible:

New GMS 2 Debugger Window

Just a few minor defects

Version 2.1 is a huge success with some great feature sets and of course official Mac support; but as with all code that has ever been written, there are a few bugs, issues and problems. Just a very quick list:

  • Some online connectivity issues – IDE occasionally thinking it’s offline
  • Closing and reopening the Marketplace tab can cause issues downloading some assets thereafter, need to restart GMS2 to fix
  • Dead instances of Window’s RuntimeBroker application can block attempts to use the manual in the IDE – just get a white page
  • Autocomplete shows up below the line you are working on if any region blocks are present at all
    • If the window you are working in is too short to fit the autocomplete box it will appear and disappear instantly

If you find any bugs with the new 2.1 version I urge you to make a bug report and post in the GameMaker Community forums: GMS 2 Version 2.1.

Good Luck in all things,
Hikati Games
Hikati Games LLC Logo

What do you think?

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

GameMaker Studio 2 adding C# region type syntax code folding soon

[GameMaker Tutorial] Drawing custom health bars with sprite parts