-
-
Notifications
You must be signed in to change notification settings - Fork 97
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
Add a default main.tscn
to a new project
#2792
Comments
Main.tscn
to a new project
I don't think it's a good idea. Current behavior highlights a configuration problem that each developer needs to solve as they see fit. Your solution would hide that there is a problem, yet doesn't help inexperienced developers when they create their own scenes, hit "Play" and don't see them, because the empty and untouched default "main" scene was launched. There is also a question of what that scene would be, what type of node would it have as its root and why. |
Okay thanks, I see now. Will close this now. BTW tried the highlighting of Tree and it was really nice |
Generally there is no need to close your proposals after one disagreeing comment. This is just my opinion 🙂 But if you don't feel like it's worth it anymore, then it's fine to close it. |
Mmm okay. Felt like I did not really know the size of what I was proposing anymore. But will leave it open a bit longer then and see what other think. To clarify: Furthermore, a possible main scene could be the root viewport. It will be more transparent about what happens when you run a scene (as can be seen with remote Scenetree). |
This would require the scene to be added as an autoload for it to work as expected when you use F6 to run a custom scene. Also, it should be |
I have a script which creates a project from a template containing See also related proposals in Speeding up creation of new projects or development workflows section in godot-extended-libraries/godot-ideas#15 (quite a bunch of them so far). |
I always liked having the default main file in XNA, with all its excessive comments, but Godot, is less in need of that sort of mini-tutorial because nodes handle so much functionality. I think the equivalent would be an empty default main.tscn with an attached default main.gd with useful comments, but I struggle to think of what this would be. I wrote down my thoughts from the first time I used Godot:
|
I would like this because it speeds things up. I agree a little with pycbouh, it's good for the new-user to get a grasp on the filesystem and where they're saving their scene. I think that's really user-friendly stuff for new users. The issue here is that while it's good for new users it's rather tedious for the rest of us. I think project templates need to be better implemented. Local project templates, not these internet templates that take 10 seconds to load, I've never used someone else's template because working with someone else's code in your project is just a huge chore. But I would ALWAYS use small local templates that I made, if I could. For test projects, for new projects, etc. To bring this back to the topic - such a template would allow you to create a simple project with a Main.tscn (in a sub directory if necessary). You can't just tell me to use templates because this topic is about relieving some tedium and the current implementation of templates is no faster. |
Main.tscn
to a new projectmain.tscn
to a new project
We can add |
I think that just a better way to make personal project templates is the solution here, like @rainlizard mentioned. We can even include an example of such template that would add some default |
I have created a new repository for this purpose now: https://github.com/godot-extended-libraries/godot-main. For now it has Of course, if someone wants to implement other scripts for other platforms, feel welcomed! |
I also have a It doesn't create a main scene, |
It seems to me that we are talking about inexperienced users who have just opened Godot. I remember how a few years ago I could not figure out what was needed for 5 minutes:
Now point 1 is almost eliminated, thanks to the Root Selection in the Scene panel, but still, the process is not so obvious when you first see it. Yes, this is just a minute delay, but a little help to the user is important at the start.
When we talk about newbies, command line and personal project templates won't help. This should be in the default template, and the user can replace the template with the one they want. |
@dalexeev To simplify your step 1 further I've proposed #679 some time ago.
Also what I've suggested in my comment there is that we do provide a newbie-friendly template out of the box that they can then quickly use, but we shouldn't change the default behavior because there is no universal solution except for an empty project. If someone wants to customize their personal templates and use them instead they are free to do so. (This btw also helps with the lack of universal addons, as you'd be able to prepack some with your templates). Otherwise we get into that silly Blender territory, where everyone just deletes the default cube. |
The way I see this, it could be an option in the project manager:
2D projects don't need to instantiate Depending on the project type, default project settings could also be adjusted. The rationale behind those options could also be explained just like for GLES2/GLES3 rendering options, that way we can teach new users about the fact that they can/should assign main scene and hit F5 to debug the project (or not, if they choose 2D/3D template instead). Don't know about you, but I would see this as a major workflow improvement. |
Make it a dropdown (like with the script templates) and a way to define your own templates in the editor data folder (likely just a folder with all the files you want the way you want them for each template), and that's it. |
@pycbouh Sounds like a good idea to me (on top of being easy to implement), but we'll have to rename the "Templates" tab in the project manager to something like "Online Templates" since it will not list local templates. The Templates tab could also have a "Open Templates Folder" button to open the folder where template folders should be placed. |
@Calinou We do have a PR to rename tabs in the PM: godotengine/godot#47871 Speaking of PRs, this is conflicting a bit with #1813 / godotengine/godot#42447. If we are to move forward with this latest idea this proposal by @aaronfranke needs to be considered. |
@Xrayez @pycbouh We could take what is in godotengine/godot#42447 and swap out the default environment checkbox for another dropdown which has options for creating default scenery for 2D, 3D, UI, or Empty. Picture for reference: |
Yes, it would be super nice to have a supportive starting foundation that sends you on the right path |
If you're going to add a default
I feel like I've written that function a thousand times. |
Note that you can stop the Godot debug process with F8 key (which works while the game window is focused and while in the editor). Unless you'd also like to let the scene tree to trigger other deinitialization callbacks. |
Thanks, I always forget about this. |
This means you wouldn't be able to use Escape to open an in-game menu anymore, since the process would kill itself when you press Escape (this is how F8 works right now). |
Hm, good point. Guess I'll just get used to using F8, then. |
That's why you do:
lol, old habits die hard. But this conversation doesn't matter because it's absolutely necessary that templates be custom and defined by user. |
Such a basic but wonderful idea! I wonder that no one else came up with this yet. However, wouldn't |
It doesn't really matter what we would call it, especially since we are talking about some default template. If you want it to be anything else, you can always customize it after your vision. |
The way I see it, it's more about the program's execution/entry point. Many (if not all) statically built apps are invoked via |
local templates could solve the problem as well |
Okay, however this proposal has lost its need for me, since I mostly work on 1 project now and have a pretty fixed main scene (switched sometimes for iterating). I think my proposal originally came from a confusion of how to apply structure, partially due to inexperience, and thus I ended up making more new projects. I am fine now with how it is. |
Describe the project you are working on
A block building builder for the GoGodot game jam.
Describe the problem or limitation you are having in your project
Every time a new project is started a "interrupting" popup appears that says to define a main scene. Not a big deal, but it breaks the flow a bit and I feel like there could be a more elegant solution, that also communicates better what "main" means, as I did not know this for some time.
Describe the feature / enhancement and how it helps to overcome the problem or limitation
godotengine/godot#1134, this is a previous issue about this, which talks about this popup: "The pop up will solve the issue of a new user having to search for "Project Settings" and the main_scene setting.".
Proposal: Add a default Main.tscn to the project, which the ProjectSettings automatically sets as the main_scene, just like icon.png. Then you can add your scenes/nodes under main and run it with F5 immediately .
This does not communicate however that the option to change the main scene exist. Therefore, you could add a Node with editor description to Main.tscn explaining what main stands for and that you can change it in ProjectSettings, but I am not really sure about this.
Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams
If this enhancement will not be used often, can it be worked around with a few lines of script?
no, it happens at startup.
Is there a reason why this should be core and not an add-on in the asset library?
no, it happens at startup.
The text was updated successfully, but these errors were encountered: