Skip to content

Commit 3eaf45d

Browse files
committed
Merge branch 'master' into 4.6
2 parents c93ecd9 + bfef9c6 commit 3eaf45d

21 files changed

+377
-95
lines changed

engine_details/development/compiling/compiling_for_linuxbsd.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -532,8 +532,8 @@ then use the following SCons command:
532532
After the build is completed, a new binary with a ``.llvm`` suffix will be
533533
created in the ``bin/`` folder.
534534

535-
It's still recommended to use GCC for production builds as they can be compiled using
536-
link-time optimization, making the resulting binaries smaller and faster.
535+
It's still recommended to use GCC for production builds as it's the compiler used
536+
for official builds and is more rigorously tested.
537537

538538
If this error occurs:
539539

engine_details/editor/creating_icons.rst

Lines changed: 41 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -21,32 +21,56 @@ Clone the ``godot`` repository containing all the editor icons:
2121
git clone https://github.com/godotengine/godot.git
2222
2323
The icons must be created in a vector graphics editor in SVG format. There are
24-
two main requirements to follow:
24+
three main requirements to follow:
2525

2626
- Icons must be 16×16. In Inkscape, you can configure the document size in
2727
**File > Document Properties**.
2828
- Lines should be snapped to pixels whenever possible to remain crisp at lower DPI.
2929
You can create a 16×16 grid in Inkscape to make this easier.
30+
- If the user has configured their editor to use a light theme, Godot will
31+
convert the icon's colors based on a
32+
`set of predefined color mappings <https://github.com/godotengine/godot/blob/master/editor/themes/editor_color_map.cpp>`__.
33+
This is to ensure the icon always displays with a sufficient contrast rate.
34+
Try to restrict your icon's color palette to colors found in the list above.
35+
Otherwise, your icon may become difficult to read on a light background.
3036

3137
Once you're satisfied with the icon's design, save the icon in the cloned
3238
repository's ``editor/icons`` folder. The icon name should match the intended
3339
name in a case-sensitive manner. For example, to create an icon for
3440
CPUParticles2D, name the file ``CPUParticles2D.svg``.
3541

36-
Color conversion for light editor themes
37-
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
42+
.. tip::
3843

39-
If the user has configured their editor to use a light theme, Godot will
40-
convert the icon's colors based on a
41-
`set of predefined color mappings <https://github.com/godotengine/godot/blob/master/editor/themes/editor_color_map.cpp>`__.
42-
This is to ensure the icon always displays with a sufficient contrast rate.
43-
Try to restrict your icon's color palette to colors found in the list above.
44-
Otherwise, your icon may become difficult to read on a light background.
44+
You can also browse all existing icons on the
45+
`Godot editor icons <https://godotengine.github.io/editor-icons/>`__
46+
website.
4547

46-
.. note::
47-
To enable color conversion for light editor themes:
48-
1. :ui:`Import > Import As > Texture2D`
49-
2. Set ``editor/convert_colors_with_editor_theme`` to ``true``
48+
Import options for custom icons
49+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
50+
51+
For custom icons that are present in projects (as opposed to the engine source code),
52+
there are two import options you should enable:
53+
54+
Scaling for hiDPI displays
55+
^^^^^^^^^^^^^^^^^^^^^^^^^^
56+
57+
Icons need to be scaled properly on hiDPI displays to ensure they remain
58+
crisp and large enough to be readable.
59+
60+
To ensure the icon is rendered at a correct scale on hiDPI displays, select the
61+
SVG file in the FileSystem dock, enable the **Editor > Scale with Editor Scale**
62+
option in the Import dock and click :button:`Reimport`. Note that this option is
63+
only available for icons in SVG format, as it requires the use of a vector
64+
format to work.
65+
66+
Color conversion for light editor themes
67+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
68+
69+
To ensure the icon has its colors converted when the user is using a light
70+
theme, select the SVG file in the FileSystem dock, enable the **Editor > Convert
71+
Colors with Editor Theme** option in the Import dock and click
72+
:button:`Reimport`. Note that this option is only available for icons in SVG
73+
format, as it requires the use of a vector format to work.
5074

5175
Icon optimization
5276
~~~~~~~~~~~~~~~~~
@@ -76,19 +100,18 @@ make a separate pull request for your icons to be available within the editor
76100
as they can be self-contained.
77101

78102
For specific instructions on how to create module icons, refer to
79-
:ref:`Creating custom module icons<doc_custom_module_icons>`.
103+
:ref:`Creating custom module icons <doc_custom_module_icons>`.
80104

81105
Troubleshooting
82106
~~~~~~~~~~~~~~~
83107

84108
If icons don't appear in the editor, make sure that:
85109

86110
1. Each icon's filename matches the naming requirement as described previously.
87-
88-
2. ``modules/svg`` is enabled (it should be enabled by default). Without it,
89-
icons won't appear in the editor at all.
111+
2. The ``svg`` module is enabled at compile-time (it is enabled by default).
112+
Without this module, icons won't appear in the editor at all.
90113

91114
References
92115
~~~~~~~~~~
93116

94-
- `editor/icons <https://github.com/godotengine/godot/tree/master/editor/icons>`__
117+
- `editor/icons <https://github.com/godotengine/godot/tree/master/editor/icons>`__

engine_details/file_formats/tscn.rst

Lines changed: 31 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -47,12 +47,10 @@ There are five main sections inside the TSCN file:
4747
3. Nodes
4848
4. Connections
4949

50-
The file descriptor looks like ``[gd_scene load_steps=4 format=3 uid="uid://cecaux1sm7mo0"]``
51-
and should be the first entry in the file. The ``load_steps`` parameter is equal to the
52-
total amount of resources (internal and external) plus one (for the file itself).
53-
If the file has no resources, ``load_steps`` is omitted. The engine will
54-
still load the file correctly if ``load_steps`` is incorrect, but this will affect
55-
loading bars and any other piece of code relying on that value.
50+
The file descriptor looks like ``[gd_scene format=3 uid="uid://cecaux1sm7mo0"]``
51+
and should be the first entry in the file. Note that scenes saved before Godot 4.6
52+
will also have a ``load_steps=<int>`` attribute in the file descriptor. This
53+
attribute is now deprecated and should be ignored if present.
5654

5755
``uid`` is a unique string-based identifier representing the scene. This is
5856
used by the engine to track files that are moved around, even while the editor
@@ -92,15 +90,19 @@ so on. For example, a Node3D looks like:
9290

9391
::
9492

95-
[node name="Cube" type="Node3D"]
93+
[node name="Cube" type="Node3D" unique_id=224283918]
9694
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 1, 2, 3)
9795

9896
The scene tree
9997
--------------
10098

101-
The scene tree is made up of… nodes! The heading of each node consists of
102-
its name, parent and (most of the time) a type. For example:
103-
``[node name="PlayerCamera" type="Camera" parent="Player/Head"]``
99+
The scene tree is made up of… nodes! The heading of each node consists of its
100+
name, parent, a unique ID (used to track nodes even if they are moved or
101+
renamed), and most of the time, a type. For example: ``[node name="PlayerCamera"
102+
type="Camera" parent="Player/Head" unique_id=1697057368]``
103+
104+
Note that ``unique_id`` is only present in scenes saved with Godot 4.6 or later.
105+
Therefore, it is not guaranteed to be present.
104106

105107
Other valid keywords include:
106108

@@ -120,10 +122,10 @@ the path should be ``"."``. Here is an example scene tree
120122

121123
::
122124

123-
[node name="Player" type="Node3D"] ; The scene root
124-
[node name="Arm" type="Node3D" parent="."] ; Parented to the scene root
125-
[node name="Hand" type="Node3D" parent="Arm"] ; Child of "Arm"
126-
[node name="Finger" type="Node3D" parent="Arm/Hand"] ; Child of "Hand"
125+
[node name="Player" type="Node3D" unique_id=1155673912] ; The scene root
126+
[node name="Arm" type="Node3D" parent="." unique_id=1010797352] ; Parented to the scene root
127+
[node name="Hand" type="Node3D" parent="Arm" unique_id=536436825] ; Child of "Arm"
128+
[node name="Finger" type="Node3D" parent="Arm/Hand" unique_id=1732647084] ; Child of "Hand"
127129

128130
.. tip::
129131

@@ -138,7 +140,7 @@ collision, visuals (mesh + light) and a camera parented to the RigidBody3D:
138140

139141
::
140142

141-
[gd_scene load_steps=4 format=3 uid="uid://cecaux1sm7mo0"]
143+
[gd_scene format=3 uid="uid://cecaux1sm7mo0"]
142144

143145
[sub_resource type="SphereShape3D" id="SphereShape3D_tj6p1"]
144146

@@ -147,20 +149,20 @@ collision, visuals (mesh + light) and a camera parented to the RigidBody3D:
147149
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_k54se"]
148150
albedo_color = Color(1, 0.639216, 0.309804, 1)
149151

150-
[node name="Ball" type="RigidBody3D"]
152+
[node name="Ball" type="RigidBody3D" unique_id=1358867382]
151153

152-
[node name="CollisionShape3D" type="CollisionShape3D" parent="."]
154+
[node name="CollisionShape3D" type="CollisionShape3D" parent="." unique_id=1279975976]
153155
shape = SubResource("SphereShape3D_tj6p1")
154156

155-
[node name="MeshInstance3D" type="MeshInstance3D" parent="."]
157+
[node name="MeshInstance3D" type="MeshInstance3D" parent="." unique_id=558852834]
156158
mesh = SubResource("SphereMesh_4w3ye")
157159
surface_material_override/0 = SubResource("StandardMaterial3D_k54se")
158160

159-
[node name="OmniLight3D" type="OmniLight3D" parent="."]
161+
[node name="OmniLight3D" type="OmniLight3D" parent="." unique_id=1581292810]
160162
light_color = Color(1, 0.698039, 0.321569, 1)
161163
omni_range = 10.0
162164

163-
[node name="Camera3D" type="Camera3D" parent="."]
165+
[node name="Camera3D" type="Camera3D" parent="." unique_id=795715540]
164166
transform = Transform3D(1, 0, 0, 0, 0.939693, 0.34202, 0, -0.34202, 0.939693, 0, 1, 3)
165167

166168
NodePath
@@ -187,7 +189,7 @@ For example, the ``skeleton`` property in the MeshInstance3D node called
187189

188190
::
189191

190-
[node name="mesh" type="MeshInstance3D" parent="Armature01"]
192+
[node name="mesh" type="MeshInstance3D" parent="Armature01" unique_id=1638249225]
191193
skeleton = NodePath("..")
192194

193195
Skeleton3D
@@ -208,7 +210,7 @@ Here's an example of a skeleton node with two bones:
208210

209211
::
210212

211-
[node name="Skeleton3D" type="Skeleton3D" parent="PlayerModel/Robot_Skeleton" index="0"]
213+
[node name="Skeleton3D" type="Skeleton3D" parent="PlayerModel/Robot_Skeleton" index="0" unique_id=542985694]
212214
bones/1/position = Vector3(0.114471, 2.19771, -0.197845)
213215
bones/1/rotation = Quaternion(0.191422, -0.0471201, -0.00831942, 0.980341)
214216
bones/2/position = Vector3(-2.59096e-05, 0.236002, 0.000347473)
@@ -227,12 +229,12 @@ An example of a :ref:`class_Marker3D` node parented to a bone in Skeleton:
227229

228230
::
229231

230-
[node name="GunBone" type="BoneAttachment3D" parent="PlayerModel/Robot_Skeleton/Skeleton3D" index="5"]
232+
[node name="GunBone" type="BoneAttachment3D" parent="PlayerModel/Robot_Skeleton/Skeleton3D" index="5" unique_id=63481392]
231233
transform = Transform3D(0.333531, 0.128981, -0.933896, 0.567174, 0.763886, 0.308015, 0.753209, -0.632331, 0.181604, -0.323915, 1.07098, 0.0497144)
232234
bone_name = "hand.R"
233235
bone_idx = 55
234236

235-
[node name="ShootFrom" type="Marker3D" parent="PlayerModel/Robot_Skeleton/Skeleton3D/GunBone"]
237+
[node name="ShootFrom" type="Marker3D" parent="PlayerModel/Robot_Skeleton/Skeleton3D/GunBone" unique_id=679926736]
236238
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.4, 0)
237239

238240
AnimationPlayer
@@ -353,7 +355,7 @@ Here's an example of an ArrayMesh saved to its own ``.tres`` file. Some fields w
353355

354356
::
355357

356-
[gd_resource type="ArrayMesh" load_steps=2 format=3 uid="uid://dww8o7hsqrhx5"]
358+
[gd_resource type="ArrayMesh" format=3 uid="uid://dww8o7hsqrhx5"]
357359

358360
[ext_resource type="Material" path="res://player/model/playerobot.tres" id="1_r3bjq"]
359361

@@ -423,7 +425,7 @@ AnimationPlayer for brevity:
423425

424426
::
425427

426-
[gd_scene load_steps=4 format=3 uid="uid://cdyt3nktp6y6"]
428+
[gd_scene format=3 uid="uid://cdyt3nktp6y6"]
427429

428430
[sub_resource type="Animation" id="Animation_r2qdp"]
429431
resource_name = "scale_down"
@@ -450,15 +452,15 @@ AnimationPlayer for brevity:
450452

451453
[sub_resource type="BoxMesh" id="BoxMesh_u688r"]
452454

453-
[node name="Node3D" type="Node3D"]
455+
[node name="Node3D" type="Node3D" unique_id=2076735200]
454456

455-
[node name="AnimationPlayer" type="AnimationPlayer" parent="."]
457+
[node name="AnimationPlayer" type="AnimationPlayer" parent="." unique_id=2139773137]
456458
autoplay = "scale_down"
457459
libraries = {
458460
"": SubResource("AnimationLibrary_4qx36")
459461
}
460462

461-
[node name="Box" type="MeshInstance3D" parent="."]
463+
[node name="Box" type="MeshInstance3D" parent="." unique_id=711004519]
462464
mesh = SubResource("BoxMesh_u688r")
463465

464466
For generic property ``value`` tracks, ``keys`` is a dictionary containing 3

getting_started/first_2d_game/02.player_scene.rst

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,14 @@ rule, a scene's root node should reflect the object's desired functionality -
1818
what the object *is*. In the upper-left corner, in the "Scene" tab, click the
1919
"Other Node" button and add an :ref:`Area2D <class_Area2D>` node to the scene.
2020

21+
.. note::
22+
23+
Godot also provides the :ref:`CharacterBody2D <class_CharacterBody2D>` node,
24+
specifically designed for 2D characters, which includes built-in support for some
25+
of the processes explained in this tutorial. In many real world projects, CharacterBody2D
26+
would be a better choice for players and enemies. However, this tutorial focuses on
27+
core concepts that apply to a wider range of nodes and use cases.
28+
2129
.. image:: img/add_node.webp
2230

2331
When you add the ``Area2D`` node, Godot will display the following **warning icon**

index.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,14 +48,14 @@ To begin reading the relevant documentation, select the tile that matches your p
4848
}
4949
5050
.grid-item {
51-
color: hsla(0, 0%, 100%, 0.9);
5251
padding: 1rem;
5352
border-radius: 0.375rem;
5453
text-align: center;
5554
}
5655
56+
.grid-item,
5757
.grid-item:visited {
58-
color: unset;
58+
color: hsla(0, 0%, 100%, 0.9);
5959
}
6060
6161
.grid-item:hover,
@@ -109,7 +109,7 @@ To begin reading the relevant documentation, select the tile that matches your p
109109
<br>
110110

111111
You can also use the table of contents in the sidebar to easily access
112-
any section of the documentation for your topic of interest. You can
112+
any section of the documentation for your topic of interest. You can
113113
also use the search function in the top-left corner.
114114

115115
Get involved

tutorials/2d/introduction_to_2d.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -300,10 +300,10 @@ Node2D and Control node
300300
for 2D game objects, and :ref:`Control <class_Control>` is the base node
301301
for everything GUI. For 3D, Godot uses the :ref:`Node3D <class_Node3D>` node.
302302

303-
3D in 2D
304-
--------
303+
Displaying 3D nodes in 2D
304+
-------------------------
305305

306-
It is possible to display 3D scenes in 2D screen, You can see this in the demo `3D in 2D Viewport <https://godotengine.org/asset-library/asset/2804>`__.
306+
It is possible to display 3D nodes in a 2D scene by using a :ref:`SubViewport<class_SubViewport>`. You can see this in the demo `3D in 2D Viewport <https://godotengine.org/asset-library/asset/2804>`__.
307307

308308
.. image:: img/3d_in_2d_demo_editor.webp
309309

tutorials/export/exporting_for_android.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ In that screen, 2 paths need to be set:
7979

8080
- ``Java SDK Path`` should be the location where OpenJDK 17 was installed.
8181

82-
- ``Android Sdk Path`` should be the location where the Android SDK was installed.
82+
- ``Android SDK Path`` should be the location where the Android SDK was installed. This directory should contain ``platform-tools/adb``.
8383
- For example ``%LOCALAPPDATA%\Android\Sdk\`` on Windows or ``/Users/$USER/Library/Android/sdk/`` on macOS.
8484

8585
Once that is configured, everything is ready to export to Android!

tutorials/export/exporting_for_linux.rst

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,53 @@ system. When exporting for Linux, the exporter takes all the project files and
1818
creates a ``data.pck`` file. This file is bundled with a specially optimized
1919
binary that is smaller, faster and does not contain the editor and debugger.
2020

21+
Architecture
22+
------------
23+
24+
There are 7 different processor architectures that exported Godot projects can run
25+
on in Linux:
26+
27+
- x86_64
28+
- x86_32
29+
- arm64
30+
- arm32
31+
- rv64
32+
- ppc64
33+
- loongarch64
34+
35+
The default is x86_64, this is the most common architecture of PC processors
36+
today. All modern Intel and AMD processors as of writing this are x86_64.
37+
38+
x86_32 will give you a 32bit executable that can run on 32bit only distributions
39+
of Linux as well as some modern distributions that are 64bit. It is NOT recommended
40+
to use this option unless you are trying to get your project to run on an old 32bit
41+
distribution and processor. It should also be noted that several prominent
42+
distributions, such as Fedora, have been discussing removing their 32bit libraries
43+
which would prevent executables made this way from running on future versions of
44+
that distribution.
45+
46+
arm64 executables can run on 64bit ARM processors. If you're familiar with the
47+
Raspberry Pi, those have utilized 64bit ARM processors since the Pi 3 (older
48+
versions used 32bit ARM processors). If you're uploading to a platform that
49+
supports multiple executables, such as itch.io, and you're confident your game
50+
could run on a common ARM computer, such as the Pi 5, then we'd recommend exporting
51+
this version and providing it as an option.
52+
53+
arm32 executables are for older 32bit arm processors, such as what the Raspberry Pi 1
54+
and 2 used. Given that they're not common at all these days we do not recommend
55+
exporting for this unless you have a computer with one of these processors you know
56+
you can, and want to have your game running on.
57+
58+
rv64 is for RISC-V processors, ppc64 is for 64bit PowerPC processors, and
59+
loongarch64 is for 64bit LoongArch processors. All of these architectures are
60+
substantially more niche when it comes to running videogames on them. And we only
61+
recommend exporting for them if you have a reason to, such as if you're an
62+
enthusiast who owns hardware. Official export templates are not provided by Godot,
63+
you will have to create them on your own. Instructions for compiling the engine for
64+
RISC-V and creating export templates can be found on the :ref:`doc_compiling_for_linuxbsd`
65+
page.
66+
67+
2168
Environment variables
2269
---------------------
2370

0 commit comments

Comments
 (0)