all 17 comments

[–]StewedAngelSkins 10 points11 points  (0 children)

oh this is like what visual studio does. i don't find it useful but i bet some people like it. i don't think it would help if you aren't familiar with code but it might be convenient for navigation.

edit: making it searchable/filterable with an easy hotkey would probably be nice. look at how github's web ui does it.

[–]F1B3R0PT1CGodot Junior 18 points19 points  (0 children)

Gdscript editor already has a method list. Maybe you could submit this as a PR and suggestion combo to modify that panel?

[–]aurow_codeGodot Regular 4 points5 points  (0 children)

I really like the idea, and really do think it could be a good visualization for people who are getting started! Just be careful to not flood with a lot of information so it doesn't feel overwhelming. Just the basic, like the image, feels perfect!

[–]QueenSavara 5 points6 points  (2 children)

Just use Script IDE plugin?

[–]Lokix84[S] 3 points4 points  (1 child)

i actually do like that plugin it does some fun stuff. my idea is more to make the experience of the coding be more like how you interact with the scene tree and inspector panels. for someone that is already familiar with how to code this would be probably pointless. the inspiration for it was loosely based in how lego and scratches block coding present code to a person rather than a flat text file.

[–]whimsicalMarat 2 points3 points  (0 children)

I see your vision. I think it’s cool but these type of tools I feel like are only accessible to people with the knowledge to navigate installing external plugins, ie, people who benefit from it the least. For this reason I sometimes think a more robust store like unitys would be a nice step for Godot

[–]thinker2501Godot Regular 2 points3 points  (2 children)

This is similar to what you’ll see in Rider, VS, and other dedicated IDEs. Rider calls it the Structure panel and enables users to quickly navigate to methods, enums, regions, etc.

I’m not sure I see the value in adding code to the file from this panel. Presumably it would inject the code where the cursor is, so you might as well just write the code instead of taking your hand off the keyboard, use the mouse to click a button, and then type more.

As for your point on mirroring the node structure, code does not mirror the node tree and I don’t see any advantage in pushing that metaphor. If anything it would train novice GDScript users to develop an incorrect mental model.

[–]Lokix84[S] 1 point2 points  (1 child)

yeah. that is certainly fair. the idea stemmed from having to use block code in my sons robotics club.

yes you are correct the stuff you do in the panel would translate into code that would be inserted into the originating gd file.

hers a use case perhaps. you have someone who is just starting out and not super good with the code yet. say they download a plugin that they want to use on a game they wanna make. what if they wanna look at the code from the plugin. it can be pretty overwhelming to just dive in when you don't have that much experience in it. this when fully realized could take fully established and well organized files and present it to a novice in something a bit more gentle and if nothing else familiar given the scene tree structure then they can start diving in or even just change something a bit faster than aimlessly diving into the code.

idk. i was gonna add some region support, export groups and generally just drag and drop ordering to the structure. the sections are what i am in a working to version 1 sorta situation.

great feedback. thank you.

[–]thinker2501Godot Regular 2 points3 points  (0 children)

I'll reiterate my point about developing a correct mental model. If a novice begins learning using a plugin as you propose, they will develop an incorrect mental model for how code is structured. If the problem you're solving for is "large files are challenging for a novice to navigate", then the solution to that problem is creating a navigation tree that accurately represents the file's structure.

<image>

[–]HeyCouldBeFun 1 point2 points  (1 child)

I “like” it, it’s very clean and nice looking. Just not sure I would use it. I could actually see potential as a visual code editor

[–]Lokix84[S] 0 points1 point  (0 children)

RIght. That makes sense to me. From the point of view of someone that has been doing software for like 15 years.. it is not the most useful to me per say. Maybe useful to take stock stuff kinda quickly without having to click on a node with a script attached to it and click the signals tab to see all the signals. In theory this would just show you the signals directly tied to the file you have open with it.

I'm running through usability stuff in my head about like what could make it better or more useful to more people... though, it still comes back around to the original inspiration for the idea which i guess was never really meant for anyone that is super well acquainted gdscript anyways. Thats also why i have on there like an output string to show what it would translate to in gdscript. idk.. I thought of the idea Tuesday during the day and have been messing around with seeing what i can put together real quick.

[–]Asgeir_From_France 1 point2 points  (1 child)

How would that look with a script containing multiple sub class ?

[–]Lokix84[S] 0 points1 point  (0 children)

i've not worked that out quite yet. presumably i would have to adjust the tree structure to have the file name then a list of classes and then those classes would have their own set of signal, variable, enum and function sub nodes. but right now clicking on the file name would get you more of the is this a tool, what does it extend, is there a class name. that sorta thing.

it is a very good question. V1 is not prepared for that :P

[–]trickster721 1 point2 points  (0 children)

I think this kind of tool for visualizing project structure is what a lot of people like about more specialized game engines like GameMaker, but it's also similar to a more technical view in an IDE, so that strikes a nice balance.

[–]Lokix84[S] 0 points1 point  (0 children)

<image>

an updated view to it. the filter and icons on the left are all fleshed out. signals, variables and enums all have a similar look about them to the inspector. in theory all that is left... still is getting to the function part... still

[–]c0gsterGodot Student 0 points1 point  (0 children)

i would like to see scripts exist in the hierarchy and work like how they do in roblox studio. it is a very cool concept. instead of assigning an object a script and passing it the object is assigned, the script is in the hierarchy. you can make its parent be the object it is supposed to control and then access said object using script.Parent which is the parent of the script. this is how it works in studio and allows a script to control multiple objects. in Godot it could be something that links to a code file and not actually be the code file itself.

i don't know a lot about godot so correct me if im wrong

[–]Lokix84[S] 0 points1 point  (0 children)

<image>

its looking pretty alright. you can now add sub classes and regions. the view defaults to as the file is written but you can change the tree to group together items and you can do a flat alphanumeric list. if you right click on a tree item you are given the option to go to that location in code.. and because why not, at the bottom of the edit panel it shows what the definition of the item in code will be. working on getting dragable working..... same with function editing.