Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Start with "dev mode" on when booting into the console #1950

Closed
blinry opened this issue Jun 6, 2022 · 41 comments · Fixed by #2581
Closed

Start with "dev mode" on when booting into the console #1950

blinry opened this issue Jun 6, 2022 · 41 comments · Fixed by #2581
Assignees
Labels
enhancement Improvement of existing feature or adding something new

Comments

@blinry
Copy link
Contributor

blinry commented Jun 6, 2022

Problem

When opening https://tic80.com/create or running any of the official releases, "dev mode" is off in the settings. This means that after running a game, upon hitting Esc, people have to select "close game" from the menu every time they want to return to the console. Also, the shortcuts F1 to F5 don't work to return to specific editors.

This greatly hinders the development flow, especially for new people who don't know that they can disable this behavior in the settings. I think that both advanced programmers as well as newcomers would much prefer having dev mode on when they want to develop a game. Also personally, disabling dev mode would be the first thing I'd always do when opening TIC-80. So I think this should be the default behavior.

When I gave a workshop on TIC-80 last month, it was unfortunate to have to explain how to enable dev mode to each of the over 20 participants. I would rather want a smooth first-time experience for them, where they can switch between making and trying the game quickly, without having to find the correct menu entry before.

Proposed solution

When booting the console without immediately starting a game, enable dev mode. In this case, it is very likely that this is the desired behavior.

@nesbox pointed out that the menu would also be good to have when using surf. I'd propose to disable dev mode again when running surf, in that case.

@borbware
Copy link
Contributor

borbware commented Jun 9, 2022

Big agree!

Also, while we're at it, make ESC go to console in devmode instead of code editor, like it used to be.

These minor changes in workflow have basically made me stay in 0.90 for the time being...

@darltrash
Copy link

darltrash commented Jun 9, 2022

In my opinion, A thing I like a lot about TIC-80 is how much it involves the average user into making things and dividing developers from regular users is not helpful in general.
I think it'd be better if we could just jump back into the editor with a shortcut of some sorts, kind of like if we could use CTRL+ESC to go back to the editor and NOT disable the menu or whatever at all.

I simply don't think the dev mode is either useful or necessary if we took this approach, but it's necessary that there's proper discussion about the matter.

@borbware
Copy link
Contributor

borbware commented Jun 9, 2022

I simply don't think the dev mode is either useful or necessary

Dev mode is necessary! For so many TIC-80 users, "press ESC to go to console" is deeply ingrained to their muscle memory, so I can't be the only one to want that functionality back.

@darltrash
Copy link

I simply don't think the dev mode is either useful or necessary

Dev mode is necessary! For so many TIC-80 users, "press ESC to go to console" is deeply ingrained to their muscle memory, so I can't be the only one to want that functionality back.

What I mean is that, why should we have to divide users from developers? At least make dev mode easy to toggle

@borbware
Copy link
Contributor

borbware commented Jun 9, 2022

At least make dev mode easy to toggle

imo, it IS easy to toggle. menu -> options > dev mode

@blinry
Copy link
Contributor Author

blinry commented Jun 9, 2022

Maybe as a clarifying question to @nesbox: why does the menu (and the "non-dev mode") exist at all? I always imagined that it served two purposes:

  1. Make it easy for "players" to modify the key layout (by making that setting visible in the menu that opens when you hit escape). I think it serves this purpose pretty well.
  2. Shield the "players" from the internals of TIC-80, so that they are not confused when they suddenly see white text on black, or strange editors. I agree with @darltrash that I would prefer it if TIC-80 would nudge the "players" a bit, by giving them an easy peek like "see, this is how the game is made! You can make games, too!" <3

But maybe there are more purposes for the menu! :)

@darltrash
Copy link

darltrash commented Jun 9, 2022

Maybe as a clarifying question to @nesbox: why does the menu (and the "non-dev mode") exist at all? I always imagined that it served two purposes:

  1. Make it easy for "players" to modify the key layout (by making that setting visible in the menu that opens when you hit escape). I think it serves this purpose pretty well.

  2. Shield the "players" from the internals of TIC-80, so that they are not confused when they suddenly see white text on black, or strange editors. I agree with @darltrash that I would prefer it if TIC-80 would nudge the "players" a bit, by giving them an easy peek like "see, this is how the game is made! You can make games, too!" <3

But maybe there are more purposes for the menu! :)

No, no, no, I am not against the menu, I think the menu is a great idea and it's very nice to use in general!
I am against the menu always showing up and getting in the way when I just want to test out the code changes I did, Maybe the default could be that there's no menu when you run the game from an editor and use a shortcut to make the menu display when in the editor (...maybe) and then default to the menu being ON for everything else

@darltrash
Copy link

At least make dev mode easy to toggle

imo, it IS easy to toggle. menu -> options > dev mode

oh that does make sense, yeah

@Skeptim
Copy link
Contributor

Skeptim commented Feb 4, 2023

I have no opinion on this question, but note that when you are on the menu, the F1 to F5 shortcuts work. So instead of typing Esc like v0.9 you can type Esc + F1 which is nearly as easy as they are adjacent keys. I never used dev mode thanks to this shortcut.
However, if people don't know that, it remains a problem. Suggesting in some way to type F1 in the menu could be a solution ?

@potato25
Copy link

I strongly agree with this. The cart should start with "dev mode" on. I'm tired of pressing 'Esc' and choosing 'dev mode on' every time

@aliceisjustplaying aliceisjustplaying added the enhancement Improvement of existing feature or adding something new label May 2, 2024
@aliceisjustplaying
Copy link
Collaborator

I want this too and I started working on this but turns out it's more tricky than I thought, so we'll see.

@Skeptim
Copy link
Contributor

Skeptim commented May 2, 2024

Could this be a solution: #2531 ?
If we could keep the settings when updating TIC-80 one would have to choose "dev mode on" only once and for all.
And that would solve this same issue with other options.

@aliceisjustplaying
Copy link
Collaborator

Honestly, yeah. I'll check how much work it is to remove the per-release new settings feature...

@aliceisjustplaying aliceisjustplaying self-assigned this May 2, 2024
@blinry
Copy link
Contributor Author

blinry commented May 3, 2024

Glad to see you working on this, @aliceisjustplaying! :)

Just as a note: Rmembering the settings would only solve my problem as phrased in the first message in this thread partially.

Especially for people new to TIC-80, I'd still favor to enable dev mode by default when booting into the console. Because otherwise, it is difficult to discover that this setting exists.

@potato25
Copy link

potato25 commented May 3, 2024

I'm tired of pressing 'Esc' and choosing 'dev mode on' every time for all carts on the website. Plz give account setting that would let users set their dev mode and it's applied for all carts for that user. Since this is independent of TIC dev ver 1.2 etc, i think this could be implemented in the website directly now

@hw762
Copy link

hw762 commented May 7, 2024

If I didn't see this issue, I would have never knew dev mode existed.

The game menu made it look like it's for "release mode configuration", so I had no idea that option was there. I always used F1-F5

@Skeptim
Copy link
Contributor

Skeptim commented May 7, 2024

The game menu made it look like it's for "release mode configuration"

Indeed the description is currently "The game menu is disabled in dev mode" which is not so clear.
What if we write "Disable menu to close game with ESC"? Or "Disable menu to switch to editor with ESC"?
Other suggestions?

I had no idea that option was there. I always used F1-F5

Was it a pain to use (Esc+)F1-(Esc+)F5?
I wonder what is the impact of habits here.

@potato25
Copy link

potato25 commented May 8, 2024

My 'Esc' key broken by pressing 'Esc' so many times on the website. It's a laptop and i can't change keyboard. I would prefer default to be 'dev mode on'. I would prefer into going into code editor by pressing F1,F2, etc. But i highly doubt that these changes would be pushed out soon :/ It also feels like a punishment for game devs who just want to see the code. Why go through the long process of 'Esc' -> ' Options' -> 'Dev mode on' -> ' Resume game'

@Skeptim
Copy link
Contributor

Skeptim commented May 8, 2024

Was it a pain to use F1-F5?

I mean using Esc+F1 - Esc+F5

I think nesbox does not want dev mode to be 'on' by default because that's necessary for the games that use the menu API and I agree with that.
I also prefer having the menu easily accessible for newcomers… if and only if they can learn to use Esc+F1 - Esc+F5, but I made a PR to write "Press F1 to switch to editor" in the menu #2570 so that should be ok.

My 'Esc' key broken by pressing 'Esc' so many times on the website. It's a laptop and i can't change keyboard. I would prefer default to be 'dev mode on'. I would prefer into going into code editor by pressing F1,F2, etc. But i highly doubt that these changes would be pushed out soon :/ It also feels like a punishment for game devs who just want to see the code. Why go through the long process of 'Esc' -> ' Options' -> 'Dev mode on' -> ' Resume game'

Your situation is unique and I understand how annoying it is, but when 'Esc' works, game devs can just do 'Esc+F1' when dev mode is off, which does not seem to be a punishment to me.

@potato25
Copy link

potato25 commented May 8, 2024

Alternative is to set dev mode option using meta tag. In cart, dev mode tag is 'on' by default. Those who want to see menu can set the meta tag 'off'. @nesbox agrees with this and asks to assign this issue to him

@Skeptim
Copy link
Contributor

Skeptim commented May 8, 2024

Oh yeah! That solves everything, that's the best solution! Thanks!

@potato25
Copy link

potato25 commented May 8, 2024

Alternative is to set dev mode option using meta tag. In cart, dev mode tag is 'on' by default. Those who want to see menu can set the meta tag 'off'. @nesbox agrees with this and asks to assign this issue to him

Plz assign this issue to nesbox. I don't know how to assign it to him

@Skeptim
Copy link
Contributor

Skeptim commented May 8, 2024

I don't think I can, or I don't know how.

@aliceisjustplaying
Copy link
Collaborator

@nesbox agrees with this and asks to assign this issue to him

where?

@potato25
Copy link

potato25 commented May 8, 2024

@nesbox agrees with this and asks to assign this issue to him

where?

Here

Screenshot 2024-05-08 144243

@aliceisjustplaying
Copy link
Collaborator

@potato25 thanks. assigned it to @nesbox.

@hw762
Copy link

hw762 commented May 10, 2024

ESC+F1-F5 was OK.

In fact, my new problem is that I can't find out how to turn dev mode off

@Skeptim
Copy link
Contributor

Skeptim commented May 10, 2024

@hw762 That's a recurrent issue when we discover dev mode ^^ Use menu in the console

@potato25
Copy link

In fact, my new problem is that I can't find out how to turn dev mode off

Meta tag solves this

@nesbox
Copy link
Owner

nesbox commented May 11, 2024

@potato25 here is the PR #2581 with devmode: on metatag
By default, devmode is disabled and we will see the game menu, but if you enable it in settings or add the dev mode: on meta tag, the game menu will not be shown.

@blinry
Copy link
Contributor Author

blinry commented May 11, 2024

Thanks for working on this, @nesbox! :) This is an interesting addition, but it doesn't solve my issue. Let me explain why!

I think what we need is two things at the same time (and please, someone correct me if my assumptions here are wrong):

  1. 🧑‍💻 Developers should have a good experience developing the game, with fast iteration cycles. This means being able to have a single-button way to switch between coding and trying the game. Esc seems like a good button for this, in my opinion.
  2. 🎮 Players should be protected from leaving the game when they don't want to. This means that Esc shouldn't stop the game for them.

Right now, (2) is fulfilled by default. #2581 adds an easier way to enable (1), but it's not there by default, and it needs documentation for people to discover it. Otherwise, developers (especially new ones) need to know/be taught that they either need to go into the menu and enable dev mode, or add the meta tag.

My envisioned solution is that, if TIC-80 boots into a game directly (like in an exported game, or maybe even after going through surf), we adjust for the need of the players, disable dev mode, and allow (1). On the other hand, if TIC-80 boots into the console, we assume that we should adjust for the need of developers, and enable dev mode.

Two questions, @nesbox:

  • Do you think this is technically feasible? Or is it maybe a problem to even tell these situations apart?
  • Would you object to me drafting such a solution, and opening a PR, to see whether this is a good solution? Would be happy to work on this, I have a bit of experience with the source code from [WIP] Advanced tab-completion for the console #1840.

Also curious what other folks think about this!

nesbox added a commit that referenced this issue May 11, 2024
@potato25
Copy link

potato25 commented May 11, 2024

@potato25 here is the PR #2581 with devmode: on metatag By default, devmode is disabled and we will see the game menu, but if you enable it in settings or add the dev mode: on meta tag, the game menu will not be shown.

Plz make 'devmode: on' as default meta tag. The whole point of this is that we don't want to see 'menu' when loaded. Those who want to see the menu can set 'devmode: off' meta tag in their carts.

The idea is if 'devmode: on' is default meta tag, then all the website cart's code can be easily accessed by pressing Esc, F1, F2. If the game is finalized and ready to be published on itch.io and tic-80, then they can set their 'devmode: off' and they get to see their 'menu'

@Skeptim
Copy link
Contributor

Skeptim commented May 11, 2024

Plz make 'devmode: on' as default. The whole point of this is that we don't want to see 'menu' when loaded. Those who want to see the menu can set 'devmode: off' in their carts.

With devmode: on as default, past games that use the game menu won't work any more. Except if we do what @blinry suggests or if we set 'devmode: off' when 'menu' metatag is used.

I think what we need is two things at the same time (and please, someone correct me if my assumptions here are wrong):

🧑‍💻 Developers should have a good experience developing the game, with fast iteration cycles. This means being able to have a single-button way to switch between coding and trying the game. Esc seems like a good button for this, in my opinion.

I just want to underline that in my point of view 'ESC+F1' is (nearly) as simple as 'ESC'! I think it's mostly a question of habits if some people don't like 'ESC+F1'. Note that for switching from editor to game nobody complains about 'CTRL+R', in comparison 'ESC+F1' is easier.
Especially now that F1 is advertised in the menu #2274

However, I am not against @blinry solution. The only disadvantage would be that newcommers will need to look at the documentation to find the menu. When you use a keyboard which is not qwerty, finding the menu to remap some keys in the gamepad setup is important, for example. Or setup the volume…

@potato25
Copy link

With devmode: on as default, past games that use the game menu won't work any more. Except if we do what @blinry suggests or if we set 'devmode: off' when 'menu' metatag is used.

Setting 'dev mode: on' meta tag as default probably couldn't have bigger impact than deprecating 'SCN' and 'OVR'; which nesbox did in the past

@Skeptim
Copy link
Contributor

Skeptim commented May 11, 2024

I think 'SCN' and 'OVR' still work for backward compatibility, they are just not recommended any more. Am I wrong?

@potato25
Copy link

I just want to underline that in my point of view 'ESC+F1' is (nearly) as simple as 'ESC'! I think it's mostly a question of habits if some people don't like 'ESC+F1'. Note that for switching from editor to game nobody complains about 'CTRL+R', in comparison 'ESC+F1' is easier. Especially now that F1 is advertised in the menu #2274

I like 'Esc' for terminal, 'F1' for code editor, 'F2' for sprite editor etc :)

@nesbox
Copy link
Owner

nesbox commented May 11, 2024

@Skeptim @potato25 yes SCN and OVR still work as before, the only thing these functions don't highlight in the code editor, so I don't see problem here.

@blinry It's becoming increasingly difficult to please all parties :) you're right, players need to see the game menu, and developers need to see the code. Perhaps we really need to remove the developer option from everywhere (from the game menu and metatag) and only show the game menu in the following cases:

  • the game was run from surf;
  • the game was automatically run in binary for export;
  • the game was run from the command line, like tic80.exe cart.tic;

so, if you have the desire and time let's try to do this.

@nesbox nesbox reopened this May 11, 2024
@Skeptim
Copy link
Contributor

Skeptim commented May 11, 2024

@Skeptim @potato25 yes SCN and OVR still work as before, the only thing these functions don't highlight in the code editor, so I don't see problem here.

Note that SCN still highlight in the code editor. That's linked to this question: #2501

@potato25
Copy link

One of the solutions could be pressing unused keys liked 'F10' shows 'menu' while 'Esc' brings command line, F1 = code editor , F2= sprite editor,.... Don't know if F10 is used or not

@Skeptim
Copy link
Contributor

Skeptim commented May 22, 2024

Note that the hotkeys topic of help command could have to be modified if something new is implemented here #2594

nesbox added a commit that referenced this issue May 26, 2024
…own if the 'game' tag exists in the tags section
nesbox added a commit that referenced this issue May 26, 2024
nesbox added a commit that referenced this issue May 26, 2024
…own if the 'game' tag exists in the tags section (#2603)

* #1950: removed devmode and game menu by default, game menu will be shown if the 'game' tag exists in the tags section

* #1950: better fix
@nesbox
Copy link
Owner

nesbox commented May 26, 2024

So, in the end, I removed devmode and game menu by default, game menu will be shown if the -- menu: tag exists in the tags section and in case the game is exported without editors.

@nesbox nesbox closed this as completed May 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Improvement of existing feature or adding something new
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

8 participants