The 2.3.2 release of GameMaker introduces some cool and major new features we wanted to highlight so you can jump right in asap.
Note that this guide will focus on the major additions/changes, but there are a sizeable stack of bug fixes and also a significant number of new functions, so please do still review the release notes thoroughly as well as reading this post.
A reminder also that all of the below stuff is covered in even more detail in the manual (either press F1 inside GameMaker itself or see manual.yoyogames.com)
Nine Slice Support For Your Sprites
Nine Slice (also known by many similar names in other packages) allows you to stretch your sprites in a more controllable and smarter way, by keeping your corners at a fixed scale and manipulating the bits in-between.
This means that you can create buttons and other UI elements in a smart and effective way, removing the need to create multiple copies of these sprites at several different sizes in order to avoid scaling in-game reducing their quality.
The Sprite Editor has a new Nine Slice panel where you can now enable this:
Here, we have a sprite with the nine slice checkbox enabled, and so we can see the four guides which "slice" our image into 9 parts. We have selected the centre slice with the sprite editor in overlay mode (and so the centre has a blue highlight to show this is the one we're working on.
You can modify the values for all four guides (these are "how far in from the edge of the sprite should the slice happen", so smaller values result in narrower margins) and also configure what type of rendering mode that individual slice should use by default when this sprite is drawn in-game.
To the right is a second window for previewing your sprite and being able to stretch and rotate the image to see how your chosen slice values affect the image. So, for example, if we set the centre slice to "Hide" mode and we change the width of the left slice we could get something like this:
And of course this new capability carries through into your game, where you can later manipulate the sprite at runtime should you wish. This means animated buttons and dynamic menu screens are far more easily-achievable. Accordingly, 2.3.2 has introduced the new functions sprite_nineslice_create(), sprite_set_nineslice() and sprite_get_nineslice(), as well as a number of in-built variables to allow you to toggle if a sprite is using nine slice or not and to then modify its rendering values when nine slice is enabled.
Continuing our example sprite above, if in-game we keep getting-and-setting just this left slice to progressively larger values, this simple sprite above just became a progress bar filling up!
Just to help visualise that, it would look something like this, with this left edge having slow slid over towards the right to get to this point:
It's worth noting that your left/right and top/bottom guides cannot cross - if you try to drag one beyond the other, then it will push that one along. This can result in some odd-looking results, so if you do drag the guides around in the sprite editor or you set a new set of slice values in-game and things start looking funny, check you haven't accidentally affected a guide you didn't mean to.
If you want to play around with a little demo project of nine slices and gain further understanding of what it can do, you can download a .yyz from the bottom of this page.
We have added a new library of preset curve types you can apply to your Bezier curves to automatically add points or change ease in/out values and easily add effects like "bounce" or "elastic".
Presets can be applied to a whole curve or between selected points only. In the image above we will select our y curve and apply a Bounce to the whole curve.
This immediately adds suitable points and handle values to our y curve, and so we get something like this:
Which all looks like this on the canvas:
Very quick and easy, and we can see exactly how it will play in-game.
Note again that the curve library is only for Bezier curves - you won't see the new UI if you're not editing a Bezier.
We have added this little demo project of a library Bounce curve as a download from the bottom of this page, but really this is a feature you will need to try for yourself with your own curves to get a proper understanding.
Mac DMG Export Packages
If you are not building for the App Store, then when you click the Create Exe button now you will be given the choice of wrapping your new app in a .zip (as always) or a .dmg installer.
A new Game Option image picker has been added to control the dmg installer's background image (we went with a plain off-white, as this image will be drawn behind all your installer text):
The dmg will also reuse the same icon sprite as the game app uses.
It is worth noting that the process of creating a .dmg package will temporarily open a process for the dmg installer on your Mac whilst the files are being collated and the disk image made. Therefore, it will look like your game installer is trying to run while your build is going on. This is fine and you should ignore this installer window, as it will close itself when complete. How long it remains visible depends on the size of your game and the speed of your Mac.
If you do have any issues with the dmg files not writing correctly or this temporary installer remaining open, etc., then please see our OS permissions guide, as this may indicate antivirus or other permissions issues which would block GameMaker from working correctly.
Asset Compiler Changes for Sounds
This one is documented in the release notes already, but just to give a little more detail. We have changed compiling of sounds so that in many cases your files will now be passed straight through to your game packages untouched - this speeds up builds, but also stops an issue where occasionally small amounts of silence were added to the end of .ogg files.
- If you have set these to remain compressed in the sound editor the original file will now always be passed through unedited to your game package, as it will be assumed you created your sound file with the desired values before you brought it into GameMaker.
- Requesting an .ogg becomes an uncompressed sound will still always result in a recompile (to become a .wav).
- If you have set these to remain uncompressed in the sound editor, then the asset compiler will first quickly check if the values you set in the sound editor match the contents of the .wav and then do one of two options:
- If the Sound Editor values match your source .wav's existing content it will just be passed through to your package untouched.
- If they do not match, then the .wav will still be recompiled using your Sound Editor values.
- Requesting a .wav becomes a compressed sound will still always result in a recompile (to become an .ogg).
- Using a .mp3 as your source file will still always result in a recompile (to become an .ogg/.wav, depending on if you requested compressed/uncompressed).
The compiler log only shows sounds which have been recompiled, so you will likely see fewer sounds are being converted now - and you can act accordingly to prepare your sounds in advance so they are not recompiled.
Live Updating of Colour Picker Values
Now, when spawning a colour picker in any applicable editor, you will be able to tweak your colours and see the effect in the new preview window. However, you can see these also apply in the main editor straight away.
For example, here we're setting the colour multiply value of our light-brown box in a sequence track to be a nice green colour:
No more having to apply the colour change to see any update and then re-open the picker to make tweaks.
And Lots More...
We have gone over just a small selection of the new changes in 2.3.2, and so you should check the full release notes and make sure you are all set with your own projects.
You should find projects compile (potentially, a lot) faster now, Demo projects which are from GM:S 1.x packages will now import properly again, Preferences will now find Android NDK 22+ installs, there are some new GM Visual nodes... and of course lots of other bugs have been fixed in the IDE and in-game.
Enjoy the new 2.3.2 release!
A Little Reminder About Permissions
Windows IDE users, we saw a lot of reports from users of Avast/AVG antivirus (and small numbers of reports from users of other antivirus products) that upgrading to the last new version required you to re-apply your permissions for GameMaker and to whitelist the new runtime install location, because your AV product treats the update as a whole new application.
Please be aware if this applied to you with 2.3.0 -> 2.3.1, you may well need to do this again each new release, so check your antivirus settings if you have any issues installing the new GameMaker version, downloading your runtimes, building your projects is suddenly failing, or sprites not appearing when you run your games.
Please see our OS permissions guide if you have any such issues, as this is not a bug or something we can "fix" (it's your protection software doing its job).
Mac IDE users, please be aware we also investigating a recent change in Bug Sur 11.1 which is now more often putting new app installs into an OS sandbox state the first time they run - you may find that GameMaker is not able to install its runtimes when it launches automatically after the installer has finished. If this happens for you, please simply restart GameMaker to fix.
You should also ensure you do follow that permissions guide mentioned above if you use antivirus software, as you can see the same end results that Windows IDE users get if your protection software is mis-configured.