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

Cleanup gdscript examples #105

Merged

Conversation

arnaudgolfouse
Copy link
Contributor

@arnaudgolfouse arnaudgolfouse commented Jan 17, 2021

This should make the gdscript examples more readable.
This addresses some of the comments made in #95.
Also fixes #100

It is now obsolete, replaced by `Project_Example/dependancy/TileMap.gd`.
'Unneeded comments' here are e.g.
```gdscript
 # Called when the node enters the scene tree for the first time.
 func _ready():
```
This uses the following conventions:
* Items are grouped by 'kind' (aka `const`, `var`, `func`...).
  Each group is separated by a newline, functions are separated by **two**
  newlines from the rest and eachother
* `gdformat --line-length=88` is used for formatting (88 seemed like a
  good length, and fits perfectly in the godot editor on my machine so 🤷)

  As an aside, godot's "line lenght guideline column" option was very
  helpful there 🙂
* Comments start with a space after `#`, and usually with an Uppercase.
  They also don't cross the 88 line length limit.
@arnaudgolfouse
Copy link
Contributor Author

I guess that if you have very strong opinions on code style, the 'Use consistent style in gdscript' commit might be controversial 😅
I am open to using different conventions/formatting options if someone thinks it would be better 🙂

@MatejSloboda MatejSloboda merged commit 07bf952 into MatejSloboda:master Jan 20, 2021
@MatejSloboda
Copy link
Owner

thank you! Sorry for the delay, I'm in middle of exam period currently, so time is scarce.

@arnaudgolfouse arnaudgolfouse deleted the cleanup-gdscript-examples branch January 20, 2021 09:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

crash in project_example.tscn
2 participants