4ian / GDevelop

🎮 Open-source, cross-platform 2D/3D/multiplayer game engine designed for everyone.
https://gdevelop.io
Other
10.83k stars 849 forks source link

Don't start timers automatically #3065

Closed Elairyx7301 closed 2 years ago

Elairyx7301 commented 3 years ago

Description

Even though that it can be really handy that timers are started automatically, many users seem to be confused about it and this behavior can be rather unintuitive for new users.

Often, users want to only start a timer when a certain event happens/occurs. This would currently require to pause the timer at beginning of scene, resume for the event, let the timer run and have another condition make the logic work or reset the timer for as long as event conditions are not met.

I can image not everyone can think of these methods right away whereas having an action to start timers at beginning of scene isn't complicated.

Solution suggested

Describe possible solutions Default timers to not start automatically or give the user an option (probably best doable via project settings etc.)

Alternatives considered

Give a hint to the user that timers are started automatically at beginning of scene if previously mentioned solution doesn't make it / is rejected.

tristanbob commented 3 years ago

I agree that timers starting automatically is counterintuitive, and that the default should be to NOT start until an action is used to start the timer. Obviously, this change could break existing games, so it would need to be applied to new games only.

Silver-Streak commented 3 years ago

I agree that timers starting automatically is counterintuitive, and that the default should be to NOT start until an action is used to start the timer. Obviously, this change could break existing games, so it would need to be applied to new games only.

That type of change is hard to do, so I think a toggle on conditions/events of "create timer if it doesn't exist" may be the best way to add this functionality, defaulting to yes, to eanure backwards compatibility?

Bouh commented 3 years ago

An extension can be done? You simply duplicate the action inside a function, and add a boolean Yes/No for enable or not the count. If I'm right there is only to add a stop action for the timer after creating them.

Silver-Streak commented 3 years ago

An extension can be done? You simply duplicate the action inside a function, and add a boolean Yes/No for enable or not the count. If I'm right there is only to add a stop action for the timer after creating them.

Unless I'm misunderstanding, I don't think the problem is actions. I think the problem is that conditions automatically create timers at the start of the scene. Without this toggle, you'd basically have to create an extension with every possible condition combination that has an "At the beginning of the scene, delete timer" event in it as well. Which seems excessive for something that could/should be a toggle on the main conditions.

If it's preferred this be done via an extension, I could probably take a crack at it sometime this weekend, but I still think it's something better to be native.

Elairyx7301 commented 3 years ago

Bouh, this would not change the behavior of how the timers for the user work. Extensions will only be installed by people who are aware of the fact that timers are started automatically - and I believe "Pause timer" is easier to add and to read than an extension, not talking about the effort needed for making such an extension in the first place. The goal is to make timers more intuitive for newer users and easier to use for all users.

Silver-Streak commented 3 years ago

Timers really aren't a problem once their behavior is understood, so I can understand the hesitance to implement something that would be a breaking change if it was a new default.

That said, I'd still thing adding a toggle to timer conditions would solve both making it more understandable and not being breaking.

Elairyx7301 commented 3 years ago

I don't think I really understood that. Why/How can it be true that changing timer behaviors would affect already built games? Isn't it that after building, the programs aren't "handled" by Gdevelop events anymore but translated into something that can be executed on all devices (same OS)? - or was that not the meaning of that point at all?

Silver-Streak commented 3 years ago

There are members of the community who have been working on their games for year(s). Changing the condition behavior would automatically update all of their projects the next time they open it, with no way for them to be aware of what/where it changed.

Adding it as a toggle as part of the behavior, defaulting it to whatever toggle makes it behave the same way it does now, would avoid this.

tristanbob commented 3 years ago

How about handling the change the same way the z-order default was changed? Don't update an existing game unless the user clicks a button to convert it. New games then start with the new default.

Silver-Streak commented 3 years ago

How about handling the change the same way the z-order default was changed? Don't update an existing game unless the user clicks a button to convert it. New games then start with the new default.

Maybe! I still think that making it a toggle in the conditions would likely be the easiest (and most future proof) solution, since it would allow users to start the timers at the beginning of the scene if they want to. But I'm no Contributor so I'm not sure what is more 'elegent' to apply here.

Elairyx7301 commented 2 years ago

Should I close this issue then and explicitly submit a feature request for timer mode toggles?

4ian commented 2 years ago

Might be a good idea to re-open a new feature request to force yourself to write again about it and so this helps ensuring it's clear in your (and our) minds :)