Will doPlease file a bug in the Helpdesk forum for the beta.
I think that is what threw me off with the instance vs struct variables - if you use built-in variable names liketoo bad the autocompletion is not as good right now.
x
and y
in a struct they are still syntax-highlighted as if they were the built-in instance variables - which lead me to believe that they are overwritten.Sounds like a bug to me...wouldn't be surprised if its already been reported though.I think that is what threw me off with the instance vs struct variables - if you use built-in variable names likex
andy
in a struct they are still syntax-highlighted as if they were the built-in instance variables - which lead me to believe that they are overwritten.
Should this be considered a bug?
I would think that would be enough to make it happen. In fact, they have internal builds they seem to be using, so the bug may have already been fixed. Its a good idea to add comments to previous bug reports though as they can see it affects more people, how urgent it is, and if nothing else they can confirm they already fixed but haven't released a build with the fix(if that's the case). I think that's better than you making a new topic for the same bug, as that wastes time, and moreso if they don't catch the fact that it is a duplicate right away.And one more question for @Nocturne: I've stumbled across a bug and found out that it has been filed four month ago. I've added a comment to that original post, saying that the bug still exists and attached an example project. Is this enough to make the issue visible to the QA team?
That should be more than enough, thank you!And one more question for @Nocturne: I've stumbled across a bug and found out that it has been filed four month ago. I've added a comment to that original post, saying that the bug still exists and attached an example project. Is this enough to make the issue visible to the QA team?
Thanks, so let's say iterating the variables of a structure is more expensive than iterating directly an array or (perhaps better still) a data structure?Hey welcome! I'm not italian, but I do speak italian, so... benvenuto!
I have no answer for your about the double ticket, but I can answer the second question. You can definitely iterate the variables of a struct using the variable_struct_* functions. You can for example get a list of variables as an array of strings using variable_struct_get_names or a single one using variable_struct_get, as well as setting them from a string with variable_struct_set.
Note though that those functions are known to be slower than accessing the variable directly.
Let me answer my own question by quoting the devs comment on the same issue from the Beta forums around three months ago:I think that is what threw me off with the instance vs struct variables - if you use built-in variable names likex
andy
in a struct they are still syntax-highlighted as if they were the built-in instance variables - which lead me to believe that they are overwritten. Should this be considered a bug?
So unfortunately it looks like the syntax highlighting will be a bit misleading when using built-in variable names in structs.Unfortunately due to the nature of GML then structs and instances are indistinguishable as there is no type associated with them (and currently the flow of types is not tracked in the IDE syntax checker) so it cannot tell that a struct is not an instance - so currently 'special' names are highlighted as such (x is a builtin instance variable, but the syntax checker does not know that the variable 'foo' is not an instance at this point so it colours x as an instance variable).
I can assure you it won't be me because I personally don't like JSsoooo, who's gonna be the first person to write a full ES6 to 2.3.0 GML transpiler?
wouldn't you say this update is a big step in GML becoming more js-like? (es6 specifically)I can assure you it won't be me because I personally don't like JS
It is more JS-like, yes. And it is still a major improvement to GML. But I still generally dislike JSwouldn't you say this update is a big step in GML becoming more js-like? (es6 specifically)
Oh, yeah, it's the well known problem of not using the correct section to report a problem. If it's with GMS2.3, post it on its dedicated forum. And if its not, scroll a few sections down on this forum.Gamemaker autosaves then shuts it's self down? (windows 10 current version)
WARNING: After this, you can not compile your game on windows without a reinstall
I just did this today and I have to do it again to compile the work on a game.
It happens while you are editing or clicking on buttons in the software.
Things like adding a background, editing a room with sprites, or editing an object.
It seems to happen randomly and for no reason.
It knows it has had a failure and autosaves most times, but forgets how to compile.
I have tried different versions of 1.4 and this occurs on them as well.
Anyone have any ideas as to why this happens or how to fix the compiling issue afterward?
Loved every minute of it, thank you.Btw guys, do check out my new video on Structs & Constructors in 2.3:
An ETA hasn't been provided just yet. I wonder how long restricted betas usually go for.so when is this getting out
it's usually as long as it takes for a sufficient amount of bugs to be squashed, once it's only minorly broken then i'd imagine we'd get our hands on it.An ETA hasn't been provided just yet. I wonder how long restricted betas usually go for.
How to call the same name function of parent?Btw guys, do check out my new video on Structs & Constructors in 2.3:
function animal() constructor
{
static talk = function()
{
show_debug_message( "1" );
}
};
function human() : animal() constructor
{
static animal_talk = talk;
static talk = function()
{
animal_talk();
show_debug_message( "2" );
}
};
function jess() : human() constructor
{
static human_talk = talk;
static talk = function()
{
human_talk();
show_debug_message( "3" );
}
};
If the function you are creating is going to be the same all over, there isn't any reason I know of to not make it static.I have a few questions about how static variables/functions work in GML:
Is there a reason to not use the static keyword for all functions inside of constructor functions?
Is there a reason to not use static for any non-constructor functions?
Is it possible to create a static constructor function, and if so, how does that work?
Apologies if the answers to these questions are obvious.
I don't think there is a built-in way to do it. You are likely going to have to store them in a list or array. That said, you could possibly make static array variable, and for each one you make, have it add itself to that array(or you could use a list). I think you could also use a global variable array/list instead. Then, either way, that list is automatically created every time you create one of these structs. You could also make your own function that would be like a "destructor" that you just have to remember to call before you call delete(or the variable goes out of scope).And I would like to add another question:
What is the proper way to iterate through all "copies" of a struct? I tried using a "with" statement but that doesn't seem to work.
Do I have to put all of the references into an array and then iterate through the array or is there a built-in method?
Thank you for bringing up the idea of a static array variable / list. I will try that tomorrow.I don't think there is a built-in way to do it. You are likely going to have to store them in a list or array. That said, you could possibly make static array variable, ...
li_elements
:
ds_list_add(other.li_elements, self);
other
and self
in structs? So I'm unsure whether this would actually be considered valid syntax.self
into that array in order to later access it again, right?Yup, you would need "self" in that case...I'm not sure why you wouldn't want to use it or why they would say to stay away from "other" and "self." They have there place. maybe since they are less useful in structs they say to avoid them since many people will not know how to use them. But in this case, its a good way to go.Thank you for bringing up the idea of a static array variable / list. I will try that tomorrow.
So far I have used the following line of code (which assumes that the instance that creates the structs has a ds_list calledli_elements
:It seems to work. However, someone posted a bit further up, that you should try and stay away from keywords likeGML:ds_list_add(other.li_elements, self);
other
andself
in structs? So I'm unsure whether this would actually be considered valid syntax.
Anyway, I like the idea of a self-contained system where the structs manage their own array / list!
Still, I would have to writeself
into that array in order to later access it again, right?
for the time being you will have clutter... I made a detailed suggestion on this topic (code completion) in the closed beta forum and as far as I was told it will be addressed in future releases.. but the first 2.3 won't have that kind of (context based) auto-completiondo we have any update on where we currently are with the 2.3 beta as it is?
are the bug fixes going smoothly, tickets still being addressed right now, etc?
any estimate on when we might hear the next 'big' news?
it'd be nice to hear about the current state of things, even if just to tide us over for the time being.
side question for those who do have 2.3: if you reference a struct, does code completion show you the variables within the scope of the struct like how an enum would, or do you need to remember the variable names when doing so?
it's always kind of bothered me how the code completion includes a bunch of variables from different objects, and i'm hoping structs don't add to the clutter when trying to reference a particular variable / function in 2.3.
example of what i mean ( note the 'clutter' from variables i haven't begun typing or even come close to referencing. an option to disable this or edit the scope of completion would be a blessing. ):
I am curious about what will Steam buyers do? I hope they don't forget.How to deploy the new version on steam? two versions? or two products?
It might be GMS3.0, a new softwareI am curious about what will Steam buyers do? I hope they don't forget.
they are not gods, relax. everybody need new ideasEDIT: Please don't give them ideas.
One year has passed since this reply was addressed to you:On this occasion, I don't like the Java stuff, because I ended up with GMS, because it is very easy to program. It all looks very complicated to me and if it gets complicated you can look for a better alternative right away. What I want to say is, it's nice that the professionals got a highlight and it's a pity that there are still many basic functions missing in GMS (slopes and tile collision for example).
Here you are STILL using the same "I-am-a-beginner" mantra to trash-talk the OOP additions, while other users of all skill levels are actively exploring it, including beginners. Good questions and answers about OOP techniques are being exchanged from all sides, so they're all learning while you are still here paralyzed by your feelings.How about instead of complaining about new features that are intended to make our lives easier, you take off your beginner’s hat and sit down for an hour to learn the features, and be happier in the long run? Instead of trying to stunt the growth of an engine for a majority of its users?
You talk like that you are going to be a beginner for years to come.
I gained access to the Beta a couple of days ago and posted a wave of bugs/suggestions in the night from Thursday to Friday. On Friday, however, it seems like nobody from the QA team was present on the forum. So far, none of the reports have been addressed. I'm looking forward to what happens today.do we have any update on where we currently are with the 2.3 beta as it is?
are the bug fixes going smoothly, tickets still being addressed right now, etc?
I think they get the weekend off.I gained access to the Beta a couple of days ago and posted a wave of bugs/suggestions in the night from Thursday to Friday. On Friday, however, it seems like nobody from the QA team was present on the forum. So far, none of the reports have been addressed. I'm looking forward to what happens today.
What are you talking about? I made an engine earlier this year specifically using tile collisions for slopes. GM having all the features in the world isn't going to help if you don't know how to use them.many basic functions missing in GMS (slopes and tile collision for example).
I have a hard time accepting thatI think they get the weekend off.
169278What number ticket were you?