-
-
Notifications
You must be signed in to change notification settings - Fork 98
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
Allow Godot to skip parsing CLI options and pass them to projects #4815
Comments
#2797 is somewhat related, but still wants the engine to have it's own args. |
I mean, that's impossible. Godot needs to parse and consume command line arguments to launch your project in the first place. Some of the options define the work environment for the runtime too, and probably can't be set up afterwards. Either way, I think this proposal is missing both technical know-how and a good explanation of the use case. |
Objection! The exported godot needs not handle cli arguments. Its like how |
A lot of people require their exported projects to handle command line arguments. This is the case for non-game applications using Godot, but also many Godot games exposing "power user" options. |
@Calinou They are saying that the Godot executable of an exported project doesn't need to handle our default arguments ( |
Assuming you mean the If you mean generally handling command line arguments, what i mean is the default arguments (save for |
I don't like the direction this proposal is going in, as many CLI arguments are useful to power users in exported projects. This is also a prerequisite for some proposals to be truly useful, such as #5449. Not all games will implement extensive settings menus (especially gamejam games), but sometimes having some way to override a parameter makes the difference between an unplayable and a playable game to some. Any change of this kind needs to be strictly opt-in, and warned against in the documentation as it worsens accessibility. (This will break compatibility otherwise, as many projects rely on the ability to pass engine arguments in projects exported in release mode.) Regarding the ability to print project-specific help with |
I mean of course the optimal way to do this (but also the hardest) would be to have some kind of user cli script, and to have a cli arg handler class that the cli script can touch
which project? |
Also, could just add a |
This still makes usability worse than the status quo, as you have to write a script, save it to disk, possibly learn GDScript, etc. Remember that players are generally not Godot users. To give a point of reference, most other popular engines have CLI arguments to force windowed/fullscreen mode and window size. |
Your saying that theyre power users, not random players that dont know how to use godot. |
What I mean is that "power users" of a game are generally not Godot users. They just play various games and don't care (too much) about the engine it's running on – until it makes bad technical decisions that harms their experience 🙂 |
I would still like to see a game that gets broken by this; And also, how did they learn the arguments anyways? |
Agreed. @bend-n Consider that godot uses CLI arguments to specify renderer, or to run the project in current folder. |
Ive addressed those 2 examples: |
Describe the project you are working on
A command line argument parser addon for my projects.
Describe the problem or limitation you are having in your project
Many command line options(
--help
,--version
) are used immediately by the engine, and removed from the args array.So, if you do, say,
godot -f
, godot:[]
when you callOS.get_cmdline_args()
.This is suboptimal if you want to make a CLI app, or a game with a CLI.
Describe the feature / enhancement and how it helps to overcome the problem or limitation
I am now able to use
--help
in my game! Now I can change godots help message.Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams
I think there should be a way to turn off godot's CLI handling.
Like so:
There are a few args that cant be removed however, such as
--main-pack
and--rendering-driver
, but they're long enough as to not come up as a problem.I think movie writer args can stay too.
If this enhancement will not be used often, can it be worked around with a few lines of script?
With a lot of lines.
Is there a reason why this should be core and not an add-on in the asset library?
Not possible, cmdline args are core
The text was updated successfully, but these errors were encountered: