-
-
Notifications
You must be signed in to change notification settings - Fork 3.5k
Update custom drawing in 2d tutorial to Godot4 #7532
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
Conversation
c2419d9 to
7de26d9
Compare
|
I have simplified the last part, I think it makes no sense to have complex code on a tutorial- I will send an amend soon after I test following it works. |
76698e2 to
16693c0
Compare
|
I think this version makes more sense- tutorials should be simple and show clear examples on how to use a library, even at the cost of showing more useful, and more realistic code. |
|
Any update on this? I know it is a large change, but I think it is better than the old tutorial; and we can always improve on top of it- or if you can provide me some feedback I would appreciate it. |
AThousandShips
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Style, syntax, and formatting details
|
Also please use rebasing to update your branch, see here |
|
|
|
You have missed a few in the middle |
89e7c0c to
8881043
Compare
|
I have fixed a few additional typos and minor expressions while redoing the tutorial for both gdscript and C#, also ensuring there was a lower possibility of confusion. While I cannot be sure 100% this is error-free, I feel now more confident after my last amend and this is ready for review. |
|
Will now squash, rebase and do the pending changes (_t) before testing. |
While rebasing I noticed the merged quick fix has a bug. Not a big deal, as the rebase I did will fix it anyway. This is why it is important to test the code- which is my next task here. |
|
Build failed after rebase due to cd92be0 , updating that too. |
|
I am rechecking now all code snippets, please give me some time. I think it is important to go over it at least once. |
|
I am happy with the current version, to my knowledge I have applied all suggestions and I have also tested that the functionality keeps working. |
This tutorial had 2 main issues: the code wasn't adapted to Godot 4 syntax and API and the suggested tutorial contained information to workaround the (at the time) non existence of the `draw_arc()` function. A general update has been made, keeping the general structure but changing the example for something more useful and fun (replicating the godot logo with draw primitives) and an additional example with a dynamicaly built drawing (dynamic line). Too many informalities have been removed on the initial paragraph. Fixed references to Texture instead of Texture2D. Fixed old style of exporting properties to the editor. Fixed inconsistencies calling Node2D, myNode2D and customNode2D. Moved examples to the end of the page, leaving general information at the top, and completing that info with images and references. Removed references to an old demo project (Tetris). Fixes godotengine#4184 Fixes godotengine#7521 Co-authored-by: Raul Santos <raulsntos@gmail.com> Co-authored-by: A Thousand Ships <96648715+AThousandShips@users.noreply.github.com>
raulsntos
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The C# code looks good and works as expected, thanks for contributing!
|
Thanks! And thanks for dealing with the long review process, this is definitely a major improvement for the docs. |
|
Thanks, I learned a lot, so hopefully future patches I can do them faster. Please if you have some linters you can recommend me for style checking, I would welcome them, specially on the C# side. I would also like to thank you all for the help and the patience with me. :-) |
Update custom drawing in 2d tutorial to Godot4
|
Cherry-picked to 4.2. |
This tutorial had 2 main issues: the code wasn't adapted to Godot
4 syntax and API and the suggested tutorial contained information
to workaround the (at the time) non existence of the
draw_arc()function.
A general update has been made, keeping the general structure but
changing the example for something more useful and fun
(replicating the godot logo with draw primitives) and an
additional example with a dynamically built drawing (dynamic line).
Too many informalities have been removed on the initial paragraph.
Fixed references to Texture instead of Texture2D.
Fixed old style of exporting properties to the editor.
Fixed inconsistencies calling Node2D, myNode2D and customNode2D.
Moved examples to the end of the page, leaving general information
at the top, and completing that info with images and references.
Fixes #4184
Fixes #7521