New unified variables and variables declaration in GDevelop 5.4

@RMDB
You see you me or any1 do not need undeclared variables
We just need easier way to declare and remove declared variables
Or to be precise we need better variable management system
Because if your var would be declared on 1st time using it in condition/action
Most arguments in favor for not declaring vars would go away
IF removing all events which include that var would result in var being removed then we are even closer to lose argument in favor of having a way to not declare vars
I do not care if i need or if my var gets declared or not
I care what steps i need to take to properly use variable
Same as to what steps i need to take to not have that var in my project
And in the end if you think about it then that is also all you care about
We could adapt without a problem to new system if it would offer better management options

@insein
No one is arguing here technical benefit of vars being declared
Ppl who are against declaring every var do not want declaring go away
They want only choice between one or another or better system to manage it
IF argument is that when you use var in action engine do not know should it be scene local or global var
Then why not leave 3 buttons in variable window to select them as one or another?
Now engine will know and you are managing your var the moment you start to use it
And you are not need to go to different window to set something up to start using it
By pure logic of newbie
Program wants me to set something 1st before i start using it
Then why it is not letting me do in the window where i am starting to use it?
We are talking about just 3 options here/3 buttons or drop down menu with 3 positions
I am all in for your argument that our projects now get better structured cause we plan our vars and declare them
Yet again if i am just to help you or someone else by preparing some events and making screenshot out of it
Then i need each time declare these variables and delete them later so i do not litter my project
I do not need that variable to be declared if i gonna use it just to show/explain something
Yet with new system i am required to take some additional steps just to be able to do what i was doing before variable update
Declaring/deleting vars do not take hours it takes few secs
Yet i gonna need to do it every single time i want to test something for someone or show how to do something
Where at the same time i can copy existing variable like action/condition
And simply rename it to some undeclared variable and it will still work
So from my standpoint only some actions/conditions for me to using undeclared vars were removed yet i still can use them if i want to
But either way i am forced to make some additional steps
So even if i declare or not declare var and care to use it
I am required to sacrifice more time in doing so than before update

So i say lets think of a better system for declaring lets throw some ideas and see if we can find some solution
Cause right now you can give me 100 reasons why declaring is better and i can give you 100 reasons why having option not to declare vars is better
Yet we will be in same exact situation

But if we start giving ideas how to have better system we will start moving forward

Probably i have not explained well…english isn’t my main languiage…but my suggestion
is to restore the old conditions actions just as fake / bridge sentences.
In game option u can have an option to check if you want to see the full sentence.
eg:

i chose option show full sentence
i chose a condition:
if “scene” variable “myundeclaredvar” is set to 1
GD in background will declare that var in scene variable panel automatically (since it will know the type and the value)…as in the new system.

if full sentence option is unchecked it will show the new sentence
If variable “myundeclared” is set to 1.

variable will be declared in both methods.

Nah i do get you
But
1 - we are regressing from having 1 action/condition to having multiple
Where on other hand we still have separate for object and other vars
2 - I say having one action/condition is still less confusing for new users

That is why i offered option where in same exact window we change variable in action or check variable in condition we do all the choices

You do not need to look for other options since all options you could possibly want to select/choose are right there in your face

Look at it this way
You do not need to look for proper option on the left list
You can click whatever you want on the right side of window and see what will show up is it what you want and i say you have better view over what you did select

Maybe i am biased cause its my idea
But what i offer could work as you describe just without 3 separate actions/conditions on the left side of the window

And now let’s look at it this way
I do not want to declare variables
How many times i gonna set up these options before i start declaring them? So i do not need to set up these options over and over?
Yet if i am using var just to show something who needs help i can choose to not declare var and it will not be added to the list and so for purpose of that i can set up few options where in most cases i will just leave it with default values like number scene var and all i input is name and what i would normally select which is sign/operator and value

The problem is that they don’t want undeclared vars anymore…(for whatever reason).
with what i said above there are no undeclared anymore… but you can still write a sentence withot the needs to go in the panel or pop ups tho chose things

Because let’s face it they are right
We do not need undeclared vars
All we need is easier system to declare and remove declared vas
So how about let’s go other way around
Let’s go with auto declare when you use var
Yet you have option there to tag this var as temp var
Meaning that if all events for this var are deleted then var no longer exist in your project
It would be declared but as soon as you tagged it as Temporary var (there would be button for that) it would special icon to notify you its temp var for example some clock icon or whatever
You delete all actions/conditions including this var then it gets deleted from the list
Wouldn’t that be a solution?

Thaz indeed my suggestion…
but i don’t get you…wha’t the needs of a temporary var if it will be deleted anyway (even form the panel) when theare are no sentences?
prolly i have not understand well

Look do you really need undeclared variables
Or in some cases declaring variables just do not make sense?
Cause i say we do not care for being able not to declare vars
We care to just use them so who cares if they get declared or not?
So instead of opting in for not declaring them let’s opt in for auto declaring variables when using them which of course would involve more options in action/condition window
Yet if for whatever reason you do not need that variable in your list you just need it for a moment to show something with screenshot
You tag it as temp variable (you simply press button in that action/condition window) so after you delete all events with that var it gets delete from your project meaning it is not declared anymore

If that would pass i would question any need for variables to be not declared since i would find no use for them
Where key word here is auto declare
Process should be automated and then all arguments for them being not declared would go away
Or am i wrong?

1 Like

Right thaz what i said :smile:
i’m ok too for a temp tag if all sentences are removed
:handshake:

to sum up:

let’s just use old conditions action as a tool/option to autodeclare all vars in the new system

1 Like

btw as i was giving this a try i figured out why you cant have same name variables in Scene / Global and so on… its for expressions.

They removed the need to type Variable(myVariable) and GlobalVariable(myVariable), now you just type “myVariable”, and since you cant have multiples, the system knows if its a Scene, Global whatever…

This seems way better and quicker if it wasent for a few snags…

If you try to plan ahead and organize your variables in structures, you still get the mouth full of Structure.myVariable, if you plan ahead for saving all your variables to do a save system and put your variables into a single structure with structures in side to be organized, you still get Scene.Structure.myVariable

Which would kinda be ok, but now you have extra cliques, and i dont mean for declaring…

Before, you could type in an expression “Variable(myVariable)” and hit “Enter” to close the whole thing and move on, now you cant, pressing enter auto completes but dosent give you the “dots” or even close the prompt if your finished, you have to clique off which i find personally annoying.

I want to chime in as I keep seeing the same group of folks going in circles around this, and it feels like you’re just going to stress yourself out with the thought experiments.

4ian’s response here and other GDevelop company devs were pretty explicit that the old method isn’t going to come back, nor are they going to make the new method behave similarly to the old, nor would they enable some way to use both. At the most basic level, I get it, because it would mean they would need to maintain both methods in perpetuity.

It feels like this thread has lead to the folks going into a cyclical spiral of ways it could go back to that method. For your own peace of mind, you likely need to adjust your thinking and energy on how you can implement the new method in existing projects, finish up your existing projects on the old version and use the new method on the new method, or finish your projects in their current state then come back to do refactoring once you’re at a good stopping point.

I mention this because there was similar discourse when setting up timers changed, and the old method remains retired even a year later. Getting increasingly frustrated here is not going to get it closer to reverting, but just build more and more stress for yourself. This is not a directive or some kind of warning or anything, it’s literally me saying “you’re potentially giving yourself blood pressure issues by hoping for something that will not come to pass.”

3 Likes

Then why even open dialog? Might as well just gone “Put up and shut up”, harsh i know, but its basically what it is.

Why even entertain Zeroxs ideo on the new UI then?

Anyways, im over it, but i tell you this… now that im using the variable page more, i keep finding bugs on day one, how the heck as this been like this all this time?

If you gonna force people to declare variables you could at the very least have prepared the means to do so a bit better, made some QL to it, make it more appealing.

Honestly that stuff with pressing enter just closing the window just made me laugh, how the heck is that a thing that hasent been fixed?

I just found that if you drag stuff out of a structure than it breaks the error message and you dont get an updated event.

You have to clique twice to get off a variable most of the time in the Variable Page when putting in the name.

And so on…

Fine, changes are here to stay, cool, but it was a piss poor implementation and you cant argue that.

Should of really tested the “declaring variables” experience, or event using the whole thing in general, this kinda sucks, i tryed, i really really tried, it sucks man…

…and updating my project is honestly making not want to keep working.

So what you suggest?
I am biased against declaring everything
Yet i am not biased that old system needs to return
I just wish for getting better new system which will be streamlined
I try to explain to users here that not in all scenarios new system is better
Where i cannot deny new system having its advantages

So again what you would suggest us to do?
Give up on the matter? And i am not sarcastic this is a serious question
I mean i do not care for undeclared vars i care for better system than we have right now
And i believe in the end everyone would care more for better system rather than going back

Give up on going back to the old method/getting frustrated about it? Yes, I definitely think that ship has sailed.

Give up on giving feedback? No, definitely not. I think it’s totally valid to provide feedback on UX methods to make the current method better (as the current method). I think other threads you’ve made with other suggestions are totally valid. I think that’s the best place for people to focus their energy.

I personally think there is a dire need to have a one (or two) click solution to declare an undeclared variable from within an event (or expression) where you’re using something undeclared. I was originally going to make my own thread about it but a few folks have different recommendations on that already.

Again, I just wanted people to not further spiral into frustration for something that won’t come to pass, when they can either focus it on figuring out what’s needed to make the new method better (easy declaration) or to spend their energy on moving towards the new method.

2 Likes

I am not frustrated old system is gone
I just wish that new system gets streamlined
I am aware we are in transition state so i do expect this can’t be smooth change
And i was more of a asking is showing other users other side of the story that in some scenarios new system is not superior to old one not the way to go
Which apparently you meant is not

But then what is left is only to come with other ideas that many users already proposed
YET you are longer here than me for sure i would be curious for your idea
You say other users did recommendations already some different ideas so you did not
Yet you as someone who have much longer experience using gdevelop i say should share his ideas
IDK how gdevelop changed over they years i seen some screenshots
Yet i would care to see what users with longer “usage” have to say when it comes to how they would make new system better

Im deleting this one because this time was my bad, the issue i was having was because i was using an external event page, and since i never declare scene variables.

For some reason i assumed the scene variables i had on the scene attached to the external events would translate to the scene i linked it tho… would be a cool feature, but not how it works, so my bad…

I also learned that the new variable actions do not created variables like the old ones… which is a shame but guess thats the point.

What @Silver-Streak says is the same as what I think. I don’t think the old system will return. The idea would be to propose something to easily migrate projects made with the previous system to the new system. Therefore I have proposed the following.

I don’t see any point in expressing over and over again how good it is to declare the variables beforehand or how bad it is. I think everyone already understands that for each particular case one is better than the other. The question is whether this change can improve the performance of games made with Gdevelop in the future, as 4ian’s mentioned

In that case, I think there would be no further discussion.

1 Like

Well insein I have to retract my previous reply to you. I hated the idea of the change but tonight I had time to play with the new system and I’m really enjoying it.

It’s not at all what I thought it would be (time consuming, hard to refactor, restrictive, have to adjust to a new workflow). Since all my declared variables have always lived inside a structure, I did as 4ian suggested and used the structure for all my variables, even the ones I normally created by events. I found working as convenient as I would have found it before, and I love the “Change variable value” menu. It’s fast and easy. I even had no problem performing my preferred way to get to any action, which is to copy/paste/modify an existing same action instead of opening the pane to find a fresh one every time. The Change variable value action was very easy to paste and modify to different variables, be they scene or global.

Though I like to name scene and global variables the same thing, I feel like I will be able to keep my variable naming conventions the same (just changing the name of the parent structure) and instead of having to learn a new way to work and keep track of what I was doing, it felt pretty much the same as what I’d been doing except I would have to say faster with the “Change variable value” action menu.

And the local variables! So I’m counting this as a Big Win for GDevelop, although I am only saying from my perspective since it happens to fit in so well with how I prefer to do things. I do understand those that are having difficulty adjusting, because that was my initial thought too, about having to learn a new system.

1 Like

I think I’ve used this system for around 2 weeks now, and it is not pleasant one bit.

I completely understand your points, but it’s like throughout all of these announcements they miss one key thing, absolutely NOTHING good comes from this system

I genuinely don’t understand why we can’t just have an object variable action/condition, a scene variable action/condition, and a global variable action/condition, then just add an option to declare the variable, and if you click it and it’s a new variable the variable will be added to the variables editor

Another thing about this is that testing new functions with non complete/experimental code where you could need a bunch of variables is wayyy more annoying since you have to manually remove them all with the variables editor rather than just deleting the code with all the undeclared variables

These solutions probably have a few issues of their own which makes them not ideal, the main issue I have is with the GDevelop team somewhat living inside of their own bubble and not listening to community feedback, I still love and support this engine, It’s helped me do amazing things but completely ignoring the new variable system, the lack of any sort of changes due to community feedback is worrying me.

I could care less about the new system to be honest. It’s just I wish the devs were more transparent and open to taking user feedback

On a separate note, the tween system needs a rework wayyy more than variables, it’s a genuine pain surfing through the endless waves of tween actions that practically do the same thing.

1 Like

Also a few separate notes:

  • The action to change an object variable should be accurately named “Change Object Variable” rather than “Change Variable” to avoid any confusion (you could also seperate the events for global and scene variables for consistency & to avoid confusing searches)
  • for some reason whenever I drag a condition/action everything turns invalid (red text w/ underline) before becoming valid again when placed

I just realized
That when i type name of variable when adding action or condition
It offers me option to ad/edit it
From drop down menu
image

If i click that add or edit
It is not added
I still need to add it manually in next window

SO either
A - this window should automatically add my var to the list and all i need to do is select its type in next window eventually global/scene type
or
B - Say “Open variables window list” and not “Add or edit variables”

@BalangoDev
I think for now
Main concerns are updating extensions and examples
Like also fixing multiplayer bugs and creating new examples with multiplayer
And whatever we propose or stand against here is not going into the void
I have no proof that what we ask for any1 read and any1 consider as a solution
Yet i have no proof that wat we ask for is ignored and won’t added to engine
You don’t have also and no one don’t
So i am willing to wait and see how system will be adjusted in the future
Cause i doubt it will stay the exactly the same