Version 2022.5 - Time Sources, .NET 6


GameMaker version 2022.5 is here, bringing you Time Sources, a Sound Inspector, and a very customisable “leaves” effect, among other improvements. 

Time Sources

Ever wished you could create your own Alarms? Well, now you can.

A Time Source is like an Alarm, but one created at runtime, completely independent of objects.

It can be based on frames or seconds. The latter will make it “frame-independent”, so it runs at the same intervals regardless of the game’s performance.

var _my_method = function()

var _time_source = time_source_create(time_source_game, 300, time_source_units_frames, _my_method);


This is a simple Time Source that calls a method 300 frames later. It’s essentially asking GameMaker to run a piece of code after a given amount of time.

You can even tell a Time Source to repeat a certain amount of times or to repeat forever. Read the Time Sources documentation for more information.

.NET 6 Upgrade

The GameMaker IDE has been upgraded from .NET 4.5 to .NET 6, bringing stability and performance improvements.

If you use GameMaker on macOS or Linux, it means you no longer have to worry about Mono, making your installation less prone to Mono-related errors.

Thanks to .NET 6, GameMaker won’t need to use ‘subst’ to create virtual drives for accessing long paths, so you’ll never again have to see drive letters such as Z: and Y: when installing new runtimes or when building projects on almost all targets (Android, you still will).

The changes brought by .NET 6 will create a faster IDE experience for you, with lower memory usage.

Pre-Create Values on Instances

instance_create_layer is your best friend (or at least a contender?) when using GameMaker. However, it’s had one infamous limitation.

You could never assign values to a new instance before its Create event ran.

You now can:

instance_create_layer(x, y, “Instances”, obj_bullet, {
    vspeed: -40,
    type: choose(0, 1)

The function is getting a new, optional argument that takes a struct. Add variables in that struct to apply them to the new instance before its Create event runs.


In your Create event, catch those values, and change up the instance using conditions:

if (type == 0)
    sprite_index = spr_bullet_0;
else if (type == 1)
    sprite_index = spr_bullet_1;

This also applies to instance_create_depth.

Constructors as Objects?

This opens up the ability to use constructors as your ‘objects’, and use an empty object asset to instantiate such constructors.

For example:

// Script
function bullet () constructor {
	sprite_index = spr_bullet_0;
	vspeed = -10;

// Any event
instance_create_layer(mouse_x, mouse_y, "Instances", obj_empty, new bullet());

You can even use a Time Source to create your own ‘Step event’ within the constructor.

How far can you go? 😏

Find All References (Beta Only)

Feather is currently in beta, and is constantly receiving updates to make its code completion more solid.

Its newest feature, Find All References, tells you everywhere a certain variable is used.

Putting your text cursor on a variable and pressing F3 will take you through all the places in your project where that variable was used:


Finding references for ‘coins’

Pressing Shift+F3 locates all references to the variable, and presents them in a neat and tidy list:


List of ‘coins’ references

This is not a mere “text search” function. Feather is smart and can properly track variables with context, so it knows where a particular variable, belonging to a particular scope, was used.

For example, if you have a variable with the same name in another object, or in another scope entirely, it won’t confuse them, and will only show references to the chosen variable.

This not only applies to variables, but to functions, assets, and constants as well.

We’re looking to bring Feather into Stable with next month’s release.

Sound Inspector

The Inspector is expanded with each release. Now, it can inspect sounds.

Most of its settings are the same as the regular Sound editor, but it also shows the waveform for your audio:


Inspecting a Sound asset

Drag your mouse across the waveform to find the time value at any given point. This makes it easier to figure out where parts of your track start or end.

This offers a great advantage for editing multiple sounds at once. Select multiple sound assets in your Asset Browser, and in the Inspector, set them to “Compressed - Streamed”, which greatly reduces your final game size.


Blowing Leaves Effect

You now have a new Effect in the Room Editor, called “Windblown Particles”.


You can use it to create a “blowing leaves” effect, as you’ll see in our upcoming Windy Woods template. There’s plenty of other uses for it too, so don’t be afraid to get creative.

This is our first “Effect”, where the others in the list are simple “Filters”. An Effect has GML code managing itself as well as a shader, where a Filter only comprises a shader.

Since this Effect uses GML code for the movement of the leaves, it can’t be previewed in the Room Editor. You’ll only see it when you run your game.


A couple of smaller updates worth mentioning:

  • You can now run custom batch scripts after the Texture Pages have been built.
  • You can make game packages up to 4GB, where previously it was limited to 2GB.

All updates are documented in the Release Notes.

Download GameMaker 2022.5 and start playing around with your new favourite features.

Happy GameMaking!

Lead Technical Writer at GameMaker, Gurpreet creates documentation and tutorials to make game making easier for you. He loves using the computer to bring new things to life, whether it's games, digital art, or Metal music.
Back to blogs