OFFICIAL 2.3.3 Beta Release

Status
Not open for further replies.

Dan

GameMaker Staff
GameMaker Dev.
This topic is for the discussion of issues relating to the update of GameMaker Studio 2. However, this does not replace our normal bug reporting system and you should report all bugs as normal using https://accounts.yoyogames.com/contact-us

As ever, PLEASE check the Required SDKs FAQ before/during updating and ensure your antivirus/OS permissions are correct after you do the new install - User Permissions and Internet Access Required by GMS2 - before you submit any bug reports or post issues here.

You should post here if:
  • Something has changed between the previous version and this one, breaking your game (i.e.: code that worked previously now does not)
  • Something reported as fixed in the release notes is not actually fixed
  • You are having IDE or system issues related to something new in this update
  • You are having issues with new features introduced in this version
  • You are having issues updating to this version
  • Everything works and you want to tell us we are great (seriously, let us know if it all works correctly for you)
When reporting issues to the Helpdesk, please try to add as much information as possible, for example:
  • If the issue is with the IDE, then please give a screenshot if you can to help illustrate the problem
  • If there are error windows, then a link to the "ui.log" file found via the "Open Log in ..." Help menu command inside GMS2
  • If it is a code issue, then link to or attach a YYZ showing the most basic project possible which exhibits the behaviour
  • If you receive any error dialogues, please screenshot them
  • If it is a system issue (like compiling to a specific target) then please provide details of the PC being used as well as the software versions involved
Again: posting a comment in these release threads is not a replacement for filing a bug!


Release Notes

Runtime Release Notes


Note that
the English beta manual is currently updating to Beta 2 and will be kept up-to-date each Beta release, but that other languages won't be released until much later in the Beta period.


Current Release - IDE v23.1.1.315 Runtime v23.1.1.319 (Jul 06, 2021)


No change in the IDE. Runtime is simply the one fix for "In-Game: argument_count returns +1 on the expected value in 2.3.3 Beta 6"


IDE v23.1.1.314 Runtime v23.1.1.318 (Jul 05, 2021)

No change in the IDE. Runtime is 2 fixes - one for macOS collisions being wrong when using a precise collision mask (might have affected some other non-Windows platforms also), and a further fix for the issue with arguments being passed into functions which are not declared to expect arguments. (See page 2 of this thread for more specifics on both changes.)


Beta 5 - IDE v23.1.1.313 Runtime v23.1.1.316 (Jul 02, 2021)

No change in the IDE. Runtime is 2 fixes - one for a memory leak when manipulating multi-dimensional arrays containing strings, and a fix for arguments being passed into functions which are not declared to expect arguments. (See page 2 of this thread for more specifics on both changes.)


Beta 4 - IDE v23.1.1.312 Runtime v23.1.1.313 (Jul 01, 2021)

On the IDE side, we made some stability fixes. Runtime-wise, some important building fixes for UWP, plus updated SDKs support for Switch and PS4 - please see their setup guides for full details of what you need now.


Beta 3 - IDE v23.1.1.306 Runtime v23.1.1.305 (Jun 23, 2021)

Fixed the Android Studio 4.2 issue with OpenJDK 11 and keystores, plus made an important Undo fix. In-game, we made a lot of fixes following the feedback from Beta 2, so please see the release notes above.


Beta 2 - IDE v23.1.1.300 Runtime v23.1.1.297 (Jun 16, 2021)

A stack of changes/fixes have been made, so please see the release notes above.
We have confirmed the Android Studio 4.2 issue, and so this is being fixed soon. However, for now our advice remains to use Android Studio 4.1, as you would need this version for 2.3.2 anyway.


Initial Release - IDE v23.1.1.290 Runtime v23.1.1.290 (Jun 03, 2021)

Please see the release notes above and enjoy...


 
Last edited:

Shut

Member
Just downloaded the beta, was hoping to see if we were finally able to type brackets and provide function arguments in moments/sequences. But, it looks like it's still missing while the support confirmed it to be coming in 2.3.3. :/
 

rwkay

GameMaker Staff
GameMaker Dev.
We are not planning on having function arguments in moments / sequences - put in a script that calls the function with the args that you want. Whoever told you that was incorrect.

Russell
 

Evanski

Raccoon Lord
Forum Staff
Moderator
"Unbundled Git tools from the installer"
  • GMS2 now relies on external source control tools you point to in Preferences, rather than us shipping a specific version of the Git tools
  • This means you can point at your own installed-and-configured Git client and use its own authentication settings, etc. It also means your tools can easily be kept up-to-date with external changes by Github, etc.
  • Note: This does mean that you will need to reconfigure your Git settings one time in Preferences before your projects are going to show as SCM-enabled!


 

Shut

Member
Well, it looks like there was some kind of misunderstanding. I was really hoping for it, since it would be much easier to handle without creating new functions for each moments as I'm planning to have quite a lot of sequences.



Thanks for confirming that it's not coming, I'll try to find a workaround method.
 

Shut

Member
Just submitted a bug that seems to be present in this beta as well, it's related to sequences - for some reason the clipping masks stop working, although in the sequence editor it seems to be fine. I'm not even using objects, just sprites so it's quite strange and it seems to start working again once I try to isolate the sequence by deleting the rest of the resources.

Edit: turned out it was surface_depth_disable() messing with it.
 
Last edited:

drandula

Member
So now you can have default arguments for functions, yay! I'll install beta soon :)

Just a thought as I didn't notice from release notes, can you force default arguments when calling? Something like:
GML:
// CreatePlayer(myLives = 3, myHealth = 100, myWeapon = "Dagger")
CreatePlayer(default, default, “Sword”);
CreatePlayer(default, 200); // Same as: CreatePlayer(default, 200, default);
 

Alice

Darts addict
Forum Staff
Moderator
Just a thought as I didn't notice from release notes, can you force default arguments when calling? Something like:
GML:
// CreatePlayer(myLives = 3, myHealth = 100, myWeapon = "Dagger")
CreatePlayer(default, default, “Sword”);
CreatePlayer(default, 200); // Same as: CreatePlayer(default, 200, default);
My C#-trained brain hopes not, because it already associates "default" with a default value of a specific struct/class. That, or a switch/case. Using it as arguments to mean "use default argument value in this place" would make it a little messy to me.

Instead, I prefer a syntax with arguments naming, like CreatePlayer(myWeapon = "Sword") or CreatePlayer(myWeapon: "Sword") (the latter is very C#-like, I admit).
Still, just having default arguments is already a nice bonus, though myself I'll probably wait until the stable release, myself.
 

8BitWarrior

Member
So now you can have default arguments for functions, yay! I'll install beta soon :)

Just a thought as I didn't notice from release notes, can you force default arguments when calling? Something like:
GML:
// CreatePlayer(myLives = 3, myHealth = 100, myWeapon = "Dagger")
CreatePlayer(default, default, “Sword”);
CreatePlayer(default, 200); // Same as: CreatePlayer(default, 200, default);
The keyword 'undefined' seems to work as you want. So, this works...
GML:
// CreatePlayer(myLives = 3, myHealth = 100, myWeapon = "Dagger")
CreatePlayer(undefined, undefined, “Sword”);
CreatePlayer(undefined, 200); // Same as: CreatePlayer(default, 200, default);
 

Zhanghua

Member
Last edited:

TheMagician

Member
Go To: Now supports jumping to individual functions
This is very much appreciated!

Search & Replace: Can now dismiss the dialog by pressing the Esc key
Glad to see that you're still caring about small usability issues like this. Thank you!

Code Editor: MMB or F1 on a function with the same name as its Script will now place the caret at the correct location for the function, rather than leaving it on line 1
Could you please extend this feature to the full screen code editors? Right now, using MMB or F1 on a function in a full screen editor will simply create a new tab that contains the function's script but the caret doesn't jump to the line with the function. In large scripts that renders this feature useless.

The Asset Inspector
1) I would suggest changing the default text in the search box from "Search..." to "Search Properties..." because "Search..." to me implies that you can also search the content of notes, scripts, shaders, etc. - which from my initial tests you can't.

2) To me the biggest value in the Inspector is a quick look at (and option to edit) the properties of an asset. Right now, the Inspector uses a large chunk of non-scrollable screen space at the top to show info on the asset and a preview of the asset (e.g. in Sequences and Tilesets):

inspector.png


Since the logical position for the Inspector is at the bottom of the Asset Browser - which already needs a lot of vertical space in the right sidebar - it is important that the Inspector shows the most imporant values in as little space as necessary. Right now, especially with Sequences and Tilesets (which, let's be honest, are the only asset types that show off the actual potential of the Inspector as of now) a large amount of non-scrollable space is used for aspects which I don't see the benefits of.
  • There's an editable textbox with the asset name - If I want to rename an asset I can do it directly in the Asset Browser (I admit, this is my weakest point).
  • There's an "Open Editor" button - If I want to open an asset I can do it directly from the Asset Browser (or various other ways).
  • There's a large "Asset Type" icon - which serves no real purpose (at least in the asset types available as of now, since I can see on first sight from the content of the Inspector (and the asset name), what type of asset I'm dealing with).
  • There's a non-scrollable preview of the graphics of the asset - Since this is non-editable (and rather small compared to the real editors) I don't see the need for it. If I want to look at or edit the graphics I will do it in the large editor.
My suggestion is this: Cut to the chase. Leave out the redundant stuff like the asset icon or the "Open Editor" button and simply show the name of the asset (keep that editable if you like). If you insist on including preview graphcis in the Inspector then please introduce tabs like "Properties", "Preview", "Editors", so that we save valuable vertical screen space in the sidebar.
 

Nocturne

Friendly Tyrant
Forum Staff
Admin
My suggestion is this: Cut to the chase. Leave out the redundant stuff like the asset icon or the "Open Editor" button and simply show the name of the asset (keep that editable if you like). If you insist on including preview graphcis in the Inspector then please introduce tabs like "Properties", "Preview", "Editors", so that we save valuable vertical screen space in the sidebar.
Have to say that I agree 100% with this. GMS2 already uses way more screen real-estate than it could, so if new features can minimise this then I would be grateful!
 

Mert

Member
Android KeyGeneration issue
keytool error: java.lang.Exception: Only one command is allowed: both -exportcert and -list were specified.
@Dan


java -version
java version "16.0.1" 2021-04-20
Java(TM) SE Runtime Environment (build 16.0.1+9-24)



Solved by hand : Android - 【Solved by hand】JDK not installed correctly at location entered in Android Platform settings | GameMaker Community (yoyogames.com)
That's a bug in 2.3.2 release and 2.3.3 beta
I thought only I had this issue. @Dan please take a look at this one.
 

Dan

GameMaker Staff
GameMaker Dev.
java -version
java version "16.0.1" 2021-04-20
Java(TM) SE Runtime Environment (build 16.0.1+9-24)
I thought only I had this issue.
Going by the Java version quoted above, you're not following our setup guide info and instead using the latest version of Oracle Java ;) This is something we documented quite a while back that you probably want to stop using, as Oracle Java has commercial-use licensing terms you're agreeing to when you download it.

We'll look into the issue a little bit (mostly just to confirm it here in case we need to add more to the setup guide), but we haven't seen any issues internally with this and I strongly suspect you can fix the issue straight away in your 2.3.2 and 2.3.3 Beta installs by using the OpenJDK which ships with Android Studio and is the one Google recommends you use: https://help.yoyogames.com/hc/en-us/articles/115001368727-Setting-Up-For-Android
 

Mert

Member
Going by the Java version quoted above, you're not following our setup guide info and instead using the latest version of Oracle Java ;) This is something we documented quite a while back that you probably want to stop using, as Oracle Java has commercial-use licensing terms you're agreeing to when you download it.

We'll look into the issue a little bit (mostly just to confirm it here in case we need to add more to the setup guide), but we haven't seen any issues internally with this and I strongly suspect you can fix the issue straight away in your 2.3.2 and 2.3.3 Beta installs by using the OpenJDK which ships with Android Studio and is the one Google recommends you use: https://help.yoyogames.com/hc/en-us/articles/115001368727-Setting-Up-For-Android
My English confuses me sometimes, but I do use the JDK that comes with the Android Studio, not the Oracle's JDK. I exactly followed the documentation on the help page.
Also my computer is fresh new, and the first thing I installed is Game Maker Studio so I'm pretty sure I'm not mixing it with anything else.

When I click the "Show Hash Key" on Platform Settings, I get this message

re.jpg

Rich (BB code):
..............z4= //It shows the Hash Key in the log
..
..
keytool error: java.lang.Exception: Only one command is allowed: both -exportcert and -list were specified.
elapsed time 00:00:00.2145894s for command "C:\Program Files\Android\Android Studio\jre\bin/keytool.exe" -exportcert -keystore "C:\Users\marty\.......\keystore.keystore" -alias "imhidingthis" -storepass "imhidingthis" -list -v  started at 06/04/2021 12:06:49
Edit : Importing the previous keystore file gives the same result. Also the KEy Hash (SHA1) area is empty
 

FoxyOfJungle

Kazan Games
I just did a test compiling for Android on YYC using the latest beta version and the same SDK, JDK and NDK as when I was using the last version released and it worked fine:







Output:

I just needed to import the keystore using the username and password.
 

Zhanghua

Member
I change the Android Studio's JRE11 version, the same issue happened with the " keytool error: java.lang.Exception: Only one command is allowed: both -exportcert and -list were specified. "

The issue resoled by hand to generate the keystore. Android - 【Solved by hand】JDK not installed correctly at location entered in Android Platform settings | GameMaker Community (yoyogames.com)

I'll follow you guide and try again, Thank you for your reply.



Going by the Java version quoted above, you're not following our setup guide info and instead using the latest version of Oracle Java ;) This is something we documented quite a while back that you probably want to stop using, as Oracle Java has commercial-use licensing terms you're agreeing to when you download it.

We'll look into the issue a little bit (mostly just to confirm it here in case we need to add more to the setup guide), but we haven't seen any issues internally with this and I strongly suspect you can fix the issue straight away in your 2.3.2 and 2.3.3 Beta installs by using the OpenJDK which ships with Android Studio and is the one Google recommends you use: https://help.yoyogames.com/hc/en-us/articles/115001368727-Setting-Up-For-Android
 
Last edited:

Zhanghua

Member
I just did a test compiling for Android on YYC using the latest beta version and the same SDK, JDK and NDK as when I was using the last version released and it worked fine:







Output:

I just needed to import the keystore using the username and password.
My Android Studio version is the newest 4.2.1 which using openjdk11 and notice that the version in the guide is V4.1 which using openjdk8.

C:\Users\Admin>D:\Android\jre\bin\java -version
openjdk version "11.0.8" 2020-07-14
OpenJDK Runtime Environment (build 11.0.8+10-b944.6842174)
OpenJDK 64-Bit Server VM (build 11.0.8+10-b944.6842174, mixed mode)

@Dan


1622801261091.png
 
Last edited:

COWCAT

Member
Wow, my project now compiles in 11 seconds instead of 19 !!
GMS 2.3.2 made no difference at all on that side for my project but this time it's really better! Super pleased by this and I'll look forward to the stable release :)

It may not seem much but when you compile 50-100 times a day to check changes or fix bugs... that's life changing ^^'
 

Zhanghua

Member
Yes again, When I change to the AS4.1.3 whose JAVA_TOOL version is OPEBJDK8, that's normal.
 
Last edited:

Ricardo

Member
First time I install a Beta and my project (which is fairly big and complicated) runs just fine. No bugs, no weird behavior at all. I'm impressed and excited for the 2.3.3 stable release!
 

gnysek

Member
I would love to see possibility to put inspector aside of resource tree (so between it and workspace) to have 3-columns layout. Something like this:

1622905629134.png


Also I've reported two bugs, bug they aren't connected to 2.3.3 changes, but general bugs (and not crashing games), so I'm not mentioning them here - 2.3.3 stuff looks to work OK as for now.
 

drandula

Member
(Bug report sent)

I have encountered a bug which causes beta GMS2.3.3 IDE disappear on certain project. GMS itself seems to be running, but you cannot focus the window and it isn't visible, also you cannot close this GMS window. You can end GMS only with Task Manager.
This renders project unusable, as you cannot access IDE after trying to open the project.

Here is video, use subtitles to see explanation of bug behaviour

How I encountered the bug:
  • I had GMS2.3.3 open with project, which now causes the problem
    • Had two windows in two separate monitors.
    • Only this one project was open, both windows showing different resources
  • I close computer using Start-menu.
    • I didn't close GMS manually, but let computer close all programs automatically
    • Later I open computer and GMS2.3.3, start menu looks normal
  • I try to open project, only one of two windows is visible
    • Secondary window behaves normally and can be seen and be accessed
    • Primary window behaves like in the example video -> cannot be closed or focused, and isn't visible
    • As I have secondary window open for project, I try to reset layout, and some other thing. I cannot access primary window.
  • I force close GMS with Task Manager and reopen the project, problem persist
  • I try some other things, and also close secondary window. Nothing helps and then I force GMS down with Task Manager
  • I try reopen project
    • Problem with primary window persist, cannot be accessed.
    • As I closed secondary window in previous session, only primary window is open and no more windows cannot be opened.
As you cannot access primary window, you cannot access IDE at all with this project anymore.

Only thing I find plausible creator of the problem is computer automatically closing IDE, which did some wonky things. After this IDE hasn't opened correctly for project, rendering it unusable.

I'll write back bug report later, I'll try recreate birth of problem with another project after sleep.

Edit 1. I still haven't managed to reproduce the cause of problem. I found that GMS2.3.2 can open the project, but GMS2.3.3 beta cannot.

Edit 2.
  • Opening GMS2.3.2, saving and trying to open with GMS2.3.3 doesn't do anything to problem
  • Exporting buggy 2.3.3 project with 2.3.2 works, which then can be imported back to beta 2.3.3, having "fixed" the problem
  • So I would conclude that something in original project directory maybe is causing GMS beta to work incorrectly
Edit 3. Tested reinstalling GMS2.3.3 beta, didn't help. Also I tried change project GUID and reset layout etc. in GMS2.3.2 and then open project in GMS2.3.3, didn't do anything.
Edit 4. Bug report sent. If I copy project files and try open the project, problem persist.
Edit 5. Found out that editing filename from .yyp fixes the problem.
 
Last edited:
D

Deleted member 16767

Guest
gif_open() does not let you choose color of the background (it is written in the manual that you can choose color) if the background is transparent. I've read that the background can not be recorded in a gif as transparent, but why not let us choose a color to be transparent for it?
 

basementApe

Member
I'm getting something odd after upgrading from 2.2.5 to 2.3.2 and then 2.3.3.

Some functions with @param lists will show the wrong parameters in the editor.

This...
GML:
function draw_sprite_blend(argument0, argument1, argument2, argument3, argument4, argument5, argument6, argument7, argument8) {
    /// @param sprite
    /// @param subimg
    /// @param x
    /// @param y
    /// @param xscale
    /// @param yscale
    /// @param rot
    /// @param col
    /// @param alpha

    var _sprite = argument0;
    var _frame = argument1;
    var _x = argument2;
    var _y = argument3;
    var _scale_x = argument4;
    var _scale_y = argument5;
    var _rot = argument6;
    var _col = argument7;
    var _alpha = argument8;

    // disable alpha temporarily
    gpu_set_colorwriteenable(true, true, true, false);
    // draw sprite
    draw_sprite_ext(_sprite, _frame, _x, _y, _scale_x, _scale_y, _rot, _col, _alpha);
    // re-enable alpha when finished drawing
    gpu_set_colorwriteenable(true, true, true, true);
}
... will have auto-complete display a completely different set of parameters when typing in the code editor, as well as in the bottom bar:

paramBug.png
 

Nocturne

Friendly Tyrant
Forum Staff
Admin
Some functions with @param lists will show the wrong parameters in the editor.
Afaik, you'll need to properly define the function so that the editor knows what params it should use. I'd guess it's just using ALL the parameters that you may have in scripts or something. Essentially just add the JSDoc @function definition at the top.
 

basementApe

Member
I added /// @function above the parameters and tried to move them all outside the function itself but no luck. This worked fine in 2.2.5 though and for some reason it works for other functions in my code even though the syntax is exactly the same as far as I can tell.
 

Posh Indie

That Guy
Am I the only one that cannot see the IDE Release Notes anymore? Runtime Release Notes work fine, but no matter what I do to view the IDE Release Notes it just says, "Older versions" with a little drop down arrow next to it. Clicking it rotates it, but shows nothing.

Update: Looks like it just does not like mobile for some reason.
 
Last edited:

drandula

Member
When I am trying to compile project with YYC, I get these error messages for several assets (not only scripts).
1623145535364.png

VM works.
 
D

Deleted User

Guest
This topic is for the discussion of issues relating to the update of GameMaker Studio 2. However, this does not replace our normal bug reporting system and you should report all bugs as normal using https://accounts.yoyogames.com/contact-us

As ever, PLEASE check the Required SDKs FAQ before/during updating and ensure your antivirus/OS permissions are correct after you do the new install - User Permissions and Internet Access Required by GMS2 - before you submit any bug reports or post issues here.

You should post here if:
  • Something has changed between the previous version and this one, breaking your game (i.e.: code that worked previously now does not)
  • Something reported as fixed in the release notes is not actually fixed
  • You are having IDE or system issues related to something new in this update
  • You are having issues with new features introduced in this version
  • You are having issues updating to this version
  • Everything works and you want to tell us we are great (seriously, let us know if it all works correctly for you)
When reporting issues to the Helpdesk, please try to add as much information as possible, for example:
  • If the issue is with the IDE, then please give a screenshot if you can to help illustrate the problem
  • If there are error windows, then a link to the "ui.log" file found via the "Open Log in ..." Help menu command inside GMS2
  • If it is a code issue, then link to or attach a YYZ showing the most basic project possible which exhibits the behaviour
  • If you receive any error dialogues, please screenshot them
  • If it is a system issue (like compiling to a specific target) then please provide details of the PC being used as well as the software versions involved
Again: posting a comment in these release threads is not a replacement for filing a bug!


Release Notes

Runtime Release Notes


Note that
the English beta manual is uploaded (although right now it needs our Web guys to flush the cache to fix searching - I will remove this bit when it is fixed) and will be kept up-to-date each Beta release, but that other languages won't be released until much later in the Beta period.


Initial Release - IDE v23.1.1.290 Runtime v23.1.1.290 (Jun 03, 2021)


Please see the release notes above and enjoy...


is there a way to add confirmation of saving changes of assets when closing asset editors?

for example:
when i close code editor, it would be nice if it asked "do you want to save the changes? save\discard"
 

kburkhart84

Firehammer Games
GML:
... will have auto-complete display a completely different set of parameters when typing in the code editor, as well as in the bottom bar:
As far as I know, now that functions can have named arguments(as of 2.3), you need to actually name them to get the auto-complete to work. It has been working for me like that just fine. However, I've also learned that if you use the argument[] array(meaning you likely have optional arguments), then the code editor will just supply an ellipsis, and switch to using the jsdoc. I'm using that to show the default values for optional arguments, so my auto-complete actually shows something like _optArg=10 for them.
 
So now you can have default arguments for functions, yay! I'll install beta soon :)

Just a thought as I didn't notice from release notes, can you force default arguments when calling? Something like:
GML:
// CreatePlayer(myLives = 3, myHealth = 100, myWeapon = "Dagger")
CreatePlayer(default, default, “Sword”);
CreatePlayer(default, 200); // Same as: CreatePlayer(default, 200, default);
My C#-trained brain hopes not, because it already associates "default" with a default value of a specific struct/class. That, or a switch/case. Using it as arguments to mean "use default argument value in this place" would make it a little messy to me.

Instead, I prefer a syntax with arguments naming, like CreatePlayer(myWeapon = "Sword") or CreatePlayer(myWeapon: "Sword") (the latter is very C#-like, I admit).
Still, just having default arguments is already a nice bonus, though myself I'll probably wait until the stable release, myself.
The keyword 'undefined' seems to work as you want. So, this works...
GML:
// CreatePlayer(myLives = 3, myHealth = 100, myWeapon = "Dagger")
CreatePlayer(undefined, undefined, “Sword”);
CreatePlayer(undefined, 200); // Same as: CreatePlayer(default, 200, default);
I've been using a modified version of some code @FrostyCat posted to merge structs:
GML:
function struct_merge(_target, _source, _must_exist) {
    if (!is_struct(_source)) {return _target;}
    if (!is_struct(_target)) {_target = {};}

    var _keys = variable_struct_get_names(_source),
        _size = array_length(_keys);

    for (var _i = 0; _i < _size; ++_i) {
        var _key    = _keys[_i],
            _val    = _source[$ _key],
            _exists = variable_struct_exists(_target, _key);

        //prevent source from making new vars in target
        if (_must_exist && !_exists) {continue;}

        //recurse if we find a struct
        if (is_struct(_val) && _exists) {
            _val = struct_merge(
                _target[$ _key], _val, _must_exist
            );
        }
       
        _target[$ _key] = _val;
    }
   
    return _target;
}
...which lets me do stuff like this:
GML:
function Enemy(_args) constructor {
    hitpoints = 1;
    weapon    = "None";
    damage    = 1;

    struct_merge(self, _args);
   
    static Ability = function() {}
   
    static Attack = function(_target) {
        _target.Get_Hit(damage);
        Ability(self, _target);
    }
}

//set a bunch of stuff including methods in here
enemy = new Enemy({
    hitpoints: 100,
    weapon:    "Sword",
    damage:    10,
    bonus_dmg: 50,

    Ability: function(_self, _target) {
        with (_self) {
            _target.Get_Hit(bonus_dmg);
        }
    }
});

//or if you have some args you know will be needed but just want extra optional tweaks:
///@func Button(text, [ centered | padding | border | color ])
function Button(_text, _args) constructor {
    text     = _text;
    centered = false;
    padding  = 0;
    border   = 1;
    color    = c_blue;

    struct_merge(self, _args);
}

button1 = new Button("Boring Button", {color: c_red;});

button2 = new Button("Cool Button", {
    centered: true,
    padding:  30,
    border:   10,
    color:    c_lime,
    On_Click: function() {
        //do cool stuff
    }
});

//or have data from a user's file merge over default data (like PWADs overwriting IWADs in DOOM)
function Settings() constructor {
    data = {
        fullscreen: true,
        graphics:   "high",
        volume:     10
    };

    var _user_prefs = //get saved settings struct from a json file
    struct_merge(data, _user_prefs, true);
}

//also you can duplicate a struct with it easy:
var _struct2 = struct_merge({}, _struct1);
It's pretty awesome lol Then you don't have to worry about having a specific number of arguments in a specific order...you can just put the vars you need in whatever order or add new ones etc and the constructor can have defaults. Lots of little convenient tricks you can do with it!
... will have auto-complete display a completely different set of parameters when typing in the code editor, as well as in the bottom bar:
Came here to post this one lol I was like "wait has it always been like this and I'm just tired??"
 
Last edited:

xDGameStudios

GameMaker Staff
GameMaker Dev.
I added /// @function above the parameters and tried to move them all outside the function itself but no luck. This worked fine in 2.2.5 though and for some reason it works for other functions in my code even though the syntax is exactly the same as far as I can tell.
as far as I know the JSDoc setup is:

GML:
/// @function my_func(p1, p2, p3)
/// @param p1
/// @param p2
/// @param p3
function my_func() {
// code here!!
}
SO first you use the JSDoc and then write the function... @param definitions should be outside the function.
 

basementApe

Member
I found the problem. This had ended up in a script with a different function somehow:

/// @function draw_sprite_blend(sprite, subimg, etc...)
/// @param sprite
etc..
 

zhuoz

Member
I see that the sprite_get_info() struct includes the texture page ID! Thank you, great and merciful YYG. 🙏
 

gnysek

Member
https://help.yoyogames.com/hc/en-us/articles/231719448-RoadMap Roadmap was updated, and OpenTK -> SDL change for rendering IDE will be in 2.3.4. So performance of IDE shouldn't change a lot in 2.3.3 (except of those changes they already mentioned).

I'm however surprised, that asset inspector shows, that it will be also available for objects, as from what I see it's not included in current beta. It's a mistake, or it will come in second beta? Release notes says, that others won't come for 2.3.3, and objects are one of most complex, so I thought they indeed aren't yet coming.
 

kroart

Member
Did YYG had explained why they switching to SDL? Why OpenTK does not fit their needs? I'm just curious.
 
Last edited:

gnysek

Member
OK, my squirrel confirmed, and as it's mentioned in roadmap and it's not a mystery, Objects will also be visible in assets Inspector for 2.3.3, which seems to be ahead of their plan! Second beta should follow soon, but I have no idea when :squirrel:
 

rwkay

GameMaker Staff
GameMaker Dev.
Did YYG had explained why they switching to SDL? Why OpenTK does not fit their needs? I'm just curious.
We were on an older version of OpenTK that was not being updated, it was falling behind on OS support (badly on macOS) and OpenGL is now deprecated on mac in any case (we are starting to see driver issues across most platforms as vendors are no longer prioritising OpenGL support). Newer versions of OpenTK use SDL2 as well, we decided we had no need for OpenTK and we will use SDL2 directly and switch to a different rendering system (you will see this in 2.3.4).

Russell
 

gnysek

Member
I hope that mean progress for Linux IDE too ;) I've got a feeling that if OpenTK got some issues on macOS, then it might cause same issues on Linux, as they are both closer together than Windows.
 

Dan

GameMaker Staff
GameMaker Dev.
Beta 2 is now rolling out - IDE v23.1.1.300 Runtime v23.1.1.297

Mac IDE users, there is an issue with our webserver updating the feeds properly, so you won't get an update notification just now (we will fix this soon, but it may be tomorrow before you would see a prompt). If you do want to jump on the new version asap, then please just download it from https://gms.yoyogames.com/GameMakerStudio2-23.1.1.300.pkg or the release notes page.

A small stack of fixes have been made (and the Inspector for Objects was indeed added), so please see the release notes for these. The English manual is currently uploading, so this should finally fix the search being broken.

We have confirmed the Android Studio 4.2 issue, and so this is being fixed soon. However, for now our advice remains to use Android Studio 4.1, as you would need this version for 2.3.2 anyway.
 

Dan

GameMaker Staff
GameMaker Dev.
When I am trying to compile project with YYC, I get these error messages for several assets (not only scripts). View attachment 40466
VM works.
Please check if Beta 2 has fixed it and, if not (and If you haven't already) please submit a ticket with that project (or a cut-down sample which still shows the issue) and we will look into this. Thanks.
 
Status
Not open for further replies.
Top