You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the project you are working on:
I working on a adventure platformer.
Describe the problem or limitation you are having in your project:
Sometimes we need to type a lot of code and it gets very large and hard to get every little thing later when you need to get back to the code. So I want to present some features that in my vision would be better for programmers when using gdscript....
Describe the feature / enhancement and how it helps to overcome the problem or limitation:
Tabbed Scripts
Manual code folding
in-editor Document Generation
for as
multiple var assign
overload
DEFINERS instead of if else while making plugins
Describe how your proposal will work, with code, pseudocode, mockups, and/or diagrams:
Tabbed Scripts
Basic Enables the user to create tabs (sections) for his script.
Use case 1: Alberto wants to create a section for his variables declaration, so he can type @tabname between the variables scope:
this creates a tab which only shows what is between @one
Manual code folding
Let the user folds the code like func does.
Use case: Barney wants to fold his NFSW variables. so he uses '##' AnyName to start and ### to enclose
#this can be folded on gdscript
func abc():
pass
## Fold this NFSW
onready var beauty_body = $armature/girl
###
In-editor Document Generation
The title describe itself, but I'll show here.
Use Case: Carlos downloaded an awesome plugin where enables godot to get any unity script and converts into gdscript, the plugin author was cool and created an awesome Documentation but carlos forget to download, so how it will use this fuck$ng awesome plugin? Don't be sad carlos cuz now you can only click on search help button and the docs will be there like any other godot class
For as
These days the script editor help us a lot when you type Raycast. godot shows you all related functions from it, but when you use for this doesnt happen so casting for would be perfect
#Before
for node in node.get_children():
node.visible = false
#After
for node as Node in node.get_children():
node.visible = false # this will show all Node class funcs
Lets the user assign multiple variables in one line
Before
case 1:
var a:int = 0
var b:int = 0
case 2:
a = 10
b = a
After
case 1:
var a:int,b:int = 0
case 2:
b = a = 10
Overload
Same as C#
class FUN:
func increase_fun():
pass
func increase_fun(a:int):
pass
DEFINERS instead of if else while making plugins
Actually if the user wants to execute code in editor only this code is inside the gdscript, but I think that should be done at compile time so using definers like C++ does will be beautiful.
If this enhancement will not be used often, can it be worked around with a few lines of script?:
Only the following one can be done with plugins:
Tabbed Scripts
Is there a reason why this should be core and not an add-on in the asset library?:
Yes, this will help a lot of devs, and most features presented "On my vision" can not by done via plugins
The text was updated successfully, but these errors were encountered:
Would be nice, but first we would need a way to specify documentation in code, like /// <summary> in C#.
Overload
Workaround for now: Give the parameter a default value of null. Though, this does make it impossible to use static typing without nullable static types.
Multiple var assign
Just want to say that this is something I'd personally use if it were implemented. a = b = whatever is something I use often in C#. But then again, it's hardly a necessary feature, so I'd also be fine if it was never implemented.
DEFINERS instead of if else while making plugins
If this is implemented, it should work similarly to the C# preprocessor defines, which are available for any script and aren't restricted to plugins.
TL;DR: If you rely heavily on features like these, consider using C#. It also has manual folding via #region.
yeah I agree with you, but I think on these things to "evolve" the gdscript language, my only problem with c# on godot for now is that mono version of the engine has a much higher compile time and I compile my projects many many times!!!
Closing, as you should open one proposal per requested feature after checking for possible duplicates. This makes it easier to track individual features' development status.
The features you requested below already have open proposals:
Describe the project you are working on:
I working on a adventure platformer.
Describe the problem or limitation you are having in your project:
Sometimes we need to type a lot of code and it gets very large and hard to get every little thing later when you need to get back to the code. So I want to present some features that in my vision would be better for programmers when using gdscript....
Describe the feature / enhancement and how it helps to overcome the problem or limitation:
Describe how your proposal will work, with code, pseudocode, mockups, and/or diagrams:
Tabbed Scripts
Basic Enables the user to create tabs (sections) for his script.
Use case 1: Alberto wants to create a section for his variables declaration, so he can type @tabname between the variables scope:
this creates a tab which only shows what is between @one
Manual code folding
Let the user folds the code like func does.
Use case: Barney wants to fold his NFSW variables. so he uses '##' AnyName to start and ### to enclose
In-editor Document Generation
The title describe itself, but I'll show here.
Use Case: Carlos downloaded an awesome plugin where enables godot to get any unity script and converts into gdscript, the plugin author was cool and created an awesome Documentation but carlos forget to download, so how it will use this fuck$ng awesome plugin? Don't be sad carlos cuz now you can only click on search help button and the docs will be there like any other godot class
For as
These days the script editor help us a lot when you type Raycast. godot shows you all related functions from it, but when you use for this doesnt happen so casting for would be perfect
![Screenshot from 2020-02-21 19-27-47](https://user-images.githubusercontent.com/58845030/75077000-46798d00-54e0-11ea-## One line multiple var creation80d7-b697fa78f007.png)
Multiple var assign
Lets the user assign multiple variables in one line
Before
After
Overload
Same as C#
DEFINERS instead of if else while making plugins
Actually if the user wants to execute code in editor only this code is inside the gdscript, but I think that should be done at compile time so using definers like C++ does will be beautiful.
If this enhancement will not be used often, can it be worked around with a few lines of script?:
Only the following one can be done with plugins:
Is there a reason why this should be core and not an add-on in the asset library?:
Yes, this will help a lot of devs, and most features presented "On my vision" can not by done via plugins
The text was updated successfully, but these errors were encountered: