OFFICIAL GMS 2.3.0 BETA ANNOUNCEMENT

Status
Not open for further replies.

FrostyCat

Redemption Seeker
That's because array_create takes the value to initialize the indexes to, and in your case you're setting it always to the same array (which is the result of the inner array_create call).
That I understand, but what I don't understand is the recursive array warning overwriting the actual content.

This is a recursive array:
GML:
var recursiveArray = [0, 0];
recursiveArray[1] = recursiveArray;
So is this:
GML:
var recursiveArray = [0, 0];
var recursivePartner = [1, 1];
recursiveArray[1] = recursivePartner;
recursivePartner[1] = recursiveArray;
In contrast, Erik Leppen's second try is NOT a recursive array:
GML:
var notRecursiveArray = array_create(10, array_create(10, 0));
Like you said, it's just an array being referenced 10 times from another array. There is no infinite recursion on serialization.

This kind of multiple inbound referencing happens all the time in direct-reference flyweights, and should not have triggered any errors. It is a genuine bug.
 
D

Deleted member 45063

Guest
That I understand, but what I don't understand is the recursive array warning overwriting the actual content.

This is a recursive array:
GML:
var recursiveArray = [0, 0];
recursiveArray[1] = recursiveArray;
So is this:
GML:
var recursiveArray = [0, 0];
var recursivePartner = [1, 1];
recursiveArray[1] = recursivePartner;
recursivePartner[1] = recursiveArray;
In contrast, Erik Leppen's second try is NOT a recursive array:
GML:
var notRecursiveArray = array_create(10, array_create(10, 0));
Like you said, it's just an array being referenced 10 times from another array. There is no infinite recursion on serialization.

This kind of multiple inbound referencing happens all the time in direct-reference flyweights, and should not have triggered any errors. It is a genuine bug.
Yes, it isn't strictly a recursive array, my guess would be that GM bails out on printing an array if it already printed it before as there is the potential for recursiveness. However I'm not in a Windows machine currently to actually test that hypothesis.
 

kupo15

Member
Just double checking, when they say this is a separate install that means that it is acting like a brand new program and won't interfere with pre 2.3 GM 2 at all right? As in, the only way to continue working on projects is to import them into 2.3 like we did between 1.4>2.0? I have some smaller projects I'd be happy to import and work on in 2.3 but one big major one I'd rather not touch until 2.3 is in Stable version.
 

Cameron

Member
Just double checking, when they say this is a separate install that means that it is acting like a brand new program and won't interfere with pre 2.3 GM 2 at all right? As in, the only way to continue working on projects is to import them into 2.3 like we did between 1.4>2.0? I have some smaller projects I'd be happy to import and work on in 2.3 but one big major one I'd rather not touch until 2.3 is in Stable version.
Yeah you can almost think of it like GMS 3
 

Erik Leppen

Member
@kupo15 As far as I can see, I have two separate, non-interfering applications; GameMaker Studio 2 and GameMaker Studio 2 Beta. When I open the "stable", I see my game projects, when I open the "beta" I see only my 2.3 test project. As far as I can see, they do not interfere. The only overlap is which program Windows has associated with .yyp files (so which of the 2 opens when you double click a .yyp file). I don't know how other OSes handle this, but I assume it's similar.
 
J

Jengamon

Guest
Is anyone else getting weird debugger behavior? I can run my project with the play button just fine, but when I try to run it from the Debug button, it just doesn't even show up.
 

Ednei

Member
The conversion of my old project to 2.3 beta was perfect. It's working perfectly.
Is there a forum thread for reporting bugs in this beta?
 

FrostyCat

Redemption Seeker
It appears the beta forum is getting stricter about having to provide a sample now, just got 3 emails this morning about that.

For those of you who want an easier time making samples without cluttering your workspace directory, here's a tool that can help: Scratchpad template for GMS 2.3 beta

Once you've downloaded and extracted the zip file, edit the scratchpad project to match your preferred starting state (e.g. API setups, extensions, room structure, etc.). Then create a link to C:\Windows\System32\cscript.exe <extracted path>\_scratchpad\scratchpad.vbs with Run: Minimized. Then you can create temporary projects that will delete themselves unless you re-save elsewhere.

For more details, see the originals for standard GMS 2: Windows | Mac

Remember to update the scratchpad project after every IDE upgrade.
 

S_Kleer

Member
Hello.
Today I decided to conduct a stress test for lightweight objects and was unpleasantly surprised.
I thought that these objects will simplify the code and at the same time they will not be very memory intensive, but it turned out that this is not so...

With this code, my game starts consuming as much as 774.16 Mb of memory!
GML:
for (var i=0; i<1000; i++)
{
    for (var j=0; j<1000; j++)
    {
        var Tile = {
        sprite : s_hexagon,
        ind : 0
        };

        map[i, j] = Tile;
    }
}
At the same time, arrays consume 86 times less memory! (9.58 Mb)
GML:
for (var i=0; i<1000; i++)
{
    for (var j=0; j<1000; j++)
    {
        spr[i, j] = s_hexagon;
        ind[i, j] = 0;
    }
}
What am I doing wrong? The more variables I add to the structure, the more memory is consumed ...
Or do I just not understand the meaning of lightweight objects?
 
D

Deleted member 45063

Guest
Hello.
Today I decided to conduct a stress test for lightweight objects and was unpleasantly surprised.
I thought that these objects will simplify the code and at the same time they will not be very memory intensive, but it turned out that this is not so...

With this code, my game starts consuming as much as 774.16 Mb of memory!
GML:
for (var i=0; i<1000; i++)
{
    for (var j=0; j<1000; j++)
    {
        var Tile = {
        sprite : s_hexagon,
        ind : 0
        };

        map[i, j] = Tile;
    }
}
At the same time, arrays consume 86 times less memory! (9.58 Mb)
GML:
for (var i=0; i<1000; i++)
{
    for (var j=0; j<1000; j++)
    {
        spr[i, j] = s_hexagon;
        ind[i, j] = 0;
    }
}
What am I doing wrong? The more variables I add to the structure, the more memory is consumed ...
Or do I just not understand the meaning of lightweight objects?
Do the same but with a constructor function instead of an anonymous structure and your memory usage will be MUCH better.

EDIT: I'm basing this on a test I did several weeks ago where I declared several thousands of anonymous structs as fields and I also got crazy amounts of memory usage, the reason being each anonymous struct created a hidden field in the object declaring the struct (since the variable actually only holds the reference to the struct), which you could see in the debugger. When I replaced it by a constructor function no extra hidden fields were declared in the object as the struct's metadata/structure/fields/whatever was already defined in one place, so the memory usage was much closer to the one I would expect.
 
Last edited by a moderator:

S_Kleer

Member
Do the same but with a constructor function instead of an anonymous structure and your memory usage will be MUCH better.
Yes. Now it uses 500 mb less.
And then it makes sense to use structures without a constructor?

P.S. As always, I solved my problem in a simpler and faster way using a tileset layer.
 
D

Deleted member 45063

Guest
Yes. Now it uses 500 mb less.
And then it makes sense to use structures without a constructor?

P.S. As always, I solved my problem in a simpler and faster way using a tileset layer.
The way I see it, if there is only going to be one instance of it, you can use an anonymous struct, if there is going to be more than one then I'd personally always go for the one with a constructor.
 

Dog Slobber

Member
I can't open the Manual.

Before reporting, could someone confirm whether the manual should be available from within 2.3 Beta, or if it's not available because it's still being developed.

Mac: 10.15.5
Beta IDE: v23.1.1.157
Safari Error:
Safari Can't Connect to the Server
Safari can't open the page "127.0.0.1:51290/index.htm" because Safari
can't connect to the server "127.0.0.1"
 

Nocturne

Friendly Tyrant
Forum Staff
Admin
Before reporting, could someone confirm whether the manual should be available from within 2.3 Beta, or if it's not available because it's still being developed.
It is still in development, but it is also bundled with the current beta (even in it's unfinished state) so we can catch issues before it goes stable. The IDE should open the manual from a local file in the default OS browser now, and not within the IDE as before, so if you're having issues, then yes, please file a bug report.
 

gnysek

Member
Do the same but with a constructor function instead of an anonymous structure and your memory usage will be MUCH better.
But 10MB vs 700MB? That's crazy, especially if it's assigned to array or ds_xxx ... there must be something wrong with one of tests. 10 MB looks really small for 1M records (1000x1000)...
 
D

Deleted member 45063

Guest
But 10MB vs 700MB? That's crazy, especially if it's assigned to array or ds_xxx ... there must be something wrong with one of tests. 10 MB looks really small for 1M records (1000x1000)...
Not really, if you consider 64-bit values (e.g. doubles) then 1M records would yield around 7.6 MiB of memory (or exactly 8 MB - 8000000 bytes). So 10 MB doesn't seem that far off to me since there will be overhead for the engine itself and other things like pointers, etc
 
Last edited by a moderator:

erayzesen

Member
Hi there. I was trying v2.3 and I finded a problem.

I want to change hp value of object in my "collided_objects" named ds list.
My original worked code is;
GML:
collided_objects[| i].hp-=5;
But it's not work in v2.3. Only it's working with this way in v2.3.
GML:
collided_objects[| i].hp=collided_objects[| i].hp-5;
So, is the problem using -=, += operators with ds list data? Anyway I wanted to share this with you.
 

Zhanghua

Member
Hi there. I was trying v2.3 and I finded a problem.

I want to change hp value of object in my "collided_objects" named ds list.
My original worked code is;
GML:
collided_objects[| i].hp-=5;
But it's not work in v2.3. Only it's working with this way in v2.3.
GML:
collided_objects[| i].hp=collided_objects[| i].hp-5;
So, is the problem using -=, += operators with ds list data? Anyway I wanted to share this with you.
This is a known issue and would be fixed
 

erayzesen

Member
This is a known issue and would be fixed
Well than.

So, I'm trying sequences. I want to stop the animation when I add a moment function in the sequence key frame. How can I do that?

My moment function is;
GML:
function sq_main_door_opened()
{
    show_debug_message("the door opened");
    layer_sequence_pause(self);
}
It gives an error if I use self. How can I get sequence id when I write moment function?
 

Erik Leppen

Member
This is actually pretty neat :D
script:
GML:
function Array_constructor () constructor {
    each = function (arr, func) {
        var len = array_length(arr);
        var resultarr = array_create(len);
        for (var ind = 0; ind < len; ind += 1) {
            resultarr[ind] = func(arr[ind]);
        }
        return resultarr;
    }
}
global.array_constructor = new Array_constructor();
#macro Array global.array_constructor
event code:
GML:
var testarr = [1, 2, 3];

show_debug_message(Array.each(testarr, sqr)); //[1, 4, 9]

show_debug_message(Array.each(testarr, function (n) {return n + 10;})); //[11, 12, 13]
 

erayzesen

Member
Hi all. How can I change depth of a sequence? I made a opener-closer door to my game with sequence, I'm controlling with an object it, everythings is ok. But the door depth is always higher than my player object.

Edit: I solved the problem with creating a low level layer. But I think the depth property must be for sequences in new version.
 
Last edited:

Dog Slobber

Member
I can't open the Manual.

Before reporting, could someone confirm whether the manual should be available from within 2.3 Beta, or if it's not available because it's still being developed.

Mac: 10.15.5
Beta IDE: v23.1.1.157
Safari Error:

It is still in development, but it is also bundled with the current beta (even in it's unfinished state) so we can catch issues before it goes stable. The IDE should open the manual from a local file in the default OS browser now, and not within the IDE as before, so if you're having issues, then yes, please file a bug report.
FYI,

Reply from development team, it's a known issue an and on the list.

TY
 

vortexvt

Member
Downloaded to try beta, but after login I get an error message "the selected runtime could not fully install" and retray button. If I press it, it again tries to install runtimes and shows the same error.
I tried to google, but did not find a solution.
 

TheMagician

Member
Downloaded to try beta, but after login I get an error message "the selected runtime could not fully install" and retray button. If I press it, it again tries to install runtimes and shows the same error.
I tried to google, but did not find a solution.
Same happened to me today. It seems like there is an issue with one of the files that needs to be downloaded during install.

Please write a support ticket for the issue so that Yoyo are made aware of the problem.
 

erayzesen

Member
Hi. I want to ask a question to Yoyo developer team; when the stable version will be available? (as an estimated time) It's important to me because I will think about moving my projects to v2.3. Thank you.
 

kburkhart84

Firehammer Games
Hi. I want to ask a question to Yoyo developer team; when the stable version will be available? (as an estimated time) It's important to me because I will think about moving my projects to v2.3. Thank you.
I'm not the Yoyo dev team...but I understand that we really can't count on a specific estimation for a time when it will be ready. I'm sure that's the official answer too.

That said...I see no reason you couldn't proceed to develop your projects in 2.3. Just make sure you are backing up more often, I'd say every time you do a couple hours(a session more or less) of development. Some people don't have many issues that they can't work around, but some people have lots more issues. I think it would be worth diving in and getting your projects set up though. Just make sure you don't delete the 2.2 version until 2.3 is stable, just in case something messes up and you want to go back to that point. Mainly, be aware that its a beta, and as long as you do what you should, you don't risk losing too much work at any given time. Just don't expect to be able to complain later if you do take the risk and lose work(which should be minimized as long as you are doing your backups consistently).
 
Ok I know we're in beta here... but...

I've converted my entities (The majority of my game's assets that are interactable) into structs, and my performance has gone down, as well as taking up more memory.
My game is like Spelunky. The objects (things that you can pick up/enemies/traps/treasure), are now structs.

40MB with structs, 32MB with objects.
How is this possible?

I really hate to sound complainy after you guys put so much work in this update, but was really expecting big boosts in performance and memory and it's had the opposite effect.

Edit: Turns out the structs haven't effected memory, it's just that 2.3 runtime is taking more memory. My direct conversion from 2.2 (still using objects) also takes 40MB. But I find it surprising that converting entities to structs, meaning getting rid of hundreds of running gm"objects" hasn't decreased it.
 
Last edited:

gnysek

Member
40MB with structs, 32MB with objects.
How is this possible?
Yeah, that was mentioned earlier, that structs seems not to be so "lightweight". Did you tried to use constructors instead of normal structs? Then name of variables aren't kept for each struct separately but shared, and they uses much much less space.

A good question in above case would be how many own variables you use in objects. If you used mostly build-in ones (like x, y, sprite_index) etc., that might be an anwser, as in that case objects will work same as constructors - built-in variables identifiers are shared among all objects, thus not using any memory. I mean, normal struct need to keep variable name and value, struct created by constructor keeps info about constructor and values, as variable names are shared. That's how I understand it, but this is something that need deeper testing in my opinion.
 
Then name of variables aren't kept for each struct separately but shared, and they uses much much less space.
Hmm, ok that is making a bit more sense. I use a "master" entity constructor, which has things like x,y, sprite stuff, collision stuff. (Vars that all entities have)
Then I have a giant switch-case function for each entity type, which gets an entity index passed in, and adds variables/components to the entity.

If something can take damage, I have a component (function) for that which adds health/regen/armor variables and adds a function in it's array of step updates. Then the game world loops through a list of all entities and runs their update functions. Probably a naive way of doing ECS, but I've been dealing with it for 6 years. I will try to work each entity to be a unique constructor and see where that takes me. It's just gonna be a lot of refactoring.
 

TheMagician

Member
Has anybody successfully installed a fresh version of the GMS 2.3 beta over the past 24 hours? I always run into the error message "the selected runtime could not fully install" when I start up GMS 2.3 for the first time.

Support tells me this is very likely a problem with my firewall configuration but I'm using the same machine(s) that I have used to run all of the previous versions of the beta so I doubt that it's a problem on my end.
 

erayzesen

Member
I'm not the Yoyo dev team...but I understand that we really can't count on a specific estimation for a time when it will be ready. I'm sure that's the official answer too.

That said...I see no reason you couldn't proceed to develop your projects in 2.3. Just make sure you are backing up more often, I'd say every time you do a couple hours(a session more or less) of development. Some people don't have many issues that they can't work around, but some people have lots more issues. I think it would be worth diving in and getting your projects set up though. Just make sure you don't delete the 2.2 version until 2.3 is stable, just in case something messes up and you want to go back to that point. Mainly, be aware that its a beta, and as long as you do what you should, you don't risk losing too much work at any given time. Just don't expect to be able to complain later if you do take the risk and lose work(which should be minimized as long as you are doing your backups consistently).
Thanks for the reply.

If I move my projects to v2.3, how can i solve problems about v2.3? I'm not in the beta program and this reason is scaring to me. We downloaded beta version and the interactions about new updated versions are closed now. So we can't get new update with this version now, if I'am wrong? :rolleyes:

So I need to know when will be available stable version of v2.3 for my projects?
 

kburkhart84

Firehammer Games
Thanks to reply. But I wonder, is the downloaded beta version being updated? For example; I saw some bugs in the version 2 days ago, the application crashes sometimes.
I understand they are still working on it...that's the whole point of a beta, test, fix, repeat, until its stable enough for a full release. I've been in since the closed beta and I think have seen 3 updates since then.
 

chmod777

Member
Care to share the line of code that is causing that?
It only happens in the HTML5 module (unless someone proves me wrong). To reproduce this issue, you must have a function in an extension that uses the same name as a method.
Eg:

Javascript extension:
GML:
function a() {}
Object 1:
GML:
self.a = function() {};
self.a(); // <- Compile error: "Houston we have a problem!"
 
I converted my project over and I am getting this error message:

Compile Errors:
Object: obj_camera_PreCreate at line 2: static can only be declared inside a function

I'm not using the word "static" in the object, nor in any other objects. Has anybody else run into this issue?
 

kburkhart84

Firehammer Games
You would need to show us what is actually on line 2 of that object's events. I don't think its the create event because it says "Pre-Create" so maybe it is instance creation?! Static may not be referring to a struct static variable in this case...it may be referring to a macro, or something else that the compiler itself is calling a static.
 
Oh nvm, I'm actually dumb. Pre-Create seems to refer to the Variables definition. I haven't used it since a big refactor of the project, but there was actually still one unused variable in there.
 

Ednei

Member
I converted my project over and I am getting this error message:

Compile Errors:
Object: obj_camera_PreCreate at line 2: static can only be declared inside a function

I'm not using the word "static" in the object, nor in any other objects. Has anybody else run into this issue?
When I converted my project to 2.3 for the first time, I had the same problem. In fact, my project had a variable called static. However, in this version it seems that there is also an internal function called static. Replaces all occurrences with the name staticx and solved the problem.
 
Status
Not open for further replies.
Top