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

Add a Godot 3 to Godot 4 upgrade guide #6393

Merged
merged 3 commits into from
Nov 30, 2022

Conversation

Calinou
Copy link
Member

@Calinou Calinou commented Nov 18, 2022

I've likely missed some things, so please review 🙂

See #5121. This closes #4960.

@Calinou Calinou added enhancement content:new page Issues and PRs related to creation of new documentation pages for new or undocumented features labels Nov 18, 2022
@Calinou Calinou force-pushed the add-upgrade-to-godot-4 branch from dadf1f3 to cb415a5 Compare November 18, 2022 21:23
@Mickeon
Copy link
Contributor

Mickeon commented Nov 19, 2022

A lot of properties, methods, signals etc. etc. are missing and I'm not sure it's because they are handled by the converter already or is an intentional omission to keep it brief.

@Calinou
Copy link
Member Author

Calinou commented Nov 19, 2022

A lot of properties, methods, signals etc. etc. are missing and I'm not sure it's because they are handled by the converter already or is an intentional omission to keep it brief.

In the interest of brevity, I've only listed properties/methods that are not automatically converted. I've left a link to the converter source code, which lists all properties/methods that were renamed. The converter source code also includes commented out code for properties/methods that are not automatically renamed, with a comment explaining why.

@Mickeon
Copy link
Contributor

Mickeon commented Nov 19, 2022

I was considering reordering that whole list 'cause it very much is... such a mess to read, but in the meantime, let's see...

@Mickeon
Copy link
Contributor

Mickeon commented Nov 19, 2022

@Calinou
Copy link
Member Author

Calinou commented Nov 19, 2022

@Mickeon Thanks! I've pushed a separate commit mentioning your changes so it can be reviewed separately.

Copy link
Contributor

@skyace65 skyace65 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I accidentally hit submit review with the first thing I was looking at, sorry. Just a few minor things that should be changed but overall the page the page looks good. As someone not familiar with a lot of the changes made this was easy to understand.

tutorials/editor/upgrading_to_godot_4.rst Outdated Show resolved Hide resolved
tutorials/editor/upgrading_to_godot_4.rst Outdated Show resolved Hide resolved
tutorials/editor/upgrading_to_godot_4.rst Outdated Show resolved Hide resolved
@Calinou Calinou force-pushed the add-upgrade-to-godot-4 branch from 580a784 to 6a7e918 Compare November 20, 2022 23:38
@mhilbrunner
Copy link
Member

Looks good to me, I'll let it stay open another day in case someone notices something else and will merge tomorrow. Thanks! ❤️

Copy link
Member

@akien-mga akien-mga left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Didn't review everything, but here's some early comments.

tutorials/editor/upgrading_to_godot_4.rst Outdated Show resolved Hide resolved
tutorials/editor/upgrading_to_godot_4.rst Show resolved Hide resolved
tutorials/editor/upgrading_to_godot_4.rst Outdated Show resolved Hide resolved
Comment on lines 98 to 104
The list below refers to the nodes' new names in Godot 4.0. In the transition
between Godot 3.x and 4.0, dozens of nodes were renamed. 3D nodes had a ``3D``
suffix added to them for consistency with their 2D counterparts. This conversion
is automatic.

For ease of searching, this table lists all nodes and resources that were
renamed in a way that does not involve only adding a ``3D`` suffix to the old name:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
The list below refers to the nodes' new names in Godot 4.0. In the transition
between Godot 3.x and 4.0, dozens of nodes were renamed. 3D nodes had a ``3D``
suffix added to them for consistency with their 2D counterparts. This conversion
is automatic.
For ease of searching, this table lists all nodes and resources that were
renamed in a way that does not involve only adding a ``3D`` suffix to the old name:
The list below refers to nodes which were simply renamed for consistency or
clarity in Godot 4.0. The project upgrade tool renames them automatically in
your scripts.
One noteworthy set of renames is 3D nodes, which all got a ``3D`` suffix added for
consistency with their 2D counterparts. For example, ``Area`` is now ``Area3D``.
For ease of searching, this table lists all nodes and resources that were renamed
and are automatically converted, excluding the ones which only involved adding
a ``3D`` suffix to the old name:

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tried to make the language clearer that this is not all renamed nodes. IMO it's still a bit confusing though to have an "exhaustive" list that actually is only a subset.

There would need to be an intro paragraph to explain how the document is structured further (trivial renames handled by the converter, API changes which require manual handling, etc.).

But maybe there should be a table which actually lists everything, and has a third column that clarifies where the rename is handled by the conversion tool or not (and if not, why - different API, risk of false positives, etc.).
So users could always find an old or new name with Ctrl+F.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The table would be very long and could get outdated quickly – I guess we could find a way to generate it automatically and put it on a separate page.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But maybe there should be a table which actually lists everything, and has a third column that clarifies where the rename is handled by the conversion tool or not (and if not, why - different API, risk of false positives, etc.).
So users could always find an old or new name with Ctrl+F.

Absolutely. 100%. It's part of the reason as to why I expressed this:

I was considering reordering that whole list 'cause it very much is... such a mess to read,

tutorials/editor/upgrading_to_godot_4.rst Outdated Show resolved Hide resolved
@Calinou
Copy link
Member Author

Calinou commented Nov 21, 2022

Some miscellaneous compatibility-breaking PRs that I could actually understand the meaning of, that I found while browsing.

I updated the list to take the PRs you listed into account (also pushed as a separate commit for easier reviewing).

Copy link
Member

@akien-mga akien-mga left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great as a start 👍

@akien-mga akien-mga merged commit 1b065c4 into godotengine:master Nov 30, 2022
@akien-mga
Copy link
Member

Thanks!

@Calinou Calinou deleted the add-upgrade-to-godot-4 branch November 30, 2022 16:04
@TokisanGames
Copy link

TokisanGames commented Dec 1, 2022

Good start. A comprehensive list of renames is great, but that's appendix information. The value of a guide like this is to discuss fundamentals, API design shifts, philosophical adjustments, gotchas, and intentional breaks where there is no supported replacement or where reimplementation is required (eg tweens, dropping rotation_degrees, signals, setters/getters), such as:

  • Shaders are not converted at all with the auto tool (last I checked) and there are many breaking changes. Transmission is gone, and backlight works differently. Filenames are different. Hints are renamed. Projection Matrices are renamed. #63673
  • ArrayMesh is an unsupported format, no matter if it is saved to disk as a resource file or embedded in a scene file. It is not forwards compatible and not upgradeable. The conversion tool won't do anything to the meshes. The only supported, and safe way to maintain working meshes is to keep fbx/glb files linked to tscns. Cleared inheritance is not supported at all and will cause broken meshes. GD3->4 #63550 GD4a1-14->a15+ #64854 There has been talk of supporting ArrayMesh by Juan, Remi & Clay in 64854, but until it is reality, the above should be documented.
  • Setters and getters are verrrrry different #61660 https://docs.godotengine.org/en/latest/tutorials/scripting/gdscript/gdscript_basics.html#properties
  • Signal connections are very different https://docs.godotengine.org/en/latest/tutorials/scripting/gdscript/gdscript_basics.html#signals
  • Advantages of upgrading:
    • Vulkan support
    • Greatly improved visual fidelity with improved direct lighting & shadows, bounce lighting systems (VoxelGI/SDGFI), fixed roughness, improved SSS, physical lights and camera, volumetric fog, particle collision, vfx/screen space/camera effects, AA methods Ground truth #63374
    • Faster real world gdscript and rendering performance, even pre-optimizations (though not in all test circumstances #68959)
    • Compute shaders and a much more open shader pipeline (How open is it? Can we do anything like tessellation or geometry shaders?), shader includes, uniform arrays, structs
    • Automatic, toggleable LOD generation and handling for meshes
    • Animation Library, allowing seamless retargeting of animations on identical rigs
    • Cyclic References of class names are now supported (as of pending beta7) #67714
    • Double precision floating point support (upon recompiling) #892
    • Move maker mode for offline, performance-independent rendering #62122
  • DIsadvantages of upgrading:
    • Bullet physics has been removed. Only godot physics exists (for better or worse). (Gamedevs should not have to discover this half-way through a port.)
    • Any ArrayMeshes (cleared inheritance from glb/fbxes) will need to be manually reimported from assets again.
    • Rotation_degrees is gone affecting both code and AnimationPlayer tracks #63390
    • You now have to care about StringNames #64171 Pending removal #68747
    • No 16/32-bit/HDR viewports (yet) #2935
    • Tween Node is gone and tweens need to be reimplemented, which can be done while still on GD3 #41794

@Calinou
Copy link
Member Author

Calinou commented Dec 2, 2022

Shaders are not converted at all with the auto tool (last I checked) and there are many breaking changes. Transmission is gone, and backlight works differently. Filenames are different. Hints are renamed. Projection Matrices are renamed. godotengine/godot#63673

Shaders are supposed to be converted, but it might only work with external .gdshader files, not built-in shaders in a scene file:
Edit: It's the other way around: godotengine/godot#69597

https://github.com/godotengine/godot/blob/1e3919c409fa1f24db8ecde58f723fd59adfeccb/editor/project_converter_3_to_4.cpp#L1374-L1390

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
content:new page Issues and PRs related to creation of new documentation pages for new or undocumented features enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Write a migration guide for Godot 4
6 participants