mirror of
https://github.com/Relintai/pandemonium_engine_docs.git
synced 2025-02-06 16:16:00 +01:00
More cleanups.
This commit is contained in:
parent
1ae7bcaf0b
commit
8c32760a70
@ -16,7 +16,8 @@ distribute the software (and derivative projects, including games made with it).
|
|||||||
Your game or project can have a different license, but it still needs to comply
|
Your game or project can have a different license, but it still needs to comply
|
||||||
with the original one.
|
with the original one.
|
||||||
|
|
||||||
.. warning::
|
Warning:
|
||||||
|
|
||||||
|
|
||||||
In your project's credits screen, remember to also list third-party notices
|
In your project's credits screen, remember to also list third-party notices
|
||||||
for assets you're using, such as textures, models, sounds, music and fonts.
|
for assets you're using, such as textures, models, sounds, music and fonts.
|
||||||
@ -43,7 +44,8 @@ This text reads as follows:
|
|||||||
|
|
||||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
|
|
||||||
.. note::
|
Note:
|
||||||
|
|
||||||
|
|
||||||
Your games do not need to be under the same license. You are free to release
|
Your games do not need to be under the same license. You are free to release
|
||||||
your Godot projects under any license and to create commercial games with
|
your Godot projects under any license and to create commercial games with
|
||||||
@ -114,7 +116,8 @@ Godot license:
|
|||||||
|
|
||||||
Portions of this software are copyright © ( year> The FreeType Project (www.freetype.org). All rights reserved.
|
Portions of this software are copyright © ( year> The FreeType Project (www.freetype.org). All rights reserved.
|
||||||
|
|
||||||
.. note::
|
Note:
|
||||||
|
|
||||||
|
|
||||||
( year> should correspond to the value from the FreeType version used
|
( year> should correspond to the value from the FreeType version used
|
||||||
in your build. This information can be found in the editor by opening
|
in your build. This information can be found in the editor by opening
|
||||||
@ -160,7 +163,8 @@ Keep in mind that Godot 2.x and 3.0 use `OpenSSL ( https://www.openssl.org )`_ 1
|
|||||||
instead. This old OpenSSL version used the OpenSSL license, not the Apache 2 license
|
instead. This old OpenSSL version used the OpenSSL license, not the Apache 2 license
|
||||||
as the latest version of OpenSSL currently uses (as of April 2022).
|
as the latest version of OpenSSL currently uses (as of April 2022).
|
||||||
|
|
||||||
.. note::
|
Note:
|
||||||
|
|
||||||
|
|
||||||
If you exported your project using a
|
If you exported your project using a
|
||||||
`custom build with specific modules disabled ( doc_optimizing_for_size )`,
|
`custom build with specific modules disabled ( doc_optimizing_for_size )`,
|
||||||
|
@ -8,7 +8,8 @@ includes many new tutorials, many fixes and updates for old tutorials, and many
|
|||||||
to the `class reference ( toc-class-ref )`. Below is a list of new tutorials
|
to the `class reference ( toc-class-ref )`. Below is a list of new tutorials
|
||||||
added since version 3.1.
|
added since version 3.1.
|
||||||
|
|
||||||
.. note:: This document only contains new tutorials so not all changes are reflected,
|
Note:
|
||||||
|
This document only contains new tutorials so not all changes are reflected,
|
||||||
many tutorials have been substantially updated but are not reflected in this document.
|
many tutorials have been substantially updated but are not reflected in this document.
|
||||||
|
|
||||||
New tutorials since version 3.1
|
New tutorials since version 3.1
|
||||||
|
@ -63,7 +63,8 @@ language and then compiled into a static website/offline document using the
|
|||||||
open source `Sphinx ( http://www.sphinx-doc.org )`_ and `ReadTheDocs
|
open source `Sphinx ( http://www.sphinx-doc.org )`_ and `ReadTheDocs
|
||||||
( https://readthedocs.org/ )`_ tools.
|
( https://readthedocs.org/ )`_ tools.
|
||||||
|
|
||||||
.. note:: You can contribute to Godot's documentation by opening issue tickets
|
Note:
|
||||||
|
You can contribute to Godot's documentation by opening issue tickets
|
||||||
or sending patches via pull requests on its GitHub
|
or sending patches via pull requests on its GitHub
|
||||||
`source repository ( https://github.com/godotengine/godot-docs )`_, or
|
`source repository ( https://github.com/godotengine/godot-docs )`_, or
|
||||||
translating it into your language on `Hosted Weblate
|
translating it into your language on `Hosted Weblate
|
||||||
|
@ -5,7 +5,8 @@ List of features
|
|||||||
|
|
||||||
This page aims to list all features currently supported by Godot.
|
This page aims to list all features currently supported by Godot.
|
||||||
|
|
||||||
.. note::
|
Note:
|
||||||
|
|
||||||
|
|
||||||
This page lists features supported by the current stable version of
|
This page lists features supported by the current stable version of
|
||||||
Godot (3.5). `More features ( https://docs.godotengine.org/en/latest/about/list_of_features.html )`
|
Godot (3.5). `More features ( https://docs.godotengine.org/en/latest/about/list_of_features.html )`
|
||||||
@ -281,7 +282,8 @@ Editor
|
|||||||
- Real-time occluder shapes (sphere and polygon). Not as effective as rooms and portals
|
- Real-time occluder shapes (sphere and polygon). Not as effective as rooms and portals
|
||||||
(and doesn't support gameplay notifications), but easier to set up.
|
(and doesn't support gameplay notifications), but easier to set up.
|
||||||
|
|
||||||
.. note::
|
Note:
|
||||||
|
|
||||||
|
|
||||||
Most of the effects listed above can be adjusted for better performance or
|
Most of the effects listed above can be adjusted for better performance or
|
||||||
to further improve quality. This can be helpful when using Godot for
|
to further improve quality. This can be helpful when using Godot for
|
||||||
@ -379,7 +381,8 @@ Scripting
|
|||||||
|
|
||||||
- Maintained D, Kotlin, Python, Nim, and Rust bindings provided by the community.
|
- Maintained D, Kotlin, Python, Nim, and Rust bindings provided by the community.
|
||||||
|
|
||||||
.. warning::
|
Warning:
|
||||||
|
|
||||||
|
|
||||||
`Godot 4.0 will remove VisualScript from core entirely. ( https://godotengine.org/article/godot-4-will-discontinue-visual-scripting )`
|
`Godot 4.0 will remove VisualScript from core entirely. ( https://godotengine.org/article/godot-4-will-discontinue-visual-scripting )`
|
||||||
As a result, creating new projects using visual scripting in Godot is not recommended.
|
As a result, creating new projects using visual scripting in Godot is not recommended.
|
||||||
@ -646,7 +649,8 @@ Miscellaneous
|
|||||||
|
|
||||||
- Open developement process with `contributions welcome ( doc_ways_to_contribute )`.
|
- Open developement process with `contributions welcome ( doc_ways_to_contribute )`.
|
||||||
|
|
||||||
.. seealso::
|
See also:
|
||||||
|
|
||||||
|
|
||||||
The `Godot proposals repository ( https://github.com/godotengine/godot-proposals )`
|
The `Godot proposals repository ( https://github.com/godotengine/godot-proposals )`
|
||||||
lists features that have been requested by the community and may be implemented
|
lists features that have been requested by the community and may be implemented
|
||||||
|
@ -59,7 +59,8 @@ further developed for maintenance releases in a Git branch of the same name
|
|||||||
(for example patch updates for the 3.3 stable branch are developed in the
|
(for example patch updates for the 3.3 stable branch are developed in the
|
||||||
`3.3` Git branch).
|
`3.3` Git branch).
|
||||||
|
|
||||||
.. note::
|
Note:
|
||||||
|
|
||||||
|
|
||||||
As mentioned in the introduction, Godot's release policy is evolving, and
|
As mentioned in the introduction, Godot's release policy is evolving, and
|
||||||
earlier Godot releases may not have followed the above rules to the letter.
|
earlier Godot releases may not have followed the above rules to the letter.
|
||||||
|
@ -5,7 +5,8 @@ Troubleshooting
|
|||||||
|
|
||||||
This page lists common issues encountered when using Godot and possible solutions.
|
This page lists common issues encountered when using Godot and possible solutions.
|
||||||
|
|
||||||
.. seealso::
|
See also:
|
||||||
|
|
||||||
|
|
||||||
See `doc_using_the_web_editor` for caveats specific to the HTML5 version
|
See `doc_using_the_web_editor` for caveats specific to the HTML5 version
|
||||||
of the Godot editor.
|
of the Godot editor.
|
||||||
|
@ -38,7 +38,8 @@ is roughly in the middle of all test builds available). If you can't reproduce
|
|||||||
the bug with Godot 3.2 beta 1, then try newer betas and RC builds. If you do
|
the bug with Godot 3.2 beta 1, then try newer betas and RC builds. If you do
|
||||||
manage to reproduce the bug with Godot 3.2 beta 1, then try older alpha builds.
|
manage to reproduce the bug with Godot 3.2 beta 1, then try older alpha builds.
|
||||||
|
|
||||||
.. warning::
|
Warning:
|
||||||
|
|
||||||
|
|
||||||
For bisecting regressions, don't use patch releases such as Godot 3.1.2.
|
For bisecting regressions, don't use patch releases such as Godot 3.1.2.
|
||||||
Instead, use the minor version's first release like Godot 3.1. This is
|
Instead, use the minor version's first release like Godot 3.1. This is
|
||||||
@ -55,7 +56,8 @@ system offers a built-in command for this: `git bisect`. This makes the
|
|||||||
process semi-automated as you only have to build the engine, run it and try to
|
process semi-automated as you only have to build the engine, run it and try to
|
||||||
reproduce the bug.
|
reproduce the bug.
|
||||||
|
|
||||||
.. note::
|
Note:
|
||||||
|
|
||||||
|
|
||||||
Before bisecting a regression, you need to set up a build environment to
|
Before bisecting a regression, you need to set up a build environment to
|
||||||
compile Godot from source. To do so, read the
|
compile Godot from source. To do so, read the
|
||||||
@ -138,7 +140,8 @@ regression appeared. Write this commit hash as a comment to the GitHub issue
|
|||||||
you've bisected. This will help in solving the issue. Thanks again for
|
you've bisected. This will help in solving the issue. Thanks again for
|
||||||
contributing to Godot :)
|
contributing to Godot :)
|
||||||
|
|
||||||
.. note::
|
Note:
|
||||||
|
|
||||||
|
|
||||||
You can read the full documentation on `git bisect`
|
You can read the full documentation on `git bisect`
|
||||||
`here ( https://git-scm.com/docs/git-bisect )`.
|
`here ( https://git-scm.com/docs/git-bisect )`.
|
||||||
|
@ -21,7 +21,8 @@ install all these tools. It comes pre-installed with `Python
|
|||||||
( https://www.python.org/ )`. Ensure that you install and use Python 3. Here are
|
( https://www.python.org/ )`. Ensure that you install and use Python 3. Here are
|
||||||
the commands to clone the repository and then install all requirements.
|
the commands to clone the repository and then install all requirements.
|
||||||
|
|
||||||
.. note:: You may need to write `python3 -m pip` (Unix) or `py -m pip` (Windows) instead of `pip3`.
|
Note:
|
||||||
|
You may need to write `python3 -m pip` (Unix) or `py -m pip` (Windows) instead of `pip3`.
|
||||||
If both approaches fail, `check that you have pip3 installed ( https://pip.pypa.io/en/stable/installation/ )`.
|
If both approaches fail, `check that you have pip3 installed ( https://pip.pypa.io/en/stable/installation/ )`.
|
||||||
|
|
||||||
.. code:: sh
|
.. code:: sh
|
||||||
@ -69,7 +70,8 @@ In case you of a `MemoryError` or `EOFError`, you can remove the
|
|||||||
`classes/` folder and run `make` again. This will drop the class references
|
`classes/` folder and run `make` again. This will drop the class references
|
||||||
from the final HTML documentation but will keep the rest intact.
|
from the final HTML documentation but will keep the rest intact.
|
||||||
|
|
||||||
.. note:: If you delete the `classes/` folder, do not use `git add .` when
|
Note:
|
||||||
|
If you delete the `classes/` folder, do not use `git add .` when
|
||||||
working on a pull request or the whole `classes/` folder will be
|
working on a pull request or the whole `classes/` folder will be
|
||||||
removed when you commit. See `#3157
|
removed when you commit. See `#3157
|
||||||
( https://github.com/godotengine/godot-docs/issues/3157 )` for more
|
( https://github.com/godotengine/godot-docs/issues/3157 )` for more
|
||||||
|
@ -7,7 +7,8 @@ This page explains how to write the class reference. You will learn where to
|
|||||||
write new descriptions for the classes, methods, and properties for Godot's
|
write new descriptions for the classes, methods, and properties for Godot's
|
||||||
built-in node types.
|
built-in node types.
|
||||||
|
|
||||||
.. seealso::
|
See also:
|
||||||
|
|
||||||
|
|
||||||
To learn to submit your changes to the Godot project using the Git version
|
To learn to submit your changes to the Godot project using the Git version
|
||||||
control system, see `doc_updating_the_class_reference`.
|
control system, see `doc_updating_the_class_reference`.
|
||||||
@ -94,7 +95,8 @@ reference. The folder contains an XML file for each class. The XML lists the
|
|||||||
constants and methods you will find in the class reference. Godot generates and
|
constants and methods you will find in the class reference. Godot generates and
|
||||||
updates the XML automatically.
|
updates the XML automatically.
|
||||||
|
|
||||||
.. note:: For some modules in the engine's source code, you'll find the XML
|
Note:
|
||||||
|
For some modules in the engine's source code, you'll find the XML
|
||||||
files in the `modules/<module_name>/doc_classes/` directory instead.
|
files in the `modules/<module_name>/doc_classes/` directory instead.
|
||||||
|
|
||||||
Edit it using your favorite text editor. If you use a code editor, make sure
|
Edit it using your favorite text editor. If you use a code editor, make sure
|
||||||
|
@ -33,7 +33,8 @@ not introducing trailing whitespace or space-based indentation, you should be
|
|||||||
fine. If you plan to contribute regularly however, we strongly advise that you
|
fine. If you plan to contribute regularly however, we strongly advise that you
|
||||||
setup clang-format locally to check and automatically fix all your commits.
|
setup clang-format locally to check and automatically fix all your commits.
|
||||||
|
|
||||||
.. warning:: Godot's code style should *not* be applied to third-party code,
|
Warning:
|
||||||
|
Godot's code style should *not* be applied to third-party code,
|
||||||
i.e. that is included in Godot's source tree but was not written
|
i.e. that is included in Godot's source tree but was not written
|
||||||
specifically for our project. Such code usually come from
|
specifically for our project. Such code usually come from
|
||||||
different upstream projects with their own style guides (or lack
|
different upstream projects with their own style guides (or lack
|
||||||
@ -47,7 +48,8 @@ setup clang-format locally to check and automatically fix all your commits.
|
|||||||
`/* clang-format off */` and `/* clang-format on */` to tell
|
`/* clang-format off */` and `/* clang-format on */` to tell
|
||||||
clang-format to ignore a chunk of code.
|
clang-format to ignore a chunk of code.
|
||||||
|
|
||||||
.. seealso::
|
See also:
|
||||||
|
|
||||||
|
|
||||||
These guidelines only cover code formatting. See `doc_cpp_usage_guidelines`
|
These guidelines only cover code formatting. See `doc_cpp_usage_guidelines`
|
||||||
for a list of language features that are permitted in pull requests.
|
for a list of language features that are permitted in pull requests.
|
||||||
|
@ -29,7 +29,8 @@ Writing complete and accessible documentation
|
|||||||
information about a feature and how it works, it doesn't exist to them. We
|
information about a feature and how it works, it doesn't exist to them. We
|
||||||
should ensure that we cover everything Godot does.
|
should ensure that we cover everything Godot does.
|
||||||
|
|
||||||
.. note::
|
Note:
|
||||||
|
|
||||||
|
|
||||||
When adding or updating an engine feature, the documentation team needs to
|
When adding or updating an engine feature, the documentation team needs to
|
||||||
know about it. Contributors should open an issue on the `godot-docs` repository
|
know about it. Contributors should open an issue on the `godot-docs` repository
|
||||||
@ -46,7 +47,8 @@ guide to solving problems they encounter. For example, instead of writing the
|
|||||||
heading "Signals", consider writing "Reacting to changes with signals". The
|
heading "Signals", consider writing "Reacting to changes with signals". The
|
||||||
second title makes it clear what the purpose of signals is.
|
second title makes it clear what the purpose of signals is.
|
||||||
|
|
||||||
.. note::
|
Note:
|
||||||
|
|
||||||
|
|
||||||
Long section titles lead to long entries in the side menu, which can make
|
Long section titles lead to long entries in the side menu, which can make
|
||||||
navigation cumbersome. Try to keep headings five words long or less.
|
navigation cumbersome. Try to keep headings five words long or less.
|
||||||
@ -83,7 +85,8 @@ concept. What new terms did you need to learn? What confused you? What was the
|
|||||||
hardest to grasp? You will want users to review your work, and we recommend you
|
hardest to grasp? You will want users to review your work, and we recommend you
|
||||||
practice explaining the feature before writing about it.
|
practice explaining the feature before writing about it.
|
||||||
|
|
||||||
.. note::
|
Note:
|
||||||
|
|
||||||
|
|
||||||
Having programming foundations is a pre-requisite to use a complex engine
|
Having programming foundations is a pre-requisite to use a complex engine
|
||||||
like Godot. Talking about variables, functions, or classes is acceptable.
|
like Godot. Talking about variables, functions, or classes is acceptable.
|
||||||
|
@ -6,7 +6,8 @@ Contributing to the documentation
|
|||||||
This guide explains how to contribute to Godot's documentation, be it by
|
This guide explains how to contribute to Godot's documentation, be it by
|
||||||
writing or reviewing pages.
|
writing or reviewing pages.
|
||||||
|
|
||||||
.. seealso::
|
See also:
|
||||||
|
|
||||||
|
|
||||||
If you want to translate pages or the class reference from English to other
|
If you want to translate pages or the class reference from English to other
|
||||||
languages, read `doc_editor_and_docs_localization`.
|
languages, read `doc_editor_and_docs_localization`.
|
||||||
@ -19,12 +20,14 @@ files in the `godot-docs GitHub repository
|
|||||||
( https://github.com/godotengine/godot-docs )`_. Modifying those pages in a pull
|
( https://github.com/godotengine/godot-docs )`_. Modifying those pages in a pull
|
||||||
request triggers a rebuild of the online documentation upon merging.
|
request triggers a rebuild of the online documentation upon merging.
|
||||||
|
|
||||||
.. seealso:: For details on Git usage and the pull request workflow, please
|
See also:
|
||||||
|
For details on Git usage and the pull request workflow, please
|
||||||
refer to the `doc_pr_workflow` page. Most of what it describes
|
refer to the `doc_pr_workflow` page. Most of what it describes
|
||||||
regarding the main godotengine/godot repository is also valid for
|
regarding the main godotengine/godot repository is also valid for
|
||||||
the docs repository.
|
the docs repository.
|
||||||
|
|
||||||
.. warning:: The class reference's source files are in the `Godot engine
|
Warning:
|
||||||
|
The class reference's source files are in the `Godot engine
|
||||||
repository ( https://github.com/godotengine/godot )`_. We generate
|
repository ( https://github.com/godotengine/godot )`_. We generate
|
||||||
the `Godot API ( toc-class-ref )` section of this documentation
|
the `Godot API ( toc-class-ref )` section of this documentation
|
||||||
from them. If you want to update the description of a class, its
|
from them. If you want to update the description of a class, its
|
||||||
@ -67,7 +70,8 @@ edited here.** They are automatically generated from Godot’s `XML class
|
|||||||
reference ( https://github.com/godotengine/godot/tree/master/doc/classes )`.
|
reference ( https://github.com/godotengine/godot/tree/master/doc/classes )`.
|
||||||
See `doc_updating_the_class_reference` for details.
|
See `doc_updating_the_class_reference` for details.
|
||||||
|
|
||||||
.. seealso:: To build the manual and test changes on your computer, see
|
See also:
|
||||||
|
To build the manual and test changes on your computer, see
|
||||||
`doc_building_the_manual`.
|
`doc_building_the_manual`.
|
||||||
|
|
||||||
Editing pages online
|
Editing pages online
|
||||||
@ -153,7 +157,9 @@ Sphinx uses specific reST comments to do specific operations, like defining the
|
|||||||
table of contents (`.. toctree::`) or cross-referencing pages. Check the
|
table of contents (`.. toctree::`) or cross-referencing pages. Check the
|
||||||
`official Sphinx documentation
|
`official Sphinx documentation
|
||||||
( https://www.sphinx-doc.org/en/stable/index.html )` for more details. To learn
|
( https://www.sphinx-doc.org/en/stable/index.html )` for more details. To learn
|
||||||
how to use Sphinx directives like `.. note::` or `.. seealso::`, check out
|
how to use Sphinx directives like `Note:
|
||||||
|
` or `See also:
|
||||||
|
`, check out
|
||||||
the `Sphinx directives documentation
|
the `Sphinx directives documentation
|
||||||
( https://www.sphinx-doc.org/en/master/usage/restructuredtext/directives.html )`.
|
( https://www.sphinx-doc.org/en/master/usage/restructuredtext/directives.html )`.
|
||||||
|
|
||||||
|
@ -22,7 +22,8 @@ To get your pull request merged, it needs to follow the C++ usage guidelines
|
|||||||
outlined here. Of course, you can use features not allowed here in your own C++
|
outlined here. Of course, you can use features not allowed here in your own C++
|
||||||
modules or GDNative scripts.
|
modules or GDNative scripts.
|
||||||
|
|
||||||
.. note::
|
Note:
|
||||||
|
|
||||||
|
|
||||||
Prior to Godot 4.0, the C++ standard used throughout the codebase was C++03,
|
Prior to Godot 4.0, the C++ standard used throughout the codebase was C++03,
|
||||||
with a handful of C++14 extensions. If you are contributing a pull request
|
with a handful of C++14 extensions. If you are contributing a pull request
|
||||||
@ -33,7 +34,8 @@ modules or GDNative scripts.
|
|||||||
generally favor small libraries instead of larger solutions. See also
|
generally favor small libraries instead of larger solutions. See also
|
||||||
`doc_best_practices_for_engine_contributors`.
|
`doc_best_practices_for_engine_contributors`.
|
||||||
|
|
||||||
.. seealso::
|
See also:
|
||||||
|
|
||||||
|
|
||||||
See `doc_code_style_guidelines` for formatting guidelines.
|
See `doc_code_style_guidelines` for formatting guidelines.
|
||||||
|
|
||||||
@ -60,7 +62,8 @@ This means that pull requests should **not** use `std::string`,
|
|||||||
can be used as an alternative (ask core developers first).
|
can be used as an alternative (ask core developers first).
|
||||||
- Use `Array` instead of `std::array`.
|
- Use `Array` instead of `std::array`.
|
||||||
|
|
||||||
.. note::
|
Note:
|
||||||
|
|
||||||
|
|
||||||
Godot also has a List datatype (which is a linked list). While List is already used
|
Godot also has a List datatype (which is a linked list). While List is already used
|
||||||
in the codebase, it typically performs worse than other datatypes like Vector
|
in the codebase, it typically performs worse than other datatypes like Vector
|
||||||
@ -100,7 +103,8 @@ pull request.
|
|||||||
To follow the existing style, please use standard `#ifdef`-based include
|
To follow the existing style, please use standard `#ifdef`-based include
|
||||||
guards instead of `#pragma once` in new files.
|
guards instead of `#pragma once` in new files.
|
||||||
|
|
||||||
.. seealso::
|
See also:
|
||||||
|
|
||||||
|
|
||||||
See `doc_code_style_guidelines_header_includes` for guidelines on sorting
|
See `doc_code_style_guidelines_header_includes` for guidelines on sorting
|
||||||
includes in C++ and Objective-C files.
|
includes in C++ and Objective-C files.
|
||||||
|
@ -26,13 +26,15 @@ There are 3 rules to describe classes:
|
|||||||
2. Mention what methods return if it's useful
|
2. Mention what methods return if it's useful
|
||||||
3. Use "if true" to describe booleans
|
3. Use "if true" to describe booleans
|
||||||
|
|
||||||
.. note::
|
Note:
|
||||||
|
|
||||||
|
|
||||||
A technical writer's job is to pack as much information as possible into
|
A technical writer's job is to pack as much information as possible into
|
||||||
the smallest and clearest sentences possible. These guidelines will help
|
the smallest and clearest sentences possible. These guidelines will help
|
||||||
you work towards that goal.
|
you work towards that goal.
|
||||||
|
|
||||||
.. seealso::
|
See also:
|
||||||
|
|
||||||
|
|
||||||
See the `content guidelines ( doc_content_guidelines )` for information
|
See the `content guidelines ( doc_content_guidelines )` for information
|
||||||
on the types of documentation you can write in the official documentation.
|
on the types of documentation you can write in the official documentation.
|
||||||
@ -535,6 +537,7 @@ heavier images, consider using a lossy compressor like `pngquant
|
|||||||
( https://pngquant.org/ )`_. With it, almost no image quality is lost during
|
( https://pngquant.org/ )`_. With it, almost no image quality is lost during
|
||||||
compression.
|
compression.
|
||||||
|
|
||||||
.. note::
|
Note:
|
||||||
|
|
||||||
|
|
||||||
The program pngquant must be installed locally as it's not available in Squoosh.
|
The program pngquant must be installed locally as it's not available in Squoosh.
|
||||||
|
@ -20,18 +20,21 @@ The HTML (or PDF and EPUB) documentation is generated from the .rst files
|
|||||||
in a pull request and getting it merged will trigger a rebuild of the online
|
in a pull request and getting it merged will trigger a rebuild of the online
|
||||||
documentation.
|
documentation.
|
||||||
|
|
||||||
.. seealso:: For details on Git usage and the pull request workflow, please
|
See also:
|
||||||
|
For details on Git usage and the pull request workflow, please
|
||||||
refer to the `doc_pr_workflow` page. Most of what it
|
refer to the `doc_pr_workflow` page. Most of what it
|
||||||
describes regarding the main godotengine/godot repository is
|
describes regarding the main godotengine/godot repository is
|
||||||
also valid for the docs repository.
|
also valid for the docs repository.
|
||||||
|
|
||||||
.. warning:: The class reference's source files are in the `Godot engine repository
|
Warning:
|
||||||
|
The class reference's source files are in the `Godot engine repository
|
||||||
( https://github.com/godotengine/godot )`_. We generate the `Godot API
|
( https://github.com/godotengine/godot )`_. We generate the `Godot API
|
||||||
( toc-class-ref )` section of this documentation from them. If you want to update the
|
( toc-class-ref )` section of this documentation from them. If you want to update the
|
||||||
description of a class, its methods, or properties, read
|
description of a class, its methods, or properties, read
|
||||||
`doc_updating_the_class_reference`.
|
`doc_updating_the_class_reference`.
|
||||||
|
|
||||||
.. warning:: If you want to edit the **API reference**, please note that it
|
Warning:
|
||||||
|
If you want to edit the **API reference**, please note that it
|
||||||
should *not* be done in the godot-docs repository. Instead, you
|
should *not* be done in the godot-docs repository. Instead, you
|
||||||
should edit the `doc/classes/*` XML files of Godot's
|
should edit the `doc/classes/*` XML files of Godot's
|
||||||
main repository. These files are then later used to generate the
|
main repository. These files are then later used to generate the
|
||||||
|
@ -54,7 +54,8 @@ as an example) to find the list of all languages:
|
|||||||
|
|
||||||
![](img/l10n_01_language_list.png)
|
![](img/l10n_01_language_list.png)
|
||||||
|
|
||||||
.. seealso::
|
See also:
|
||||||
|
|
||||||
|
|
||||||
Feel free to consult Weblate's own documentation on the `translation
|
Feel free to consult Weblate's own documentation on the `translation
|
||||||
workflow ( https://docs.weblate.org/en/latest/user/translating.html )` for
|
workflow ( https://docs.weblate.org/en/latest/user/translating.html )` for
|
||||||
@ -190,7 +191,8 @@ used with the `location:` token, e.g. `location:nodes_and_scenes.rst`):
|
|||||||
|
|
||||||
![](img/l10n_06_browse_by_location.png)
|
![](img/l10n_06_browse_by_location.png)
|
||||||
|
|
||||||
.. note::
|
Note:
|
||||||
|
|
||||||
|
|
||||||
When a given source string is used in multiple source locations, they will
|
When a given source string is used in multiple source locations, they will
|
||||||
all be concatenated into one. For example, the above
|
all be concatenated into one. For example, the above
|
||||||
@ -243,7 +245,8 @@ The editor translations originate from C++ strings, and may use:
|
|||||||
Scene '%s' is currently being edited.↵
|
Scene '%s' is currently being edited.↵
|
||||||
Changes will only take effect when reloaded.
|
Changes will only take effect when reloaded.
|
||||||
|
|
||||||
.. note::
|
Note:
|
||||||
|
|
||||||
Only logical order of the characters matters, in the right-to-left text, format
|
Only logical order of the characters matters, in the right-to-left text, format
|
||||||
specifiers may be displayed as `s%`.
|
specifiers may be displayed as `s%`.
|
||||||
|
|
||||||
@ -290,7 +293,8 @@ external links, etc. Here are some examples::
|
|||||||
Save the scene. Click Scene -> Save, or press :kbd:`Ctrl + S` on Windows/Linux
|
Save the scene. Click Scene -> Save, or press :kbd:`Ctrl + S` on Windows/Linux
|
||||||
or :kbd:`Cmd + S` on macOS.
|
or :kbd:`Cmd + S` on macOS.
|
||||||
|
|
||||||
.. seealso::
|
See also:
|
||||||
|
|
||||||
|
|
||||||
See Sphinx's `reStructured Text primer ( https://www.sphinx-doc.org/en/master/usage/restructuredtext/basics.html )`
|
See Sphinx's `reStructured Text primer ( https://www.sphinx-doc.org/en/master/usage/restructuredtext/basics.html )`
|
||||||
for a quick overview of the markup language you may find in source strings.
|
for a quick overview of the markup language you may find in source strings.
|
||||||
@ -325,7 +329,8 @@ translate the name of the variable which holds the result (`red = ...`).
|
|||||||
Note also that in the XML, each line is a paragraph, so you should not add line
|
Note also that in the XML, each line is a paragraph, so you should not add line
|
||||||
breaks if they are not part of the original translation.
|
breaks if they are not part of the original translation.
|
||||||
|
|
||||||
.. seealso::
|
See also:
|
||||||
|
|
||||||
|
|
||||||
See our documentation for class reference writers for the `list of
|
See our documentation for class reference writers for the `list of
|
||||||
BBCode-like tags ( doc_class_reference_writing_guidelines_bbcode )` which are used
|
BBCode-like tags ( doc_class_reference_writing_guidelines_bbcode )` which are used
|
||||||
@ -348,7 +353,8 @@ Once you are done with a series of edits, use the "Upload translation" item in
|
|||||||
that same menu and select your file. Choose "Add as translation" for the file
|
that same menu and select your file. Choose "Add as translation" for the file
|
||||||
upload mode.
|
upload mode.
|
||||||
|
|
||||||
.. note::
|
Note:
|
||||||
|
|
||||||
|
|
||||||
If a significant amount of time has passed between your download of the PO
|
If a significant amount of time has passed between your download of the PO
|
||||||
file and the upload of the edited version, there is a risk to overwrite the
|
file and the upload of the edited version, there is a risk to overwrite the
|
||||||
@ -378,7 +384,8 @@ This part is not handled via Weblate, but directly on the `godot-docs-l10n
|
|||||||
( https://github.com/godotengine/godot-docs-l10n )`_ Git repository where the
|
( https://github.com/godotengine/godot-docs-l10n )`_ Git repository where the
|
||||||
documentation translations are synced from Weblate.
|
documentation translations are synced from Weblate.
|
||||||
|
|
||||||
.. note::
|
Note:
|
||||||
|
|
||||||
|
|
||||||
The workflow is not the most straightforward and requires some knowledge of
|
The workflow is not the most straightforward and requires some knowledge of
|
||||||
Git. We plan to work on a simplified Web tool which could be used to manage
|
Git. We plan to work on a simplified Web tool which could be used to manage
|
||||||
|
@ -29,7 +29,8 @@ The `repository on GitHub ( https://github.com/godotengine/godot )`_ is a
|
|||||||
`Git ( https://git-scm.com )`_ code repository together with an embedded
|
`Git ( https://git-scm.com )`_ code repository together with an embedded
|
||||||
issue tracker and PR system.
|
issue tracker and PR system.
|
||||||
|
|
||||||
.. note:: If you are contributing to the documentation, its repository can
|
Note:
|
||||||
|
If you are contributing to the documentation, its repository can
|
||||||
be found `here ( https://github.com/godotengine/godot-docs )`_.
|
be found `here ( https://github.com/godotengine/godot-docs )`_.
|
||||||
|
|
||||||
The Git version control system is the tool used to keep track of successive
|
The Git version control system is the tool used to keep track of successive
|
||||||
@ -42,7 +43,8 @@ contributions (although it's tolerated for small fixes or documentation changes)
|
|||||||
as it enforces one commit per file and per modification,
|
as it enforces one commit per file and per modification,
|
||||||
which quickly leads to PRs with an unreadable Git history (especially after peer review).
|
which quickly leads to PRs with an unreadable Git history (especially after peer review).
|
||||||
|
|
||||||
.. seealso:: The first sections of Git's "Book" are a good introduction to
|
See also:
|
||||||
|
The first sections of Git's "Book" are a good introduction to
|
||||||
the tool's philosophy and the various commands you need to
|
the tool's philosophy and the various commands you need to
|
||||||
master in your daily workflow. You can read them online on the
|
master in your daily workflow. You can read them online on the
|
||||||
`Git SCM ( https://git-scm.com/book/en/v2 )`_ website.
|
`Git SCM ( https://git-scm.com/book/en/v2 )`_ website.
|
||||||
@ -87,7 +89,8 @@ repository (in Git speak, the *origin remote*). If you haven't already,
|
|||||||
download Git from `its website ( https://git-scm.com )`_ if you're using Windows or
|
download Git from `its website ( https://git-scm.com )`_ if you're using Windows or
|
||||||
macOS, or install it through your package manager if you're using Linux.
|
macOS, or install it through your package manager if you're using Linux.
|
||||||
|
|
||||||
.. note:: If you are on Windows, open Git Bash to type commands. macOS and Linux users
|
Note:
|
||||||
|
If you are on Windows, open Git Bash to type commands. macOS and Linux users
|
||||||
can use their respective terminals.
|
can use their respective terminals.
|
||||||
|
|
||||||
To clone your fork from GitHub, use the following command:
|
To clone your fork from GitHub, use the following command:
|
||||||
@ -96,7 +99,8 @@ To clone your fork from GitHub, use the following command:
|
|||||||
|
|
||||||
$ git clone https://github.com/USERNAME/godot
|
$ git clone https://github.com/USERNAME/godot
|
||||||
|
|
||||||
.. note:: In our examples, the "$" character denotes the command line prompt
|
Note:
|
||||||
|
In our examples, the "$" character denotes the command line prompt
|
||||||
on typical UNIX shells. It is not part of the command and should
|
on typical UNIX shells. It is not part of the command and should
|
||||||
not be typed.
|
not be typed.
|
||||||
|
|
||||||
@ -123,7 +127,8 @@ You only need to do the above steps once, as long as you keep that local
|
|||||||
`godot` folder (which you can move around if you want, the relevant
|
`godot` folder (which you can move around if you want, the relevant
|
||||||
metadata is hidden in its `.git` subfolder).
|
metadata is hidden in its `.git` subfolder).
|
||||||
|
|
||||||
.. note:: *Branch it, pull it, code it, stage it, commit, push it, rebase
|
Note:
|
||||||
|
*Branch it, pull it, code it, stage it, commit, push it, rebase
|
||||||
it... technologic.*
|
it... technologic.*
|
||||||
|
|
||||||
This bad take on Daft Punk's *Technologic* shows the general
|
This bad take on Daft Punk's *Technologic* shows the general
|
||||||
@ -218,7 +223,8 @@ we all do the first few times), you can abort the rebase with `git rebase --abor
|
|||||||
You will then be back to the original state of your branch before calling
|
You will then be back to the original state of your branch before calling
|
||||||
`git pull --rebase`.
|
`git pull --rebase`.
|
||||||
|
|
||||||
.. note:: If you omit the `--rebase` argument, you will instead create a merge
|
Note:
|
||||||
|
If you omit the `--rebase` argument, you will instead create a merge
|
||||||
commit which tells Git what to make of the two distinct branches. If any
|
commit which tells Git what to make of the two distinct branches. If any
|
||||||
conflicts arise, they would be resolved all at once via this merge commit.
|
conflicts arise, they would be resolved all at once via this merge commit.
|
||||||
|
|
||||||
@ -454,7 +460,8 @@ upstream `master` branch, which you can do with:
|
|||||||
|
|
||||||
$ git rebase -i upstream/master
|
$ git rebase -i upstream/master
|
||||||
|
|
||||||
.. note:: Referencing branches in Git is a bit tricky due to the distinction
|
Note:
|
||||||
|
Referencing branches in Git is a bit tricky due to the distinction
|
||||||
between remote and local branches. Here, `upstream/master` (with a
|
between remote and local branches. Here, `upstream/master` (with a
|
||||||
`/`) is a local branch which has been pulled from the `upstream`
|
`/`) is a local branch which has been pulled from the `upstream`
|
||||||
remote's `master` branch.
|
remote's `master` branch.
|
||||||
|
@ -18,7 +18,8 @@ You can download pull request builds from GitHub Actions. Since only signed in
|
|||||||
users may download builds directly from GitHub Actions, the procedure varies
|
users may download builds directly from GitHub Actions, the procedure varies
|
||||||
depending on whether you have a GitHub account or not.
|
depending on whether you have a GitHub account or not.
|
||||||
|
|
||||||
.. note::
|
Note:
|
||||||
|
|
||||||
|
|
||||||
Due to a GitHub Actions limitation, builds are only available for 90 days
|
Due to a GitHub Actions limitation, builds are only available for 90 days
|
||||||
after the pull request was last updated. If you still wish to try a
|
after the pull request was last updated. If you still wish to try a
|
||||||
|
@ -17,7 +17,8 @@ the `godot-docs repository ( https://github.com/godotengine/godot-docs/ )`_
|
|||||||
or comment on an existing issue. Doing so lets others know you're already
|
or comment on an existing issue. Doing so lets others know you're already
|
||||||
taking care of a given class.
|
taking care of a given class.
|
||||||
|
|
||||||
.. seealso::
|
See also:
|
||||||
|
|
||||||
|
|
||||||
You can find the writing guidelines for the class reference `here ( doc_class_reference_writing_guidelines )`.
|
You can find the writing guidelines for the class reference `here ( doc_class_reference_writing_guidelines )`.
|
||||||
|
|
||||||
@ -30,7 +31,8 @@ taking care of a given class.
|
|||||||
This guide is also available as a `video tutorial on YouTube
|
This guide is also available as a `video tutorial on YouTube
|
||||||
( https://www.youtube.com/watch?v=5jeHXxeX-JY )`_.
|
( https://www.youtube.com/watch?v=5jeHXxeX-JY )`_.
|
||||||
|
|
||||||
.. seealso::
|
See also:
|
||||||
|
|
||||||
|
|
||||||
Not sure which class to contribute to? Take a look at the class reference's
|
Not sure which class to contribute to? Take a look at the class reference's
|
||||||
completion status `here ( https://godotengine.github.io/doc-status/ )`_.
|
completion status `here ( https://godotengine.github.io/doc-status/ )`_.
|
||||||
@ -39,15 +41,18 @@ You can find the source files for the class reference in Godot's GitHub
|
|||||||
repository: `doc/classes/
|
repository: `doc/classes/
|
||||||
( https://github.com/godotengine/godot/tree/master/doc/classes )`_.
|
( https://github.com/godotengine/godot/tree/master/doc/classes )`_.
|
||||||
|
|
||||||
.. note:: For some modules in the engine's source code, you'll find the XML
|
Note:
|
||||||
|
For some modules in the engine's source code, you'll find the XML
|
||||||
files in the `modules/( module_name>/doc_classes/` directory instead.
|
files in the `modules/( module_name>/doc_classes/` directory instead.
|
||||||
|
|
||||||
.. warning:: Always edit the API reference through these source XML files. Do
|
Warning:
|
||||||
|
Always edit the API reference through these source XML files. Do
|
||||||
not edit the generated `.rst` files `in the online documentation
|
not edit the generated `.rst` files `in the online documentation
|
||||||
( toc-class-ref )`, hosted in the `godot-docs
|
( toc-class-ref )`, hosted in the `godot-docs
|
||||||
( https://github.com/godotengine/godot-docs )`_ repository.
|
( https://github.com/godotengine/godot-docs )`_ repository.
|
||||||
|
|
||||||
.. warning::
|
Warning:
|
||||||
|
|
||||||
|
|
||||||
Unless you make minor changes, like fixing a typo, we do not recommend using the GitHub web editor to edit the class reference's XML.
|
Unless you make minor changes, like fixing a typo, we do not recommend using the GitHub web editor to edit the class reference's XML.
|
||||||
|
|
||||||
|
@ -88,7 +88,8 @@ A good place to start is by searching for issues tagged as
|
|||||||
`good first issue ( https://github.com/godotengine/godot/issues?q=is%3Aissue+is%3Aopen+label%3A%22good+first+issue%22 )`_
|
`good first issue ( https://github.com/godotengine/godot/issues?q=is%3Aissue+is%3Aopen+label%3A%22good+first+issue%22 )`_
|
||||||
on GitHub.
|
on GitHub.
|
||||||
|
|
||||||
.. seealso:: Technical details about the PR workflow are outlined in a
|
See also:
|
||||||
|
Technical details about the PR workflow are outlined in a
|
||||||
specific section, `doc_pr_workflow`.
|
specific section, `doc_pr_workflow`.
|
||||||
|
|
||||||
Details about the code style guidelines and the `clang-format`
|
Details about the code style guidelines and the `clang-format`
|
||||||
@ -108,7 +109,8 @@ has a `proposal system ( https://github.com/godotengine/godot-proposals )`_. Its
|
|||||||
usage is encouraged to plan changes and discuss them with the community. Implementation
|
usage is encouraged to plan changes and discuss them with the community. Implementation
|
||||||
details can also be discussed with other contributors on the `Godot Contributors Chat ( https://chat.godotengine.org/ )`_.
|
details can also be discussed with other contributors on the `Godot Contributors Chat ( https://chat.godotengine.org/ )`_.
|
||||||
|
|
||||||
.. note:: Proposals are only required when working on an enhancement or a new feature.
|
Note:
|
||||||
|
Proposals are only required when working on an enhancement or a new feature.
|
||||||
Bug reports are sufficient for fixing issues.
|
Bug reports are sufficient for fixing issues.
|
||||||
|
|
||||||
Testing and reporting issues
|
Testing and reporting issues
|
||||||
|
@ -4,7 +4,8 @@ Compiling for Android
|
|||||||
=====================
|
=====================
|
||||||
|
|
||||||
|
|
||||||
.. seealso::
|
See also:
|
||||||
|
|
||||||
|
|
||||||
This page describes how to compile Android export template binaries from source.
|
This page describes how to compile Android export template binaries from source.
|
||||||
If you're looking to export your project to Android instead, read `doc_exporting_for_android`.
|
If you're looking to export your project to Android instead, read `doc_exporting_for_android`.
|
||||||
@ -39,7 +40,8 @@ For compiling under Windows, Linux or macOS, the following is required:
|
|||||||
|
|
||||||
- You can download a build from `ojdkbuild ( https://github.com/ojdkbuild/ojdkbuild )`_.
|
- You can download a build from `ojdkbuild ( https://github.com/ojdkbuild/ojdkbuild )`_.
|
||||||
|
|
||||||
.. seealso:: To get the Godot source code for compiling, see
|
See also:
|
||||||
|
To get the Godot source code for compiling, see
|
||||||
`doc_getting_source`.
|
`doc_getting_source`.
|
||||||
|
|
||||||
For a general overview of SCons usage for Godot, see
|
For a general overview of SCons usage for Godot, see
|
||||||
@ -69,11 +71,13 @@ Setting up the buildsystem
|
|||||||
|
|
||||||
tools/bin/sdkmanager --sdk_root=( android_sdk_path> "platform-tools" "build-tools;30.0.3" "platforms;android-29" "cmdline-tools;latest" "cmake;3.10.2.4988404"
|
tools/bin/sdkmanager --sdk_root=( android_sdk_path> "platform-tools" "build-tools;30.0.3" "platforms;android-29" "cmdline-tools;latest" "cmake;3.10.2.4988404"
|
||||||
|
|
||||||
.. seealso:: To set the environment variable on Windows, press :kbd:`Windows + R`, type
|
See also:
|
||||||
|
To set the environment variable on Windows, press :kbd:`Windows + R`, type
|
||||||
"control system", then click on **Advanced system settings** in the left
|
"control system", then click on **Advanced system settings** in the left
|
||||||
pane, then click on **Environment variables** on the window that appears.
|
pane, then click on **Environment variables** on the window that appears.
|
||||||
|
|
||||||
.. seealso:: To set the environment variable on Linux or macOS, use
|
See also:
|
||||||
|
To set the environment variable on Linux or macOS, use
|
||||||
`export ANDROID_SDK_ROOT=/path/to/android-sdk` where `/path/to/android-sdk` points to
|
`export ANDROID_SDK_ROOT=/path/to/android-sdk` where `/path/to/android-sdk` points to
|
||||||
the root of the SDK directories.
|
the root of the SDK directories.
|
||||||
|
|
||||||
|
@ -4,7 +4,8 @@ Compiling for iOS
|
|||||||
=================
|
=================
|
||||||
|
|
||||||
|
|
||||||
.. seealso::
|
See also:
|
||||||
|
|
||||||
|
|
||||||
This page describes how to compile iOS export template binaries from source.
|
This page describes how to compile iOS export template binaries from source.
|
||||||
If you're looking to export your project to iOS instead, read `doc_exporting_for_ios`.
|
If you're looking to export your project to iOS instead, read `doc_exporting_for_ios`.
|
||||||
@ -17,7 +18,8 @@ Requirements
|
|||||||
to run `scons` in a terminal when installed).
|
to run `scons` in a terminal when installed).
|
||||||
- Xcode 10.0 (or later) with the iOS (10.0) SDK and the command line tools.
|
- Xcode 10.0 (or later) with the iOS (10.0) SDK and the command line tools.
|
||||||
|
|
||||||
.. seealso:: To get the Godot source code for compiling, see
|
See also:
|
||||||
|
To get the Godot source code for compiling, see
|
||||||
`doc_getting_source`.
|
`doc_getting_source`.
|
||||||
|
|
||||||
For a general overview of SCons usage for Godot, see
|
For a general overview of SCons usage for Godot, see
|
||||||
|
@ -4,7 +4,8 @@ Compiling for macOS
|
|||||||
===================
|
===================
|
||||||
|
|
||||||
|
|
||||||
.. note::
|
Note:
|
||||||
|
|
||||||
|
|
||||||
This page describes how to compile macOS editor and export template binaries from source.
|
This page describes how to compile macOS editor and export template binaries from source.
|
||||||
If you're looking to export your project to macOS instead, read `doc_exporting_for_macos`.
|
If you're looking to export your project to macOS instead, read `doc_exporting_for_macos`.
|
||||||
@ -20,7 +21,8 @@ For compiling under macOS, the following is required:
|
|||||||
(or the more lightweight Command Line Tools for Xcode).
|
(or the more lightweight Command Line Tools for Xcode).
|
||||||
- *Optional* - `yasm ( https://yasm.tortall.net/ )`_ (for WebM SIMD optimizations).
|
- *Optional* - `yasm ( https://yasm.tortall.net/ )`_ (for WebM SIMD optimizations).
|
||||||
|
|
||||||
.. note:: If you have `Homebrew ( https://brew.sh/ )`_ installed, you can easily
|
Note:
|
||||||
|
If you have `Homebrew ( https://brew.sh/ )`_ installed, you can easily
|
||||||
install SCons and yasm using the following command::
|
install SCons and yasm using the following command::
|
||||||
|
|
||||||
brew install scons yasm
|
brew install scons yasm
|
||||||
@ -34,7 +36,8 @@ For compiling under macOS, the following is required:
|
|||||||
|
|
||||||
sudo port install scons yasm
|
sudo port install scons yasm
|
||||||
|
|
||||||
.. seealso:: To get the Godot source code for compiling, see
|
See also:
|
||||||
|
To get the Godot source code for compiling, see
|
||||||
`doc_getting_source`.
|
`doc_getting_source`.
|
||||||
|
|
||||||
For a general overview of SCons usage for Godot, see
|
For a general overview of SCons usage for Godot, see
|
||||||
@ -62,7 +65,8 @@ If all goes well, the resulting binary executable will be placed in the
|
|||||||
runs without any dependencies. Executing it will bring up the project
|
runs without any dependencies. Executing it will bring up the project
|
||||||
manager.
|
manager.
|
||||||
|
|
||||||
.. note:: If you want to use separate editor settings for your own Godot builds
|
Note:
|
||||||
|
If you want to use separate editor settings for your own Godot builds
|
||||||
and official releases, you can enable
|
and official releases, you can enable
|
||||||
`doc_data_paths_self_contained_mode` by creating a file called
|
`doc_data_paths_self_contained_mode` by creating a file called
|
||||||
`._sc_` or `_sc_` in the `bin/` folder.
|
`._sc_` or `_sc_` in the `bin/` folder.
|
||||||
|
@ -4,7 +4,8 @@ Compiling for Universal Windows Platform
|
|||||||
========================================
|
========================================
|
||||||
|
|
||||||
|
|
||||||
.. seealso::
|
See also:
|
||||||
|
|
||||||
|
|
||||||
This page describes how to compile UWP export template binaries from source.
|
This page describes how to compile UWP export template binaries from source.
|
||||||
If you're looking to export your project to UWP instead, read `doc_exporting_for_uwp`.
|
If you're looking to export your project to UWP instead, read `doc_exporting_for_uwp`.
|
||||||
@ -20,7 +21,8 @@ Requirements
|
|||||||
`ms_master` (default) branch. Keep it in a path without spaces to
|
`ms_master` (default) branch. Keep it in a path without spaces to
|
||||||
avoid problems.
|
avoid problems.
|
||||||
|
|
||||||
.. note:: The ANGLE repo by Microsoft has been discontinued and the
|
Note:
|
||||||
|
The ANGLE repo by Microsoft has been discontinued and the
|
||||||
`ms_master` branch has been cleared out.
|
`ms_master` branch has been cleared out.
|
||||||
|
|
||||||
As a temporary workaround however, it is still possible to
|
As a temporary workaround however, it is still possible to
|
||||||
@ -30,7 +32,8 @@ Requirements
|
|||||||
This page will eventually be updated in the future to reflect
|
This page will eventually be updated in the future to reflect
|
||||||
the new build instructions.
|
the new build instructions.
|
||||||
|
|
||||||
.. seealso:: To get the Godot source code for compiling, see
|
See also:
|
||||||
|
To get the Godot source code for compiling, see
|
||||||
`doc_getting_source`.
|
`doc_getting_source`.
|
||||||
|
|
||||||
For a general overview of SCons usage for Godot, see
|
For a general overview of SCons usage for Godot, see
|
||||||
|
@ -3,7 +3,8 @@
|
|||||||
Compiling for the Web
|
Compiling for the Web
|
||||||
=====================
|
=====================
|
||||||
|
|
||||||
.. seealso::
|
See also:
|
||||||
|
|
||||||
|
|
||||||
This page describes how to compile HTML5 editor and export template binaries from source.
|
This page describes how to compile HTML5 editor and export template binaries from source.
|
||||||
If you're looking to export your project to HTML5 instead, read `doc_exporting_for_web`.
|
If you're looking to export your project to HTML5 instead, read `doc_exporting_for_web`.
|
||||||
@ -18,7 +19,8 @@ To compile export templates for the Web, the following is required:
|
|||||||
- `Python 3.5+ ( https://www.python.org/ )`.
|
- `Python 3.5+ ( https://www.python.org/ )`.
|
||||||
- `SCons 3.0+ ( https://www.scons.org )` build system.
|
- `SCons 3.0+ ( https://www.scons.org )` build system.
|
||||||
|
|
||||||
.. seealso:: To get the Godot source code for compiling, see
|
See also:
|
||||||
|
To get the Godot source code for compiling, see
|
||||||
`doc_getting_source`.
|
`doc_getting_source`.
|
||||||
|
|
||||||
For a general overview of SCons usage for Godot, see
|
For a general overview of SCons usage for Godot, see
|
||||||
|
@ -4,7 +4,8 @@ Compiling for Windows
|
|||||||
=====================
|
=====================
|
||||||
|
|
||||||
|
|
||||||
.. seealso::
|
See also:
|
||||||
|
|
||||||
|
|
||||||
This page describes how to compile Windows editor and export template binaries from source.
|
This page describes how to compile Windows editor and export template binaries from source.
|
||||||
If you're looking to export your project to Windows instead, read `doc_exporting_for_windows`.
|
If you're looking to export your project to Windows instead, read `doc_exporting_for_windows`.
|
||||||
@ -25,12 +26,14 @@ For compiling under Windows, the following is required:
|
|||||||
- `SCons ( https://www.scons.org/ )`_ build system. Using the latest release is
|
- `SCons ( https://www.scons.org/ )`_ build system. Using the latest release is
|
||||||
recommended, especially for proper support of recent Visual Studio releases.
|
recommended, especially for proper support of recent Visual Studio releases.
|
||||||
|
|
||||||
.. note:: If you have `Scoop ( https://scoop.sh/ )`_ installed, you can easily
|
Note:
|
||||||
|
If you have `Scoop ( https://scoop.sh/ )`_ installed, you can easily
|
||||||
install MinGW and other dependencies using the following command::
|
install MinGW and other dependencies using the following command::
|
||||||
|
|
||||||
scoop install gcc python scons make
|
scoop install gcc python scons make
|
||||||
|
|
||||||
.. note:: If you have `MSYS2 ( https://www.msys2.org/ )`_ installed, you can easily
|
Note:
|
||||||
|
If you have `MSYS2 ( https://www.msys2.org/ )`_ installed, you can easily
|
||||||
install MinGW and other dependencies using the following command::
|
install MinGW and other dependencies using the following command::
|
||||||
|
|
||||||
pacman -S mingw-w64-x86_64-python3-pip mingw-w64-x86_64-gcc \
|
pacman -S mingw-w64-x86_64-python3-pip mingw-w64-x86_64-gcc \
|
||||||
@ -39,7 +42,8 @@ For compiling under Windows, the following is required:
|
|||||||
For each MSYS2 MinGW subsystem, you should then run
|
For each MSYS2 MinGW subsystem, you should then run
|
||||||
`pip3 install scons` in its shell.
|
`pip3 install scons` in its shell.
|
||||||
|
|
||||||
.. seealso:: To get the Godot source code for compiling, see
|
See also:
|
||||||
|
To get the Godot source code for compiling, see
|
||||||
`doc_getting_source`.
|
`doc_getting_source`.
|
||||||
|
|
||||||
For a general overview of SCons usage for Godot, see
|
For a general overview of SCons usage for Godot, see
|
||||||
@ -95,7 +99,8 @@ Refer to `doc_getting_source` for detailed instructions.
|
|||||||
The tutorial will assume from now on that you placed the source code in
|
The tutorial will assume from now on that you placed the source code in
|
||||||
`C:\godot`.
|
`C:\godot`.
|
||||||
|
|
||||||
.. warning::
|
Warning:
|
||||||
|
|
||||||
|
|
||||||
To prevent slowdowns caused by continuous virus scanning during compilation,
|
To prevent slowdowns caused by continuous virus scanning during compilation,
|
||||||
add the Godot source folder to the list of exceptions in your antivirus
|
add the Godot source folder to the list of exceptions in your antivirus
|
||||||
@ -141,7 +146,8 @@ In general, it is OK to have at least as many threads compiling Godot as you
|
|||||||
have cores in your CPU, if not one or two more. Feel free to add the `-j`
|
have cores in your CPU, if not one or two more. Feel free to add the `-j`
|
||||||
option to any SCons command you see below.
|
option to any SCons command you see below.
|
||||||
|
|
||||||
.. note:: When compiling with multiple CPU threads, SCons may warn about
|
Note:
|
||||||
|
When compiling with multiple CPU threads, SCons may warn about
|
||||||
pywin32 being missing. You can safely ignore this warning.
|
pywin32 being missing. You can safely ignore this warning.
|
||||||
|
|
||||||
If all goes well, the resulting binary executable will be placed in
|
If all goes well, the resulting binary executable will be placed in
|
||||||
@ -153,7 +159,8 @@ your CPU architecture, but this can be overridden using `bits=64` or
|
|||||||
This executable file contains the whole engine and runs without any
|
This executable file contains the whole engine and runs without any
|
||||||
dependencies. Running it will bring up the Project Manager.
|
dependencies. Running it will bring up the Project Manager.
|
||||||
|
|
||||||
.. note:: If you are compiling Godot for production use, then you can
|
Note:
|
||||||
|
If you are compiling Godot for production use, then you can
|
||||||
make the final executable smaller and faster by adding the
|
make the final executable smaller and faster by adding the
|
||||||
SCons option `target=release_debug`.
|
SCons option `target=release_debug`.
|
||||||
|
|
||||||
@ -162,7 +169,8 @@ dependencies. Running it will bring up the Project Manager.
|
|||||||
As link-time optimization is a memory-intensive process,
|
As link-time optimization is a memory-intensive process,
|
||||||
this will require about 7 GB of available RAM while compiling.
|
this will require about 7 GB of available RAM while compiling.
|
||||||
|
|
||||||
.. note:: If you want to use separate editor settings for your own Godot builds
|
Note:
|
||||||
|
If you want to use separate editor settings for your own Godot builds
|
||||||
and official releases, you can enable
|
and official releases, you can enable
|
||||||
`doc_data_paths_self_contained_mode` by creating a file called
|
`doc_data_paths_self_contained_mode` by creating a file called
|
||||||
`._sc_` or `_sc_` in the `bin/` folder.
|
`._sc_` or `_sc_` in the `bin/` folder.
|
||||||
@ -185,7 +193,8 @@ the `vsproj=yes` parameter, like this::
|
|||||||
You will be able to open Godot's source in a Visual Studio solution now,
|
You will be able to open Godot's source in a Visual Studio solution now,
|
||||||
and able to build Godot using Visual Studio's **Build** button.
|
and able to build Godot using Visual Studio's **Build** button.
|
||||||
|
|
||||||
.. seealso:: See `doc_configuring_an_ide_vs` for further details.
|
See also:
|
||||||
|
See `doc_configuring_an_ide_vs` for further details.
|
||||||
|
|
||||||
Cross-compiling for Windows from other operating systems
|
Cross-compiling for Windows from other operating systems
|
||||||
--------------------------------------------------------
|
--------------------------------------------------------
|
||||||
|
@ -4,7 +4,8 @@ Compiling for X11 (Linux, \*BSD)
|
|||||||
================================
|
================================
|
||||||
|
|
||||||
|
|
||||||
.. seealso::
|
See also:
|
||||||
|
|
||||||
|
|
||||||
This page describes how to compile Linux editor and export template binaries from source.
|
This page describes how to compile Linux editor and export template binaries from source.
|
||||||
If you're looking to export your project to Linux instead, read `doc_exporting_for_linux`.
|
If you're looking to export your project to Linux instead, read `doc_exporting_for_linux`.
|
||||||
@ -30,7 +31,8 @@ required:
|
|||||||
- *Optional* - libudev (build with `udev=yes`).
|
- *Optional* - libudev (build with `udev=yes`).
|
||||||
- *Optional* - yasm (for WebM SIMD optimizations).
|
- *Optional* - yasm (for WebM SIMD optimizations).
|
||||||
|
|
||||||
.. seealso:: To get the Godot source code for compiling, see
|
See also:
|
||||||
|
To get the Godot source code for compiling, see
|
||||||
`doc_getting_source`.
|
`doc_getting_source`.
|
||||||
|
|
||||||
For a general overview of SCons usage for Godot, see
|
For a general overview of SCons usage for Godot, see
|
||||||
@ -116,7 +118,8 @@ If all goes well, the resulting binary executable will be placed in the
|
|||||||
runs without any dependencies. Executing it will bring up the project
|
runs without any dependencies. Executing it will bring up the project
|
||||||
manager.
|
manager.
|
||||||
|
|
||||||
.. note::
|
Note:
|
||||||
|
|
||||||
|
|
||||||
If you wish to compile using Clang rather than GCC, use this command:
|
If you wish to compile using Clang rather than GCC, use this command:
|
||||||
|
|
||||||
@ -127,7 +130,8 @@ manager.
|
|||||||
Using Clang appears to be a requirement for OpenBSD, otherwise fonts
|
Using Clang appears to be a requirement for OpenBSD, otherwise fonts
|
||||||
would not build.
|
would not build.
|
||||||
|
|
||||||
.. note:: If you are compiling Godot for production use, then you can
|
Note:
|
||||||
|
If you are compiling Godot for production use, then you can
|
||||||
make the final executable smaller and faster by adding the
|
make the final executable smaller and faster by adding the
|
||||||
SCons option `target=release_debug`.
|
SCons option `target=release_debug`.
|
||||||
|
|
||||||
@ -136,7 +140,8 @@ manager.
|
|||||||
As link-time optimization is a memory-intensive process,
|
As link-time optimization is a memory-intensive process,
|
||||||
this will require about 7 GB of available RAM while compiling.
|
this will require about 7 GB of available RAM while compiling.
|
||||||
|
|
||||||
.. note:: If you want to use separate editor settings for your own Godot builds
|
Note:
|
||||||
|
If you want to use separate editor settings for your own Godot builds
|
||||||
and official releases, you can enable
|
and official releases, you can enable
|
||||||
`doc_data_paths_self_contained_mode` by creating a file called
|
`doc_data_paths_self_contained_mode` by creating a file called
|
||||||
`._sc_` or `_sc_` in the `bin/` folder.
|
`._sc_` or `_sc_` in the `bin/` folder.
|
||||||
@ -162,7 +167,8 @@ use::
|
|||||||
Building export templates
|
Building export templates
|
||||||
-------------------------
|
-------------------------
|
||||||
|
|
||||||
.. warning:: Linux binaries usually won't run on distributions that are
|
Warning:
|
||||||
|
Linux binaries usually won't run on distributions that are
|
||||||
older than the distribution they were built on. If you wish to
|
older than the distribution they were built on. If you wish to
|
||||||
distribute binaries that work on most distributions,
|
distribute binaries that work on most distributions,
|
||||||
you should build them on an old distribution such as Ubuntu 16.04.
|
you should build them on an old distribution such as Ubuntu 16.04.
|
||||||
|
@ -165,7 +165,8 @@ The data directory is a dependency for Godot binaries built with the Mono module
|
|||||||
enabled. It contains important files for the correct functioning of Godot. It
|
enabled. It contains important files for the correct functioning of Godot. It
|
||||||
must be distributed together with the Godot executable.
|
must be distributed together with the Godot executable.
|
||||||
|
|
||||||
.. note:: The information below doesn't apply for Android, iOS and WASM,
|
Note:
|
||||||
|
The information below doesn't apply for Android, iOS and WASM,
|
||||||
as there is no data directory for these platforms.
|
as there is no data directory for these platforms.
|
||||||
|
|
||||||
Export templates
|
Export templates
|
||||||
|
@ -14,7 +14,8 @@ optimized and without symbols, it would take some effort to find it.
|
|||||||
For this to work, you need to build the export templates from source,
|
For this to work, you need to build the export templates from source,
|
||||||
with that same key.
|
with that same key.
|
||||||
|
|
||||||
.. warning::
|
Warning:
|
||||||
|
|
||||||
|
|
||||||
This will **not** work if you use official, precompiled export templates.
|
This will **not** work if you use official, precompiled export templates.
|
||||||
It is absolutely **required** to compile your own export templates to use
|
It is absolutely **required** to compile your own export templates to use
|
||||||
|
@ -201,13 +201,15 @@ directory paths containing such modules:
|
|||||||
|
|
||||||
scons custom_modules="../modules,/abs/path/to/modules,~/src/godot_modules"
|
scons custom_modules="../modules,/abs/path/to/modules,~/src/godot_modules"
|
||||||
|
|
||||||
.. note::
|
Note:
|
||||||
|
|
||||||
|
|
||||||
If there's any custom module with the exact directory name as a built-in
|
If there's any custom module with the exact directory name as a built-in
|
||||||
module, the engine will only compile the custom one. This logic can be used
|
module, the engine will only compile the custom one. This logic can be used
|
||||||
to override built-in module implementations.
|
to override built-in module implementations.
|
||||||
|
|
||||||
.. seealso::
|
See also:
|
||||||
|
|
||||||
|
|
||||||
`doc_custom_modules_in_c++`
|
`doc_custom_modules_in_c++`
|
||||||
|
|
||||||
@ -256,7 +258,8 @@ source to initialize any SCons build options passed via the command line:
|
|||||||
You can also disable some of the builtin modules before compiling, saving some
|
You can also disable some of the builtin modules before compiling, saving some
|
||||||
time it takes to build the engine. See `doc_optimizing_for_size` page for more details.
|
time it takes to build the engine. See `doc_optimizing_for_size` page for more details.
|
||||||
|
|
||||||
.. seealso::
|
See also:
|
||||||
|
|
||||||
|
|
||||||
You can use the online
|
You can use the online
|
||||||
`Godot build options generator ( https://godot-build-options-generator.github.io/ )`
|
`Godot build options generator ( https://godot-build-options-generator.github.io/ )`
|
||||||
@ -270,7 +273,8 @@ line option, both overriding the default build configuration:
|
|||||||
|
|
||||||
scons profile=path/to/custom.py
|
scons profile=path/to/custom.py
|
||||||
|
|
||||||
.. note:: Build options set from the file can be overridden by the command line
|
Note:
|
||||||
|
Build options set from the file can be overridden by the command line
|
||||||
options.
|
options.
|
||||||
|
|
||||||
It's also possible to override the options conditionally:
|
It's also possible to override the options conditionally:
|
||||||
|
@ -42,7 +42,8 @@ The downside is that crash backtraces will no longer provide accurate informatio
|
|||||||
`C++ profilers ( doc_using_cpp_profilers )` will also no longer be able to display
|
`C++ profilers ( doc_using_cpp_profilers )` will also no longer be able to display
|
||||||
function names (this does not affect the built-in GDScript profiler).
|
function names (this does not affect the built-in GDScript profiler).
|
||||||
|
|
||||||
.. note::
|
Note:
|
||||||
|
|
||||||
|
|
||||||
The above command will not work on Windows binaries compiled with MSVC
|
The above command will not work on Windows binaries compiled with MSVC
|
||||||
and platforms such as Android and HTML5. Instead, pass `debug_symbols=no`
|
and platforms such as Android and HTML5. Instead, pass `debug_symbols=no`
|
||||||
@ -212,6 +213,7 @@ following:
|
|||||||
module_websocket_enabled = "no"
|
module_websocket_enabled = "no"
|
||||||
module_xatlas_unwrap_enabled = "no"
|
module_xatlas_unwrap_enabled = "no"
|
||||||
|
|
||||||
.. seealso::
|
See also:
|
||||||
|
|
||||||
|
|
||||||
`doc_overriding_build_options`.
|
`doc_overriding_build_options`.
|
||||||
|
@ -92,7 +92,8 @@ To insert placeholders in localizable strings, wrap the localization macro in a
|
|||||||
String file_path = "example.txt";
|
String file_path = "example.txt";
|
||||||
vformat(TTR("Couldn't open \"%s\" for reading."), file_path);
|
vformat(TTR("Couldn't open \"%s\" for reading."), file_path);
|
||||||
|
|
||||||
.. note::
|
Note:
|
||||||
|
|
||||||
|
|
||||||
When using `vformat()` and a translation macro together, always wrap the
|
When using `vformat()` and a translation macro together, always wrap the
|
||||||
translation macro in `vformat()`, not the other way around. Otherwise, the
|
translation macro in `vformat()`, not the other way around. Otherwise, the
|
||||||
@ -135,7 +136,8 @@ use this snippet:
|
|||||||
This will print the time spent between the `begin` declaration and the `end`
|
This will print the time spent between the `begin` declaration and the `end`
|
||||||
declaration.
|
declaration.
|
||||||
|
|
||||||
.. note::
|
Note:
|
||||||
|
|
||||||
|
|
||||||
You may have to `#include "core/os/os.h"` if it's not present already.
|
You may have to `#include "core/os/os.h"` if it's not present already.
|
||||||
|
|
||||||
@ -175,13 +177,15 @@ Error macros
|
|||||||
|
|
||||||
Godot features many error macros to make error reporting more convenient.
|
Godot features many error macros to make error reporting more convenient.
|
||||||
|
|
||||||
.. warning::
|
Warning:
|
||||||
|
|
||||||
|
|
||||||
Conditions in error macros work in the **opposite** way of GDScript's
|
Conditions in error macros work in the **opposite** way of GDScript's
|
||||||
built-in `assert()` function. An error is reached if the condition inside
|
built-in `assert()` function. An error is reached if the condition inside
|
||||||
evaluates to `true`, not `false`.
|
evaluates to `true`, not `false`.
|
||||||
|
|
||||||
.. note::
|
Note:
|
||||||
|
|
||||||
|
|
||||||
Only variants with custom messages are documented here, as these should
|
Only variants with custom messages are documented here, as these should
|
||||||
always be used in new contributions. Make sure the custom message provided
|
always be used in new contributions. Make sure the custom message provided
|
||||||
@ -235,7 +239,8 @@ Godot features many error macros to make error reporting more convenient.
|
|||||||
CRASH_NOW_MSG("Can't predict the future! Aborting.");
|
CRASH_NOW_MSG("Can't predict the future! Aborting.");
|
||||||
|
|
||||||
|
|
||||||
.. seealso::
|
See also:
|
||||||
|
|
||||||
|
|
||||||
See `core/error_macros.h ( https://github.com/godotengine/godot/blob/3.x/core/error_macros.h )`
|
See `core/error_macros.h ( https://github.com/godotengine/godot/blob/3.x/core/error_macros.h )`
|
||||||
in Godot's codebase for more information about each error macro.
|
in Godot's codebase for more information about each error macro.
|
||||||
|
@ -65,7 +65,8 @@ You will first need to `compile godot yourself ( https://docs.godotengine.org/en
|
|||||||
|
|
||||||
You can now use the debugging tools from CLion.
|
You can now use the debugging tools from CLion.
|
||||||
|
|
||||||
.. note::
|
Note:
|
||||||
|
|
||||||
|
|
||||||
If you run the binary without any arguments, you will only debug the project manager window.
|
If you run the binary without any arguments, you will only debug the project manager window.
|
||||||
Don't forget to add the `--path path/to/your/godot/project` argument to debug a project.
|
Don't forget to add the `--path path/to/your/godot/project` argument to debug a project.
|
||||||
|
@ -29,7 +29,8 @@ Importing the project
|
|||||||
:figclass: figure-w480
|
:figclass: figure-w480
|
||||||
:align: center
|
:align: center
|
||||||
|
|
||||||
.. note:: You can change this configuration later by right-clicking on your project
|
Note:
|
||||||
|
You can change this configuration later by right-clicking on your project
|
||||||
and selecting the **Edit Files...** option.
|
and selecting the **Edit Files...** option.
|
||||||
|
|
||||||
.. figure:: img/qtcreator-edit-files-menu.png)
|
.. figure:: img/qtcreator-edit-files-menu.png)
|
||||||
@ -65,7 +66,8 @@ Importing the project
|
|||||||
:figclass: figure-w480
|
:figclass: figure-w480
|
||||||
:align: center
|
:align: center
|
||||||
|
|
||||||
.. note:: If the build fails with `Could not start process "scons"`, it can mean that `scons`
|
Note:
|
||||||
|
If the build fails with `Could not start process "scons"`, it can mean that `scons`
|
||||||
is not in your `PATH` environment variable. In this case, you'll have to specify the
|
is not in your `PATH` environment variable. In this case, you'll have to specify the
|
||||||
full path to the SCons binary.
|
full path to the SCons binary.
|
||||||
|
|
||||||
|
@ -20,7 +20,8 @@ with the solution file, it can be generated using SCons.
|
|||||||
or by using the **Open a project or solution** option inside of the Visual Studio.
|
or by using the **Open a project or solution** option inside of the Visual Studio.
|
||||||
- Use the **Build** top menu to build the project.
|
- Use the **Build** top menu to build the project.
|
||||||
|
|
||||||
.. warning:: Visual Studio must be configured with the C++ package. It can be selected
|
Warning:
|
||||||
|
Visual Studio must be configured with the C++ package. It can be selected
|
||||||
in the intaller:
|
in the intaller:
|
||||||
|
|
||||||
.. figure:: img/vs_1_install_cpp_package.png)
|
.. figure:: img/vs_1_install_cpp_package.png)
|
||||||
|
@ -166,7 +166,8 @@ js Windows
|
|||||||
An example of a filled out `launch.json`.
|
An example of a filled out `launch.json`.
|
||||||
|
|
||||||
|
|
||||||
.. note::
|
Note:
|
||||||
|
|
||||||
|
|
||||||
Due to sporadic performance issues, it is recommended to use LLDB over GDB on Unix-based systems.
|
Due to sporadic performance issues, it is recommended to use LLDB over GDB on Unix-based systems.
|
||||||
Make sure that the `CodeLLDB extension ( https://marketplace.visualstudio.com/items?itemName=vadimcn.vscode-lldb )`_
|
Make sure that the `CodeLLDB extension ( https://marketplace.visualstudio.com/items?itemName=vadimcn.vscode-lldb )`_
|
||||||
|
@ -43,7 +43,8 @@ Importing the project
|
|||||||
:figclass: figure-w480
|
:figclass: figure-w480
|
||||||
:align: center
|
:align: center
|
||||||
|
|
||||||
.. note:: Name it something so you know not to compile with this target (e.g. `GodotXcodeIndex`).
|
Note:
|
||||||
|
Name it something so you know not to compile with this target (e.g. `GodotXcodeIndex`).
|
||||||
|
|
||||||
- For this target open the **Build Settings** tab and look for **Header Search Paths**.
|
- For this target open the **Build Settings** tab and look for **Header Search Paths**.
|
||||||
- Set **Header Search Paths** to the absolute path to the Godot root folder. You need to
|
- Set **Header Search Paths** to the absolute path to the Godot root folder. You need to
|
||||||
|
@ -221,7 +221,8 @@ You can then zip it and share the module with everyone else. When
|
|||||||
building for every platform (instructions in the previous sections),
|
building for every platform (instructions in the previous sections),
|
||||||
your module will be included.
|
your module will be included.
|
||||||
|
|
||||||
.. note:: There is a parameter limit of 5 in C++ modules for things such
|
Note:
|
||||||
|
There is a parameter limit of 5 in C++ modules for things such
|
||||||
as subclasses. This can be raised to 13 by including the header
|
as subclasses. This can be raised to 13 by including the header
|
||||||
file `core/method_bind_ext.gen.inc`.
|
file `core/method_bind_ext.gen.inc`.
|
||||||
|
|
||||||
@ -241,12 +242,14 @@ You can now use your newly created module from any script:
|
|||||||
|
|
||||||
The output will be `60`.
|
The output will be `60`.
|
||||||
|
|
||||||
.. seealso:: The previous Summator example is great for small, custom modules,
|
See also:
|
||||||
|
The previous Summator example is great for small, custom modules,
|
||||||
but what if you want to use a larger, external library? Refer to
|
but what if you want to use a larger, external library? Refer to
|
||||||
`doc_binding_to_external_libraries` for details about binding to
|
`doc_binding_to_external_libraries` for details about binding to
|
||||||
external libraries.
|
external libraries.
|
||||||
|
|
||||||
.. warning:: If your module is meant to be accessed from the running project
|
Warning:
|
||||||
|
If your module is meant to be accessed from the running project
|
||||||
(not just from the editor), you must also recompile every export
|
(not just from the editor), you must also recompile every export
|
||||||
template you plan to use, then specify the path to the custom
|
template you plan to use, then specify the path to the custom
|
||||||
template in each export preset. Otherwise, you'll get errors when
|
template in each export preset. Otherwise, you'll get errors when
|
||||||
@ -294,21 +297,24 @@ modules, similar to the following:
|
|||||||
The build system shall detect all modules under the `../modules` directory
|
The build system shall detect all modules under the `../modules` directory
|
||||||
and compile them accordingly, including our "summator" module.
|
and compile them accordingly, including our "summator" module.
|
||||||
|
|
||||||
.. warning::
|
Warning:
|
||||||
|
|
||||||
|
|
||||||
Any path passed to `custom_modules` will be converted to an absolute path
|
Any path passed to `custom_modules` will be converted to an absolute path
|
||||||
internally as a way to distinguish between custom and built-in modules. It
|
internally as a way to distinguish between custom and built-in modules. It
|
||||||
means that things like generating module documentation may rely on a
|
means that things like generating module documentation may rely on a
|
||||||
specific path structure on your machine.
|
specific path structure on your machine.
|
||||||
|
|
||||||
.. seealso::
|
See also:
|
||||||
|
|
||||||
|
|
||||||
`Introduction to the buildsystem - Custom modules build option ( doc_buildsystem_custom_modules )`.
|
`Introduction to the buildsystem - Custom modules build option ( doc_buildsystem_custom_modules )`.
|
||||||
|
|
||||||
Improving the build system for development
|
Improving the build system for development
|
||||||
------------------------------------------
|
------------------------------------------
|
||||||
|
|
||||||
.. warning::
|
Warning:
|
||||||
|
|
||||||
|
|
||||||
This shared library support is not designed to support distributing a module
|
This shared library support is not designed to support distributing a module
|
||||||
to other users without recompiling the engine. For that purpose, use
|
to other users without recompiling the engine. For that purpose, use
|
||||||
@ -375,7 +381,8 @@ during runtime with the `LD_LIBRARY_PATH` environment variable:
|
|||||||
export LD_LIBRARY_PATH="$PWD/bin/"
|
export LD_LIBRARY_PATH="$PWD/bin/"
|
||||||
./bin/godot*
|
./bin/godot*
|
||||||
|
|
||||||
.. note::
|
Note:
|
||||||
|
|
||||||
You have to `export` the environment variable. Otherwise,
|
You have to `export` the environment variable. Otherwise,
|
||||||
you won't be able to run your project from the editor.
|
you won't be able to run your project from the editor.
|
||||||
|
|
||||||
|
@ -3,7 +3,8 @@
|
|||||||
Object class
|
Object class
|
||||||
============
|
============
|
||||||
|
|
||||||
.. seealso::
|
See also:
|
||||||
|
|
||||||
|
|
||||||
This page describes the C++ implementation of objects in Godot.
|
This page describes the C++ implementation of objects in Godot.
|
||||||
Looking for the Object class reference? `Have a look here.`
|
Looking for the Object class reference? `Have a look here.`
|
||||||
|
@ -6,7 +6,8 @@ Using C++ profilers
|
|||||||
To optimize Godot's performance, you need to know what to optimize first.
|
To optimize Godot's performance, you need to know what to optimize first.
|
||||||
To this end, profilers are useful tools.
|
To this end, profilers are useful tools.
|
||||||
|
|
||||||
.. note::
|
Note:
|
||||||
|
|
||||||
|
|
||||||
There is a built-in GDScript profiler in the editor, but using C++ profiler
|
There is a built-in GDScript profiler in the editor, but using C++ profiler
|
||||||
may be useful in cases where the GDScript profiler is not accurate enough
|
may be useful in cases where the GDScript profiler is not accurate enough
|
||||||
@ -40,7 +41,8 @@ compile binaries with the following SCons options:
|
|||||||
It is possible to run a profiler on less optimized builds (e.g. `target=debug` without LTO),
|
It is possible to run a profiler on less optimized builds (e.g. `target=debug` without LTO),
|
||||||
but results will naturally be less representative of real world conditions.
|
but results will naturally be less representative of real world conditions.
|
||||||
|
|
||||||
.. warning::
|
Warning:
|
||||||
|
|
||||||
|
|
||||||
Do *not* strip debugging symbols on the binaries using the `strip` command
|
Do *not* strip debugging symbols on the binaries using the `strip` command
|
||||||
after compiling the binaries. Otherwise, you will no longer get useful
|
after compiling the binaries. Otherwise, you will no longer get useful
|
||||||
@ -55,7 +57,8 @@ This will exit Godot just after it finished starting.
|
|||||||
The `--quit` option works with `--editor`, `--project-manager` or
|
The `--quit` option works with `--editor`, `--project-manager` or
|
||||||
`--path <path to project directory )` (which runs a project directly).
|
`--path <path to project directory )` (which runs a project directly).
|
||||||
|
|
||||||
.. seealso::
|
See also:
|
||||||
|
|
||||||
|
|
||||||
See `doc_command_line_tutorial` for more command line arguments
|
See `doc_command_line_tutorial` for more command line arguments
|
||||||
supported by Godot.
|
supported by Godot.
|
||||||
@ -123,7 +126,8 @@ HotSpot
|
|||||||
|
|
||||||
![](img/cpp_profiler_hotspot_flame_graph.png)
|
![](img/cpp_profiler_hotspot_flame_graph.png)
|
||||||
|
|
||||||
.. note::
|
Note:
|
||||||
|
|
||||||
|
|
||||||
If you don't want the startup procedure to be included in the profile, you
|
If you don't want the startup procedure to be included in the profile, you
|
||||||
can also attach HotSpot to a running process by clicking **Record Data**
|
can also attach HotSpot to a running process by clicking **Record Data**
|
||||||
|
@ -66,7 +66,8 @@ The `--multipass` switch improves compression, so make sure to include it.
|
|||||||
The optimized icon will be saved to `svg_optimized.svg`. You can also change
|
The optimized icon will be saved to `svg_optimized.svg`. You can also change
|
||||||
the destination parameter to any relative or absolute path you'd like.
|
the destination parameter to any relative or absolute path you'd like.
|
||||||
|
|
||||||
.. note::
|
Note:
|
||||||
|
|
||||||
|
|
||||||
While this optimization step won't impact the icon's quality noticeably, it
|
While this optimization step won't impact the icon's quality noticeably, it
|
||||||
will still remove editor-only information such as guides. Therefore, it's
|
will still remove editor-only information such as guides. Therefore, it's
|
||||||
|
@ -26,7 +26,8 @@ Writing style
|
|||||||
Double quotes should be used to quote user input, file paths and possibly
|
Double quotes should be used to quote user input, file paths and possibly
|
||||||
other things depending on the context.
|
other things depending on the context.
|
||||||
|
|
||||||
.. seealso::
|
See also:
|
||||||
|
|
||||||
|
|
||||||
Try to follow the `doc_docs_writing_guidelines` in addition to the
|
Try to follow the `doc_docs_writing_guidelines` in addition to the
|
||||||
guidelines outlined above.
|
guidelines outlined above.
|
||||||
|
@ -11,7 +11,8 @@ On this page, you will learn:
|
|||||||
This guide is aimed at current or future engine contributors.
|
This guide is aimed at current or future engine contributors.
|
||||||
To create editor plugins in GDScript, see `doc_making_plugins` instead.
|
To create editor plugins in GDScript, see `doc_making_plugins` instead.
|
||||||
|
|
||||||
.. seealso::
|
See also:
|
||||||
|
|
||||||
|
|
||||||
If you are new to Godot, we recommended you to read
|
If you are new to Godot, we recommended you to read
|
||||||
`doc_godot_design_philosophy` before continuing. Since the Godot editor
|
`doc_godot_design_philosophy` before continuing. Since the Godot editor
|
||||||
|
@ -38,7 +38,8 @@ children are not selectable."
|
|||||||
Save the scene. Click Scene -> Save, or press :kbd:`Ctrl + S` on Windows/Linux
|
Save the scene. Click Scene -> Save, or press :kbd:`Ctrl + S` on Windows/Linux
|
||||||
or :kbd:`Cmd + S` on macOS.
|
or :kbd:`Cmd + S` on macOS.
|
||||||
|
|
||||||
.. note:: For this project, we will be following the Godot naming conventions.
|
Note:
|
||||||
|
For this project, we will be following the Godot naming conventions.
|
||||||
|
|
||||||
- **GDScript**: Classes (nodes) use PascalCase, variables and
|
- **GDScript**: Classes (nodes) use PascalCase, variables and
|
||||||
functions use snake_case, and constants use ALL_CAPS (See
|
functions use snake_case, and constants use ALL_CAPS (See
|
||||||
|
@ -15,12 +15,14 @@ Script" button:
|
|||||||
In the script settings window, you can leave the default settings alone. Just
|
In the script settings window, you can leave the default settings alone. Just
|
||||||
click "Create":
|
click "Create":
|
||||||
|
|
||||||
.. note:: If you're creating a C# script or other languages, select the language
|
Note:
|
||||||
|
If you're creating a C# script or other languages, select the language
|
||||||
from the `language` drop down menu before hitting create.
|
from the `language` drop down menu before hitting create.
|
||||||
|
|
||||||
![](img/attach_node_window.png)
|
![](img/attach_node_window.png)
|
||||||
|
|
||||||
.. note:: If this is your first time encountering GDScript, please read
|
Note:
|
||||||
|
If this is your first time encountering GDScript, please read
|
||||||
`doc_scripting` before continuing.
|
`doc_scripting` before continuing.
|
||||||
|
|
||||||
Start by declaring the member variables this object will need:
|
Start by declaring the member variables this object will need:
|
||||||
@ -90,7 +92,8 @@ Your input map tab should look like this:
|
|||||||
|
|
||||||
Click the "Close" button to close the project settings.
|
Click the "Close" button to close the project settings.
|
||||||
|
|
||||||
.. note::
|
Note:
|
||||||
|
|
||||||
|
|
||||||
We only mapped one key to each input action, but you can map multiple keys,
|
We only mapped one key to each input action, but you can map multiple keys,
|
||||||
joystick buttons, or mouse buttons to the same input action.
|
joystick buttons, or mouse buttons to the same input action.
|
||||||
@ -166,7 +169,8 @@ gdscript GDScript
|
|||||||
Click "Play Scene" (:kbd:`F6`, :kbd:`Cmd + R` on macOS) and confirm you can move
|
Click "Play Scene" (:kbd:`F6`, :kbd:`Cmd + R` on macOS) and confirm you can move
|
||||||
the player around the screen in all directions.
|
the player around the screen in all directions.
|
||||||
|
|
||||||
.. warning:: If you get an error in the "Debugger" panel that says
|
Warning:
|
||||||
|
If you get an error in the "Debugger" panel that says
|
||||||
|
|
||||||
`Attempt to call function 'play' in base 'null instance' on a null
|
`Attempt to call function 'play' in base 'null instance' on a null
|
||||||
instance`
|
instance`
|
||||||
@ -198,7 +202,8 @@ gdscript GDScript
|
|||||||
$AnimatedSprite.flip_v = velocity.y > 0
|
$AnimatedSprite.flip_v = velocity.y > 0
|
||||||
```
|
```
|
||||||
|
|
||||||
.. Note:: The boolean assignments in the code above are a common shorthand for
|
Note:
|
||||||
|
The boolean assignments in the code above are a common shorthand for
|
||||||
programmers. Since we're doing a comparison test (boolean) and also
|
programmers. Since we're doing a comparison test (boolean) and also
|
||||||
*assigning* a boolean value, we can do both at the same time. Consider
|
*assigning* a boolean value, we can do both at the same time. Consider
|
||||||
this code versus the one-line boolean assignment above:
|
this code versus the one-line boolean assignment above:
|
||||||
@ -277,7 +282,8 @@ Each time an enemy hits the player, the signal is going to be emitted. We need
|
|||||||
to disable the player's collision so that we don't trigger the `hit` signal
|
to disable the player's collision so that we don't trigger the `hit` signal
|
||||||
more than once.
|
more than once.
|
||||||
|
|
||||||
.. Note:: Disabling the area's collision shape can cause an error if it happens
|
Note:
|
||||||
|
Disabling the area's collision shape can cause an error if it happens
|
||||||
in the middle of the engine's collision processing. Using
|
in the middle of the engine's collision processing. Using
|
||||||
`set_deferred()` tells Godot to wait to disable the shape until it's
|
`set_deferred()` tells Godot to wait to disable the shape until it's
|
||||||
safe to do so.
|
safe to do so.
|
||||||
|
@ -84,7 +84,8 @@ We then need to pick a random number between `0` and `2` to select one of
|
|||||||
these names from the list (array indices start at `0`). `randi() % n`
|
these names from the list (array indices start at `0`). `randi() % n`
|
||||||
selects a random integer between `0` and `n-1`.
|
selects a random integer between `0` and `n-1`.
|
||||||
|
|
||||||
.. note:: You must use `randomize()` if you want your sequence of "random"
|
Note:
|
||||||
|
You must use `randomize()` if you want your sequence of "random"
|
||||||
numbers to be different every time you run the scene. We're going to
|
numbers to be different every time you run the scene. We're going to
|
||||||
use `randomize()` in our `Main` scene, so we won't need it here.
|
use `randomize()` in our `Main` scene, so we won't need it here.
|
||||||
|
|
||||||
|
@ -53,7 +53,8 @@ Once you've done this on the `ScoreLabel`, you can click the down arrow next
|
|||||||
to the Font property and choose "Copy", then "Paste" it in the same place
|
to the Font property and choose "Copy", then "Paste" it in the same place
|
||||||
on the other two Control nodes.
|
on the other two Control nodes.
|
||||||
|
|
||||||
.. note:: **Anchors and Margins:** `Control` nodes have a position and size,
|
Note:
|
||||||
|
**Anchors and Margins:** `Control` nodes have a position and size,
|
||||||
but they also have anchors and margins. Anchors define the origin -
|
but they also have anchors and margins. Anchors define the origin -
|
||||||
the reference point for the edges of the node. Margins update
|
the reference point for the edges of the node. Margins update
|
||||||
automatically when you move or resize a control node. They represent
|
automatically when you move or resize a control node. They represent
|
||||||
@ -139,7 +140,8 @@ This function is called when the player loses. It will show "Game Over" for 2
|
|||||||
seconds, then return to the title screen and, after a brief pause, show the
|
seconds, then return to the title screen and, after a brief pause, show the
|
||||||
"Start" button.
|
"Start" button.
|
||||||
|
|
||||||
.. note:: When you need to pause for a brief time, an alternative to using a
|
Note:
|
||||||
|
When you need to pause for a brief time, an alternative to using a
|
||||||
Timer node is to use the SceneTree's `create_timer()` function. This
|
Timer node is to use the SceneTree's `create_timer()` function. This
|
||||||
can be very useful to add delays such as in the above code, where we
|
can be very useful to add delays such as in the above code, where we
|
||||||
want to wait some time before showing the "Start" button.
|
want to wait some time before showing the "Start" button.
|
||||||
|
@ -12,7 +12,8 @@ game of your own, like the image below.
|
|||||||
You will learn how the Godot editor works, how to structure a project, and build
|
You will learn how the Godot editor works, how to structure a project, and build
|
||||||
a 2D game.
|
a 2D game.
|
||||||
|
|
||||||
.. note:: This project is an introduction to the Godot engine. It assumes that
|
Note:
|
||||||
|
This project is an introduction to the Godot engine. It assumes that
|
||||||
you have some programming experience already. If you're new to
|
you have some programming experience already. If you're new to
|
||||||
programming entirely, you should start here: `doc_scripting`.
|
programming entirely, you should start here: `doc_scripting`.
|
||||||
|
|
||||||
|
@ -77,7 +77,8 @@ the Z axis.
|
|||||||
|
|
||||||
|image9|
|
|image9|
|
||||||
|
|
||||||
.. note::
|
Note:
|
||||||
|
|
||||||
|
|
||||||
In 3D, translation and size units are in meters. The box's total size is
|
In 3D, translation and size units are in meters. The box's total size is
|
||||||
twice its extents: `60` by `60` meters on the ground plane and `2`
|
twice its extents: `60` by `60` meters on the ground plane and `2`
|
||||||
@ -110,7 +111,8 @@ and click and drag down on the Y axis. It's the green arrow in the move gizmo.
|
|||||||
|
|
||||||
|image13|
|
|image13|
|
||||||
|
|
||||||
.. note::
|
Note:
|
||||||
|
|
||||||
|
|
||||||
If you can't see the 3D object manipulator like on the image above, ensure
|
If you can't see the 3D object manipulator like on the image above, ensure
|
||||||
the *Select Mode* is active in the toolbar above the view.
|
the *Select Mode* is active in the toolbar above the view.
|
||||||
@ -122,7 +124,8 @@ viewport tells you how much you're translating the node.
|
|||||||
|
|
||||||
|image15|
|
|image15|
|
||||||
|
|
||||||
.. note::
|
Note:
|
||||||
|
|
||||||
|
|
||||||
Moving the *Ground* node down moves both children along with it.
|
Moving the *Ground* node down moves both children along with it.
|
||||||
Ensure you move the *Ground* node, **not** the *MeshInstance* or the
|
Ensure you move the *Ground* node, **not** the *MeshInstance* or the
|
||||||
|
@ -21,7 +21,8 @@ environment, but instead of being controlled by the physics engine, you dictate
|
|||||||
their movement. You will see how we use the node's unique features when we code
|
their movement. You will see how we use the node's unique features when we code
|
||||||
the jump and squash mechanics.
|
the jump and squash mechanics.
|
||||||
|
|
||||||
.. seealso::
|
See also:
|
||||||
|
|
||||||
|
|
||||||
To learn more about the different physics node types, see the
|
To learn more about the different physics node types, see the
|
||||||
`doc_physics_introduction`.
|
`doc_physics_introduction`.
|
||||||
@ -40,7 +41,8 @@ This should instantiate the model as a child of *Pivot*. You can rename it to
|
|||||||
|
|
||||||
|image2|
|
|image2|
|
||||||
|
|
||||||
.. note::
|
Note:
|
||||||
|
|
||||||
|
|
||||||
The `.glb` files contain 3D scene data based on the open-source GLTF 2.0
|
The `.glb` files contain 3D scene data based on the open-source GLTF 2.0
|
||||||
specification. They're a modern and powerful alternative to a proprietary format
|
specification. They're a modern and powerful alternative to a proprietary format
|
||||||
|
@ -34,7 +34,8 @@ These are common properties for a moving body. The `velocity` is a 3D vector
|
|||||||
combining a speed with a direction. Here, we define it as a property because
|
combining a speed with a direction. Here, we define it as a property because
|
||||||
we want to update and reuse its value across frames.
|
we want to update and reuse its value across frames.
|
||||||
|
|
||||||
.. note::
|
Note:
|
||||||
|
|
||||||
|
|
||||||
The values are quite different from 2D code because distances are in meters.
|
The values are quite different from 2D code because distances are in meters.
|
||||||
While in 2D, a thousand units (pixels) may only correspond to half of your
|
While in 2D, a thousand units (pixels) may only correspond to half of your
|
||||||
@ -68,7 +69,8 @@ virtual function. Like `_process()`, it allows you to update the node every
|
|||||||
frame, but it's designed specifically for physics-related code like moving a
|
frame, but it's designed specifically for physics-related code like moving a
|
||||||
kinematic or rigid body.
|
kinematic or rigid body.
|
||||||
|
|
||||||
.. seealso::
|
See also:
|
||||||
|
|
||||||
|
|
||||||
To learn more about the difference between `_process()` and
|
To learn more about the difference between `_process()` and
|
||||||
`_physics_process()`, see `doc_idle_and_physics_processing`.
|
`_physics_process()`, see `doc_idle_and_physics_processing`.
|
||||||
@ -103,7 +105,8 @@ In this case, we also get the *Pivot* node and call its `look_at()` method.
|
|||||||
This method takes a position in space to look at in global coordinates and the
|
This method takes a position in space to look at in global coordinates and the
|
||||||
up direction. In this case, we can use the `Vector3.UP` constant.
|
up direction. In this case, we can use the `Vector3.UP` constant.
|
||||||
|
|
||||||
.. note::
|
Note:
|
||||||
|
|
||||||
|
|
||||||
A node's local coordinates, like `translation`, are relative to their
|
A node's local coordinates, like `translation`, are relative to their
|
||||||
parent. Global coordinates are relative to the world's main axes you can see
|
parent. Global coordinates are relative to the world's main axes you can see
|
||||||
|
@ -58,7 +58,8 @@ Once a monster leaves the screen, we don't need it anymore, so we can delete it.
|
|||||||
Godot has a node that detects when objects leave the screen,
|
Godot has a node that detects when objects leave the screen,
|
||||||
*VisibilityNotifier*, and we're going to use it to destroy our mobs.
|
*VisibilityNotifier*, and we're going to use it to destroy our mobs.
|
||||||
|
|
||||||
.. note::
|
Note:
|
||||||
|
|
||||||
|
|
||||||
When you keep instancing an object in games, there's a technique you can
|
When you keep instancing an object in games, there's a technique you can
|
||||||
use to avoid the cost of creating and destroying instances all the time
|
use to avoid the cost of creating and destroying instances all the time
|
||||||
|
@ -126,7 +126,8 @@ the *Add Point* tool, the icon with the green "+" sign.
|
|||||||
|
|
||||||
|image16|
|
|image16|
|
||||||
|
|
||||||
.. note:: You can hover any icon to see a tooltip describing the tool.
|
Note:
|
||||||
|
You can hover any icon to see a tooltip describing the tool.
|
||||||
|
|
||||||
Click in the center of each cylinder to create a point. Then, click the *Close
|
Click in the center of each cylinder to create a point. Then, click the *Close
|
||||||
Curve* icon in the toolbar to close the path. If any point is a bit off, you can
|
Curve* icon in the toolbar to close the path. If any point is a bit off, you can
|
||||||
|
@ -94,7 +94,8 @@ These settings mean the monsters will move through one another. If you want the
|
|||||||
monsters to collide with and slide against each other, turn on the "enemies"
|
monsters to collide with and slide against each other, turn on the "enemies"
|
||||||
mask.
|
mask.
|
||||||
|
|
||||||
.. note::
|
Note:
|
||||||
|
|
||||||
|
|
||||||
The mobs don't need to mask the "world" layer because they only move
|
The mobs don't need to mask the "world" layer because they only move
|
||||||
on the XZ plane. We don't apply any gravity to them by design.
|
on the XZ plane. We don't apply any gravity to them by design.
|
||||||
@ -233,7 +234,8 @@ information about where and how the collision occurred. For example, we use its
|
|||||||
`collider` property to check if we collided with a "mob" by calling
|
`collider` property to check if we collided with a "mob" by calling
|
||||||
`is_in_group()` on it: `collision.collider.is_in_group("mob")`.
|
`is_in_group()` on it: `collision.collider.is_in_group("mob")`.
|
||||||
|
|
||||||
.. note::
|
Note:
|
||||||
|
|
||||||
|
|
||||||
The method `is_in_group()` is available on every `Node( Node )`.
|
The method `is_in_group()` is available on every `Node( Node )`.
|
||||||
|
|
||||||
|
@ -57,7 +57,8 @@ of how all the built-in UI widgets will look with your theme resource.
|
|||||||
|
|
||||||
By default, a theme only has one property, the *Default Font*.
|
By default, a theme only has one property, the *Default Font*.
|
||||||
|
|
||||||
.. seealso::
|
See also:
|
||||||
|
|
||||||
|
|
||||||
You can add more properties to the theme resource to design complex user
|
You can add more properties to the theme resource to design complex user
|
||||||
interfaces, but that is beyond the scope of this series. To learn more about
|
interfaces, but that is beyond the scope of this series. To learn more about
|
||||||
@ -151,7 +152,8 @@ placeholder `%s`. When using this feature, Godot automatically converts values
|
|||||||
to text, which is convenient to output text in labels or using the `print()`
|
to text, which is convenient to output text in labels or using the `print()`
|
||||||
function.
|
function.
|
||||||
|
|
||||||
.. seealso::
|
See also:
|
||||||
|
|
||||||
|
|
||||||
You can learn more about string formatting here: `doc_gdscript_printf`.
|
You can learn more about string formatting here: `doc_gdscript_printf`.
|
||||||
|
|
||||||
@ -160,7 +162,8 @@ increase.
|
|||||||
|
|
||||||
|image11|
|
|image11|
|
||||||
|
|
||||||
.. note::
|
Note:
|
||||||
|
|
||||||
|
|
||||||
In a complex game, you may want to completely separate your user interface
|
In a complex game, you may want to completely separate your user interface
|
||||||
from the game world. In that case, you would not keep track of the score on
|
from the game world. In that case, you would not keep track of the score on
|
||||||
|
@ -105,7 +105,8 @@ seconds by dragging it on the timeline.
|
|||||||
|
|
||||||
|image14|
|
|image14|
|
||||||
|
|
||||||
.. note::
|
Note:
|
||||||
|
|
||||||
|
|
||||||
A lecture on the principles of animation is beyond the scope of this
|
A lecture on the principles of animation is beyond the scope of this
|
||||||
tutorial. Just note that you don't want to time and space everything evenly.
|
tutorial. Just note that you don't want to time and space everything evenly.
|
||||||
@ -159,7 +160,8 @@ Your animation should look something like this.
|
|||||||
|
|
||||||
|image21|
|
|image21|
|
||||||
|
|
||||||
.. note::
|
Note:
|
||||||
|
|
||||||
|
|
||||||
Animations update the properties of the animated nodes every frame,
|
Animations update the properties of the animated nodes every frame,
|
||||||
overriding initial values. If we directly animated the *Player* node, it
|
overriding initial values. If we directly animated the *Player* node, it
|
||||||
|
@ -33,7 +33,8 @@ steps. If you're an experienced programmer, you can browse the complete demo's
|
|||||||
source code here: `Squash the Creep source code
|
source code here: `Squash the Creep source code
|
||||||
( https://github.com/GDQuest/godot-3d-dodge-the-creeps/ )`.
|
( https://github.com/GDQuest/godot-3d-dodge-the-creeps/ )`.
|
||||||
|
|
||||||
.. note::
|
Note:
|
||||||
|
|
||||||
|
|
||||||
You can follow this series without having done the 2D one. However, if
|
You can follow this series without having done the 2D one. However, if
|
||||||
you're new to game development, we recommend you to start with 2D. 3D game
|
you're new to game development, we recommend you to start with 2D. 3D game
|
||||||
|
@ -12,7 +12,8 @@ First look at Godot's editor
|
|||||||
This page will give you a brief overview of Godot's interface. We're going to
|
This page will give you a brief overview of Godot's interface. We're going to
|
||||||
look at the different main screens and docks to help you situate yourself.
|
look at the different main screens and docks to help you situate yourself.
|
||||||
|
|
||||||
.. seealso:: For a comprehensive breakdown of the editor's interface and how to
|
See also:
|
||||||
|
For a comprehensive breakdown of the editor's interface and how to
|
||||||
use it, see the `Editor manual ( toc-learn-editor )`.
|
use it, see the `Editor manual ( toc-learn-editor )`.
|
||||||
|
|
||||||
The Project manager
|
The Project manager
|
||||||
@ -109,7 +110,8 @@ options related to the 3D view.
|
|||||||
|
|
||||||
![](img/editor_intro_3d_viewport_perspective.png)
|
![](img/editor_intro_3d_viewport_perspective.png)
|
||||||
|
|
||||||
.. note:: Read `doc_introduction_to_3d` for more detail about the **3D
|
Note:
|
||||||
|
Read `doc_introduction_to_3d` for more detail about the **3D
|
||||||
main screen**.
|
main screen**.
|
||||||
|
|
||||||
The **Script screen** is a complete code editor with a debugger, rich
|
The **Script screen** is a complete code editor with a debugger, rich
|
||||||
@ -122,7 +124,8 @@ and assets to use in your projects.
|
|||||||
|
|
||||||
![](img/editor_intro_workspace_assetlib.png)
|
![](img/editor_intro_workspace_assetlib.png)
|
||||||
|
|
||||||
.. seealso:: You can learn more about the asset library in
|
See also:
|
||||||
|
You can learn more about the asset library in
|
||||||
`doc_what_is_assetlib`.
|
`doc_what_is_assetlib`.
|
||||||
|
|
||||||
Integrated class reference
|
Integrated class reference
|
||||||
|
@ -109,7 +109,8 @@ game code. See `The Godot editor is a Godot game`_ below.
|
|||||||
manage states and transitions visually.*
|
manage states and transitions visually.*
|
||||||
|
|
||||||
|
|
||||||
.. warning::
|
Warning:
|
||||||
|
|
||||||
|
|
||||||
`Godot 4.0 will remove VisualScript from core entirely. ( https://godotengine.org/article/godot-4-will-discontinue-visual-scripting )`
|
`Godot 4.0 will remove VisualScript from core entirely. ( https://godotengine.org/article/godot-4-will-discontinue-visual-scripting )`
|
||||||
As a result, creating new projects using visual scripting in Godot is not recommended.
|
As a result, creating new projects using visual scripting in Godot is not recommended.
|
||||||
@ -136,7 +137,8 @@ On the other hand, an open codebase means you can **learn from and extend
|
|||||||
the engine** to your heart's content. You can also debug games easily,
|
the engine** to your heart's content. You can also debug games easily,
|
||||||
as Godot will print errors with a stack trace, even if they come from the engine itself.
|
as Godot will print errors with a stack trace, even if they come from the engine itself.
|
||||||
|
|
||||||
.. note::
|
Note:
|
||||||
|
|
||||||
|
|
||||||
This **does not affect the work you do with Godot** in any way: there's
|
This **does not affect the work you do with Godot** in any way: there's
|
||||||
no strings attached to the engine or anything you make with it.
|
no strings attached to the engine or anything you make with it.
|
||||||
@ -177,7 +179,8 @@ in the editor. This lets you import and export plugins, create plugins
|
|||||||
like custom level editors, or create scripts with the same nodes and API
|
like custom level editors, or create scripts with the same nodes and API
|
||||||
you use in your projects.
|
you use in your projects.
|
||||||
|
|
||||||
.. note::
|
Note:
|
||||||
|
|
||||||
|
|
||||||
The editor is fully written in C++ and is statically compiled into the
|
The editor is fully written in C++ and is statically compiled into the
|
||||||
binary. This means you can't import it as a typical project that would have a
|
binary. This means you can't import it as a typical project that would have a
|
||||||
|
@ -21,7 +21,8 @@ on desktop or mobile, as well as on the web.
|
|||||||
You can also create console games with it, although you either need strong
|
You can also create console games with it, although you either need strong
|
||||||
programming skills or a developer to port the game for you.
|
programming skills or a developer to port the game for you.
|
||||||
|
|
||||||
.. note:: The Godot team can't provide an open-source console export due to the
|
Note:
|
||||||
|
The Godot team can't provide an open-source console export due to the
|
||||||
licensing terms imposed by console manufacturers. Regardless of the
|
licensing terms imposed by console manufacturers. Regardless of the
|
||||||
engine you use, though, releasing games on consoles is always a lot of
|
engine you use, though, releasing games on consoles is always a lot of
|
||||||
work. You can read more on that here: `doc_consoles`.
|
work. You can read more on that here: `doc_consoles`.
|
||||||
@ -87,7 +88,8 @@ Software Development Kits (SDK) in the engine.
|
|||||||
Of course, you can also directly add modules and features to the engine, as it's
|
Of course, you can also directly add modules and features to the engine, as it's
|
||||||
completely free and open-source.
|
completely free and open-source.
|
||||||
|
|
||||||
.. seealso:: These are the five officially supported programming languages. The
|
See also:
|
||||||
|
These are the five officially supported programming languages. The
|
||||||
community maintains support for many more. For more information,
|
community maintains support for many more. For more information,
|
||||||
see `GDNative third-party bindings
|
see `GDNative third-party bindings
|
||||||
( doc_what_is_gdnative_third_party_bindings )`.
|
( doc_what_is_gdnative_third_party_bindings )`.
|
||||||
@ -108,7 +110,8 @@ courseware`_ from Harvard University. It's a great free course that will teach
|
|||||||
you everything you need to know to be off to a good start. It will save you
|
you everything you need to know to be off to a good start. It will save you
|
||||||
countless hours and hurdles learning any game engine afterward.
|
countless hours and hurdles learning any game engine afterward.
|
||||||
|
|
||||||
.. note:: In CS50, you will learn multiple programming languages. Don't be
|
Note:
|
||||||
|
In CS50, you will learn multiple programming languages. Don't be
|
||||||
afraid of that: programming languages have many similarities. The
|
afraid of that: programming languages have many similarities. The
|
||||||
skills you learn with one language transfer well to others.
|
skills you learn with one language transfer well to others.
|
||||||
|
|
||||||
|
@ -43,7 +43,8 @@ nodes.
|
|||||||
It is made of a `KinematicBody2D` node named "Character", a `Sprite`, a
|
It is made of a `KinematicBody2D` node named "Character", a `Sprite`, a
|
||||||
`Camera2D`, and a `CollisionShape2D`.
|
`Camera2D`, and a `CollisionShape2D`.
|
||||||
|
|
||||||
.. note:: The node names end with "2D" because this is a 2D scene. Their 3D
|
Note:
|
||||||
|
The node names end with "2D" because this is a 2D scene. Their 3D
|
||||||
counterpart have names that end with "3D".
|
counterpart have names that end with "3D".
|
||||||
|
|
||||||
Notice how nodes and scenes look the same in the editor. When you save a tree of
|
Notice how nodes and scenes look the same in the editor. When you save a tree of
|
||||||
@ -75,7 +76,8 @@ flexibility in how you structure your scenes.
|
|||||||
|
|
||||||
![](img/key_concepts_signals.png)
|
![](img/key_concepts_signals.png)
|
||||||
|
|
||||||
.. note:: Signals are Godot's version of the *observer* pattern. You can read
|
Note:
|
||||||
|
Signals are Godot's version of the *observer* pattern. You can read
|
||||||
more about it here:
|
more about it here:
|
||||||
https://gameprogrammingpatterns.com/observer.html
|
https://gameprogrammingpatterns.com/observer.html
|
||||||
|
|
||||||
|
@ -51,7 +51,8 @@ A class reference's page tells you:
|
|||||||
|
|
||||||
4. Links to manual pages further detailing the class.
|
4. Links to manual pages further detailing the class.
|
||||||
|
|
||||||
.. note:: If the manual or class reference is missing or has insufficient
|
Note:
|
||||||
|
If the manual or class reference is missing or has insufficient
|
||||||
information, please open an Issue in the official `godot-docs
|
information, please open an Issue in the official `godot-docs
|
||||||
( https://github.com/godotengine/godot-docs/issues )`_ GitHub repository
|
( https://github.com/godotengine/godot-docs/issues )`_ GitHub repository
|
||||||
to report it.
|
to report it.
|
||||||
|
@ -111,7 +111,8 @@ There is more to instances. With this feature, you can:
|
|||||||
and making a change to the Ball node there. Upon saving, all instances of the
|
and making a change to the Ball node there. Upon saving, all instances of the
|
||||||
Ball in the project will see their values update.
|
Ball in the project will see their values update.
|
||||||
|
|
||||||
.. note:: Changing a property on an instance always overrides values from the
|
Note:
|
||||||
|
Changing a property on an instance always overrides values from the
|
||||||
corresponding packed scene.
|
corresponding packed scene.
|
||||||
|
|
||||||
Let's try this. Open `Ball.tscn` and select the Ball node. In the Inspector on
|
Let's try this. Open `Ball.tscn` and select the Ball node. In the Inspector on
|
||||||
@ -149,7 +150,8 @@ property to the value in the saved scene.
|
|||||||
|
|
||||||
Rerun the game and notice how this ball now falls much faster than the others.
|
Rerun the game and notice how this ball now falls much faster than the others.
|
||||||
|
|
||||||
.. note:: If you change a value on the `PhysicsMaterial` of one instance, it
|
Note:
|
||||||
|
If you change a value on the `PhysicsMaterial` of one instance, it
|
||||||
will affect all the others. This is because `PhysicsMaterial` is a
|
will affect all the others. This is because `PhysicsMaterial` is a
|
||||||
resource, and resources are shared between instances. To make a
|
resource, and resources are shared between instances. To make a
|
||||||
resource unique for one instance, right-click on it in the Inspector
|
resource unique for one instance, right-click on it in the Inspector
|
||||||
|
@ -143,7 +143,8 @@ button to save it as "Label.tscn".
|
|||||||
|
|
||||||
![](img/nodes_and_scenes_11_save_scene_as.png)
|
![](img/nodes_and_scenes_11_save_scene_as.png)
|
||||||
|
|
||||||
.. note:: The Save Scene As dialog, like other file dialogs in the editor, only
|
Note:
|
||||||
|
The Save Scene As dialog, like other file dialogs in the editor, only
|
||||||
allows you to save files inside the project. The `res://` path at
|
allows you to save files inside the project. The `res://` path at
|
||||||
the top of the window represents the project's root directory and
|
the top of the window represents the project's root directory and
|
||||||
stands for "resource path". For more information about file paths in
|
stands for "resource path". For more information about file paths in
|
||||||
@ -155,7 +156,8 @@ The application should open in a new window and display the text "Hello World".
|
|||||||
|
|
||||||
Close the window or press :kbd:`F8` to quit the running scene.
|
Close the window or press :kbd:`F8` to quit the running scene.
|
||||||
|
|
||||||
.. note::
|
Note:
|
||||||
|
|
||||||
|
|
||||||
If this doesn't immediately work and you have a hiDPI display on at least
|
If this doesn't immediately work and you have a hiDPI display on at least
|
||||||
one of your monitors, go to Project -> Project Settings -> Display ->
|
one of your monitors, go to Project -> Project Settings -> Display ->
|
||||||
@ -182,7 +184,8 @@ Label.tscn.
|
|||||||
The demo should run again. Moving forward, every time you run the project, Godot
|
The demo should run again. Moving forward, every time you run the project, Godot
|
||||||
will use this scene as a starting point.
|
will use this scene as a starting point.
|
||||||
|
|
||||||
.. note:: The editor saves the main scene's path in a project.godot file in your
|
Note:
|
||||||
|
The editor saves the main scene's path in a project.godot file in your
|
||||||
project's directory. While you can edit this text file directly to
|
project's directory. While you can edit this text file directly to
|
||||||
change project settings, you can also use the "Project -> Project
|
change project settings, you can also use the "Project -> Project
|
||||||
Settings" window to do so.
|
Settings" window to do so.
|
||||||
|
@ -25,10 +25,12 @@ The equivalent C# code has been included in another tab for convenience.
|
|||||||
|
|
||||||
![](img/scripting_first_script_rotating_godot.gif)
|
![](img/scripting_first_script_rotating_godot.gif)
|
||||||
|
|
||||||
.. seealso:: To learn more about GDScript, its keywords, and its syntax, head to
|
See also:
|
||||||
|
To learn more about GDScript, its keywords, and its syntax, head to
|
||||||
the `GDScript reference( doc_gdscript )`.
|
the `GDScript reference( doc_gdscript )`.
|
||||||
|
|
||||||
.. seealso:: To learn more about C#, head to the `C# basics ( doc_c_sharp )` page.
|
See also:
|
||||||
|
To learn more about C#, head to the `C# basics ( doc_c_sharp )` page.
|
||||||
|
|
||||||
Project setup
|
Project setup
|
||||||
-------------
|
-------------
|
||||||
@ -59,7 +61,8 @@ and drag the file `icon.png)` from the FileSystem dock onto the Texture slot.
|
|||||||
|
|
||||||
![](img/scripting_first_script_setting_texture.png)
|
![](img/scripting_first_script_setting_texture.png)
|
||||||
|
|
||||||
.. note::
|
Note:
|
||||||
|
|
||||||
|
|
||||||
You can create Sprite nodes automatically by dragging and dropping images on
|
You can create Sprite nodes automatically by dragging and dropping images on
|
||||||
the viewport.
|
the viewport.
|
||||||
@ -101,14 +104,16 @@ our script will get access to all the properties and functions of the Sprite
|
|||||||
node, including classes it extends, like `Node2D`, `CanvasItem`, and
|
node, including classes it extends, like `Node2D`, `CanvasItem`, and
|
||||||
`Node`.
|
`Node`.
|
||||||
|
|
||||||
.. note:: In GDScript, if you omit the line with the `extends` keyword, your
|
Note:
|
||||||
|
In GDScript, if you omit the line with the `extends` keyword, your
|
||||||
class will implicitly extend `Reference`, which
|
class will implicitly extend `Reference`, which
|
||||||
Godot uses to manage your application's memory.
|
Godot uses to manage your application's memory.
|
||||||
|
|
||||||
Inherited properties include the ones you can see in the Inspector dock, like
|
Inherited properties include the ones you can see in the Inspector dock, like
|
||||||
our node's `texture`.
|
our node's `texture`.
|
||||||
|
|
||||||
.. note::
|
Note:
|
||||||
|
|
||||||
|
|
||||||
By default, the Inspector displays a node's properties in "Title Case", with
|
By default, the Inspector displays a node's properties in "Title Case", with
|
||||||
capitalized words separated by a space. In GDScript code, these properties
|
capitalized words separated by a space. In GDScript code, these properties
|
||||||
@ -138,7 +143,8 @@ Let's break it down. The `func` keyword defines a new function named
|
|||||||
`_init()` on every object or node upon creating it in memory, if you define
|
`_init()` on every object or node upon creating it in memory, if you define
|
||||||
this function.
|
this function.
|
||||||
|
|
||||||
.. note:: GDScript is an indent-based language. The tab at the start of the line
|
Note:
|
||||||
|
GDScript is an indent-based language. The tab at the start of the line
|
||||||
that says `print()` is necessary for the code to work. If you omit
|
that says `print()` is necessary for the code to work. If you omit
|
||||||
it or don't indent a line correctly, the editor will highlight it in
|
it or don't indent a line correctly, the editor will highlight it in
|
||||||
red and display the following error message: "Indented block expected".
|
red and display the following error message: "Indented block expected".
|
||||||
@ -171,7 +177,8 @@ but before functions. Every node
|
|||||||
instance with this script attached to it will have its own copy of the `speed`
|
instance with this script attached to it will have its own copy of the `speed`
|
||||||
and `angular_speed` properties.
|
and `angular_speed` properties.
|
||||||
|
|
||||||
.. note:: Angles in Godot work in radians by default,
|
Note:
|
||||||
|
Angles in Godot work in radians by default,
|
||||||
but you have built-in functions and properties available if you prefer
|
but you have built-in functions and properties available if you prefer
|
||||||
to calculate angles in degrees instead.
|
to calculate angles in degrees instead.
|
||||||
|
|
||||||
@ -181,7 +188,8 @@ If you define it in any class that extends the Node class, like Sprite, Godot
|
|||||||
will call the function every frame and pass it an argument named `delta`, the
|
will call the function every frame and pass it an argument named `delta`, the
|
||||||
time elapsed since the last frame.
|
time elapsed since the last frame.
|
||||||
|
|
||||||
.. note::
|
Note:
|
||||||
|
|
||||||
|
|
||||||
Games work by rendering many images per second, each called a frame, and
|
Games work by rendering many images per second, each called a frame, and
|
||||||
they do so in a loop. We measure the rate at which a game produces images in
|
they do so in a loop. We measure the rate at which a game produces images in
|
||||||
@ -208,7 +216,8 @@ function's name and arguments it takes in parentheses. A colon ends the
|
|||||||
definition, and the indented blocks that follow are the function's content or
|
definition, and the indented blocks that follow are the function's content or
|
||||||
instructions.
|
instructions.
|
||||||
|
|
||||||
.. note:: Notice how `_process()`, like `_init()`, starts with a leading
|
Note:
|
||||||
|
Notice how `_process()`, like `_init()`, starts with a leading
|
||||||
underscore. By convention, Godot's virtual functions, that is to say,
|
underscore. By convention, Godot's virtual functions, that is to say,
|
||||||
built-in functions you can override to communicate with the engine,
|
built-in functions you can override to communicate with the engine,
|
||||||
start with an underscore.
|
start with an underscore.
|
||||||
@ -260,7 +269,8 @@ Run the scene to see the Godot head run in circles.
|
|||||||
|
|
||||||
![](img/scripting_first_script_rotating_godot.gif)
|
![](img/scripting_first_script_rotating_godot.gif)
|
||||||
|
|
||||||
.. note:: Moving a node like that does not take into account colliding with
|
Note:
|
||||||
|
Moving a node like that does not take into account colliding with
|
||||||
walls or the floor. In `doc_your_first_2d_game`, you will learn
|
walls or the floor. In `doc_your_first_2d_game`, you will learn
|
||||||
another approach to moving objects while detecting collisions.
|
another approach to moving objects while detecting collisions.
|
||||||
|
|
||||||
|
@ -37,7 +37,8 @@ everything in GDScript or C#. It's your call.
|
|||||||
We provide this flexibility to answer the needs of different game projects and
|
We provide this flexibility to answer the needs of different game projects and
|
||||||
developers.
|
developers.
|
||||||
|
|
||||||
.. warning::
|
Warning:
|
||||||
|
|
||||||
|
|
||||||
`Godot 4.0 will remove VisualScript from core entirely. ( https://godotengine.org/article/godot-4-will-discontinue-visual-scripting )`
|
`Godot 4.0 will remove VisualScript from core entirely. ( https://godotengine.org/article/godot-4-will-discontinue-visual-scripting )`
|
||||||
As a result, creating new projects using visual scripting in Godot is not recommended.
|
As a result, creating new projects using visual scripting in Godot is not recommended.
|
||||||
@ -94,7 +95,8 @@ GDScript looks like Python as you structure your code blocks using indentations,
|
|||||||
but it doesn't work the same way in practice. It's inspired by multiple
|
but it doesn't work the same way in practice. It's inspired by multiple
|
||||||
languages, including Squirrel, Lua, and Python.
|
languages, including Squirrel, Lua, and Python.
|
||||||
|
|
||||||
.. note::
|
Note:
|
||||||
|
|
||||||
|
|
||||||
Why don't we use Python or Lua directly?
|
Why don't we use Python or Lua directly?
|
||||||
|
|
||||||
@ -121,7 +123,8 @@ thanks to a generous donation from Microsoft.
|
|||||||
C# offers a good tradeoff between performance and ease of use, although you
|
C# offers a good tradeoff between performance and ease of use, although you
|
||||||
should be aware of its garbage collector.
|
should be aware of its garbage collector.
|
||||||
|
|
||||||
.. note:: You must use the Mono edition of the Godot editor to script in C#. You
|
Note:
|
||||||
|
You must use the Mono edition of the Godot editor to script in C#. You
|
||||||
can download it on the Godot website's `download
|
can download it on the Godot website's `download
|
||||||
( https://godotengine.org/download/ )`_ page.
|
( https://godotengine.org/download/ )`_ page.
|
||||||
|
|
||||||
@ -130,7 +133,8 @@ you can use any third-party .NET library or framework in Godot, as well as any
|
|||||||
Common Language Infrastructure-compliant programming language, such as F#, Boo,
|
Common Language Infrastructure-compliant programming language, such as F#, Boo,
|
||||||
or ClojureCLR. However, C# is the only officially supported .NET option.
|
or ClojureCLR. However, C# is the only officially supported .NET option.
|
||||||
|
|
||||||
.. note:: GDScript code itself doesn't execute as fast as compiled C# or C++.
|
Note:
|
||||||
|
GDScript code itself doesn't execute as fast as compiled C# or C++.
|
||||||
However, most script code calls functions written with fast algorithms
|
However, most script code calls functions written with fast algorithms
|
||||||
in C++ code inside the engine. In many cases, writing gameplay logic
|
in C++ code inside the engine. In many cases, writing gameplay logic
|
||||||
in GDScript, C#, or C++ won't have a significant impact on
|
in GDScript, C#, or C++ won't have a significant impact on
|
||||||
@ -139,7 +143,8 @@ or ClojureCLR. However, C# is the only officially supported .NET option.
|
|||||||
VisualScript
|
VisualScript
|
||||||
~~~~~~~~~~~~
|
~~~~~~~~~~~~
|
||||||
|
|
||||||
.. warning::
|
Warning:
|
||||||
|
|
||||||
|
|
||||||
`Godot 4.0 will remove VisualScript from core entirely. ( https://godotengine.org/article/godot-4-will-discontinue-visual-scripting )`
|
`Godot 4.0 will remove VisualScript from core entirely. ( https://godotengine.org/article/godot-4-will-discontinue-visual-scripting )`
|
||||||
As a result, creating new projects using visual scripting in Godot is not recommended.
|
As a result, creating new projects using visual scripting in Godot is not recommended.
|
||||||
@ -163,7 +168,8 @@ While it provides all the basic building blocks you need to code complete games,
|
|||||||
we do not recommend to use VisualScript this way. Programming everything with it
|
we do not recommend to use VisualScript this way. Programming everything with it
|
||||||
is slow compared to using other programming languages.
|
is slow compared to using other programming languages.
|
||||||
|
|
||||||
.. seealso::
|
See also:
|
||||||
|
|
||||||
|
|
||||||
For more information, see
|
For more information, see
|
||||||
`Getting started with VisualScript ( doc_getting_started_visual_script )`.
|
`Getting started with VisualScript ( doc_getting_started_visual_script )`.
|
||||||
|
@ -60,7 +60,8 @@ The two actions we use above, "ui_left" and "ui_right", are predefined in every
|
|||||||
Godot project. They respectively trigger when the player presses the left and
|
Godot project. They respectively trigger when the player presses the left and
|
||||||
right arrows on the keyboard or left and right on a gamepad's D-pad.
|
right arrows on the keyboard or left and right on a gamepad's D-pad.
|
||||||
|
|
||||||
.. note:: You can see and edit input actions in your project by going to Project
|
Note:
|
||||||
|
You can see and edit input actions in your project by going to Project
|
||||||
-> Project Settings and clicking on the Input Map tab.
|
-> Project Settings and clicking on the Input Map tab.
|
||||||
|
|
||||||
Finally, we use the `direction` as a multiplier when we update the node's
|
Finally, we use the `direction` as a multiplier when we update the node's
|
||||||
|
@ -25,7 +25,8 @@ For example, you might have a life bar on the screen that represents the
|
|||||||
player’s health. When the player takes damage or uses a healing potion, you want
|
player’s health. When the player takes damage or uses a healing potion, you want
|
||||||
the bar to reflect the change. To do so, in Godot, you would use signals.
|
the bar to reflect the change. To do so, in Godot, you would use signals.
|
||||||
|
|
||||||
.. note:: As mentioned in the introduction, signals are Godot's version of the
|
Note:
|
||||||
|
As mentioned in the introduction, signals are Godot's version of the
|
||||||
observer pattern. You can learn more about it here:
|
observer pattern. You can learn more about it here:
|
||||||
https://gameprogrammingpatterns.com/observer.html
|
https://gameprogrammingpatterns.com/observer.html
|
||||||
|
|
||||||
@ -113,7 +114,8 @@ method, a function that Godot will call when the Button emits the signal. The
|
|||||||
editor generates one for you. By convention, we name these callback methods
|
editor generates one for you. By convention, we name these callback methods
|
||||||
"_on_NodeName_signal_name". Here, it'll be "_on_Button_pressed".
|
"_on_NodeName_signal_name". Here, it'll be "_on_Button_pressed".
|
||||||
|
|
||||||
.. note::
|
Note:
|
||||||
|
|
||||||
|
|
||||||
When connecting signals via the editor's Node dock, you can use two
|
When connecting signals via the editor's Node dock, you can use two
|
||||||
modes. The simple one only allows you to connect to nodes that have a
|
modes. The simple one only allows you to connect to nodes that have a
|
||||||
@ -224,7 +226,8 @@ We need to do two operations to connect the nodes via code:
|
|||||||
1. Get a reference to the Timer from the Sprite.
|
1. Get a reference to the Timer from the Sprite.
|
||||||
2. Call the Timer's `connect()` method.
|
2. Call the Timer's `connect()` method.
|
||||||
|
|
||||||
.. note:: To connect to a signal via code, you need to call the `connect()`
|
Note:
|
||||||
|
To connect to a signal via code, you need to call the `connect()`
|
||||||
method of the node you want to listen to. In this case, we want to
|
method of the node you want to listen to. In this case, we want to
|
||||||
listen to the Timer's "timeout" signal.
|
listen to the Timer's "timeout" signal.
|
||||||
|
|
||||||
@ -315,7 +318,8 @@ gdscript GDScript
|
|||||||
Custom signals
|
Custom signals
|
||||||
--------------
|
--------------
|
||||||
|
|
||||||
.. note:: This section is a reference on how to define and use your own signals,
|
Note:
|
||||||
|
This section is a reference on how to define and use your own signals,
|
||||||
and does not build upon the project created in previous lessons.
|
and does not build upon the project created in previous lessons.
|
||||||
|
|
||||||
You can define custom signals in a script. Say, for example, that you want to
|
You can define custom signals in a script. Say, for example, that you want to
|
||||||
@ -333,7 +337,8 @@ gdscript GDScript
|
|||||||
var health = 10
|
var health = 10
|
||||||
```
|
```
|
||||||
|
|
||||||
.. note:: As signals represent events that just occurred, we generally use an
|
Note:
|
||||||
|
As signals represent events that just occurred, we generally use an
|
||||||
action verb in the past tense in their names.
|
action verb in the past tense in their names.
|
||||||
|
|
||||||
Your signals work the same way as built-in ones: they appear in the Node tab and
|
Your signals work the same way as built-in ones: they appear in the Node tab and
|
||||||
@ -363,7 +368,8 @@ gdscript GDScript
|
|||||||
signal health_changed(old_value, new_value)
|
signal health_changed(old_value, new_value)
|
||||||
```
|
```
|
||||||
|
|
||||||
.. note::
|
Note:
|
||||||
|
|
||||||
|
|
||||||
The signal arguments show up in the editor's node dock, and Godot can use
|
The signal arguments show up in the editor's node dock, and Godot can use
|
||||||
them to generate callback functions for you. However, you can still emit any
|
them to generate callback functions for you. However, you can still emit any
|
||||||
|
9
index.md
9
index.md
@ -3,7 +3,8 @@ Godot Docs – *3.5* branch
|
|||||||
|
|
||||||
.. only:: not i18n
|
.. only:: not i18n
|
||||||
|
|
||||||
.. note:: Godot's documentation is available in various languages and versions.
|
Note:
|
||||||
|
Godot's documentation is available in various languages and versions.
|
||||||
Expand the "Read the Docs" panel at the bottom of the sidebar to see
|
Expand the "Read the Docs" panel at the bottom of the sidebar to see
|
||||||
the list.
|
the list.
|
||||||
|
|
||||||
@ -15,7 +16,8 @@ Godot Docs – *3.5* branch
|
|||||||
|
|
||||||
.. only:: i18n
|
.. only:: i18n
|
||||||
|
|
||||||
.. note:: This documentation is translated from the `original English one
|
Note:
|
||||||
|
This documentation is translated from the `original English one
|
||||||
( https://docs.godotengine.org/en/latest )`_ by community members
|
( https://docs.godotengine.org/en/latest )`_ by community members
|
||||||
on `Weblate ( https://hosted.weblate.org/projects/godot-engine/godot-docs )`_.
|
on `Weblate ( https://hosted.weblate.org/projects/godot-engine/godot-docs )`_.
|
||||||
|
|
||||||
@ -42,7 +44,8 @@ You can also `download an HTML copy ( https://nightly.link/godotengine/godot-doc
|
|||||||
for offline reading (updated every Monday). Extract the ZIP archive then open
|
for offline reading (updated every Monday). Extract the ZIP archive then open
|
||||||
the top-level `index.html` in a web browser.
|
the top-level `index.html` in a web browser.
|
||||||
|
|
||||||
.. note:: Godot Engine is an open source project developed by a community of
|
Note:
|
||||||
|
Godot Engine is an open source project developed by a community of
|
||||||
volunteers. The documentation team can always use your
|
volunteers. The documentation team can always use your
|
||||||
feedback and help to improve the tutorials and class reference. If
|
feedback and help to improve the tutorials and class reference. If
|
||||||
you don't understand something, or cannot find what you
|
you don't understand something, or cannot find what you
|
||||||
|
@ -130,7 +130,8 @@ node, which is why we want the blob to be centered on its parent `Light`.
|
|||||||
|
|
||||||
![](img/light_shadow_all_lights.png)
|
![](img/light_shadow_all_lights.png)
|
||||||
|
|
||||||
.. note:: The animations in the demo will not be covered here. See `doc_introduction_animation`
|
Note:
|
||||||
|
The animations in the demo will not be covered here. See `doc_introduction_animation`
|
||||||
for information on creating animations.
|
for information on creating animations.
|
||||||
|
|
||||||
Right now the scene should look too bright. This is because all three lights are adding color to the scene.
|
Right now the scene should look too bright. This is because all three lights are adding color to the scene.
|
||||||
@ -175,15 +176,18 @@ lines of the polygon can be seen:
|
|||||||
|
|
||||||
![](img/light_shadow_cull_disabled.png)
|
![](img/light_shadow_cull_disabled.png)
|
||||||
|
|
||||||
.. note:: `Cull Mode` is set to `Disabled`. All three lines cast shadows.
|
Note:
|
||||||
|
`Cull Mode` is set to `Disabled`. All three lines cast shadows.
|
||||||
|
|
||||||
![](img/light_shadow_cull_clockwise.png)
|
![](img/light_shadow_cull_clockwise.png)
|
||||||
|
|
||||||
.. note:: `Cull Mode` is set to `Clockwise`. Only the top and right lines cast shadows.
|
Note:
|
||||||
|
`Cull Mode` is set to `Clockwise`. Only the top and right lines cast shadows.
|
||||||
|
|
||||||
![](img/light_shadow_cull_counter_clockwise.png)
|
![](img/light_shadow_cull_counter_clockwise.png)
|
||||||
|
|
||||||
.. note:: `Cull Mode` is set to `Counter-Clockwise`. Only the bottom line casts a shadow.
|
Note:
|
||||||
|
`Cull Mode` is set to `Counter-Clockwise`. Only the bottom line casts a shadow.
|
||||||
If `Closed` was set to `on` there would be an additional vertical line on the
|
If `Closed` was set to `on` there would be an additional vertical line on the
|
||||||
left which would cast a shadow as well.
|
left which would cast a shadow as well.
|
||||||
|
|
||||||
@ -202,12 +206,14 @@ The demo uses PCF7.
|
|||||||
|
|
||||||
![](img/light_shadow_normal.png)
|
![](img/light_shadow_normal.png)
|
||||||
|
|
||||||
.. note:: This is a shadow rendered with the demo's settings. `gradient length` is set
|
Note:
|
||||||
|
This is a shadow rendered with the demo's settings. `gradient length` is set
|
||||||
to `1.3`, `filter smooth` is set to `11.1`, and `filter` is set to `PCF7`.
|
to `1.3`, `filter smooth` is set to `11.1`, and `filter` is set to `PCF7`.
|
||||||
|
|
||||||
![](img/light_shadow_pcf13.png)
|
![](img/light_shadow_pcf13.png)
|
||||||
|
|
||||||
.. note:: `filter` is set to `PCF13`. Notice how the shadow becomes wider, this is because the
|
Note:
|
||||||
|
`filter` is set to `PCF13`. Notice how the shadow becomes wider, this is because the
|
||||||
distance between samples is based on the variable `filter smooth`.
|
distance between samples is based on the variable `filter smooth`.
|
||||||
|
|
||||||
In order to make use of filtering you need to set the `filter smooth` variable.
|
In order to make use of filtering you need to set the `filter smooth` variable.
|
||||||
@ -217,14 +223,16 @@ forming between the samples.
|
|||||||
|
|
||||||
![](img/light_shadow_filter30.png)
|
![](img/light_shadow_filter30.png)
|
||||||
|
|
||||||
.. note:: `filter smooth` is set to `30`.
|
Note:
|
||||||
|
`filter smooth` is set to `30`.
|
||||||
|
|
||||||
The different `Light` nodes in the demo use different values for filter smooth.
|
The different `Light` nodes in the demo use different values for filter smooth.
|
||||||
Play around with it and see what you like.
|
Play around with it and see what you like.
|
||||||
|
|
||||||
![](img/light_shadow_filter0.png)
|
![](img/light_shadow_filter0.png)
|
||||||
|
|
||||||
.. note:: `filter smooth` is set to `0`.
|
Note:
|
||||||
|
`filter smooth` is set to `0`.
|
||||||
|
|
||||||
Lastly, there is the variable `gradient length`. For some smooth shadows it is preferable not to have the
|
Lastly, there is the variable `gradient length`. For some smooth shadows it is preferable not to have the
|
||||||
shadow start immediately on the object, as this produces a hard edge. The gradient length variable creates
|
shadow start immediately on the object, as this produces a hard edge. The gradient length variable creates
|
||||||
@ -232,11 +240,13 @@ a smooth gradient to begin the shadow to reduce the effect of the hard edge.
|
|||||||
|
|
||||||
![](img/light_shadow_grad0.png)
|
![](img/light_shadow_grad0.png)
|
||||||
|
|
||||||
.. note:: `gradient length` is set to `0`.
|
Note:
|
||||||
|
`gradient length` is set to `0`.
|
||||||
|
|
||||||
![](img/light_shadow_grad10.png)
|
![](img/light_shadow_grad10.png)
|
||||||
|
|
||||||
.. note:: `gradient length` is set to `10`.
|
Note:
|
||||||
|
`gradient length` is set to `10`.
|
||||||
|
|
||||||
You will need to play around with the options a bit to find settings that suit your project. There is no right solution
|
You will need to play around with the options a bit to find settings that suit your project. There is no right solution
|
||||||
for everyone, which is why Godot provides so much flexibility. Just keep in mind that the higher `filter`
|
for everyone, which is why Godot provides so much flexibility. Just keep in mind that the higher `filter`
|
||||||
|
@ -10,7 +10,8 @@ In 3D, meshes are used to display the world. In 2D, they are rare as images are
|
|||||||
Godot's 2D engine is a pure two-dimensional engine, so it can't really display 3D meshes directly (although it can be done
|
Godot's 2D engine is a pure two-dimensional engine, so it can't really display 3D meshes directly (although it can be done
|
||||||
via `Viewport` and `ViewportTexture`).
|
via `Viewport` and `ViewportTexture`).
|
||||||
|
|
||||||
.. seealso:: If you are interested in displaying 3D meshes on a 2D viewport, see the `doc_viewport_as_texture` tutorial.
|
See also:
|
||||||
|
If you are interested in displaying 3D meshes on a 2D viewport, see the `doc_viewport_as_texture` tutorial.
|
||||||
|
|
||||||
2D meshes are meshes that contain two-dimensional geometry (Z can be omitted or ignored) instead of 3D.
|
2D meshes are meshes that contain two-dimensional geometry (Z can be omitted or ignored) instead of 3D.
|
||||||
You can experiment creating them yourself using `SurfaceTool` from code and displaying them in a `MeshInstance2D` node.
|
You can experiment creating them yourself using `SurfaceTool` from code and displaying them in a `MeshInstance2D` node.
|
||||||
|
@ -75,7 +75,8 @@ its *length* to `1`, and multiply by the desired speed.
|
|||||||
.. tip:: If you've never used vector math before, or need a refresher,
|
.. tip:: If you've never used vector math before, or need a refresher,
|
||||||
you can see an explanation of vector usage in Godot at `doc_vector_math`.
|
you can see an explanation of vector usage in Godot at `doc_vector_math`.
|
||||||
|
|
||||||
.. note::
|
Note:
|
||||||
|
|
||||||
|
|
||||||
If the code above does nothing when you press the keys, double-check that
|
If the code above does nothing when you press the keys, double-check that
|
||||||
you've set up input actions correctly as described in the
|
you've set up input actions correctly as described in the
|
||||||
|
@ -16,7 +16,8 @@ animate a collection of individual images. Then we will animate a sprite sheet u
|
|||||||
with `AnimationPlayer` and the *Animation*
|
with `AnimationPlayer` and the *Animation*
|
||||||
property of `Sprite`.
|
property of `Sprite`.
|
||||||
|
|
||||||
.. note:: Art for the following examples by https://opengameart.org/users/ansimuz and by
|
Note:
|
||||||
|
Art for the following examples by https://opengameart.org/users/ansimuz and by
|
||||||
https://opengameart.org/users/tgfcoder
|
https://opengameart.org/users/tgfcoder
|
||||||
|
|
||||||
Individual images with AnimatedSprite
|
Individual images with AnimatedSprite
|
||||||
@ -36,7 +37,8 @@ with the following nodes:
|
|||||||
|
|
||||||
![](img/2d_animation_tree1.png)
|
![](img/2d_animation_tree1.png)
|
||||||
|
|
||||||
.. note:: The root node could also be `Area2D` or
|
Note:
|
||||||
|
The root node could also be `Area2D` or
|
||||||
`RigidBody2D`. The animation will still be
|
`RigidBody2D`. The animation will still be
|
||||||
made in the same way. Once the animation is completed, you can
|
made in the same way. Once the animation is completed, you can
|
||||||
assign a shape to the CollisionShape2D. See
|
assign a shape to the CollisionShape2D. See
|
||||||
@ -143,7 +145,8 @@ setting up your scene tree:
|
|||||||
|
|
||||||
![](img/2d_animation_tree2.png)
|
![](img/2d_animation_tree2.png)
|
||||||
|
|
||||||
.. note:: The root node could also be `Area2D` or
|
Note:
|
||||||
|
The root node could also be `Area2D` or
|
||||||
`RigidBody2D`. The animation will still be
|
`RigidBody2D`. The animation will still be
|
||||||
made in the same way. Once the animation is completed, you can
|
made in the same way. Once the animation is completed, you can
|
||||||
assign a shape to the CollisionShape2D. See
|
assign a shape to the CollisionShape2D. See
|
||||||
@ -204,7 +207,8 @@ gdscript GDScript
|
|||||||
_animation_player.stop()
|
_animation_player.stop()
|
||||||
```
|
```
|
||||||
|
|
||||||
.. note:: If updating both an animation and a separate property at once
|
Note:
|
||||||
|
If updating both an animation and a separate property at once
|
||||||
(for example, a platformer may update the sprite's `h_flip`/`v_flip`
|
(for example, a platformer may update the sprite's `h_flip`/`v_flip`
|
||||||
properties when a character turns while starting a 'turning' animation),
|
properties when a character turns while starting a 'turning' animation),
|
||||||
it's important to keep in mind that `play()` isn't applied instantly.
|
it's important to keep in mind that `play()` isn't applied instantly.
|
||||||
|
@ -57,7 +57,8 @@ Here's a diagram of how it looks:
|
|||||||
CanvasLayers are independent of tree order, and they only depend on
|
CanvasLayers are independent of tree order, and they only depend on
|
||||||
their layer number, so they can be instantiated when needed.
|
their layer number, so they can be instantiated when needed.
|
||||||
|
|
||||||
.. note:: CanvasLayers aren't necessary to control the drawing order of nodes.
|
Note:
|
||||||
|
CanvasLayers aren't necessary to control the drawing order of nodes.
|
||||||
The standard way to ensuring that a node is correctly drawn 'in front' or 'behind' others is to manipulate the
|
The standard way to ensuring that a node is correctly drawn 'in front' or 'behind' others is to manipulate the
|
||||||
order of the nodes in the scene panel. Perhaps counterintuitively, the topmost nodes in the scene panel are drawn
|
order of the nodes in the scene panel. Perhaps counterintuitively, the topmost nodes in the scene panel are drawn
|
||||||
on *behind* lower ones in the viewport. 2d nodes also have a property for controlling their drawing order
|
on *behind* lower ones in the viewport. 2d nodes also have a property for controlling their drawing order
|
||||||
|
@ -356,5 +356,6 @@ Once you click "OK", the mask will be generated and set to the ParticlesMaterial
|
|||||||
All of the values within this section have been automatically generated by the
|
All of the values within this section have been automatically generated by the
|
||||||
"Load Emission Mask" menu, so they should generally be left alone.
|
"Load Emission Mask" menu, so they should generally be left alone.
|
||||||
|
|
||||||
.. note:: An image should not be added to `Point Texture` or `Color Texture` directly.
|
Note:
|
||||||
|
An image should not be added to `Point Texture` or `Color Texture` directly.
|
||||||
The "Load Emission Mask" menu should always be used instead.
|
The "Load Emission Mask" menu should always be used instead.
|
||||||
|
@ -239,7 +239,8 @@ adjacent to it is not "on".
|
|||||||
A total of 47 tiles would be needed to provide exactly one bitmask for each
|
A total of 47 tiles would be needed to provide exactly one bitmask for each
|
||||||
arrangement that this mode can test for.
|
arrangement that this mode can test for.
|
||||||
|
|
||||||
.. note::
|
Note:
|
||||||
|
|
||||||
|
|
||||||
Right-click an image and choose **Save image as…** to save it.
|
Right-click an image and choose **Save image as…** to save it.
|
||||||
|
|
||||||
|
@ -3,7 +3,8 @@
|
|||||||
3D rendering limitations
|
3D rendering limitations
|
||||||
========================
|
========================
|
||||||
|
|
||||||
.. seealso::
|
See also:
|
||||||
|
|
||||||
|
|
||||||
In addition to the limitations below, mobile platforms have even more
|
In addition to the limitations below, mobile platforms have even more
|
||||||
limitations on 3D rendering compared to desktop platforms.
|
limitations on 3D rendering compared to desktop platforms.
|
||||||
@ -50,7 +51,8 @@ There are two main ways to alleviate banding:
|
|||||||
to be applied on your *materials*. This technique works even if your project is
|
to be applied on your *materials*. This technique works even if your project is
|
||||||
rendered in LDR, which means it will work when using the GLES2 renderer.
|
rendered in LDR, which means it will work when using the GLES2 renderer.
|
||||||
|
|
||||||
.. seealso::
|
See also:
|
||||||
|
|
||||||
|
|
||||||
See `Banding in Games: A Noisy Rant ( http://loopit.dk/banding_in_games.pdf )`
|
See `Banding in Games: A Noisy Rant ( http://loopit.dk/banding_in_games.pdf )`
|
||||||
for more details about banding and ways to combat it.
|
for more details about banding and ways to combat it.
|
||||||
|
@ -73,7 +73,8 @@ final size of the lightmap texture (and, in consequence, the UV padding in the m
|
|||||||
The effect of setting this option is that all meshes within the scene will have
|
The effect of setting this option is that all meshes within the scene will have
|
||||||
their UV2 maps properly generated.
|
their UV2 maps properly generated.
|
||||||
|
|
||||||
.. warning::
|
Warning:
|
||||||
|
|
||||||
|
|
||||||
When reusing a mesh within a scene, keep in mind that UVs will be generated
|
When reusing a mesh within a scene, keep in mind that UVs will be generated
|
||||||
for the first instance found. If the mesh is re-used with different scales
|
for the first instance found. If the mesh is re-used with different scales
|
||||||
@ -245,7 +246,8 @@ it is recommended to use lower quality settings at first. Then, once you are con
|
|||||||
with your scene's lighting setup, raise the quality settings and perform a "final"
|
with your scene's lighting setup, raise the quality settings and perform a "final"
|
||||||
bake before exporting your project.
|
bake before exporting your project.
|
||||||
|
|
||||||
.. note::
|
Note:
|
||||||
|
|
||||||
|
|
||||||
By default, the lightmap baker will use all the system's logical CPU cores
|
By default, the lightmap baker will use all the system's logical CPU cores
|
||||||
to speed up baking. This can reduce system responsiveness. To preserve system
|
to speed up baking. This can reduce system responsiveness. To preserve system
|
||||||
|
@ -11,7 +11,8 @@ Level prototyping is one of the main uses of CSG in Godot. This technique allows
|
|||||||
users to create simple versions of most common shapes by combining primitives.
|
users to create simple versions of most common shapes by combining primitives.
|
||||||
Interior environments can be created by using inverted primitives.
|
Interior environments can be created by using inverted primitives.
|
||||||
|
|
||||||
.. note:: The CSG nodes in Godot are mainly intended for prototyping. There is
|
Note:
|
||||||
|
The CSG nodes in Godot are mainly intended for prototyping. There is
|
||||||
no built-in support for UV mapping or editing 3D polygons (though
|
no built-in support for UV mapping or editing 3D polygons (though
|
||||||
extruded 2D polygons can be used with the CSGPolygon node).
|
extruded 2D polygons can be used with the CSGPolygon node).
|
||||||
|
|
||||||
@ -71,7 +72,8 @@ The `CSGPolygon` node extrude along a Polygon drawn in
|
|||||||
|
|
||||||
![](img/csg_poly.png)
|
![](img/csg_poly.png)
|
||||||
|
|
||||||
.. note:: The **Path** mode must be provided with a `Path`
|
Note:
|
||||||
|
The **Path** mode must be provided with a `Path`
|
||||||
node to work. In the Path node, draw the path and the polygon in
|
node to work. In the Path node, draw the path and the polygon in
|
||||||
CSGPolygon will extrude along the given path.
|
CSGPolygon will extrude along the given path.
|
||||||
|
|
||||||
@ -103,7 +105,8 @@ Every CSG node will first process its children nodes and their operations:
|
|||||||
union, intersection or subtraction, in tree order, and apply them to itself one
|
union, intersection or subtraction, in tree order, and apply them to itself one
|
||||||
after the other.
|
after the other.
|
||||||
|
|
||||||
.. note:: In the interest of performance, make sure CSG geometry remains
|
Note:
|
||||||
|
In the interest of performance, make sure CSG geometry remains
|
||||||
relatively simple, as complex meshes can take a while to process.
|
relatively simple, as complex meshes can take a while to process.
|
||||||
If adding objects together (such as table and room objects), create
|
If adding objects together (such as table and room objects), create
|
||||||
them as separate CSG trees. Forcing too many objects in a single tree
|
them as separate CSG trees. Forcing too many objects in a single tree
|
||||||
@ -155,7 +158,8 @@ Adjust their placement to resemble a desk.
|
|||||||
|
|
||||||
![](img/csg_desk.png)
|
![](img/csg_desk.png)
|
||||||
|
|
||||||
.. note:: CSG nodes inside a CSGCombiner will only process their operation
|
Note:
|
||||||
|
CSG nodes inside a CSGCombiner will only process their operation
|
||||||
within the combiner. Therefore, CSGCombiners are used to organize
|
within the combiner. Therefore, CSGCombiners are used to organize
|
||||||
CSG nodes.
|
CSG nodes.
|
||||||
|
|
||||||
@ -185,7 +189,8 @@ spheres will cut a hole into the mattress.
|
|||||||
Try to re-parent the `pillow` node to the root `Spatial` node; the hole will
|
Try to re-parent the `pillow` node to the root `Spatial` node; the hole will
|
||||||
disappear.
|
disappear.
|
||||||
|
|
||||||
.. note:: This is to illustrate the effect of CSG processing order.
|
Note:
|
||||||
|
This is to illustrate the effect of CSG processing order.
|
||||||
Since the root node is not a CSG node, the CSGCombiner nodes are
|
Since the root node is not a CSG node, the CSGCombiner nodes are
|
||||||
the end of the operations; this shows the use of CSGCombiner to
|
the end of the operations; this shows the use of CSGCombiner to
|
||||||
organize the CSG scene.
|
organize the CSG scene.
|
||||||
@ -256,7 +261,8 @@ nodes yet. Triplanar mapping is relatively slow, which usually restricts its
|
|||||||
usage to organic surfaces like terrain. Still, when prototyping, it can be used
|
usage to organic surfaces like terrain. Still, when prototyping, it can be used
|
||||||
to quickly apply textures to CSG-based levels.
|
to quickly apply textures to CSG-based levels.
|
||||||
|
|
||||||
.. note:: If you need some textures for prototyping, Kenney made a
|
Note:
|
||||||
|
If you need some textures for prototyping, Kenney made a
|
||||||
`set of CC0-licensed prototype textures ( https://kenney.nl/assets/prototype-textures )`.
|
`set of CC0-licensed prototype textures ( https://kenney.nl/assets/prototype-textures )`.
|
||||||
|
|
||||||
There are two ways to apply a material to a CSG node:
|
There are two ways to apply a material to a CSG node:
|
||||||
|
@ -6,7 +6,8 @@ Using GIProbe
|
|||||||
Introduction
|
Introduction
|
||||||
------------
|
------------
|
||||||
|
|
||||||
.. note:: This feature is only available when using the GLES3 backend.
|
Note:
|
||||||
|
This feature is only available when using the GLES3 backend.
|
||||||
`doc_baked_lightmaps` can be used as an alternative
|
`doc_baked_lightmaps` can be used as an alternative
|
||||||
when using the GLES2 renderer.
|
when using the GLES2 renderer.
|
||||||
|
|
||||||
@ -51,7 +52,8 @@ toolbar to begin the pre-baking process:
|
|||||||
|
|
||||||
![](img/giprobe_bake.png)
|
![](img/giprobe_bake.png)
|
||||||
|
|
||||||
.. warning::
|
Warning:
|
||||||
|
|
||||||
|
|
||||||
Meshes should have sufficiently thick walls to avoid light leaks (avoid
|
Meshes should have sufficiently thick walls to avoid light leaks (avoid
|
||||||
one-sided walls). For interior levels, enclose your level geometry in a
|
one-sided walls). For interior levels, enclose your level geometry in a
|
||||||
|
@ -32,7 +32,8 @@ through a virtual camera. Here, our virtual camera would apply a particular
|
|||||||
camera rendering transform to the scene data, and the output would be ready
|
camera rendering transform to the scene data, and the output would be ready
|
||||||
for display on a particular display type.
|
for display on a particular display type.
|
||||||
|
|
||||||
.. note::
|
Note:
|
||||||
|
|
||||||
|
|
||||||
Godot does not support high dynamic range *output* yet. It can only perform
|
Godot does not support high dynamic range *output* yet. It can only perform
|
||||||
lighting in HDR and tonemap the result to a low dynamic range image.
|
lighting in HDR and tonemap the result to a low dynamic range image.
|
||||||
|
@ -7,7 +7,8 @@ In addition to occlusion via `doc_rooms_and_portals`, Godot also has the ability
|
|||||||
|
|
||||||
Any object that is fully occluded by the shape (behind or in some cases inside) will be culled at runtime. They are designed to be simple to use and inexpensive at runtime, but the trade off is they may not be as effective at culling as `doc_rooms_and_portals`. Nevertheless they can still significantly boost performance in some situations.
|
Any object that is fully occluded by the shape (behind or in some cases inside) will be culled at runtime. They are designed to be simple to use and inexpensive at runtime, but the trade off is they may not be as effective at culling as `doc_rooms_and_portals`. Nevertheless they can still significantly boost performance in some situations.
|
||||||
|
|
||||||
.. note:: It is important to understand that geometric occluders work by testing the axis aligned bounding box (`AABB`) of the occludee against the occluder. The AABB must be *fully occluded* to be culled. The consequence of this is that smaller objects are more likely to be effectively culled than larger objects, and larger occluders tend to be much more effective than smaller ones.
|
Note:
|
||||||
|
It is important to understand that geometric occluders work by testing the axis aligned bounding box (`AABB`) of the occludee against the occluder. The AABB must be *fully occluded* to be culled. The consequence of this is that smaller objects are more likely to be effectively culled than larger objects, and larger occluders tend to be much more effective than smaller ones.
|
||||||
|
|
||||||
A major advantage to Occluder nodes is that they are fully dynamic. For example if you place an occluder node as a child of a spaceship, it will move as you move the parent object.
|
A major advantage to Occluder nodes is that they are fully dynamic. For example if you place an occluder node as a child of a spaceship, it will move as you move the parent object.
|
||||||
|
|
||||||
@ -49,7 +50,8 @@ The polygon is a generalist occluder. It can be made to work well in almost all
|
|||||||
|
|
||||||
As with all geometric occluders, the key to success is to make them large. They do not have to match rendered geometry, and in many cases they will work better if you extend them past rendered geometry to make them as big as possible (without blocking legitimate lines of sight). The reason why they need to be large is that in general, they will only cull objects whose `AABB` is completely hidden by the polygon. For large objects to be culled, you will need large occluders.
|
As with all geometric occluders, the key to success is to make them large. They do not have to match rendered geometry, and in many cases they will work better if you extend them past rendered geometry to make them as big as possible (without blocking legitimate lines of sight). The reason why they need to be large is that in general, they will only cull objects whose `AABB` is completely hidden by the polygon. For large objects to be culled, you will need large occluders.
|
||||||
|
|
||||||
.. note:: Like all occluders, polygons **can** overlap, and in many cases they will work better if you overlap them (they are more likely to cull objects on boundaries).
|
Note:
|
||||||
|
Like all occluders, polygons **can** overlap, and in many cases they will work better if you overlap them (they are more likely to cull objects on boundaries).
|
||||||
|
|
||||||
Editing and details
|
Editing and details
|
||||||
~~~~~~~~~~~~~~~~~~~
|
~~~~~~~~~~~~~~~~~~~
|
||||||
@ -82,7 +84,8 @@ The hole can be totally within the polygon (such as a window), abutting the edge
|
|||||||
|
|
||||||
- If the object to be culled is totally hidden by the polygon, it then looks to see whether it can be seen *through* the hole. If the object touches the hole, it is not culled, but if hidden by the polygon and not seen through the hole it is culled.
|
- If the object to be culled is totally hidden by the polygon, it then looks to see whether it can be seen *through* the hole. If the object touches the hole, it is not culled, but if hidden by the polygon and not seen through the hole it is culled.
|
||||||
|
|
||||||
.. note:: Placing holes is usually far more convenient, and works faster and better at runtime, than creating lots of smaller OccluderShapePolygons.
|
Note:
|
||||||
|
Placing holes is usually far more convenient, and works faster and better at runtime, than creating lots of smaller OccluderShapePolygons.
|
||||||
|
|
||||||
Hole Limits
|
Hole Limits
|
||||||
^^^^^^^^^^^
|
^^^^^^^^^^^
|
||||||
|
@ -97,7 +97,8 @@ The tent is a simple room inside a terrain room (which contains the ground, the
|
|||||||
|
|
||||||
![](img/tent.png)
|
![](img/tent.png)
|
||||||
|
|
||||||
.. note:: To use internal rooms for buildings, it is usually a good idea to split the *interior* mesh of the building from the *exterior*. The exterior can be placed in the outer room (so it can be seen from outside, but not from the inside), and the interior should be placed in the interior room (so it only visible inside, or through the portal).
|
Note:
|
||||||
|
To use internal rooms for buildings, it is usually a good idea to split the *interior* mesh of the building from the *exterior*. The exterior can be placed in the outer room (so it can be seen from outside, but not from the inside), and the interior should be placed in the interior room (so it only visible inside, or through the portal).
|
||||||
|
|
||||||
![](img/tent_terrain.png)
|
![](img/tent_terrain.png)
|
||||||
|
|
||||||
@ -124,7 +125,8 @@ However, if we set this autoplace priority to `-1` for example, the autoplace wi
|
|||||||
|
|
||||||
This gives us a helpful extra bit of control for these kinds of situations, and makes the entire system much more flexible.
|
This gives us a helpful extra bit of control for these kinds of situations, and makes the entire system much more flexible.
|
||||||
|
|
||||||
.. note:: As the default autoplace priority is `0`, you can't effectively force objects into RoomGroups with priority `0`. However there are plenty of priority values available so this should not be a problem in practice.
|
Note:
|
||||||
|
As the default autoplace priority is `0`, you can't effectively force objects into RoomGroups with priority `0`. However there are plenty of priority values available so this should not be a problem in practice.
|
||||||
|
|
||||||
The final scene looks something like this, with houses instanced wherever you want them on a giant outer room.
|
The final scene looks something like this, with houses instanced wherever you want them on a giant outer room.
|
||||||
|
|
||||||
|
@ -15,7 +15,8 @@ This conversion must take place every time you want to activate the system. It d
|
|||||||
|
|
||||||
If you convert the level while the editor is running, the portal culling system will take over from the normal Godot frustum culling, potentially interfering with editor features. To get around this, you can turn portal culling on and off using either the **View Portal Culling** toggle in the **View** menu on the editor toolbar (which also has a keyboard shortcut) or the **Active** setting in the RoomManager node.
|
If you convert the level while the editor is running, the portal culling system will take over from the normal Godot frustum culling, potentially interfering with editor features. To get around this, you can turn portal culling on and off using either the **View Portal Culling** toggle in the **View** menu on the editor toolbar (which also has a keyboard shortcut) or the **Active** setting in the RoomManager node.
|
||||||
|
|
||||||
.. note:: To use the RoomManager, you have to tell it where the rooms are in your scene tree, or, more specifically, where the RoomList node is. This RoomList is the parent of your rooms - see below. If the RoomList is not set, conversion will fail, and you will see a warning dialog box.
|
Note:
|
||||||
|
To use the RoomManager, you have to tell it where the rooms are in your scene tree, or, more specifically, where the RoomList node is. This RoomList is the parent of your rooms - see below. If the RoomList is not set, conversion will fail, and you will see a warning dialog box.
|
||||||
|
|
||||||
![](img/room_manager.png)
|
![](img/room_manager.png)
|
||||||
|
|
||||||
@ -26,7 +27,8 @@ Before we create any rooms, we must first create a node to be the parent of all
|
|||||||
|
|
||||||
![](img/roomlist_node.png)
|
![](img/roomlist_node.png)
|
||||||
|
|
||||||
.. note:: The roomlist is **not** a special node type – it can just be a regular Spatial.
|
Note:
|
||||||
|
The roomlist is **not** a special node type – it can just be a regular Spatial.
|
||||||
|
|
||||||
You will need to assign the roomlist node in the RoomManager so that it knows where to find the rooms.
|
You will need to assign the roomlist node in the RoomManager so that it knows where to find the rooms.
|
||||||
|
|
||||||
@ -111,7 +113,8 @@ There are two ways to specify which room the portal should link to:
|
|||||||
- Leave the **Linked Room** in the inspector blank. The system will attempt to *autolink* the portal to the nearest neighbour room during conversion. This works fine in most cases.
|
- Leave the **Linked Room** in the inspector blank. The system will attempt to *autolink* the portal to the nearest neighbour room during conversion. This works fine in most cases.
|
||||||
- Explicitly specify the room by setting the **Linked Room** in the inspector.
|
- Explicitly specify the room by setting the **Linked Room** in the inspector.
|
||||||
|
|
||||||
.. note:: Portals are defined as a set of 2D points. This ensures that the polygon formed is in a single plane. The transform determines the portal orientation. The points must also form a *convex* polygon. This is enforced by validating the points you specify, ignoring any that do not form a convex shape. This makes editing easier while making it difficult to break the system.
|
Note:
|
||||||
|
Portals are defined as a set of 2D points. This ensures that the polygon formed is in a single plane. The transform determines the portal orientation. The points must also form a *convex* polygon. This is enforced by validating the points you specify, ignoring any that do not form a convex shape. This makes editing easier while making it difficult to break the system.
|
||||||
|
|
||||||
Trying it out
|
Trying it out
|
||||||
~~~~~~~~~~~~~
|
~~~~~~~~~~~~~
|
||||||
|
@ -13,7 +13,8 @@ This allows several features:
|
|||||||
|
|
||||||
The trade off for these features is that we have to manually partition our level into rooms, and add portals between them.
|
The trade off for these features is that we have to manually partition our level into rooms, and add portals between them.
|
||||||
|
|
||||||
.. note:: Godot portals should not be confused with those in the `game of the same name ( https://en.wikipedia.org/wiki/Portal_(video_game) )`. They do not warp space, they simply represent a window that the camera (or lights) can see through.
|
Note:
|
||||||
|
Godot portals should not be confused with those in the `game of the same name ( https://en.wikipedia.org/wiki/Portal_(video_game) )`. They do not warp space, they simply represent a window that the camera (or lights) can see through.
|
||||||
|
|
||||||
Minimizing manual labour
|
Minimizing manual labour
|
||||||
^^^^^^^^^^^^^^^^^^^^^^^^
|
^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
@ -31,6 +32,7 @@ In general, when it comes to medium and large-sized levels, it is better to do a
|
|||||||
Some caveats
|
Some caveats
|
||||||
^^^^^^^^^^^^
|
^^^^^^^^^^^^
|
||||||
|
|
||||||
.. note:: The portal system should be considered an **advanced feature** of Godot. You should not attempt to use rooms and portals until you are familiar with the Godot editor, and have successfully made at least a couple of test games.
|
Note:
|
||||||
|
The portal system should be considered an **advanced feature** of Godot. You should not attempt to use rooms and portals until you are familiar with the Godot editor, and have successfully made at least a couple of test games.
|
||||||
|
|
||||||
It gives you great power as a game designer, but the trade off is that it requires a very technical approach to level design. It is aimed at producing professional-grade results, and assumes the user is prepared to put in the work for this. It is not intended to be used for all 3D games. Not all games will significantly benefit from portals, and it may require more time than a short game jam allows.
|
It gives you great power as a game designer, but the trade off is that it requires a very technical approach to level design. It is aimed at producing professional-grade results, and assumes the user is prepared to put in the work for this. It is not intended to be used for all 3D games. Not all games will significantly benefit from portals, and it may require more time than a short game jam allows.
|
||||||
|
@ -128,7 +128,8 @@ gdscript GDScript
|
|||||||
mesh.add_surface_from_arrays(Mesh.PRIMITIVE_TRIANGLES, surface_array) # No blendshapes or compression used.
|
mesh.add_surface_from_arrays(Mesh.PRIMITIVE_TRIANGLES, surface_array) # No blendshapes or compression used.
|
||||||
```
|
```
|
||||||
|
|
||||||
.. note:: In this example, we used `Mesh.PRIMITIVE_TRIANGLES`, but you can use any primitive type
|
Note:
|
||||||
|
In this example, we used `Mesh.PRIMITIVE_TRIANGLES`, but you can use any primitive type
|
||||||
available from mesh.
|
available from mesh.
|
||||||
|
|
||||||
Put together, the full code looks like:
|
Put together, the full code looks like:
|
||||||
|
@ -11,7 +11,8 @@ and tools to work with meshes than the ArrayMesh does. When the MeshDataTool
|
|||||||
is used, it calculates mesh data that is not available in ArrayMeshes such as faces and edges, which are necessary
|
is used, it calculates mesh data that is not available in ArrayMeshes such as faces and edges, which are necessary
|
||||||
for certain mesh algorithms. If you do not need this extra information then it may be better to use an ArrayMesh.
|
for certain mesh algorithms. If you do not need this extra information then it may be better to use an ArrayMesh.
|
||||||
|
|
||||||
.. note:: MeshDataTool can only be used on Meshes that use the PrimitiveType `Mesh.PRIMITIVE_TRIANGLES`.
|
Note:
|
||||||
|
MeshDataTool can only be used on Meshes that use the PrimitiveType `Mesh.PRIMITIVE_TRIANGLES`.
|
||||||
|
|
||||||
We initialize the MeshDataTool from an ArrayMesh by calling `create_from_surface()`. If there is already data initialized in the MeshDataTool,
|
We initialize the MeshDataTool from an ArrayMesh by calling `create_from_surface()`. If there is already data initialized in the MeshDataTool,
|
||||||
calling `create_from_surface()` will clear it for you. Alternatively, you can call `clear()` yourself before re-using the MeshDataTool.
|
calling `create_from_surface()` will clear it for you. Alternatively, you can call `clear()` yourself before re-using the MeshDataTool.
|
||||||
|
@ -226,7 +226,8 @@ Determines which side of the object is not drawn when backfaces are rendered:
|
|||||||
* **Front:** The front of the object is culled when not visible.
|
* **Front:** The front of the object is culled when not visible.
|
||||||
* **Disabled:** Used for objects that are double-sided (no culling is performed).
|
* **Disabled:** Used for objects that are double-sided (no culling is performed).
|
||||||
|
|
||||||
.. note::
|
Note:
|
||||||
|
|
||||||
|
|
||||||
By default, Blender has backface culling disabled on materials and will
|
By default, Blender has backface culling disabled on materials and will
|
||||||
export materials to match how they render in Blender. This means that
|
export materials to match how they render in Blender. This means that
|
||||||
@ -376,7 +377,8 @@ and wider compatibility.
|
|||||||
|
|
||||||
![](img/spatial_material16.png)
|
![](img/spatial_material16.png)
|
||||||
|
|
||||||
.. note::
|
Note:
|
||||||
|
|
||||||
|
|
||||||
Godot requires the normal map to use the X+, Y+ and Z+ coordinates, this is
|
Godot requires the normal map to use the X+, Y+ and Z+ coordinates, this is
|
||||||
known as OpenGL style. If you've imported a material made to be used with
|
known as OpenGL style. If you've imported a material made to be used with
|
||||||
@ -418,7 +420,8 @@ right.
|
|||||||
|
|
||||||
![](img/clearcoat_comparison.png)
|
![](img/clearcoat_comparison.png)
|
||||||
|
|
||||||
.. note:: The effect will be more noticeable in Godot 4.
|
Note:
|
||||||
|
The effect will be more noticeable in Godot 4.
|
||||||
|
|
||||||
Anisotropy
|
Anisotropy
|
||||||
~~~~~~~~~~
|
~~~~~~~~~~
|
||||||
|
@ -73,7 +73,8 @@ To create the NavigationMesh from a MeshLibrary scene export, place a
|
|||||||
item. Add a valid NavigationMesh resource to the NavigationMeshInstance and some source
|
item. Add a valid NavigationMesh resource to the NavigationMeshInstance and some source
|
||||||
geometry nodes below and bake the NavigationMesh.
|
geometry nodes below and bake the NavigationMesh.
|
||||||
|
|
||||||
.. note::
|
Note:
|
||||||
|
|
||||||
|
|
||||||
With small grid cells it is often necessary to reduce the NavigationMesh properties
|
With small grid cells it is often necessary to reduce the NavigationMesh properties
|
||||||
for agent radius and region minimum size.
|
for agent radius and region minimum size.
|
||||||
@ -83,7 +84,8 @@ geometry nodes below and bake the NavigationMesh.
|
|||||||
Nodes below the NavigationMeshInstance are ignored for the MeshLibrary scene export, so
|
Nodes below the NavigationMeshInstance are ignored for the MeshLibrary scene export, so
|
||||||
additional nodes can be added as source geometry just for baking the navmesh.
|
additional nodes can be added as source geometry just for baking the navmesh.
|
||||||
|
|
||||||
.. warning::
|
Warning:
|
||||||
|
|
||||||
|
|
||||||
The baked cell size of the NavigationMesh must match the NavigationServer map cell
|
The baked cell size of the NavigationMesh must match the NavigationServer map cell
|
||||||
size to properly merge the navigation meshes of different grid cells.
|
size to properly merge the navigation meshes of different grid cells.
|
||||||
|
@ -36,7 +36,8 @@ the scene. Your scene tree would look like this:
|
|||||||
|
|
||||||
![](img/multimesh_scene_tree.png)
|
![](img/multimesh_scene_tree.png)
|
||||||
|
|
||||||
.. note:: For simplicity's sake, this tutorial uses built-in primitives.
|
Note:
|
||||||
|
For simplicity's sake, this tutorial uses built-in primitives.
|
||||||
|
|
||||||
Now you have everything ready. Select the MultiMeshInstance node and look at the
|
Now you have everything ready. Select the MultiMeshInstance node and look at the
|
||||||
toolbar, you should see an extra button called `MultiMesh` next to `View`.
|
toolbar, you should see an extra button called `MultiMesh` next to `View`.
|
||||||
|
@ -29,7 +29,8 @@ The following tutorial will, then, explain 2D skeletal deformations.
|
|||||||
Setup
|
Setup
|
||||||
-----
|
-----
|
||||||
|
|
||||||
.. seealso::
|
See also:
|
||||||
|
|
||||||
|
|
||||||
Before starting, we recommend you to go through the
|
Before starting, we recommend you to go through the
|
||||||
`doc_cutout_animation` tutorial to gain a general understanding of
|
`doc_cutout_animation` tutorial to gain a general understanding of
|
||||||
|
@ -124,7 +124,8 @@ the hip node in the scene hierarchy), but then the left arm is no longer in its
|
|||||||
proper place in the hierarchy. This means it wouldn't be affected by the movement
|
proper place in the hierarchy. This means it wouldn't be affected by the movement
|
||||||
of the torso. We'll fix this problem with `RemoteTransform2D` nodes.
|
of the torso. We'll fix this problem with `RemoteTransform2D` nodes.
|
||||||
|
|
||||||
.. note:: You can also fix depth ordering problems by adjusting the Z property
|
Note:
|
||||||
|
You can also fix depth ordering problems by adjusting the Z property
|
||||||
of any node inheriting from Node2D.
|
of any node inheriting from Node2D.
|
||||||
|
|
||||||
RemoteTransform2D node
|
RemoteTransform2D node
|
||||||
|
@ -113,7 +113,8 @@ its child. We will animate the sprite to move between two points on the screen.
|
|||||||
|
|
||||||
Our scene setup
|
Our scene setup
|
||||||
|
|
||||||
.. warning::
|
Warning:
|
||||||
|
|
||||||
|
|
||||||
AnimationPlayer inherits from Node instead of Node2D or Spatial, which means
|
AnimationPlayer inherits from Node instead of Node2D or Spatial, which means
|
||||||
that the child nodes will not inherit the transform from the parent nodes
|
that the child nodes will not inherit the transform from the parent nodes
|
||||||
|
@ -21,7 +21,8 @@ WebM is supported in core in Godot 3.x, but support for it will be removed in 4.
|
|||||||
as it proved to be too buggy and difficult to maintain.
|
as it proved to be too buggy and difficult to maintain.
|
||||||
Therefore, **using WebM is not recommended**.
|
Therefore, **using WebM is not recommended**.
|
||||||
|
|
||||||
.. note::
|
Note:
|
||||||
|
|
||||||
|
|
||||||
You may find videos with an `.ogg` or `.ogx` extensions, which are generic
|
You may find videos with an `.ogg` or `.ogx` extensions, which are generic
|
||||||
extensions for data within an Ogg container.
|
extensions for data within an Ogg container.
|
||||||
@ -79,7 +80,8 @@ node to be a child of the AspectRatioContainer node. Make sure **Expand** is
|
|||||||
disabled on the VideoPlayer. Your video should now scale automatically
|
disabled on the VideoPlayer. Your video should now scale automatically
|
||||||
to fit the whole screen while avoiding distortion.
|
to fit the whole screen while avoiding distortion.
|
||||||
|
|
||||||
.. seealso::
|
See also:
|
||||||
|
|
||||||
|
|
||||||
See `doc_multiple_resolutions` for more tips on supporting multiple
|
See `doc_multiple_resolutions` for more tips on supporting multiple
|
||||||
aspect ratios in your project.
|
aspect ratios in your project.
|
||||||
@ -184,7 +186,8 @@ Here are example FFmpeg commands to convert a MP4 video to Ogg Theora. Since
|
|||||||
FFmpeg supports a lot of input formats, you should be able to use the commands
|
FFmpeg supports a lot of input formats, you should be able to use the commands
|
||||||
below with almost any input video format (AVI, MOV, WebM, …).
|
below with almost any input video format (AVI, MOV, WebM, …).
|
||||||
|
|
||||||
.. note::
|
Note:
|
||||||
|
|
||||||
|
|
||||||
Make sure your copy of FFmpeg is compiled with libtheora and libvorbis support.
|
Make sure your copy of FFmpeg is compiled with libtheora and libvorbis support.
|
||||||
You can check this by running `ffmpeg` without any arguments, then looking
|
You can check this by running `ffmpeg` without any arguments, then looking
|
||||||
|
@ -1,7 +1,8 @@
|
|||||||
Blender ESCN exporter
|
Blender ESCN exporter
|
||||||
=====================
|
=====================
|
||||||
|
|
||||||
.. note:: This chapter relates to the Blender plugin called "Godot Blender Exporter",
|
Note:
|
||||||
|
This chapter relates to the Blender plugin called "Godot Blender Exporter",
|
||||||
which can be downloaded here: https://github.com/godotengine/godot-blender-exporter
|
which can be downloaded here: https://github.com/godotengine/godot-blender-exporter
|
||||||
|
|
||||||
This plugin can be used to export Blender scenes in a Godot-specific scene format
|
This plugin can be used to export Blender scenes in a Godot-specific scene format
|
||||||
|
@ -1,10 +1,12 @@
|
|||||||
Lights
|
Lights
|
||||||
======
|
======
|
||||||
.. warning::
|
Warning:
|
||||||
|
|
||||||
By default, lamps in Blender have shadows enabled. This can cause
|
By default, lamps in Blender have shadows enabled. This can cause
|
||||||
performance issues in Godot.
|
performance issues in Godot.
|
||||||
|
|
||||||
.. warning::
|
Warning:
|
||||||
|
|
||||||
Lamps are exported using their "Blender Render" settings. When Blender 2.8
|
Lamps are exported using their "Blender Render" settings. When Blender 2.8
|
||||||
is released, this will be removed and this part of the exporter will change.
|
is released, this will be removed and this part of the exporter will change.
|
||||||
|
|
||||||
|
@ -45,7 +45,8 @@ difficulties in implementation, which are:
|
|||||||
- `group node`
|
- `group node`
|
||||||
- shader nodes except `PrincipledBSDF`, `Diffuse`, `Glossy`, `Glass`, `add shader` and `mix shader`
|
- shader nodes except `PrincipledBSDF`, `Diffuse`, `Glossy`, `Glass`, `add shader` and `mix shader`
|
||||||
|
|
||||||
.. warning::
|
Warning:
|
||||||
|
|
||||||
|
|
||||||
If possible, try to use PrincipledBSDF node with GGX distribution as the output shader
|
If possible, try to use PrincipledBSDF node with GGX distribution as the output shader
|
||||||
node, it is the only one guaranteed to be exactly correct. Others are just based on approximation.
|
node, it is the only one guaranteed to be exactly correct. Others are just based on approximation.
|
||||||
|
@ -13,7 +13,8 @@ Exporting mesh shape key is supported, however exporting each shape key
|
|||||||
is almost like exporting the mesh again, so don't be surprised
|
is almost like exporting the mesh again, so don't be surprised
|
||||||
it takes a relatively long time.
|
it takes a relatively long time.
|
||||||
|
|
||||||
.. warning::
|
Warning:
|
||||||
|
|
||||||
A lot of modifiers are not compatible with shape keys
|
A lot of modifiers are not compatible with shape keys
|
||||||
(e.g. subsurface modifier), so if you found you have
|
(e.g. subsurface modifier), so if you found you have
|
||||||
incorrect shape keys exported, try to disable :code:`Apply Modifiers`
|
incorrect shape keys exported, try to disable :code:`Apply Modifiers`
|
||||||
|
@ -9,7 +9,8 @@ Rest Bone
|
|||||||
Armature object in Blender is exported as a Skeleton node along with
|
Armature object in Blender is exported as a Skeleton node along with
|
||||||
rest position (transform in Godot) of bones.
|
rest position (transform in Godot) of bones.
|
||||||
|
|
||||||
.. warning::
|
Warning:
|
||||||
|
|
||||||
The three check boxes :code:`Inherit Rotation`, :code:`Inherit Scale`,
|
The three check boxes :code:`Inherit Rotation`, :code:`Inherit Scale`,
|
||||||
:code:`Local Location` (colored in red) must be ticked when building
|
:code:`Local Location` (colored in red) must be ticked when building
|
||||||
armature in Blender, so that the exported bone transform be
|
armature in Blender, so that the exported bone transform be
|
||||||
|
@ -12,7 +12,8 @@ export as a glTF binary (`.glb` file) or glTF embedded with textures
|
|||||||
such as a CSG mesh blockout for a level, export it to clean it up in a
|
such as a CSG mesh blockout for a level, export it to clean it up in a
|
||||||
program such as Blender, and then bring it back into Godot.
|
program such as Blender, and then bring it back into Godot.
|
||||||
|
|
||||||
.. note::
|
Note:
|
||||||
|
|
||||||
|
|
||||||
Only Blender 2.83 and newer can import glTF files exported by Godot.
|
Only Blender 2.83 and newer can import glTF files exported by Godot.
|
||||||
|
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user