From bd72f2e17e1df3432227b7724374d007cd1909ab Mon Sep 17 00:00:00 2001 From: Relintai Date: Thu, 12 Jan 2023 20:57:31 +0100 Subject: [PATCH] More cleanups. --- README.md | 2 +- about/complying_with_licenses.md | 12 ++-- about/faq.md | 34 +++++------ about/introduction.md | 16 ++--- .../contributing/bug_triage_guidelines.md | 6 +- community/contributing/building_the_manual.md | 2 +- .../class_reference_writing_guidelines.md | 4 +- .../contributing_to_the_documentation.md | 10 ++-- .../contributing/docs_writing_guidelines.md | 2 +- .../contributing/documentation_guidelines.md | 16 ++--- .../editor_and_docs_localization.md | 6 +- community/contributing/index.md | 2 +- community/contributing/pr_workflow.md | 16 ++--- .../updating_the_class_reference.md | 10 ++-- community/contributing/ways_to_contribute.md | 18 +++--- community/tutorials.md | 60 +++++++++---------- .../compiling/compiling_for_android.md | 10 ++-- development/compiling/compiling_for_ios.md | 4 +- development/compiling/compiling_for_osx.md | 14 ++--- .../compiling/compiling_for_windows.md | 16 ++--- development/compiling/compiling_for_x11.md | 2 +- development/compiling/compiling_with_mono.md | 4 +- .../compiling_with_script_encryption_key.md | 2 +- .../cpp/binding_to_external_libraries.md | 2 +- .../cpp/common_engine_methods_and_macros.md | 2 +- .../cpp/configuring_an_ide/android_studio.md | 4 +- development/cpp/configuring_an_ide/clion.md | 4 +- .../cpp/configuring_an_ide/code_blocks.md | 2 +- development/cpp/configuring_an_ide/index.md | 2 +- .../cpp/configuring_an_ide/kdevelop.md | 2 +- .../cpp/configuring_an_ide/qt_creator.md | 2 +- .../cpp/configuring_an_ide/visual_studio.md | 2 +- .../configuring_an_ide/visual_studio_code.md | 10 ++-- development/cpp/configuring_an_ide/xcode.md | 2 +- development/cpp/custom_audiostreams.md | 2 +- development/cpp/custom_modules_in_cpp.md | 2 +- .../cpp/custom_resource_format_loaders.md | 12 ++-- development/cpp/object_class.md | 16 ++--- development/editor/creating_icons.md | 2 +- development/file_formats/tscn.md | 2 +- .../first_2d_game/03.coding_the_player.md | 14 ++--- .../first_2d_game/04.creating_the_enemy.md | 2 +- .../first_2d_game/05.the_main_game_scene.md | 6 +- .../first_2d_game/06.heads_up_display.md | 2 +- .../first_3d_game/03.player_movement_code.md | 12 ++-- getting_started/first_3d_game/04.mob_scene.md | 2 +- .../first_3d_game/05.spawning_mobs.md | 2 +- .../first_3d_game/06.jump_and_squash.md | 6 +- .../first_3d_game/07.killing_player.md | 2 +- .../first_3d_game/08.score_and_replay.md | 10 ++-- .../first_3d_game/09.adding_animations.md | 4 +- .../first_3d_game/going_further.md | 2 +- .../introduction/godot_design_philosophy.md | 4 +- .../introduction/introduction_to_godot.md | 4 +- .../introduction/learning_new_features.md | 22 +++---- .../step_by_step/scripting_first_script.md | 14 ++--- .../step_by_step/scripting_languages.md | 16 ++--- .../step_by_step/scripting_player_input.md | 12 ++-- getting_started/step_by_step/signals.md | 8 +-- index.md | 14 ++--- tutorials/2d/2d_lights_and_shadows.md | 22 +++---- tutorials/2d/custom_drawing_in_2d.md | 20 +++---- tutorials/2d/using_tilemaps.md | 2 +- tutorials/3d/csg_tools.md | 2 +- tutorials/3d/lights_and_shadows.md | 4 +- .../portals/advanced_room_and_portal_usage.md | 2 +- .../3d/portals/rooms_and_portals_example.md | 4 +- tutorials/3d/procedural_geometry/arraymesh.md | 2 +- tutorials/3d/using_transforms.md | 4 +- tutorials/animation/animation_tree.md | 2 +- tutorials/assets_pipeline/importing_scenes.md | 2 +- tutorials/audio/audio_streams.md | 4 +- tutorials/audio/recording_with_microphone.md | 2 +- tutorials/best_practices/data_preferences.md | 4 +- tutorials/best_practices/godot_interfaces.md | 4 +- .../best_practices/godot_notifications.md | 44 +++++++------- .../introduction_best_practices.md | 4 +- .../best_practices/scene_organization.md | 14 ++--- tutorials/editor/external_editor.md | 4 +- .../changing_application_icon_for_windows.md | 8 +-- tutorials/export/exporting_basics.md | 2 +- tutorials/export/exporting_for_android.md | 4 +- .../export/exporting_for_dedicated_servers.md | 2 +- tutorials/export/exporting_for_web.md | 8 +-- tutorials/export/exporting_projects.md | 2 +- tutorials/i18n/internationalizing_games.md | 2 +- tutorials/i18n/localization_using_gettext.md | 12 ++-- .../inputs/controllers_gamepads_joysticks.md | 2 +- tutorials/inputs/custom_mouse_cursor.md | 2 +- tutorials/inputs/input_examples.md | 4 +- tutorials/io/background_loading.md | 4 +- tutorials/io/data_paths.md | 2 +- tutorials/math/random_number_generation.md | 6 +- .../networking/high_level_multiplayer.md | 6 +- tutorials/networking/webrtc.md | 2 +- tutorials/networking/websocket.md | 2 +- tutorials/performance/batching.md | 2 +- tutorials/performance/cpu_optimization.md | 8 +-- .../animating_thousands_of_fish.md | 4 +- .../advanced_physics_interpolation.md | 10 ++-- .../physics_interpolation_introduction.md | 2 +- ...physics_interpolation_quick_start_guide.md | 2 +- .../using_physics_interpolation.md | 4 +- tutorials/physics/physics_introduction.md | 6 +- tutorials/physics/ragdoll_system.md | 4 +- tutorials/physics/ray-casting.md | 4 +- tutorials/physics/rigid_body.md | 2 +- tutorials/physics/soft_body.md | 2 +- tutorials/physics/using_kinematic_body_2d.md | 4 +- .../android/android_in_app_purchases.md | 2 +- tutorials/platform/android/android_plugin.md | 16 ++--- tutorials/platform/consoles.md | 10 ++-- tutorials/platform/ios/ios_plugin.md | 10 ++-- tutorials/platform/ios/plugins_for_ios.md | 6 +- tutorials/plugins/editor/inspector_plugins.md | 4 +- .../plugins/editor/installing_plugins.md | 2 +- .../editor/making_main_screen_plugins.md | 6 +- tutorials/plugins/editor/making_plugins.md | 10 ++-- tutorials/plugins/editor/spatial_gizmos.md | 2 +- .../plugins/editor/visual_shader_plugins.md | 2 +- .../plugins/running_code_in_the_editor.md | 6 +- tutorials/rendering/multiple_resolutions.md | 6 +- tutorials/rendering/viewports.md | 4 +- .../scripting/gdscript/gdscript_advanced.md | 4 +- .../scripting/gdscript/gdscript_basics.md | 46 +++++++------- .../scripting/gdscript/gdscript_exports.md | 12 ++-- .../gdscript/gdscript_format_string.md | 6 +- .../scripting/gdscript/gdscript_styleguide.md | 16 ++--- tutorials/scripting/gdscript/static_typing.md | 2 +- .../scripting/idle_and_physics_processing.md | 14 ++--- .../scripting/nodes_and_scene_instances.md | 4 +- tutorials/scripting/overridable_functions.md | 20 +++---- tutorials/scripting/pausing_games.md | 2 +- tutorials/scripting/scene_tree.md | 2 +- tutorials/scripting/singletons_autoload.md | 4 +- tutorials/shaders/advanced_postprocessing.md | 2 +- .../converting_glsl_to_godot_shaders.md | 8 +-- tutorials/shaders/custom_postprocessing.md | 2 +- tutorials/shaders/shaders_style_guide.md | 4 +- .../shaders/using_viewport_as_texture.md | 2 +- tutorials/shaders/your_first_shader/index.md | 2 +- .../your_first_shader/your_first_2d_shader.md | 4 +- .../your_first_shader/your_first_3d_shader.md | 4 +- tutorials/ui/bbcode_in_richtextlabel.md | 4 +- tutorials/ui/custom_gui_controls.md | 2 +- 145 files changed, 509 insertions(+), 509 deletions(-) diff --git a/README.md b/README.md index 4750d9b..6e52e49 100644 --- a/README.md +++ b/README.md @@ -94,7 +94,7 @@ The compilation might take some time as the `classes/` folder contains many file In case of a `MemoryError` or `EOFError`, you can remove the `classes/` folder and run `make` again. This will drop the class references from the final HTML documentation but will keep the rest intact. Make sure to avoid using `git add .` in this case when working on a pull request, or the whole `classes/` folder will be removed when you make a commit. See [#3157](https://github.com/godotengine/godot-docs/issues/3157) for more details. -You can then test the changes live by opening `_build/html/index.html` in your favorite browser. +You can then test the changes live by opening `build/html/index.html` in your favorite browser. ### Building with Sphinx on Windows diff --git a/about/complying_with_licenses.md b/about/complying_with_licenses.md index 55f56c2..1bf0b75 100644 --- a/about/complying_with_licenses.md +++ b/about/complying_with_licenses.md @@ -6,7 +6,7 @@ Complying with licenses What are licenses? ------------------ -Godot is created and distributed under the `MIT License ( https://opensource.org/licenses/MIT )`_. +Godot is created and distributed under the `MIT License ( https://opensource.org/licenses/MIT )`. It doesn't have a sole owner either, as every contributor that submits code to the project does it under this same license and keeps ownership of the contribution. @@ -99,7 +99,7 @@ Third-party licenses -------------------- Godot itself contains software written by -`third parties ( https://github.com/godotengine/godot/blob/master/COPYRIGHT.txt )`_. +`third parties ( https://github.com/godotengine/godot/blob/master/COPYRIGHT.txt )`. Most of it does not require license inclusion, but some do. Make sure to do it if these are compiled in your Godot export template. If you're using the official export templates, all libraries are enabled. This @@ -110,7 +110,7 @@ Here's a list of libraries requiring attribution: FreeType ^^^^^^^^ -Godot uses `FreeType ( https://www.freetype.org/ )`_ to render fonts. Its license +Godot uses `FreeType ( https://www.freetype.org/ )` to render fonts. Its license requires attribution, so the following text must be included together with the Godot license: @@ -127,7 +127,7 @@ Note: ENet ^^^^ -Godot includes the `ENet ( http://enet.bespin.org/ )`_ library to handle +Godot includes the `ENet ( http://enet.bespin.org/ )` library to handle high-level multiplayer. ENet has similar licensing terms as Godot: @@ -142,7 +142,7 @@ high-level multiplayer. ENet has similar licensing terms as Godot: mbed TLS ^^^^^^^^ -If the project is exported with Godot 3.1 or later, it includes `mbed TLS ( https://tls.mbed.org )`_. +If the project is exported with Godot 3.1 or later, it includes `mbed TLS ( https://tls.mbed.org )`. The Apache license needs to be complied to by including the following text: Copyright The Mbed TLS Contributors @@ -159,7 +159,7 @@ The Apache license needs to be complied to by including the following text: See the License for the specific language governing permissions and limitations under the License. -Keep in mind that Godot 2.x and 3.0 use `OpenSSL ( https://www.openssl.org )`_ 1.x +Keep in mind that Godot 2.x and 3.0 use `OpenSSL ( https://www.openssl.org )` 1.x 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). diff --git a/about/faq.md b/about/faq.md index f212d9a..2bc794e 100644 --- a/about/faq.md +++ b/about/faq.md @@ -9,7 +9,7 @@ Frequently asked questions What can I do with Godot? How much does it cost? What are the license terms? ---------------------------------------------------------------------------- -Godot is `Free and Open-Source Software ( https://en.wikipedia.org/wiki/Free_and_open-source_software )`_ available under the `OSI-approved ( https://opensource.org/licenses/MIT )`_ MIT license. This means it is free as in "free speech" as well as in "free beer." +Godot is `Free and Open-Source Software ( https://en.wikipedia.org/wiki/Free_and_open-source_software )` available under the `OSI-approved ( https://opensource.org/licenses/MIT )` MIT license. This means it is free as in "free speech" as well as in "free beer." In short: @@ -17,18 +17,18 @@ In short: * You are free to modify, distribute, redistribute, and remix Godot to your heart's content, for any reason, both non-commercially and commercially. All the contents of this accompanying documentation are published under -the permissive Creative Commons Attribution 3.0 (`CC-BY 3.0 ( https://creativecommons.org/licenses/by/3.0/ )`_) license, with attribution +the permissive Creative Commons Attribution 3.0 (`CC-BY 3.0 ( https://creativecommons.org/licenses/by/3.0/ )`) license, with attribution to "Juan Linietsky, Ariel Manzur and the Godot Engine community." Logos and icons are generally under the same Creative Commons license. Note that some third-party libraries included with Godot's source code may have different licenses. -For full details, look at the `COPYRIGHT.txt ( https://github.com/godotengine/godot/blob/master/COPYRIGHT.txt )`_ as well -as the `LICENSE.txt ( https://github.com/godotengine/godot/blob/master/LICENSE.txt )`_ and `LOGO_LICENSE.txt ( https://github.com/godotengine/godot/blob/master/LOGO_LICENSE.md )`_ files +For full details, look at the `COPYRIGHT.txt ( https://github.com/godotengine/godot/blob/master/COPYRIGHT.txt )` as well +as the `LICENSE.txt ( https://github.com/godotengine/godot/blob/master/LICENSE.txt )` and `LOGO_LICENSE.txt ( https://github.com/godotengine/godot/blob/master/LOGO_LICENSE.md )` files in the Godot repository. -Also, see `the license page on the Godot website ( https://godotengine.org/license )`_. +Also, see `the license page on the Godot website ( https://godotengine.org/license )`. Which platforms are supported by Godot? --------------------------------------- @@ -81,13 +81,13 @@ Note that C# support is still relatively new, and as such, you may encounter som issues along the way. Our friendly and hard-working development community is always ready to tackle new problems as they arise, but since this is an open-source project, we recommend that you first do some due diligence yourself. Searching through -discussions on `open issues ( https://github.com/godotengine/godot/issues )`_ is a +discussions on `open issues ( https://github.com/godotengine/godot/issues )` is a great way to start your troubleshooting. As for new languages, support is possible via third parties using the GDNative / NativeScript / PluginScript facilities. (See the question about plugins below.) Work is currently underway, for example, on unofficial bindings for Godot -to `Python ( https://github.com/touilleMan/godot-python )`_ and `Nim ( https://github.com/pragmagic/godot-nim )`_. +to `Python ( https://github.com/touilleMan/godot-python )` and `Nim ( https://github.com/pragmagic/godot-nim )`. @@ -157,8 +157,8 @@ GDScript was designed to curtail the issues above, and more. What type of 3D model formats does Godot support? ------------------------------------------------- -Godot supports Collada via the `OpenCollada ( https://github.com/KhronosGroup/OpenCOLLADA/wiki/OpenCOLLADA-Tools )`_ exporter (Maya, 3DSMax). -If you are using Blender, take a look at our own `Better Collada Exporter ( https://godotengine.org/download )`_. +Godot supports Collada via the `OpenCollada ( https://github.com/KhronosGroup/OpenCOLLADA/wiki/OpenCOLLADA-Tools )` exporter (Maya, 3DSMax). +If you are using Blender, take a look at our own `Better Collada Exporter ( https://godotengine.org/download )`. As of Godot 3.0, glTF is supported. @@ -364,11 +364,11 @@ and tool scripts. Also, see the official blog posts on these topics: -* `A look at the GDNative architecture ( https://godotengine.org/article/look-gdnative-architecture )`_ -* `GDNative is here! ( https://godotengine.org/article/dlscript-here )`_ +* `A look at the GDNative architecture ( https://godotengine.org/article/look-gdnative-architecture )` +* `GDNative is here! ( https://godotengine.org/article/dlscript-here )` You can also take a look at the GDScript implementation, the Godot modules, -as well as the `unofficial Python support ( https://github.com/touilleMan/godot-python )`_ for Godot. +as well as the `unofficial Python support ( https://github.com/touilleMan/godot-python )` for Godot. This would be a good starting point to see how another third-party library integrates with Godot. @@ -384,8 +384,8 @@ I would like to contribute! How can I get started? Awesome! As an open-source project, Godot thrives off of the innovation and ambition of developers like you. -The first place to get started is in the `issues ( https://github.com/godotengine/godot/issues )`_. -Find an issue that resonates with you, then proceed to the `How to Contribute ( https://github.com/godotengine/godot/blob/master/CONTRIBUTING.md#contributing-pull-requests )`_ +The first place to get started is in the `issues ( https://github.com/godotengine/godot/issues )`. +Find an issue that resonates with you, then proceed to the `How to Contribute ( https://github.com/godotengine/godot/blob/master/CONTRIBUTING.md#contributing-pull-requests )` guide to learn how to fork, modify, and submit a Pull Request (PR) with your changes. I have a great idea for Godot. How can I share it? @@ -396,8 +396,8 @@ result in massive core changes, some sort of mimicry of what another game engine does, or alternative workflows that you'd like built into the editor. These are great, and we are thankful to have such motivated people want to contribute, but Godot's focus is and always will be the -core functionality as outlined in the `Roadmap ( https://github.com/godotengine/godot-roadmap/blob/master/ROADMAP.md )`_, -`squashing bugs and addressing issues ( https://github.com/godotengine/godot/issues )`_, +core functionality as outlined in the `Roadmap ( https://github.com/godotengine/godot-roadmap/blob/master/ROADMAP.md )`, +`squashing bugs and addressing issues ( https://github.com/godotengine/godot/issues )`, and conversations between Godot community members. Most developers in the Godot community will be more interested to learn @@ -540,4 +540,4 @@ See `doc_ways_to_contribute`. Who is working on Godot? How can I contact you? ----------------------------------------------- -See the corresponding page on the `Godot website ( https://godotengine.org/contact )`_. +See the corresponding page on the `Godot website ( https://godotengine.org/contact )`. diff --git a/about/introduction.md b/about/introduction.md index 1f6c7cb..6f4a3c0 100644 --- a/about/introduction.md +++ b/about/introduction.md @@ -47,7 +47,7 @@ if you need a quick writeup about Godot Engine. theirs, down to the last line of engine code. Godot's development is fully independent and community-driven, empowering users to help shape their engine to match their expectations. It is supported by the `Software - Freedom Conservancy ( https://sfconservancy.org )`_ not-for-profit. + Freedom Conservancy ( https://sfconservancy.org )` not-for-profit. For a more in-depth view of the engine, you are encouraged to read this documentation further, especially the `Step by step @@ -58,20 +58,20 @@ About the documentation This documentation is continuously written, corrected, edited, and revamped by members of the Godot Engine community. It is edited via text files in the -`reStructuredText ( http://www.sphinx-doc.org/en/stable/rest.html )`_ markup +`reStructuredText ( http://www.sphinx-doc.org/en/stable/rest.html )` markup language and then compiled into a static website/offline document using the -open source `Sphinx ( http://www.sphinx-doc.org )`_ and `ReadTheDocs -( https://readthedocs.org/ )`_ tools. +open source `Sphinx ( http://www.sphinx-doc.org )` and `ReadTheDocs +( https://readthedocs.org/ )` tools. Note: You can contribute to Godot's documentation by opening issue tickets 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 - ( https://hosted.weblate.org/projects/godot-engine/godot-docs/ )`_. + ( https://hosted.weblate.org/projects/godot-engine/godot-docs/ )`. All the contents are under the permissive Creative Commons Attribution 3.0 -(`CC-BY 3.0 ( https://creativecommons.org/licenses/by/3.0/ )`_) license, with +(`CC-BY 3.0 ( https://creativecommons.org/licenses/by/3.0/ )`) license, with attribution to "Juan Linietsky, Ariel Manzur and the Godot Engine community". Organization of the documentation @@ -106,6 +106,6 @@ relatively intuitive: `doc_updating_the_class_reference` for details. In addition to this documentation you may also want to take a look at the -various `Godot demo projects ( https://github.com/godotengine/godot-demo-projects )`_. +various `Godot demo projects ( https://github.com/godotengine/godot-demo-projects )`. Have fun reading and making games with Godot Engine! diff --git a/community/contributing/bug_triage_guidelines.md b/community/contributing/bug_triage_guidelines.md index 3f4bd9a..4d6d3c7 100644 --- a/community/contributing/bug_triage_guidelines.md +++ b/community/contributing/bug_triage_guidelines.md @@ -61,7 +61,7 @@ The following labels are currently defined in the Godot repository: - *Documentation*: issue related to the documentation. Mainly to request enhancements in the API documentation. Issues related to the ReadTheDocs documentation should be filed on the - `godot-docs ( https://github.com/godotengine/godot-docs )`_ repository. + `godot-docs ( https://github.com/godotengine/godot-docs )` repository. - *Enhancement*: describes a proposed enhancement to an existing functionality. - *Feature proposal*: describes a wish for a new feature to be @@ -69,7 +69,7 @@ The following labels are currently defined in the Godot repository: feature requests. Please use `godot-proposals ( https://github.com/godotengine/godot-proposals )` instead. - *For PR meeting*: the issue needs to be discussed in a pull request meeting. - These meetings are public and are held on the `Godot Contributors Chat ( https://chat.godotengine.org/ )`_. + These meetings are public and are held on the `Godot Contributors Chat ( https://chat.godotengine.org/ )`. - *Good first issue*: the issue is *assumed* to be an easy one to fix, which makes it a great fit for new contributors who need to become familiar with the code base. @@ -177,7 +177,7 @@ use the following labels: Milestones ~~~~~~~~~~ -`Milestones ( https://github.com/godotengine/godot/milestones )`_ correspond to +`Milestones ( https://github.com/godotengine/godot/milestones )` correspond to planned future versions of Godot for which there is an existing roadmap. Issues that fit in the said roadmap should be filed under the corresponding milestone; if they don't correspond to any current roadmap, they should be left without diff --git a/community/contributing/building_the_manual.md b/community/contributing/building_the_manual.md index 771586b..6a51713 100644 --- a/community/contributing/building_the_manual.md +++ b/community/contributing/building_the_manual.md @@ -63,7 +63,7 @@ up compilation by running: The compilation will take some time as the `classes/` folder contains hundreds of files. -You can then browse the documentation by opening `_build/html/index.html` in +You can then browse the documentation by opening `build/html/index.html` in your web browser. In case you of a `MemoryError` or `EOFError`, you can remove the diff --git a/community/contributing/class_reference_writing_guidelines.md b/community/contributing/class_reference_writing_guidelines.md index d83eccd..864463b 100644 --- a/community/contributing/class_reference_writing_guidelines.md +++ b/community/contributing/class_reference_writing_guidelines.md @@ -183,7 +183,7 @@ If you need to have different code version in GDScript and C#, use least one of the language-specific tags, `[gdscript]` and `[csharp]`. Always write GDScript code examples first! You can use this `experimental code -translation tool ( https://github.com/HaSa1002/codetranslator )`_ to speed up your +translation tool ( https://github.com/HaSa1002/codetranslator )` to speed up your workflow. .. code-block:: none @@ -245,4 +245,4 @@ pull of your changes. Another writer will take care of it. You can still look at the methods' implementation in Godot's source code on GitHub. If you have doubts, feel free to ask on the `Q&A website -( https://godotengine.org/qa/ )` and `Godot Contributors Chat ( https://chat.godotengine.org/ )`_. +( https://godotengine.org/qa/ )` and `Godot Contributors Chat ( https://chat.godotengine.org/ )`. diff --git a/community/contributing/contributing_to_the_documentation.md b/community/contributing/contributing_to_the_documentation.md index 4634884..706ee43 100644 --- a/community/contributing/contributing_to_the_documentation.md +++ b/community/contributing/contributing_to_the_documentation.md @@ -17,7 +17,7 @@ Getting started To modify or create pages in the reference manual, you need to edit `.rst` 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. See also: @@ -28,7 +28,7 @@ See also: 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 from them. If you want to update the description of a class, its methods, or properties, read @@ -108,7 +108,7 @@ Adding new pages Before adding a new page, please ensure that it fits in the documentation: 1. Look for `existing issues - ( https://github.com/godotengine/godot-docs/issues )`_ or open a new one to see + ( https://github.com/godotengine/godot-docs/issues )` or open a new one to see if the page is necessary. 2. Ensure there isn't a page that already covers the topic. 3. Read our `doc_content_guidelines`. @@ -132,7 +132,7 @@ Always begin pages with their title and a Sphinx reference name: Insert your title here ====================== -The reference `_doc_insert_your_title_here` and the title should match. +The reference `doc_insert_your_title_here` and the title should match. The reference allows linking to this page using the ``` format, e.g. ```doc_insert_your_title_here``` would link to the above example page (note @@ -187,7 +187,7 @@ License This documentation and every page it contains is published under the terms of the `Creative Commons Attribution 3.0 license (CC-BY-3.0) -( https://tldrlegal.com/license/creative-commons-attribution-(cc) )`_, with +( https://tldrlegal.com/license/creative-commons-attribution-(cc) )`, with attribution to "Juan Linietsky, Ariel Manzur and the Godot community". By contributing to the documentation on the GitHub repository, you agree that diff --git a/community/contributing/docs_writing_guidelines.md b/community/contributing/docs_writing_guidelines.md index 066e6f7..5099781 100644 --- a/community/contributing/docs_writing_guidelines.md +++ b/community/contributing/docs_writing_guidelines.md @@ -534,7 +534,7 @@ Before you add or replace any images in the documentation, they should be run through a PNG compressor to save size. You can use the lossless OxiPNG compressor included in `Squoosh ( https://squoosh.app/ )` for this purpose. For 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. Note: diff --git a/community/contributing/documentation_guidelines.md b/community/contributing/documentation_guidelines.md index 2483764..0c34dae 100644 --- a/community/contributing/documentation_guidelines.md +++ b/community/contributing/documentation_guidelines.md @@ -6,15 +6,15 @@ Documentation guidelines This page describes the rules to follow if you want to contribute to Godot Engine by writing or reviewing documentation, or by translating existing documentation. Also, have a look at README of the -`godot-docs GitHub repository ( https://github.com/godotengine/godot-docs )`_ -and the `docs front page ( https://docs.godotengine.org )`_ +`godot-docs GitHub repository ( https://github.com/godotengine/godot-docs )` +and the `docs front page ( https://docs.godotengine.org )` on what steps to follow and how to contact the docs team. How to contribute ----------------- Creating or modifying documentation pages is mainly done via the -`godot-docs GitHub repository ( https://github.com/godotengine/godot-docs )`_. +`godot-docs GitHub repository ( https://github.com/godotengine/godot-docs )`. The HTML (or PDF and EPUB) documentation is generated from the .rst files (reStructuredText markup language) in that repository. Modifying those pages in a pull request and getting it merged will trigger a rebuild of the online @@ -28,7 +28,7 @@ See also: 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 description of a class, its methods, or properties, read `doc_updating_the_class_reference`. @@ -44,7 +44,7 @@ Warning: The 'Edit on GitHub' link ------------------------- -If you're reading documentation on `docs.godotengine.org ( https://docs.godotengine.org )`_, +If you're reading documentation on `docs.godotengine.org ( https://docs.godotengine.org )`, you'll see an **Edit on GitHub** hyperlink at the top right of the page. Once you've created a GitHub account, you can propose changes to a page you're reading as follows: @@ -121,7 +121,7 @@ letter. Translating existing pages -------------------------- -You can help to translate the official Godot documentation on our `Hosted Weblate ( https://hosted.weblate.org/engage/godot-engine/ )`_. +You can help to translate the official Godot documentation on our `Hosted Weblate ( https://hosted.weblate.org/engage/godot-engine/ )`. ![](https://hosted.weblate.org/widgets/godot-engine/-/godot-docs/287x66-white.png) :alt: Translation state @@ -131,14 +131,14 @@ You can help to translate the official Godot documentation on our `Hosted Weblat :height: 66 There also is the official -`Godot i18n repository ( https://github.com/godotengine/godot-docs-l10n )`_ +`Godot i18n repository ( https://github.com/godotengine/godot-docs-l10n )` where you can see when the data was last synchronized. License ------- This documentation and every page it contains is published under the terms of -the `Creative Commons Attribution 3.0 license (CC-BY-3.0) ( https://tldrlegal.com/license/creative-commons-attribution-(cc) )`_, with attribution to "Juan Linietsky, Ariel Manzur and the Godot community". +the `Creative Commons Attribution 3.0 license (CC-BY-3.0) ( https://tldrlegal.com/license/creative-commons-attribution-(cc) )`, with attribution to "Juan Linietsky, Ariel Manzur and the Godot community". By contributing to the documentation on the GitHub repository, you agree that your changes are distributed under this license. diff --git a/community/contributing/editor_and_docs_localization.md b/community/contributing/editor_and_docs_localization.md index 82ca118..29af0b9 100644 --- a/community/contributing/editor_and_docs_localization.md +++ b/community/contributing/editor_and_docs_localization.md @@ -265,7 +265,7 @@ external links, etc. Here are some examples:: # syntax and should be preserved. Looking for the documentation of the current **development** branch? - `Have a look here ( https://docs.godotengine.org/en/latest )`_. + `Have a look here ( https://docs.godotengine.org/en/latest )`. # "|supported|" is an inline reference to an image and should stay unchanged. # "master" uses the markup for inline code, and will be styled as such. @@ -381,7 +381,7 @@ Godot editor, custom-made graphs, of any other kind of visual content. Some of it includes text and might thus be relevant to localize in your language. 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. Note: @@ -416,7 +416,7 @@ added before the extension, e.g. `project_manager_first_open.png)` would become Finally, on godot-docs-l10n_, recreate the same folder structure as for the original image in the `images` subfolder -(`GitHub ( https://github.com/godotengine/godot-docs-l10n/tree/master/images )`_), +(`GitHub ( https://github.com/godotengine/godot-docs-l10n/tree/master/images )`), and place your translated image there. In our example, the end result should be `images/getting_started/step_by_step/img/project_manager_first_open.fr.png)`. diff --git a/community/contributing/index.md b/community/contributing/index.md index c7bc87b..2ec8b45 100644 --- a/community/contributing/index.md +++ b/community/contributing/index.md @@ -82,7 +82,7 @@ Class reference guides The pages below focus on the class reference. As the reference is included in the Godot editor, its source files are part of -the `godot repository ( https://github.com/godotengine/godot )`_. We use XML files +the `godot repository ( https://github.com/godotengine/godot )`. We use XML files to write it, so the process to contribute to the class reference differs from writing the online manual. diff --git a/community/contributing/pr_workflow.md b/community/contributing/pr_workflow.md index a448eb5..4443b08 100644 --- a/community/contributing/pr_workflow.md +++ b/community/contributing/pr_workflow.md @@ -25,13 +25,13 @@ organization of Godot's Git repository. Git source repository --------------------- -The `repository on GitHub ( https://github.com/godotengine/godot )`_ is a -`Git ( https://git-scm.com )`_ code repository together with an embedded +The `repository on GitHub ( https://github.com/godotengine/godot )` is a +`Git ( https://git-scm.com )` code repository together with an embedded issue tracker and PR system. 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 edits to the source code - to contribute efficiently to Godot, learning the @@ -47,7 +47,7 @@ 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 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. You can also try out `GitHub's interactive guide ( https://try.github.io/ )`. The branches on the Git repository are organized as follows: @@ -72,7 +72,7 @@ The branches on the Git repository are organized as follows: Forking and cloning ------------------- -The first step is to *fork* the `godotengine/godot ( https://github.com/godotengine/godot )`_ +The first step is to *fork* the `godotengine/godot ( https://github.com/godotengine/godot )` repository on GitHub. To do so, you will need to have a GitHub account and to be logged in. In the top right corner of the repository's GitHub page, you should see the "Fork" button as shown below: @@ -86,7 +86,7 @@ Godot repo, with your GitHub username as namespace: You can then *clone* your fork, i.e. create a local copy of the online 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. Note: @@ -371,7 +371,7 @@ that will let you issue a pull request on the `godotengine/godot` upstream repository. It should show you your two commits, and state "Able to merge". If not (e.g. it has way more commits, or says there are merge conflicts), don't create the PR yet, something went wrong. Go to our -`Godot Contributors Chat ( https://chat.godotengine.org/ )`_ and ask for support :) +`Godot Contributors Chat ( https://chat.godotengine.org/ )` and ask for support :) Use an explicit title for the PR and put the necessary details in the comment area. You can drag and drop screenshots, GIFs or zipped projects if relevant, @@ -477,7 +477,7 @@ Note: with this little by little). This will open a text editor (`vi` by default, see -`Git docs ( https://git-scm.com/book/en/v2/Customizing-Git-Git-Configuration#_core_editor )`_ +`Git docs ( https://git-scm.com/book/en/v2/Customizing-Git-Git-Configuration#_core_editor )` to configure your favorite one) with something which may look like this: .. code-block:: text diff --git a/community/contributing/updating_the_class_reference.md b/community/contributing/updating_the_class_reference.md index de33bad..e3cbca2 100644 --- a/community/contributing/updating_the_class_reference.md +++ b/community/contributing/updating_the_class_reference.md @@ -13,7 +13,7 @@ the entire reference on their own. Godot needs you, and all of us, to contribute. **Important:** If you plan to make large changes, you should create an issue on -the `godot-docs repository ( https://github.com/godotengine/godot-docs/ )`_ +the `godot-docs repository ( https://github.com/godotengine/godot-docs/ )` or comment on an existing issue. Doing so lets others know you're already taking care of a given class. @@ -29,17 +29,17 @@ See also: language, see `doc_editor_and_docs_localization`. 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 )`. See also: 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/ )`. You can find the source files for the class reference in Godot's GitHub 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 @@ -49,7 +49,7 @@ Warning: Always edit the API reference through these source XML files. Do not edit the generated `.rst` files `in the online documentation ( toc-class-ref )`, hosted in the `godot-docs - ( https://github.com/godotengine/godot-docs )`_ repository. + ( https://github.com/godotengine/godot-docs )` repository. Warning: diff --git a/community/contributing/ways_to_contribute.md b/community/contributing/ways_to_contribute.md index 7d722c1..004c32b 100644 --- a/community/contributing/ways_to_contribute.md +++ b/community/contributing/ways_to_contribute.md @@ -47,7 +47,7 @@ positive to the engine, regardless of their skill set: can work full-time on the engine. Even with a low monthly wage, we need a steady donation income to continue doing this, which has been very beneficial to the project so far. So if you want to donate - some money to the project, check `our website ( https://godotengine.org/donate )`_ + some money to the project, check `our website ( https://godotengine.org/donate )` for details. Contributing code @@ -55,11 +55,11 @@ Contributing code The possibility to study, use, modify and redistribute modifications of the engine's source code are the fundamental rights that -Godot's `MIT ( https://tldrlegal.com/license/mit-license )`_ license grants you, -making it `free and open source software ( https://en.wikipedia.org/wiki/Free_and_open-source_software )`_. +Godot's `MIT ( https://tldrlegal.com/license/mit-license )` license grants you, +making it `free and open source software ( https://en.wikipedia.org/wiki/Free_and_open-source_software )`. As such, everyone is entitled to modify -`Godot's source code ( https://github.com/godotengine/godot )`_, and send those +`Godot's source code ( https://github.com/godotengine/godot )`, and send those modifications back to the upstream project in the form of a patch (a text file describing the changes in a ready-to-apply manner) or - in the modern workflow that we use - via a so-called "pull request" (PR), i.e. a proposal to directly @@ -85,7 +85,7 @@ enforce some rules for code contributions, for example regarding the style to use in the C++ code (indentation, brackets, etc.) or the Git and PR workflow. 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. See also: @@ -105,9 +105,9 @@ way more contributions than people validating them. To make sure that your time and efforts aren't wasted, it is recommended to vet the idea first before implementing it and putting it for a review as a PR. To that end, Godot -has a `proposal system ( https://github.com/godotengine/godot-proposals )`_. Its +has a `proposal system ( https://github.com/godotengine/godot-proposals )`. Its 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. @@ -145,7 +145,7 @@ the developers. Filing an issue on GitHub ~~~~~~~~~~~~~~~~~~~~~~~~~ -Godot uses `GitHub's issue tracker ( https://github.com/godotengine/godot/issues )`_ +Godot uses `GitHub's issue tracker ( https://github.com/godotengine/godot/issues )` for bug reports and enhancement suggestions. You will need a GitHub account to be able to open a new issue there, and click on the **New issue** button. @@ -208,7 +208,7 @@ There are two separate resources referred to as "documentation" in Godot: This is the part you are reading now, which is distributed in the HTML format. Its contents are generated from plain text files in the reStructured Text (rst) format, to which you can contribute via pull requests on the - `godot-docs ( https://github.com/godotengine/godot-docs )`_ GitHub repository. + `godot-docs ( https://github.com/godotengine/godot-docs )` GitHub repository. See `doc_contributing_to_the_documentation` for more details. Contributing translations diff --git a/community/tutorials.md b/community/tutorials.md index edbd436..1f077f8 100644 --- a/community/tutorials.md +++ b/community/tutorials.md @@ -3,48 +3,48 @@ Tutorials and resources ======================= -This is a list of third-party tutorials and resources created by the Godot community. For resources, remember that there is the official `Godot Asset Library ( https://godotengine.org/asset-library/asset )`_ full of official and community resources too! Also, have a look at this `huge list over at Reddit ( https://www.reddit.com/r/godot/comments/an0iq5/godot_tutorials_list_of_video_and_written/ )`_. +This is a list of third-party tutorials and resources created by the Godot community. For resources, remember that there is the official `Godot Asset Library ( https://godotengine.org/asset-library/asset )` full of official and community resources too! Also, have a look at this `huge list over at Reddit ( https://www.reddit.com/r/godot/comments/an0iq5/godot_tutorials_list_of_video_and_written/ )`. -Think there is something missing here? Feel free to submit a `Pull Request ( https://github.com/godotengine/godot-docs/blob/master/community/tutorials.rst )`_ as always. +Think there is something missing here? Feel free to submit a `Pull Request ( https://github.com/godotengine/godot-docs/blob/master/community/tutorials.rst )` as always. Where to start -------------- -The Godot video tutorials by `GDQuest ( https://www.youtube.com/channel/UCxboW7x0jZqFdvMdCFKTMsQ/playlists )`_, `Game from Scratch ( https://www.youtube.com/watch?v=iDEcP8Mc-7s&list=PLS9MbmO_ssyDk79j9ewONxV88fD5e_o5d )`_ and `KidsCanCode ( https://www.youtube.com/channel/UCNaPQ5uLX5iIEHUCLmfAgKg/playlists )`_ are well-regarded in the community and often recommended as a gentle introduction to beginners. +The Godot video tutorials by `GDQuest ( https://www.youtube.com/channel/UCxboW7x0jZqFdvMdCFKTMsQ/playlists )`, `Game from Scratch ( https://www.youtube.com/watch?v=iDEcP8Mc-7s&list=PLS9MbmO_ssyDk79j9ewONxV88fD5e_o5d )` and `KidsCanCode ( https://www.youtube.com/channel/UCNaPQ5uLX5iIEHUCLmfAgKg/playlists )` are well-regarded in the community and often recommended as a gentle introduction to beginners. -If you're interested in Visual Scripting, `Emilio's tutorials ( https://www.youtube.com/channel/UC9DR22-qohBDtZ74R3FxOZg )`_ may be worth a look. +If you're interested in Visual Scripting, `Emilio's tutorials ( https://www.youtube.com/channel/UC9DR22-qohBDtZ74R3FxOZg )` may be worth a look. -If you're interested in a complete introduction to programming using Godot and GDScript, the unofficial `Godot Tutorials ( https://www.youtube.com/channel/UCnr9ojBEQGgwbcKsZC-2rIg )`_ YouTube channel is a good place to start. +If you're interested in a complete introduction to programming using Godot and GDScript, the unofficial `Godot Tutorials ( https://www.youtube.com/channel/UCnr9ojBEQGgwbcKsZC-2rIg )` YouTube channel is a good place to start. -GDQuest's *Learn GDScript From Zero* is a free and open source interactive tutorial for absolute beginners to learn to program with Godot's GDScript language. It is available as a `desktop application ( https://gdquest.itch.io/learn-godot-gdscript )`_ or `in the browser ( https://gdquest.github.io/learn-gdscript )`_. +GDQuest's *Learn GDScript From Zero* is a free and open source interactive tutorial for absolute beginners to learn to program with Godot's GDScript language. It is available as a `desktop application ( https://gdquest.itch.io/learn-godot-gdscript )` or `in the browser ( https://gdquest.github.io/learn-gdscript )`. Some tutorials mentioned below provide more advanced tutorials, e.g. on 3D or shaders. Video tutorials --------------- -- `Godot Tutorials ( https://www.youtube.com/channel/UCnr9ojBEQGgwbcKsZC-2rIg )`_ (2D, GDScript, Programming Basics). -- `Emilio ( https://www.youtube.com/channel/UC9DR22-qohBDtZ74R3FxOZg )`_ (2D, GDScript and VisualScript). -- `FinePointCGI ( https://www.youtube.com/channel/UCSojAWUnEUTUcdA9iJ6bryQ )`_ (2D, 3D, GDScript and C#). -- `GDQuest ( https://www.youtube.com/channel/UCxboW7x0jZqFdvMdCFKTMsQ/playlists )`_ (2D and 3D, GDScript, VisualScript and C#). -- `Game Development Center ( https://www.youtube.com/c/GameDevelopmentCenter )`_ (2D, networked multiplayer, GDScript). -- `Game Endeavor ( https://www.youtube.com/channel/UCLweX1UtQjRjj7rs_0XQ2Eg/videos )`_ (2D, GDScript). -- `Game from Scratch ( https://www.youtube.com/watch?v=iDEcP8Mc-7s&list=PLS9MbmO_ssyDk79j9ewONxV88fD5e_o5d )`_ (2D and 3D, GDScript and C#). -- `HeartBeast ( https://www.youtube.com/watch?v=wETY5_9kFtA&list=PL9FzW-m48fn2jlBu_0DRh7PvAt-GULEmd )`_ (2D, GDScript). +- `Godot Tutorials ( https://www.youtube.com/channel/UCnr9ojBEQGgwbcKsZC-2rIg )` (2D, GDScript, Programming Basics). +- `Emilio ( https://www.youtube.com/channel/UC9DR22-qohBDtZ74R3FxOZg )` (2D, GDScript and VisualScript). +- `FinePointCGI ( https://www.youtube.com/channel/UCSojAWUnEUTUcdA9iJ6bryQ )` (2D, 3D, GDScript and C#). +- `GDQuest ( https://www.youtube.com/channel/UCxboW7x0jZqFdvMdCFKTMsQ/playlists )` (2D and 3D, GDScript, VisualScript and C#). +- `Game Development Center ( https://www.youtube.com/c/GameDevelopmentCenter )` (2D, networked multiplayer, GDScript). +- `Game Endeavor ( https://www.youtube.com/channel/UCLweX1UtQjRjj7rs_0XQ2Eg/videos )` (2D, GDScript). +- `Game from Scratch ( https://www.youtube.com/watch?v=iDEcP8Mc-7s&list=PLS9MbmO_ssyDk79j9ewONxV88fD5e_o5d )` (2D and 3D, GDScript and C#). +- `HeartBeast ( https://www.youtube.com/watch?v=wETY5_9kFtA&list=PL9FzW-m48fn2jlBu_0DRh7PvAt-GULEmd )` (2D, GDScript). - `KidsCanCode ( https://www.youtube.com/channel/UCNaPQ5uLX5iIEHUCLmfAgKg/playlists )` (2D and 3D, GDScript and VisualScript). -- `Mister Taft Creates ( https://www.youtube.com/playlist?list=PL4vbr3u7UKWqwQlvwvgNcgDL1p_3hcNn2 )`_ (2D, GDScript). -- `Miziziziz ( https://www.youtube.com/playlist?list=PLmugv6_kd0qN6AyjG245_Pdak4MXKUx88 )`_ (2D and 3D, GDScript). -- `P1X / Krzysztof Jankowski ( https://www.youtube.com/playlist?list=PLvDk7UKhld4xGPovdB4IFtAHYMYjx_-3K )`_ (3D). -- `Pigdev ( https://www.youtube.com/playlist?list=PLPMN4vCRFdordS3E-3zi0Hdh7pAsbWQ6a )`_ (2D, GDScript). +- `Mister Taft Creates ( https://www.youtube.com/playlist?list=PL4vbr3u7UKWqwQlvwvgNcgDL1p_3hcNn2 )` (2D, GDScript). +- `Miziziziz ( https://www.youtube.com/playlist?list=PLmugv6_kd0qN6AyjG245_Pdak4MXKUx88 )` (2D and 3D, GDScript). +- `P1X / Krzysztof Jankowski ( https://www.youtube.com/playlist?list=PLvDk7UKhld4xGPovdB4IFtAHYMYjx_-3K )` (3D). +- `Pigdev ( https://www.youtube.com/playlist?list=PLPMN4vCRFdordS3E-3zi0Hdh7pAsbWQ6a )` (2D, GDScript). - `Steincodes ( https://www.youtube.com/c/steincodes/playlists )` (2D, GDScript and VisualScript). -- `TheBuffED ( https://www.youtube.com/watch?v=ygGaN1EOQEA&list=PLvN5Z3tTxXEDfQkt4Frg6ALirespSwZd7 )`_ (2D, GDScript). -- `Code with Tom ( https://www.youtube.com/playlist?list=PLiUQR4U_J9ec0k91iHPme_qtfS1nrWF3W )`_ (2D and 3D, GDScript). -- `BornCG ( https://www.youtube.com/playlist?list=PLda3VoSoc_TSBBOBYwcmlamF1UrjVtccZ )`_ (2D and 3D, GDScript). -- `Gonkee ( https://www.youtube.com/channel/UCJqCPFHdbc6443G3Sz6VYDw )`_ (2D and 3D, GDScript, Shaders). -- `TheGuideKnight ( https://www.youtube.com/playlist?list=PLYcTJBw32KtX2fvOdtO_fS3Nd6sxM71tn )`_ (2D, GDScript). -- `GDScript Dude ( https://www.youtube.com/channel/UCQs0i6vKISElM6mh7OzLouQ )`_ (GDScript). -- `Garbaj ( https://www.youtube.com/c/Garbaj/ )`_ (3D, GDScript). -- `Kasper Frandsen ( https://www.youtube.com/c/KasperFrandsen/ )`_ (3D, Shaders). +- `TheBuffED ( https://www.youtube.com/watch?v=ygGaN1EOQEA&list=PLvN5Z3tTxXEDfQkt4Frg6ALirespSwZd7 )` (2D, GDScript). +- `Code with Tom ( https://www.youtube.com/playlist?list=PLiUQR4U_J9ec0k91iHPme_qtfS1nrWF3W )` (2D and 3D, GDScript). +- `BornCG ( https://www.youtube.com/playlist?list=PLda3VoSoc_TSBBOBYwcmlamF1UrjVtccZ )` (2D and 3D, GDScript). +- `Gonkee ( https://www.youtube.com/channel/UCJqCPFHdbc6443G3Sz6VYDw )` (2D and 3D, GDScript, Shaders). +- `TheGuideKnight ( https://www.youtube.com/playlist?list=PLYcTJBw32KtX2fvOdtO_fS3Nd6sxM71tn )` (2D, GDScript). +- `GDScript Dude ( https://www.youtube.com/channel/UCQs0i6vKISElM6mh7OzLouQ )` (GDScript). +- `Garbaj ( https://www.youtube.com/c/Garbaj/ )` (3D, GDScript). +- `Kasper Frandsen ( https://www.youtube.com/c/KasperFrandsen/ )` (3D, Shaders). Text tutorials -------------- @@ -57,11 +57,11 @@ Text tutorials Devlogs ------- -- `Andrea Catania (Physics & AI) ( https://www.youtube.com/channel/UCm4RuvYtgpgFDTCgaEUT5uQ/videos )`_ -- `Bastiaan Olij (AR & VR) ( https://www.youtube.com/channel/UCrbLJYzJjDf2p-vJC011lYw/videos )`_ +- `Andrea Catania (Physics & AI) ( https://www.youtube.com/channel/UCm4RuvYtgpgFDTCgaEUT5uQ/videos )` +- `Bastiaan Olij (AR & VR) ( https://www.youtube.com/channel/UCrbLJYzJjDf2p-vJC011lYw/videos )` Resources --------- -- `awesome-godot: A curated list of free/libre plugins, scripts and add-ons ( https://github.com/godotengine/awesome-godot )`_ -- `Zeef Godot Engine: A curated directory of resources by Andre Schmitz ( https://godot-engine.zeef.com/andre.antonio.schmitz )`_ +- `awesome-godot: A curated list of free/libre plugins, scripts and add-ons ( https://github.com/godotengine/awesome-godot )` +- `Zeef Godot Engine: A curated directory of resources by Andre Schmitz ( https://godot-engine.zeef.com/andre.antonio.schmitz )` diff --git a/development/compiling/compiling_for_android.md b/development/compiling/compiling_for_android.md index cd412f9..6250e2e 100644 --- a/development/compiling/compiling_for_android.md +++ b/development/compiling/compiling_for_android.md @@ -26,9 +26,9 @@ Requirements For compiling under Windows, Linux or macOS, the following is required: -- `Python 3.5+ ( https://www.python.org/downloads/ )`_. -- `SCons 3.0+ ( https://scons.org/pages/download.html )`_ build system. -- `Android SDK ( https://developer.android.com/studio/#command-tools )`_ +- `Python 3.5+ ( https://www.python.org/downloads/ )`. +- `SCons 3.0+ ( https://scons.org/pages/download.html )` build system. +- `Android SDK ( https://developer.android.com/studio/#command-tools )` (command-line tools are sufficient). - Required SDK components will be automatically installed. @@ -38,7 +38,7 @@ For compiling under Windows, Linux or macOS, the following is required: - Gradle (will be downloaded and installed automatically if missing). - JDK 11 (either OpenJDK or Oracle JDK). - - You can download a build from `ojdkbuild ( https://github.com/ojdkbuild/ojdkbuild )`_. + - You can download a build from `ojdkbuild ( https://github.com/ojdkbuild/ojdkbuild )`. See also: To get the Godot source code for compiling, see @@ -224,7 +224,7 @@ If so: - Check that the debug keystore is properly generated. - Check that the jarsigner executable is from JDK 8. -If it still fails, open a command line and run `logcat ( https://developer.android.com/studio/command-line/logcat )`_: +If it still fails, open a command line and run `logcat ( https://developer.android.com/studio/command-line/logcat )`: :: diff --git a/development/compiling/compiling_for_ios.md b/development/compiling/compiling_for_ios.md index 33ba6db..8a5a531 100644 --- a/development/compiling/compiling_for_ios.md +++ b/development/compiling/compiling_for_ios.md @@ -13,8 +13,8 @@ See also: Requirements ------------ -- SCons 3.0+ (you can install it via `Homebrew ( https://brew.sh/ )`_ or - `MacPorts ( https://www.macports.org/ )`_, you should be able +- SCons 3.0+ (you can install it via `Homebrew ( https://brew.sh/ )` or + `MacPorts ( https://www.macports.org/ )`, you should be able to run `scons` in a terminal when installed). - Xcode 10.0 (or later) with the iOS (10.0) SDK and the command line tools. diff --git a/development/compiling/compiling_for_osx.md b/development/compiling/compiling_for_osx.md index f357094..fc5bd48 100644 --- a/development/compiling/compiling_for_osx.md +++ b/development/compiling/compiling_for_osx.md @@ -15,14 +15,14 @@ Requirements For compiling under macOS, the following is required: -- `Python 3.5+ ( https://www.python.org )`_. -- `SCons 3.0+ ( https://www.scons.org )`_ build system. -- `Xcode ( https://apps.apple.com/us/app/xcode/id497799835 )`_ +- `Python 3.5+ ( https://www.python.org )`. +- `SCons 3.0+ ( https://www.scons.org )` build system. +- `Xcode ( https://apps.apple.com/us/app/xcode/id497799835 )` (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 + If you have `Homebrew ( https://brew.sh/ )` installed, you can easily install SCons and yasm using the following command:: brew install scons yasm @@ -30,7 +30,7 @@ Note: Installing Homebrew will also fetch the Command Line Tools for Xcode automatically if you don't have them already. - Similarly, if you have `MacPorts ( https://www.macports.org/ )`_ + Similarly, if you have `MacPorts ( https://www.macports.org/ )` installed, you can easily install SCons and yasm using the following command:: @@ -69,7 +69,7 @@ Note: If you want to use separate editor settings for your own Godot builds and official releases, you can enable `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. To create an `.app` bundle like in the official builds, you need to use the template located in `misc/dist/osx_tools.app`. Typically, for an optimized diff --git a/development/compiling/compiling_for_windows.md b/development/compiling/compiling_for_windows.md index ab2ee5d..a9b0c1d 100644 --- a/development/compiling/compiling_for_windows.md +++ b/development/compiling/compiling_for_windows.md @@ -15,25 +15,25 @@ Requirements For compiling under Windows, the following is required: -- `Visual Studio Community ( https://www.visualstudio.com/vs/community/ )`_, +- `Visual Studio Community ( https://www.visualstudio.com/vs/community/ )`, version 2017 or later. VS 2019 is recommended. **Make sure to read "Installing Visual Studio caveats" below or you will have to run/download the installer again.** - `MinGW-w64 ( http://mingw-w64.org/ )` with GCC can be used as an alternative to Visual Studio. Be sure to install/configure it to use the `posix` thread model. -- `Python 3.5+ ( https://www.python.org/downloads/windows/ )`_. +- `Python 3.5+ ( https://www.python.org/downloads/windows/ )`. **Make sure to enable the option to add Python to the `PATH` in the installer.** -- `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. Note: - If you have `Scoop ( https://scoop.sh/ )`_ installed, you can easily + If you have `Scoop ( https://scoop.sh/ )` installed, you can easily install MinGW and other dependencies using the following command:: scoop install gcc python scons make Note: - If you have `MSYS2 ( https://www.msys2.org/ )`_ installed, you can easily + If you have `MSYS2 ( https://www.msys2.org/ )` installed, you can easily install MinGW and other dependencies using the following command:: pacman -S mingw-w64-x86_64-python3-pip mingw-w64-x86_64-gcc \ @@ -173,7 +173,7 @@ Note: If you want to use separate editor settings for your own Godot builds and official releases, you can enable `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. Development in Visual Studio ---------------------------- @@ -205,7 +205,7 @@ and 64-bit variants. The package names may differ based on your distribution, here are some known ones: +----------------+--------------------------------------------------------------+ -| **Arch Linux** | Install `mingw-w64-gcc from the AUR`_. | +| **Arch Linux** | Install `mingw-w64-gcc from the AUR`. | +----------------+--------------------------------------------------------------+ | **Debian** / | :: | | **Ubuntu** | | @@ -252,7 +252,7 @@ Troubleshooting ~~~~~~~~~~~~~~~ Cross-compiling from some Ubuntu versions may lead to -`this bug ( https://github.com/godotengine/godot/issues/9258 )`_, +`this bug ( https://github.com/godotengine/godot/issues/9258 )`, due to a default configuration lacking support for POSIX threading. You can change that configuration following those instructions, diff --git a/development/compiling/compiling_for_x11.md b/development/compiling/compiling_for_x11.md index 41726c8..8bc6863 100644 --- a/development/compiling/compiling_for_x11.md +++ b/development/compiling/compiling_for_x11.md @@ -144,7 +144,7 @@ Note: If you want to use separate editor settings for your own Godot builds and official releases, you can enable `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. Compiling a headless/server build --------------------------------- diff --git a/development/compiling/compiling_with_mono.md b/development/compiling/compiling_with_mono.md index b90c828..f6a51e1 100644 --- a/development/compiling/compiling_with_mono.md +++ b/development/compiling/compiling_with_mono.md @@ -233,7 +233,7 @@ that is installed on your system. This likely won't be the case when targeting o platforms like Android, iOS and WebAssembly. You will have to build the Mono runtime yourself for those platforms. -We recommend using these `build scripts ( https://github.com/godotengine/godot-mono-builds )`_. +We recommend using these `build scripts ( https://github.com/godotengine/godot-mono-builds )`. They simplify this process but also include some patches needed for proper functioning with Godot. See the README on the link above for instructions on how to use the scripts. @@ -353,7 +353,7 @@ Godot will look for the cross-compiler executable in the AOT compilers folder. The location of this folder is `/Tools/aot-compilers/`. In order to build the cross-compilers we recommend using these -`build scripts ( https://github.com/godotengine/godot-mono-builds )`_. +`build scripts ( https://github.com/godotengine/godot-mono-builds )`. After building them, copy the executable to the Godot AOT compilers directory. The executable name is `-mono-sgen`, e.g.: `aarch64-apple-darwin-mono-sgen`. diff --git a/development/compiling/compiling_with_script_encryption_key.md b/development/compiling/compiling_with_script_encryption_key.md index b3bf480..0921cd1 100644 --- a/development/compiling/compiling_with_script_encryption_key.md +++ b/development/compiling/compiling_with_script_encryption_key.md @@ -25,7 +25,7 @@ Step by step ------------ 1. Generate a 256-bit AES key in hexadecimal format. You can use the aes-256-cbc variant from - `this service ( https://asecuritysite.com/encryption/keygen )`_. + `this service ( https://asecuritysite.com/encryption/keygen )`. Alternatively, you can generate it yourself using `OpenSSL ( https://www.openssl.org/ )` command-line tools: diff --git a/development/cpp/binding_to_external_libraries.md b/development/cpp/binding_to_external_libraries.md index df35b1c..e190286 100644 --- a/development/cpp/binding_to_external_libraries.md +++ b/development/cpp/binding_to_external_libraries.md @@ -8,7 +8,7 @@ Modules The Summator example in `doc_custom_modules_in_c++` is great for small, custom modules, but what if you want to use a larger, external library? -Let's look at an example using `Festival ( http://www.cstr.ed.ac.uk/projects/festival/ )`_, +Let's look at an example using `Festival ( http://www.cstr.ed.ac.uk/projects/festival/ )`, a speech synthesis (text-to-speech) library written in C++. To bind to an external library, set up a module directory similar to the Summator example: diff --git a/development/cpp/common_engine_methods_and_macros.md b/development/cpp/common_engine_methods_and_macros.md index b8d93e7..8385c25 100644 --- a/development/cpp/common_engine_methods_and_macros.md +++ b/development/cpp/common_engine_methods_and_macros.md @@ -194,7 +194,7 @@ Note: the invalid value in question to ease debugging. For internal error checking where displaying a human-readable message isn't - necessary, remove `_MSG` at the end of the macro name and don't supply a + necessary, remove `MSG` at the end of the macro name and don't supply a message argument. Also, always try to return processable data so the engine can keep running diff --git a/development/cpp/configuring_an_ide/android_studio.md b/development/cpp/configuring_an_ide/android_studio.md index 9f10ed7..1bb0f8a 100644 --- a/development/cpp/configuring_an_ide/android_studio.md +++ b/development/cpp/configuring_an_ide/android_studio.md @@ -3,8 +3,8 @@ Android Studio ============== -`Android Studio ( https://developer.android.com/studio )`_ is a free -`JetBrains ( https://www.jetbrains.com/ )`_ IDE for Android development. +`Android Studio ( https://developer.android.com/studio )` is a free +`JetBrains ( https://www.jetbrains.com/ )` IDE for Android development. It has a feature-rich editor which supports Java and C/C++. It can be used to work on Godot's core engine as well as the Android platform codebase. diff --git a/development/cpp/configuring_an_ide/clion.md b/development/cpp/configuring_an_ide/clion.md index 5118998..9c88730 100644 --- a/development/cpp/configuring_an_ide/clion.md +++ b/development/cpp/configuring_an_ide/clion.md @@ -3,8 +3,8 @@ CLion ===== -`CLion ( https://www.jetbrains.com/clion/ )`_ is a commercial -`JetBrains ( https://www.jetbrains.com/ )`_ IDE for C++. +`CLion ( https://www.jetbrains.com/clion/ )` is a commercial +`JetBrains ( https://www.jetbrains.com/ )` IDE for C++. Importing the project --------------------- diff --git a/development/cpp/configuring_an_ide/code_blocks.md b/development/cpp/configuring_an_ide/code_blocks.md index dc308ff..01715b5 100644 --- a/development/cpp/configuring_an_ide/code_blocks.md +++ b/development/cpp/configuring_an_ide/code_blocks.md @@ -3,7 +3,7 @@ Code::Blocks ============ -`Code::Blocks ( https://codeblocks.org/ )`_ is a free, open source, cross platform IDE. +`Code::Blocks ( https://codeblocks.org/ )` is a free, open source, cross platform IDE. Creating a new project ---------------------- diff --git a/development/cpp/configuring_an_ide/index.md b/development/cpp/configuring_an_ide/index.md index 81d7aae..d6d0d50 100644 --- a/development/cpp/configuring_an_ide/index.md +++ b/development/cpp/configuring_an_ide/index.md @@ -1,7 +1,7 @@ Configuring an IDE ================== -We assume that you have already `cloned ( https://github.com/godotengine/godot )`_ +We assume that you have already `cloned ( https://github.com/godotengine/godot )` and `compiled connect("enter_tree", this, "_node_entered_tree") -The method `_node_entered_tree` must be registered to the class using +The method `node_entered_tree` must be registered to the class using `ClassDB::bind_method` (explained before). -Adding signals to a class is done in `_bind_methods`, using the +Adding signals to a class is done in `bind_methods`, using the `ADD_SIGNAL` macro, for example: .. code-block:: cpp @@ -241,7 +241,7 @@ Adding signals to a class is done in `_bind_methods`, using the Notifications ------------- -All objects in Godot have a `_notification` +All objects in Godot have a `notification` method that allows it to respond to engine level callbacks that may relate to it. More information can be found on the `doc_godot_notifications` page. diff --git a/development/editor/creating_icons.md b/development/editor/creating_icons.md index 52b1e7d..ba63695 100644 --- a/development/editor/creating_icons.md +++ b/development/editor/creating_icons.md @@ -12,7 +12,7 @@ Creating icons ~~~~~~~~~~~~~~ To create new icons, you first need a vector graphics editor installed. -For instance, you can use the open source `Inkscape ( https://inkscape.org/ )`_ editor. +For instance, you can use the open source `Inkscape ( https://inkscape.org/ )` editor. Clone the `godot` repository containing all the editor icons: diff --git a/development/file_formats/tscn.md b/development/file_formats/tscn.md index a64998c..bc24bf6 100644 --- a/development/file_formats/tscn.md +++ b/development/file_formats/tscn.md @@ -16,7 +16,7 @@ This reduces the data size and speeds up loading, as binary formats are faster to load compared to text-based formats. For those looking for a complete description, the parsing is handled in the file -`resource_format_text.cpp ( https://github.com/godotengine/godot/blob/master/scene/resources/resource_format_text.cpp )`_ +`resource_format_text.cpp ( https://github.com/godotengine/godot/blob/master/scene/resources/resource_format_text.cpp )` in the `ResourceFormatLoaderText` class. File structure diff --git a/getting_started/first_2d_game/03.coding_the_player.md b/getting_started/first_2d_game/03.coding_the_player.md index 605d79e..e567cdb 100644 --- a/getting_started/first_2d_game/03.coding_the_player.md +++ b/getting_started/first_2d_game/03.coding_the_player.md @@ -45,7 +45,7 @@ value written in the script. ![](img/export_variable.png) -The `_ready()` function is called when a node enters the scene tree, which is +The `ready()` function is called when a node enters the scene tree, which is a good time to find the size of the game window: ``` @@ -53,8 +53,8 @@ a good time to find the size of the game window: screen_size = get_viewport_rect().size ``` -Now we can use the `_process()` function to define what the player will do. -`_process()` is called every frame, so we'll use it to update elements of our +Now we can use the `process()` function to define what the player will do. +`process()` is called every frame, so we'll use it to update elements of our game, which we expect will change often. For the player, we need to do the following: @@ -151,7 +151,7 @@ We also check whether the player is moving so we can call `play()` or Now that we have a movement direction, we can update the player's position. We can also use `clamp()` to prevent it from leaving the screen. *Clamping* a value means restricting it to a given range. Add the following to the bottom of -the `_process` function (make sure it's not indented under the `else`): +the `process` function (make sure it's not indented under the `else`): gdscript GDScript @@ -161,7 +161,7 @@ gdscript GDScript position.y = clamp(position.y, 0, screen_size.y) ``` -.. tip:: The `delta` parameter in the `_process()` function refers to the *frame +.. tip:: The `delta` parameter in the `process()` function refers to the *frame length* - the amount of time that the previous frame took to complete. Using this value ensures that your movement will remain consistent even if the frame rate changes. @@ -187,7 +187,7 @@ AnimatedSprite is playing based on its direction. We have the "walk" animation, which shows the player walking to the right. This animation should be flipped horizontally using the `flip_h` property for left movement. We also have the "up" animation, which should be flipped vertically with `flip_v` for downward -movement. Let's place this code at the end of the `_process()` function: +movement. Let's place this code at the end of the `process()` function: gdscript GDScript @@ -226,7 +226,7 @@ directions. capital "W" in the code. When you're sure the movement is working correctly, add this line to -`_ready()`, so the player will be hidden when the game starts: +`ready()`, so the player will be hidden when the game starts: gdscript GDScript diff --git a/getting_started/first_2d_game/04.creating_the_enemy.md b/getting_started/first_2d_game/04.creating_the_enemy.md index eaf5b2f..22bbf0e 100644 --- a/getting_started/first_2d_game/04.creating_the_enemy.md +++ b/getting_started/first_2d_game/04.creating_the_enemy.md @@ -64,7 +64,7 @@ gdscript GDScript extends RigidBody2D ``` -Now let's look at the rest of the script. In `_ready()` we play the animation +Now let's look at the rest of the script. In `ready()` we play the animation and randomly choose one of the three animation types: gdscript GDScript diff --git a/getting_started/first_2d_game/05.the_main_game_scene.md b/getting_started/first_2d_game/05.the_main_game_scene.md index 8eadebf..75c49a3 100644 --- a/getting_started/first_2d_game/05.the_main_game_scene.md +++ b/getting_started/first_2d_game/05.the_main_game_scene.md @@ -144,7 +144,7 @@ gdscript GDScript $ScoreTimer.start() ``` -In `_on_MobTimer_timeout()`, we will create a mob instance, pick a random +In `on_MobTimer_timeout()`, we will create a mob instance, pick a random starting location along the `Path2D`, and set the mob in motion. The `PathFollow2D` node will automatically rotate as it follows the path, so we will use that to select the mob's direction as well as its position. @@ -194,7 +194,7 @@ Testing the scene ~~~~~~~~~~~~~~~~~ Let's test the scene to make sure everything is working. Add this `new_game` -call to `_ready()`: +call to `ready()`: gdscript GDScript @@ -215,7 +215,7 @@ You should be able to move the player around, see mobs spawning, and see the player disappear when hit by a mob. When you're sure everything is working, remove the call to `new_game()` from -`_ready()`. +`ready()`. What's our game lacking? Some user interface. In the next lesson, we'll add a title screen and display the player's score. diff --git a/getting_started/first_2d_game/06.heads_up_display.md b/getting_started/first_2d_game/06.heads_up_display.md index bb207ad..43b699a 100644 --- a/getting_started/first_2d_game/06.heads_up_display.md +++ b/getting_started/first_2d_game/06.heads_up_display.md @@ -203,7 +203,7 @@ gdscript GDScript $HUD.show_game_over() ``` -Finally, add this to `_on_ScoreTimer_timeout()` to keep the display in sync +Finally, add this to `on_ScoreTimer_timeout()` to keep the display in sync with the changing score: gdscript GDScript diff --git a/getting_started/first_3d_game/03.player_movement_code.md b/getting_started/first_3d_game/03.player_movement_code.md index afc2764..4ff97a8 100644 --- a/getting_started/first_3d_game/03.player_movement_code.md +++ b/getting_started/first_3d_game/03.player_movement_code.md @@ -42,7 +42,7 @@ Note: screen's width, in 3D, it's a kilometer. Let's code the movement now. We start by calculating the input direction vector -using the global `Input` object, in `_physics_process()`. +using the global `Input` object, in `physics_process()`. gdscript GDScript @@ -64,16 +64,16 @@ gdscript GDScript direction.z -= 1 ``` -Here, we're going to make all calculations using the `_physics_process()` -virtual function. Like `_process()`, it allows you to update the node every +Here, we're going to make all calculations using the `physics_process()` +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 kinematic or rigid body. See also: - To learn more about the difference between `_process()` and - `_physics_process()`, see `doc_idle_and_physics_processing`. + To learn more about the difference between `process()` and + `physics_process()`, see `doc_idle_and_physics_processing`. We start by initializing a `direction` variable to `Vector3.ZERO`. Then, we check if the player is pressing one or more of the `move_*` inputs and update @@ -118,7 +118,7 @@ away from the *Player*. Then, we update the velocity. We have to calculate the ground velocity and the fall speed separately. Be sure to go back one tab so the lines are inside the -`_physics_process()` function but outside the condition we just wrote. +`physics_process()` function but outside the condition we just wrote. gdscript GDScript diff --git a/getting_started/first_3d_game/04.mob_scene.md b/getting_started/first_3d_game/04.mob_scene.md index 2edef3e..48ef22e 100644 --- a/getting_started/first_3d_game/04.mob_scene.md +++ b/getting_started/first_3d_game/04.mob_scene.md @@ -192,7 +192,7 @@ Connect the signal to the *Mob*. |image10| This will take you back to the script editor and add a new function for you, -`_on_VisibilityNotifier_screen_exited()`. From it, call the `queue_free()` +`on_VisibilityNotifier_screen_exited()`. From it, call the `queue_free()` method. This will destroy the mob instance when the *VisibilityNotifier* \'s box leaves the screen. diff --git a/getting_started/first_3d_game/05.spawning_mobs.md b/getting_started/first_3d_game/05.spawning_mobs.md index 58f90fd..473be75 100644 --- a/getting_started/first_3d_game/05.spawning_mobs.md +++ b/getting_started/first_3d_game/05.spawning_mobs.md @@ -204,7 +204,7 @@ Connect it to the *Main* node. |image24| This will take you back to the script, with a new empty -`_on_MobTimer_timeout()` function. +`on_MobTimer_timeout()` function. Let's code the mob spawning logic. We're going to: diff --git a/getting_started/first_3d_game/06.jump_and_squash.md b/getting_started/first_3d_game/06.jump_and_squash.md index 6225837..b849257 100644 --- a/getting_started/first_3d_game/06.jump_and_squash.md +++ b/getting_started/first_3d_game/06.jump_and_squash.md @@ -105,7 +105,7 @@ Jumping The jumping mechanic itself requires only two lines of code. Open the *Player* script. We need a value to control the jump's strength and update -`_physics_process()` to code the jump. +`physics_process()` to code the jump. After the line that defines `fall_acceleration`, at the top of the script, add the `jump_impulse`. @@ -118,7 +118,7 @@ gdscript GDScript export var jump_impulse = 20 ``` -Inside `_physics_process()`, add the following code before the line where we +Inside `physics_process()`, add the following code before the line where we called `move_and_slide()`. gdscript GDScript @@ -194,7 +194,7 @@ gdscript GDScript export var bounce_impulse = 16 ``` -Then, at the bottom of `_physics_process()`, add the following loop. With +Then, at the bottom of `physics_process()`, add the following loop. With `move_and_slide()`, Godot makes the body move sometimes multiple times in a row to smooth out the character's motion. So we have to loop over all collisions that may have happened. diff --git a/getting_started/first_3d_game/07.killing_player.md b/getting_started/first_3d_game/07.killing_player.md index ea6667f..dbd13df 100644 --- a/getting_started/first_3d_game/07.killing_player.md +++ b/getting_started/first_3d_game/07.killing_player.md @@ -97,7 +97,7 @@ connect its `hit` signal to the *Main* node. |image5| -Get and stop the timer in the `_on_Player_hit()` function. +Get and stop the timer in the `on_Player_hit()` function. gdscript GDScript diff --git a/getting_started/first_3d_game/08.score_and_replay.md b/getting_started/first_3d_game/08.score_and_replay.md index 019dfb9..12277f4 100644 --- a/getting_started/first_3d_game/08.score_and_replay.md +++ b/getting_started/first_3d_game/08.score_and_replay.md @@ -119,7 +119,7 @@ the script editor's left column. Alternatively, you can double-click the `Main.gd` file in the *FileSystem* dock. -At the bottom of the `_on_MobTimer_timeout()` function, add the following +At the bottom of the `on_MobTimer_timeout()` function, add the following line. gdscript GDScript @@ -132,9 +132,9 @@ gdscript GDScript ``` This line means that when the mob emits the `squashed` signal, the -*ScoreLabel* node will receive it and call the function `_on_Mob_squashed()`. +*ScoreLabel* node will receive it and call the function `on_Mob_squashed()`. -Head back to the `ScoreLabel.gd` script to define the `_on_Mob_squashed()` +Head back to the `ScoreLabel.gd` script to define the `on_Mob_squashed()` callback function. There, we increment the score and update the displayed text. @@ -227,7 +227,7 @@ We can now head to the code to show and hide the *Retry* node when the player dies and plays again. Open the script `Main.gd`. First, we want to hide the overlay at the start of -the game. Add this line to the `_ready()` function. +the game. Add this line to the `ready()` function. gdscript GDScript @@ -250,7 +250,7 @@ gdscript GDScript Finally, when the *Retry* node is visible, we need to listen to the player's input and restart the game if they press enter. To do this, we use the built-in -`_unhandled_input()` callback. +`unhandled_input()` callback. If the player pressed the predefined `ui_accept` input action and *Retry* is visible, we reload the current scene. diff --git a/getting_started/first_3d_game/09.adding_animations.md b/getting_started/first_3d_game/09.adding_animations.md index 3a779a5..78c1715 100644 --- a/getting_started/first_3d_game/09.adding_animations.md +++ b/getting_started/first_3d_game/09.adding_animations.md @@ -185,7 +185,7 @@ Open the *Player*'s script by clicking the script icon next to it. |image22| -In `_physics_process()`, after the line where we check the `direction` +In `physics_process()`, after the line where we check the `direction` vector, add the following code. gdscript GDScript @@ -205,7 +205,7 @@ This code makes it so when the player moves, we multiply the playback speed by We mentioned that the pivot could layer transforms on top of the animation. We can make the character arc when jumping using the following line of code. Add it -at the end of `_physics_process()`. +at the end of `physics_process()`. gdscript GDScript diff --git a/getting_started/first_3d_game/going_further.md b/getting_started/first_3d_game/going_further.md index 2c7f151..71b62c4 100644 --- a/getting_started/first_3d_game/going_further.md +++ b/getting_started/first_3d_game/going_further.md @@ -17,7 +17,7 @@ Where should you begin? Below, you’ll find a few pages to start exploring and build upon what you’ve learned so far. But before that, here’s a link to download a completed version of the project: -`( https://github.com/GDQuest/godot-3d-dodge-the-creeps )`_. +`( https://github.com/GDQuest/godot-3d-dodge-the-creeps )`. Exploring the manual -------------------- diff --git a/getting_started/introduction/godot_design_philosophy.md b/getting_started/introduction/godot_design_philosophy.md index b25c0aa..d93d7d6 100644 --- a/getting_started/introduction/godot_design_philosophy.md +++ b/getting_started/introduction/godot_design_philosophy.md @@ -17,7 +17,7 @@ your project, you need to try it out for yourself and understand its design and limitations. Please watch -`Godot explained in 5 minutes ( https://www.youtube.com/watch?v=KjX5llYZ5eQ )`_ +`Godot explained in 5 minutes ( https://www.youtube.com/watch?v=KjX5llYZ5eQ )` if you're looking for an overview of the engine's features. Object-oriented design and composition @@ -101,7 +101,7 @@ to create new code blocks.* Note that the 3D workspace doesn't feature as many tools as the 2D workspace. You'll need external programs or add-ons to edit terrains, animate complex characters, and so on. Godot provides a complete API to extend the editor's functionality using -game code. See `The Godot editor is a Godot game`_ below. +game code. See `The Godot editor is a Godot game` below. |image4| diff --git a/getting_started/introduction/introduction_to_godot.md b/getting_started/introduction/introduction_to_godot.md index 74c88b6..6408a93 100644 --- a/getting_started/introduction/introduction_to_godot.md +++ b/getting_started/introduction/introduction_to_godot.md @@ -45,7 +45,7 @@ powered by Godot, and so is the voxel RPG creator RPG in a box. ![](img/introduction_rpg_in_a_box.png) -You can find many more examples in the `official showcase videos`_. +You can find many more examples in the `official showcase videos`. How does it work and look? -------------------------- @@ -106,7 +106,7 @@ Godot relies on the object-oriented programming paradigm. Being comfortable with concepts such as classes and objects will help you code efficiently in it. If you are entirely new to programming, we recommend following the `CS50 open -courseware`_ from Harvard University. It's a great free course that will teach +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 countless hours and hurdles learning any game engine afterward. diff --git a/getting_started/introduction/learning_new_features.md b/getting_started/introduction/learning_new_features.md index 42c24e2..943d209 100644 --- a/getting_started/introduction/learning_new_features.md +++ b/getting_started/introduction/learning_new_features.md @@ -54,7 +54,7 @@ A class reference's page tells you: Note: If the manual or class reference is missing or has insufficient 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. You can Ctrl-click any underlined text like the name of a class, property, @@ -68,14 +68,14 @@ beyond the scope of Godot's documentation. If you're new to programming, we recommend two excellent free resources to get you started: 1. Harvard university offers a free courseware to learn to program, `CS50 - ( https://cs50.harvard.edu/x/ )`_. It will teach you programming + ( https://cs50.harvard.edu/x/ )`. It will teach you programming fundamentals, how code works, and how to think like a programmer. These skills are essential to become a game developer and learn any game engine efficiently. You can see this course as an investment that will save you time and trouble when you learn to create games. 2. If you prefer books, check out the free ebook `Automate The Boring Stuff With - Python ( https://automatetheboringstuff.com/ )`_ by Al Sweigart. + Python ( https://automatetheboringstuff.com/ )` by Al Sweigart. Learning with the community --------------------------- @@ -83,10 +83,10 @@ Learning with the community Godot has a growing community of users. If you're stuck on a problem or need help to better understand how to achieve something, you can ask other users for help on one of the many `active -communities ( https://godotengine.org/community )`_. +communities ( https://godotengine.org/community )`. The best place to ask for questions and find already answered ones is the -official `Questions & Answers ( https://godotengine.org/qa/ )`_ site. These +official `Questions & Answers ( https://godotengine.org/qa/ )` site. These responses show up in search engine results and get saved, allowing other users to benefit from discussions on the platform. Once you asked a question there, you can share its link on other social platforms. Before asking a question, be @@ -110,7 +110,7 @@ information: 3. If there is code involved, **share a code sample**. Other users won't be able to help you fix a problem without seeing your code. Share the code as text directly. To do so, you can copy and paste a short code snippet in a chat - box, or use a website like `Pastebin ( https://pastebin.com/ )`_ to share long + box, or use a website like `Pastebin ( https://pastebin.com/ )` to share long files. 4. **Share a screenshot** of your *Scene* dock along with your written code. Most of @@ -124,15 +124,15 @@ information: should have a built-in tool to take screenshots with the :kbd:`PrtSc` (Print Screen) key. - Alternatively, you can use a program like `ShareX ( https://getsharex.com/ )`_ - on Windows or `FlameShot ( https://flameshot.org/ )`_ on Linux. + Alternatively, you can use a program like `ShareX ( https://getsharex.com/ )` + on Windows or `FlameShot ( https://flameshot.org/ )` on Linux. 5. Sharing a video of your running game can also be really **useful to troubleshoot your game**. You can use programs like `OBS Studio - ( https://obsproject.com/ )`_ and `Screen to GIF - ( https://www.screentogif.com/ )`_ to capture your screen. + ( https://obsproject.com/ )` and `Screen to GIF + ( https://www.screentogif.com/ )` to capture your screen. - You can then use a service like `streamable ( https://streamable.com/ )`_ or a + You can then use a service like `streamable ( https://streamable.com/ )` or a cloud provider to upload and share your videos for free. 6. If you're not using the stable version of Godot, please mention the version diff --git a/getting_started/step_by_step/scripting_first_script.md b/getting_started/step_by_step/scripting_first_script.md index 6c610d9..ee2afc7 100644 --- a/getting_started/step_by_step/scripting_first_script.md +++ b/getting_started/step_by_step/scripting_first_script.md @@ -139,8 +139,8 @@ gdscript GDScript Let's break it down. The `func` keyword defines a new function named -`_init`. This is a special name for our class's constructor. The engine calls -`_init()` on every object or node upon creating it in memory, if you define +`init`. This is a special name for our class's constructor. The engine calls +`init()` on every object or node upon creating it in memory, if you define this function. Note: @@ -155,7 +155,7 @@ It should display "Hello, world!". ![](img/scripting_first_script_print_hello_world.png) -Delete the `_init()` function, so you're only left with the line `extends +Delete the `init()` function, so you're only left with the line `extends Sprite`. Turning around @@ -183,7 +183,7 @@ Note: to calculate angles in degrees instead. To move our icon, we need to update its position and rotation every frame in the -game loop. We can use the `_process()` virtual function of the `Node` class. +game loop. We can use the `process()` virtual function of the `Node` class. 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 time elapsed since the last frame. @@ -217,7 +217,7 @@ definition, and the indented blocks that follow are the function's content or instructions. Note: - Notice how `_process()`, like `_init()`, starts with a leading + Notice how `process()`, like `init()`, starts with a leading underscore. By convention, Godot's virtual functions, that is to say, built-in functions you can override to communicate with the engine, start with an underscore. @@ -228,7 +228,7 @@ from the class `Node2D`, which `Sprite` extends. It controls the rotation of our node and works with radians. .. tip:: In the code editor, you can ctrl-click on any built-in property or - function like `position`, `rotation`, or `_process` to open the + function like `position`, `rotation`, or `process` to open the corresponding documentation in a new tab. Run the scene to see the Godot icon turn in-place. @@ -238,7 +238,7 @@ Run the scene to see the Godot icon turn in-place. Moving forward ~~~~~~~~~~~~~~ -Let's now make the node move. Add the following two lines to the `_process()` +Let's now make the node move. Add the following two lines to the `process()` function, ensuring the new lines are indented the same way as the one before them. diff --git a/getting_started/step_by_step/scripting_languages.md b/getting_started/step_by_step/scripting_languages.md index 7703d7e..8f0cf71 100644 --- a/getting_started/step_by_step/scripting_languages.md +++ b/getting_started/step_by_step/scripting_languages.md @@ -59,7 +59,7 @@ with Godot. ![](img/scripting_gdscript.png) For C#, you will need an external code editor like -`VSCode ( https://code.visualstudio.com/ )`_ or Visual Studio. While C# support is +`VSCode ( https://code.visualstudio.com/ )` or Visual Studio. While C# support is now mature, you will find fewer learning resources for it compared to GDScript. That's why we recommend C# mainly to users who already have experience with the language. @@ -70,8 +70,8 @@ GDScript ~~~~~~~~ `GDScript( doc_gdscript )` is an -`object-oriented ( https://en.wikipedia.org/wiki/Object-oriented_programming )`_ and -`imperative ( https://en.wikipedia.org/wiki/Imperative_programming )`_ +`object-oriented ( https://en.wikipedia.org/wiki/Object-oriented_programming )` and +`imperative ( https://en.wikipedia.org/wiki/Imperative_programming )` programming language built for Godot. It's made by and for game developers to save you time coding games. Its features include: @@ -83,11 +83,11 @@ to save you time coding games. Its features include: linear algebra, a must for games. - Supports multiple threads as efficiently as statically typed languages. - No `garbage collection - ( https://en.wikipedia.org/wiki/Garbage_collection_(computer_science) )`_, as + ( https://en.wikipedia.org/wiki/Garbage_collection_(computer_science) )`, as this feature eventually gets in the way when creating games. The engine counts references and manages the memory for you in most cases by default, but you can also control memory if you need to. -- `Gradual typing ( https://en.wikipedia.org/wiki/Gradual_typing )`_. Variables +- `Gradual typing ( https://en.wikipedia.org/wiki/Gradual_typing )`. Variables have dynamic types by default, but you also can use type hints for strong type checks. @@ -113,7 +113,7 @@ Note: ~~~~~~~~~ As Microsoft's `C# -( https://en.wikipedia.org/wiki/C_Sharp_(programming_language) )`_ is a favorite +( https://en.wikipedia.org/wiki/C_Sharp_(programming_language) )` is a favorite amongst game developers, we officially support it. C# is a mature and flexible language with tons of libraries written for it. We could add support for it thanks to a generous donation from Microsoft. @@ -126,9 +126,9 @@ should be aware of its garbage collector. 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 - ( https://godotengine.org/download/ )`_ page. + ( https://godotengine.org/download/ )` page. -Since Godot uses the `Mono ( https://mono-project.com )`_ .NET runtime, in theory, +Since Godot uses the `Mono ( https://mono-project.com )` .NET runtime, in theory, 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, or ClojureCLR. However, C# is the only officially supported .NET option. diff --git a/getting_started/step_by_step/scripting_player_input.md b/getting_started/step_by_step/scripting_player_input.md index ae3d801..08f0fa1 100644 --- a/getting_started/step_by_step/scripting_player_input.md +++ b/getting_started/step_by_step/scripting_player_input.md @@ -15,8 +15,8 @@ To add this, we need to modify our `Sprite.gd` code. You have two main tools to process the player's input in Godot: -1. The built-in input callbacks, mainly `_unhandled_input()`. Like - `_process()`, it's a built-in virtual function that Godot calls every time +1. The built-in input callbacks, mainly `unhandled_input()`. Like + `process()`, it's a built-in virtual function that Godot calls every time the player presses a key. It's the tool you want to use to react to events that don't happen every frame, like pressing :kbd:`Space` to jump. To learn more about input callbacks, see `doc_inputevent`. @@ -27,7 +27,7 @@ You have two main tools to process the player's input in Godot: We're going to use the `Input` singleton here as we need to know if the player wants to turn or move every frame. -For turning, we should use a new variable: `direction`. In our `_process()` +For turning, we should use a new variable: `direction`. In our `process()` function, replace the `rotation += angular_speed * delta` line with the code below. @@ -138,12 +138,12 @@ properties, also called member variables. Besides variables, you can define functions, which, for the most part, will be your classes' methods. Godot provides several virtual functions you can define to connect your class -with the engine. These include `_process()`, to apply changes to the node -every frame, and `_unhandled_input()`, to receive input events like key and +with the engine. These include `process()`, to apply changes to the node +every frame, and `unhandled_input()`, to receive input events like key and button presses from the users. There are quite a few more. The `Input` singleton allows you to react to the players' input anywhere in -your code. In particular, you'll get to use it in the `_process()` loop. +your code. In particular, you'll get to use it in the `process()` loop. In the next lesson `doc_signals`, we'll build upon the relationship between scripts and nodes by having our nodes trigger code in scripts. diff --git a/getting_started/step_by_step/signals.md b/getting_started/step_by_step/signals.md index 085ad22..80d5653 100644 --- a/getting_started/step_by_step/signals.md +++ b/getting_started/step_by_step/signals.md @@ -18,7 +18,7 @@ connect to that signal and call a function when the event occurs. Signals are a delegation mechanism built into Godot that allows one game object to react to a change in another without them referencing one another. Using signals limits `coupling -( https://en.wikipedia.org/wiki/Coupling_(computer_programming) )`_ and keeps your +( https://en.wikipedia.org/wiki/Coupling_(computer_programming) )` and keeps your code flexible. For example, you might have a life bar on the screen that represents the @@ -142,7 +142,7 @@ connection. This feature is only available when connecting nodes in the editor. Let's replace the line with the `pass` keyword with code that'll toggle the node's motion. -Our Sprite moves thanks to code in the `_process()` function. Godot provides a +Our Sprite moves thanks to code in the `process()` function. Godot provides a method to toggle processing on and off: `Node.set_process() ( Node_method_set_process )`. Another method of the Node class, `is_processing()`, returns `true` if idle processing is active. We can use @@ -158,7 +158,7 @@ gdscript GDScript This function will toggle processing and, in turn, the icon's motion on and off upon pressing the button. -Before trying the game, we need to simplify our `_process()` function to move +Before trying the game, we need to simplify our `process()` function to move the node automatically and not wait for user input. Replace it with the following code, which we saw two lessons ago: @@ -252,7 +252,7 @@ editor, you would have to change the call to `get_node("BlinkingTimer")`. .. add seealso to a page that explains node features. -We can now connect the Timer to the Sprite in the `_ready()` function. +We can now connect the Timer to the Sprite in the `ready()` function. gdscript GDScript diff --git a/index.md b/index.md index c35d655..c1f8f56 100644 --- a/index.md +++ b/index.md @@ -10,16 +10,16 @@ Godot Docs – *3.5* branch .. tip:: This is the documentation for the 3.5 branch. Looking for the documentation of the current **development** branch? - `Have a look here ( https://docs.godotengine.org/en/latest )`_. + `Have a look here ( https://docs.godotengine.org/en/latest )`. You can also browse the documentation for the current stable - `3.4 ( https://docs.godotengine.org/en/3.4 )`_ branch. + `3.4 ( https://docs.godotengine.org/en/3.4 )` branch. .. only:: i18n Note: This documentation is translated from the `original English one - ( https://docs.godotengine.org/en/latest )`_ by community members - on `Weblate ( https://hosted.weblate.org/projects/godot-engine/godot-docs )`_. + ( https://docs.godotengine.org/en/latest )` by community members + on `Weblate ( https://hosted.weblate.org/projects/godot-engine/godot-docs )`. Depending on the translation effort's completion level, you may find paragraphs or whole pages which are still in English. You can @@ -53,12 +53,12 @@ Note: by letting us know! Submit an issue or pull request on the `GitHub repository - ( https://github.com/godotengine/godot-docs/issues )`_, + ( https://github.com/godotengine/godot-docs/issues )`, help us `translate the documentation - ( https://hosted.weblate.org/engage/godot-engine/ )`_ into your + ( https://hosted.weblate.org/engage/godot-engine/ )` into your language, or talk to us on the `#documentation` channel on the `Godot Contributors Chat - ( https://chat.godotengine.org/ )`_! + ( https://chat.godotengine.org/ )`! .. centered:: |weblate_widget| diff --git a/tutorials/2d/2d_lights_and_shadows.md b/tutorials/2d/2d_lights_and_shadows.md index 4f51a04..6f4b145 100644 --- a/tutorials/2d/2d_lights_and_shadows.md +++ b/tutorials/2d/2d_lights_and_shadows.md @@ -7,13 +7,13 @@ Introduction ------------ This tutorial explains how the 2D lighting works in the -`lights and shadows ( https://github.com/godotengine/godot-demo-projects/tree/master/2d/lights_and_shadows )`_ demo project. +`lights and shadows ( https://github.com/godotengine/godot-demo-projects/tree/master/2d/lights_and_shadows )` demo project. It begins with a brief description of the resources used in the final demo and then describes how to make a scene like the demo step by step. ![](img/light_shadow_main.png) -All the resources for this tutorial can be found in the `official demo repository ( https://github.com/godotengine/godot-demo-projects )`_ +All the resources for this tutorial can be found in the `official demo repository ( https://github.com/godotengine/godot-demo-projects )` on GitHub. I suggest you download it before starting. Alternatively, it can be downloaded from the Project Manager. Launch Godot and in the top bar select "Templates" and search for "2D Lights and Shadows Demo". @@ -25,19 +25,19 @@ For this demo we use four textures: two for the lights, one for the shadow caste and one for the background. I've included links to them all here if you want to download them separately from the demo. -The first is the background image (`background.png) ( https://raw.githubusercontent.com/godotengine/godot-demo-projects/master/2d/lights_and_shadows/background.png) )`_) +The first is the background image (`background.png) ( https://raw.githubusercontent.com/godotengine/godot-demo-projects/master/2d/lights_and_shadows/background.png) )`) used in the demo. You do not necessarily need a background, but we use one for the demo. -The second is a plain black image (`caster.png) ( https://raw.githubusercontent.com/godotengine/godot-demo-projects/master/2d/lights_and_shadows/caster.png) )`_) +The second is a plain black image (`caster.png) ( https://raw.githubusercontent.com/godotengine/godot-demo-projects/master/2d/lights_and_shadows/caster.png) )`) to use as our shadow caster object. For a top down game this could be a wall or any other object that casts a shadow. -Next is the light itself (`light.png) ( https://raw.githubusercontent.com/godotengine/godot-demo-projects/master/2d/lights_and_shadows/light.png) )`_). +Next is the light itself (`light.png) ( https://raw.githubusercontent.com/godotengine/godot-demo-projects/master/2d/lights_and_shadows/light.png) )`). If you click the link you will notice how large it is. The image you use for a light should cover the area you want your light to cover. This image is 1024x1024 pixels, so you should use it to cover 1024x1024 pixels in your game. -Lastly, we have the spotlight image (`spot.png) ( https://raw.githubusercontent.com/godotengine/godot-demo-projects/master/2d/lights_and_shadows/spot.png) )`_). +Lastly, we have the spotlight image (`spot.png) ( https://raw.githubusercontent.com/godotengine/godot-demo-projects/master/2d/lights_and_shadows/spot.png) )`). The demo uses a blob to show where the light is and the larger light image to show the effect of the light upon the rest of the scene. @@ -110,19 +110,19 @@ Step by step Now that we have covered the basics of the nodes being used, we can now walk step by step through the process of making a scene like the one found in the demo. -First add a `Sprite`_. For your game this can be any +First add a `Sprite`. For your game this can be any background you choose. For this style of shadow it is most likely to be a floor texture. ![](img/light_shadow_background.png) -Next create three `Light2D's`_. You can alter their +Next create three `Light2D's`. You can alter their color in the top section. By default shadows are turned off and the `mode` is set to `add`. This means that each light adds its own color to whatever is underneath. ![](img/light_shadow_all_lights_no_blob.png) Next add a child `Sprite` nodes, and set -the `Sprite's`_. Each of these +the `Sprite's`. Each of these should stay centered on the `Light` node. The blob is the image of the light itself while the `Light` shows the effect that the light has on the scene. The `LightOccluder2D's` @@ -151,7 +151,7 @@ This way we can show and hide them all at the same time. Each shadow caster is made of a `Sprite` child. For the demo the `Sprite` has a texture -set to the `caster image ( https://raw.githubusercontent.com/godotengine/godot-demo-projects/master/2d/lights_and_shadows/caster.png) )`_ and nothing else. The child `LightOccluder2D` is where all the magic happens. In a +set to the `caster image ( https://raw.githubusercontent.com/godotengine/godot-demo-projects/master/2d/lights_and_shadows/caster.png) )` and nothing else. The child `LightOccluder2D` is where all the magic happens. In a game the `Sprite` could be more than a black box; it could be an image of whatever object is casting the shadow: a wall, a magical chest, or anything else. @@ -198,7 +198,7 @@ section set `Enable` to `on`. This turns on shadows with hard edges like in the ![](img/light_shadow_filter0_pcf0.png) To give the shadows that nice, soft edge look we set the variables `filter`, `filter smooth`, and -`gradient length`. Godot supports `Percentage Closer Filtering ( https://developer.nvidia.com/gpugems/GPUGems/gpugems_ch11.html )`_ +`gradient length`. Godot supports `Percentage Closer Filtering ( https://developer.nvidia.com/gpugems/GPUGems/gpugems_ch11.html )` (PCF), which takes multiple samples of the shadow map around a pixel and blurs them to create a smooth shadow effect. The higher the number of samples the smoother the shadow will look, but the slower it will run. That is why Godot provides 3-13 samples by default and allows you to choose. diff --git a/tutorials/2d/custom_drawing_in_2d.md b/tutorials/2d/custom_drawing_in_2d.md index e609ba6..f4e3727 100644 --- a/tutorials/2d/custom_drawing_in_2d.md +++ b/tutorials/2d/custom_drawing_in_2d.md @@ -32,7 +32,7 @@ Drawing Add a script to any `CanvasItem` derived node, like `Control` or -`Node2D`. Then override the `_draw()` function. +`Node2D`. Then override the `draw()` function. gdscript GDScript @@ -50,12 +50,12 @@ class reference. There are plenty of them. Updating -------- -The `_draw()` function is only called once, and then the draw commands +The `draw()` function is only called once, and then the draw commands are cached and remembered, so further calls are unnecessary. If re-drawing is required because a state or something else changed, call `CanvasItem.update()` -in that same node and a new `_draw()` call will happen. +in that same node and a new `draw()` call will happen. Here is a little more complex example, a texture variable that will be redrawn if modified: @@ -78,7 +78,7 @@ gdscript GDScript ``` In some cases, it may be desired to draw every frame. For this, just -call `update()` from the `_process()` callback, like this: +call `update()` from the `process()` callback, like this: gdscript GDScript @@ -170,7 +170,7 @@ Draw the arc on the screen ^^^^^^^^^^^^^^^^^^^^^^^^^^ We now have a function that draws stuff on the screen; -it is time to call it inside the `_draw()` function: +it is time to call it inside the `draw()` function: gdscript GDScript @@ -245,7 +245,7 @@ they reach the maximum integer value Godot can manage (`2^31 - 1`). When this happens, Godot may crash or produce unexpected behavior. Finally, we must not forget to call the `update()` function, which automatically -calls `_draw()`. This way, you can control when you want to refresh the frame. +calls `draw()`. This way, you can control when you want to refresh the frame. gdscript GDScript @@ -261,7 +261,7 @@ gdscript GDScript update() ``` -Also, don't forget to modify the `_draw()` function to make use of these variables: +Also, don't forget to modify the `draw()` function to make use of these variables: gdscript GDScript @@ -279,14 +279,14 @@ It works, but the arc is rotating insanely fast! What's wrong? The reason is that your GPU is actually displaying the frames as fast as it can. We need to "normalize" the drawing by this speed; to achieve that, we have to make -use of the `delta` parameter of the `_process()` function. `delta` contains the +use of the `delta` parameter of the `process()` function. `delta` contains the time elapsed between the two last rendered frames. It is generally small (about 0.0003 seconds, but this depends on your hardware), so using `delta` to control your drawing ensures that your program runs at the same speed on everybody's hardware. In our case, we simply need to multiply our `rotation_angle` variable by `delta` -in the `_process()` function. This way, our 2 angles will be increased by a much +in the `process()` function. This way, our 2 angles will be increased by a much smaller value, which directly depends on the rendering speed. gdscript GDScript @@ -317,7 +317,7 @@ There is also no `antialiased` parameter available in As a workaround, install and use the `Antialiased Line2D add-on ( https://github.com/godot-extended-libraries/godot-antialiased-line2d )` (which also supports antialiased Polygon2D drawing). Note that this add-on relies -on high-level nodes, rather than low-level `_draw()` functions. +on high-level nodes, rather than low-level `draw()` functions. Tools ----- diff --git a/tutorials/2d/using_tilemaps.md b/tutorials/2d/using_tilemaps.md index cc13a91..e38c5f0 100644 --- a/tutorials/2d/using_tilemaps.md +++ b/tutorials/2d/using_tilemaps.md @@ -21,7 +21,7 @@ Project setup ------------- This demo will use the following tiles taken from Kenney's "Abstract Platformer" -art pack. You can find the complete set `here ( https://kenney.nl/assets/abstract-platformer )`_ +art pack. You can find the complete set `here ( https://kenney.nl/assets/abstract-platformer )` but for this demo we'll stick to this small set. ![](img/tilesheet.png) diff --git a/tutorials/3d/csg_tools.md b/tutorials/3d/csg_tools.md index baab92e..9b9fede 100644 --- a/tutorials/3d/csg_tools.md +++ b/tutorials/3d/csg_tools.md @@ -209,7 +209,7 @@ another CSGCylinder and adjust the dimensions to use it as a pole. ![](img/csg_lamp_pole_stand.png) We will use a CSGPolygon for the lampshade. Use the **Spin** mode for the -CSGPolygon and draw a `trapezoid ( https://en.wikipedia.org/wiki/Trapezoid )`_ +CSGPolygon and draw a `trapezoid ( https://en.wikipedia.org/wiki/Trapezoid )` while in **Front View** (numeric keypad 1); this shape will extrude around the origin and form the lampshade. diff --git a/tutorials/3d/lights_and_shadows.md b/tutorials/3d/lights_and_shadows.md index f060fc1..d6e8575 100644 --- a/tutorials/3d/lights_and_shadows.md +++ b/tutorials/3d/lights_and_shadows.md @@ -22,8 +22,8 @@ in the `doc_spatial_material` tutorial. Light nodes ----------- -There are three types of light nodes: `Directional light`_, -`Omni light`_ and `Spot light`_. Let's take a look at the common +There are three types of light nodes: `Directional light`, +`Omni light` and `Spot light`. Let's take a look at the common parameters for lights: ![](img/light_params.png) diff --git a/tutorials/3d/portals/advanced_room_and_portal_usage.md b/tutorials/3d/portals/advanced_room_and_portal_usage.md index 77c794c..b80d861 100644 --- a/tutorials/3d/portals/advanced_room_and_portal_usage.md +++ b/tutorials/3d/portals/advanced_room_and_portal_usage.md @@ -104,7 +104,7 @@ Note: This is perfect for improving performance in open world games. Often your buildings can be scenes (including the rooms and portals) that can be reused. When viewed from the outside, interiors will mostly be culled, and when viewing from the inside other buildings and most of the outside will be culled. The same goes for other players and objects that are inside and outside the buildings. -*Scene is 'Diorama Eco scene' by Odo, with slight changes for illustration purposes.* `CC Attribution ( https://creativecommons.org/licenses/by/4.0/ )`_ +*Scene is 'Diorama Eco scene' by Odo, with slight changes for illustration purposes.* `CC Attribution ( https://creativecommons.org/licenses/by/4.0/ )` Internal room scenes ^^^^^^^^^^^^^^^^^^^^ diff --git a/tutorials/3d/portals/rooms_and_portals_example.md b/tutorials/3d/portals/rooms_and_portals_example.md index f4707a9..0b84fc4 100644 --- a/tutorials/3d/portals/rooms_and_portals_example.md +++ b/tutorials/3d/portals/rooms_and_portals_example.md @@ -2,7 +2,7 @@ Rooms and Portals example ========================= Download this tutorial project: -`Simple Portals Example ( https://github.com/lawnjelly/godot-demo-projects/tree/portals_simple_demo/3d/portals/room_and_portals_simple_example )`_ +`Simple Portals Example ( https://github.com/lawnjelly/godot-demo-projects/tree/portals_simple_demo/3d/portals/room_and_portals_simple_example )` . Introduction @@ -85,7 +85,7 @@ Some things to try ^^^^^^^^^^^^^^^^^^ - Create different types of geometry. CSG nodes, Particle systems, and Multimeshes are all supported by the portal system. -- Try creating a Camera and adding it to the scene. If you run the scene you will notice that the portal culling is not active. This is because the `room graph` must be created each time you load a level, by converting the rooms. Instead of using a button in the editor, in real games you call a function in the RoomManager to convert the level, called `rooms_convert()`. Try this out with a script, perhaps running within a `_ready()` function. +- Try creating a Camera and adding it to the scene. If you run the scene you will notice that the portal culling is not active. This is because the `room graph` must be created each time you load a level, by converting the rooms. Instead of using a button in the editor, in real games you call a function in the RoomManager to convert the level, called `rooms_convert()`. Try this out with a script, perhaps running within a `ready()` function. - The geometry you created so far is all `STATIC` (non-moving). If you look in the inspector for geometry nodes, you will see they derive from `CullInstance`. Here you can set the **Portal Mode** for objects in the portal system. This determines how the node is processed. - If you now write a script to move one of your objects within a room and view it through a Camera as the scene runs, you may notice that the object gets culled incorrectly. This is because `STATIC` objects are assumed not to move in the system. If you instead change the object to `DYNAMIC`, it should now update the culling correctly. - There are several `portal_modes`, these are described in the main documentation. diff --git a/tutorials/3d/procedural_geometry/arraymesh.md b/tutorials/3d/procedural_geometry/arraymesh.md index 2cadacd..846bd4d 100644 --- a/tutorials/3d/procedural_geometry/arraymesh.md +++ b/tutorials/3d/procedural_geometry/arraymesh.md @@ -84,7 +84,7 @@ from code without creating one. Next, add a script to the MeshInstance. -Under `_ready()`, create a new Array. +Under `ready()`, create a new Array. gdscript GDScript diff --git a/tutorials/3d/using_transforms.md b/tutorials/3d/using_transforms.md index f2e0868..a434733 100644 --- a/tutorials/3d/using_transforms.md +++ b/tutorials/3d/using_transforms.md @@ -74,7 +74,7 @@ The camera actually rotated the opposite direction! There are a few reasons this may happen: * Rotations don't map linearly to orientation, so interpolating them does not always result in the shortest path (i.e., to go from `270` to `0` degrees is not the same as going from `270` to `360`, even though the angles are equivalent). -* Gimbal lock is at play (first and last rotated axis align, so a degree of freedom is lost). See `Wikipedia's page on Gimbal Lock ( https://en.wikipedia.org/wiki/Gimbal_lock )`_ for a detailed explanation of this problem. +* Gimbal lock is at play (first and last rotated axis align, so a degree of freedom is lost). See `Wikipedia's page on Gimbal Lock ( https://en.wikipedia.org/wiki/Gimbal_lock )` for a detailed explanation of this problem. Say no to Euler angles ====================== @@ -298,4 +298,4 @@ Transforms are your friend For most beginners, getting used to working with transforms can take some time. However, once you get used to them, you will appreciate their simplicity and power. -Don't hesitate to ask for help on this topic in any of Godot's `online communities ( https://godotengine.org/community )`_ and, once you become confident enough, please help others! +Don't hesitate to ask for help on this topic in any of Godot's `online communities ( https://godotengine.org/community )` and, once you become confident enough, please help others! diff --git a/tutorials/animation/animation_tree.md b/tutorials/animation/animation_tree.md index b2bebd2..7970037 100644 --- a/tutorials/animation/animation_tree.md +++ b/tutorials/animation/animation_tree.md @@ -29,7 +29,7 @@ At the end, the imported Godot scene will contain the animations in a `Animation As you rarely use imported scenes directly in Godot (they are either instantiated or inherited from), you can place the `AnimationTree` node in your new scene which contains the imported one. Afterwards, point the `AnimationTree` node to the `AnimationPlayer` that was created in the imported scene. -This is how it's done in the `Third Person Shooter demo ( https://github.com/godotengine/tps-demo )`_, for reference: +This is how it's done in the `Third Person Shooter demo ( https://github.com/godotengine/tps-demo )`, for reference: ![](img/animtree1.png) diff --git a/tutorials/assets_pipeline/importing_scenes.md b/tutorials/assets_pipeline/importing_scenes.md index 6432c36..cea22e9 100644 --- a/tutorials/assets_pipeline/importing_scenes.md +++ b/tutorials/assets_pipeline/importing_scenes.md @@ -77,7 +77,7 @@ Exporting DAE files from Blender Blender has built-in COLLADA support, but it does not work properly for the needs of game engines and should not be used as is. -Godot provides a `Blender plugin ( https://github.com/godotengine/collada-exporter )`_ +Godot provides a `Blender plugin ( https://github.com/godotengine/collada-exporter )` that will correctly export COLLADA scenes for use in Godot. It does not work in Blender 2.8 or newer, but there are plans to update it in the future. diff --git a/tutorials/audio/audio_streams.md b/tutorials/audio/audio_streams.md index d3af899..3a686c6 100644 --- a/tutorials/audio/audio_streams.md +++ b/tutorials/audio/audio_streams.md @@ -100,6 +100,6 @@ Both nodes have this property, which must be enabled manually: ![](img/audio_stream_doppler.png) Enable it by setting it depending on how objects will be moved: -use **Idle** for objects moved using `_process`, or **Physics** -for objects moved using `_physics_process`. The tracking will +use **Idle** for objects moved using `process`, or **Physics** +for objects moved using `physics_process`. The tracking will happen automatically. diff --git a/tutorials/audio/recording_with_microphone.md b/tutorials/audio/recording_with_microphone.md index 8419616..d4460bb 100644 --- a/tutorials/audio/recording_with_microphone.md +++ b/tutorials/audio/recording_with_microphone.md @@ -8,7 +8,7 @@ iOS. A simple demo is included in the official demo projects and will be used as support for this tutorial: -`( https://github.com/godotengine/godot-demo-projects/tree/master/audio/mic_record )`_. +`( https://github.com/godotengine/godot-demo-projects/tree/master/audio/mic_record )`. You will need to enable audio input in the project settings, or you'll just get empty audio files. diff --git a/tutorials/best_practices/data_preferences.md b/tutorials/best_practices/data_preferences.md index 2033a97..a603413 100644 --- a/tutorials/best_practices/data_preferences.md +++ b/tutorials/best_practices/data_preferences.md @@ -11,7 +11,7 @@ Note: This article makes references to "[something]-time" operations. This terminology comes from algorithm analysis' - `Big O Notation ( https://rob-bell.net/2009/06/a-beginners-guide-to-big-o-notation/ )`_. + `Big O Notation ( https://rob-bell.net/2009/06/a-beginners-guide-to-big-o-notation/ )`. Long-story short, it describes the worst-case scenario of runtime length. In laymen's terms: @@ -41,7 +41,7 @@ Array vs. Dictionary vs. Object ------------------------------- Godot stores all variables in the scripting API in the -`Variant ( https://docs.godotengine.org/en/latest/development/cpp/variant_class.html )`_ +`Variant ( https://docs.godotengine.org/en/latest/development/cpp/variant_class.html )` class. Variants can store Variant-compatible data structures such as `Array` as well as `Object` s. diff --git a/tutorials/best_practices/godot_interfaces.md b/tutorials/best_practices/godot_interfaces.md index b148958..aad2d0c 100644 --- a/tutorials/best_practices/godot_interfaces.md +++ b/tutorials/best_practices/godot_interfaces.md @@ -160,10 +160,10 @@ following checks, in order: - If not found, it does an explicit check to see if the user wants to access the "script" or "meta" properties. -- If not, it checks for a `_set`/`_get` implementation (depending on type +- If not, it checks for a `set`/`get` implementation (depending on type of access) in the CanvasItem and its inherited types. These methods can execute logic that gives the impression that the Object has a property. This - is also the case with the `_get_property_list` method. + is also the case with the `get_property_list` method. - Note that this happens even for non-legal symbol names such as in the case of `TileSet`'s "1/tile_name" property. This diff --git a/tutorials/best_practices/godot_notifications.md b/tutorials/best_practices/godot_notifications.md index 1eb93c7..73a8715 100644 --- a/tutorials/best_practices/godot_notifications.md +++ b/tutorials/best_practices/godot_notifications.md @@ -4,26 +4,26 @@ Godot notifications =================== Every Object in Godot implements a -`_notification` method. Its purpose is to +`notification` method. Its purpose is to allow the Object to respond to a variety of engine-level callbacks that may relate to it. For example, if the engine tells a `CanvasItem` to "draw", it will call -`_notification(NOTIFICATION_DRAW)`. +`notification(NOTIFICATION_DRAW)`. Some of these notifications, like draw, are useful to override in scripts. So much so that Godot exposes many of them with dedicated functions: -- `_ready()` : NOTIFICATION_READY +- `ready()` : NOTIFICATION_READY -- `_enter_tree()` : NOTIFICATION_ENTER_TREE +- `enter_tree()` : NOTIFICATION_ENTER_TREE -- `_exit_tree()` : NOTIFICATION_EXIT_TREE +- `exit_tree()` : NOTIFICATION_EXIT_TREE -- `_process(delta)` : NOTIFICATION_PROCESS +- `process(delta)` : NOTIFICATION_PROCESS -- `_physics_process(delta)` : NOTIFICATION_PHYSICS_PROCESS +- `physics_process(delta)` : NOTIFICATION_PHYSICS_PROCESS -- `_draw()` : NOTIFICATION_DRAW +- `draw()` : NOTIFICATION_DRAW What users might *not* realize is that notifications exist for types other than Node alone: @@ -55,7 +55,7 @@ methods, but are still quite useful. *before* its appearance. One can access all these custom notifications from the universal -`_notification` method. +`notification` method. Note: @@ -63,7 +63,7 @@ Note: overridden by scripts. A classic example is the - `_init` method in Object. While it has no + `init` method in Object. While it has no `NOTIFICATION_*` equivalent, the engine still calls the method. Most languages (except C#) rely on it as a constructor. @@ -73,7 +73,7 @@ virtual functions? _process vs. _physics_process vs. \*_input ------------------------------------------ -Use `_process` when one needs a framerate-dependent deltatime between +Use `process` when one needs a framerate-dependent deltatime between frames. If code that updates object data needs to update as often as possible, this is the right place. Recurring logic checks and data caching often execute here, but it comes down to the frequency at which one needs @@ -92,14 +92,14 @@ gdscript GDScript yield($Timer, "timeout") ``` -Use `_physics_process` when one needs a framerate-independent deltatime +Use `physics_process` when one needs a framerate-independent deltatime between frames. If code needs consistent updates over time, regardless of how fast or slow time advances, this is the right place. Recurring kinematic and object transform operations should execute here. While it is possible, to achieve the best performance, one should avoid -making input checks during these callbacks. `_process` and -`_physics_process` will trigger at every opportunity (they do not "rest" by +making input checks during these callbacks. `process` and +`physics_process` will trigger at every opportunity (they do not "rest" by default). In contrast, `*_input` callbacks will trigger only on frames in which the engine has actually detected the input. @@ -129,8 +129,8 @@ _init vs. initialization vs. export If the script initializes its own node subtree, without a scene, that code should execute here. Other property or SceneTree-independent -initializations should also run here. This triggers before `_ready` or -`_enter_tree`, but after a script creates and initializes its properties. +initializations should also run here. This triggers before `ready` or +`enter_tree`, but after a script creates and initializes its properties. Scripts have three types of property assignments that can occur during instantiation: @@ -174,16 +174,16 @@ _ready vs. _enter_tree vs. NOTIFICATION_PARENTED ------------------------------------------------ When instantiating a scene connected to the first executed scene, Godot will -instantiate nodes down the tree (making `_init` calls) and build the tree -going downwards from the root. This causes `_enter_tree` calls to cascade -down the tree. Once the tree is complete, leaf nodes call `_ready`. A node +instantiate nodes down the tree (making `init` calls) and build the tree +going downwards from the root. This causes `enter_tree` calls to cascade +down the tree. Once the tree is complete, leaf nodes call `ready`. A node will call this method once all child nodes have finished calling theirs. This then causes a reverse cascade going up back to the tree's root. When instantiating a script or a standalone scene, nodes are not -added to the SceneTree upon creation, so no `_enter_tree` callbacks -trigger. Instead, only the `_init` call occurs. When the scene is added -to the SceneTree, the `_enter_tree` and `_ready` calls occur. +added to the SceneTree upon creation, so no `enter_tree` callbacks +trigger. Instead, only the `init` call occurs. When the scene is added +to the SceneTree, the `enter_tree` and `ready` calls occur. If one needs to trigger behavior that occurs as nodes parent to another, regardless of whether it occurs as part of the main/active scene or not, one diff --git a/tutorials/best_practices/introduction_best_practices.md b/tutorials/best_practices/introduction_best_practices.md index 0610ac0..d279133 100644 --- a/tutorials/best_practices/introduction_best_practices.md +++ b/tutorials/best_practices/introduction_best_practices.md @@ -26,5 +26,5 @@ Note: The best practices in Godot rely on Object-Oriented design principles. We use tools like the `single responsibility - ( https://en.wikipedia.org/wiki/Single_responsibility_principle )`_ principle and - `encapsulation ( https://en.wikipedia.org/wiki/Encapsulation_(computer_programming) )`_. + ( https://en.wikipedia.org/wiki/Single_responsibility_principle )` principle and + `encapsulation ( https://en.wikipedia.org/wiki/Encapsulation_(computer_programming) )`. diff --git a/tutorials/best_practices/scene_organization.md b/tutorials/best_practices/scene_organization.md index 11cec3b..c5f31bd 100644 --- a/tutorials/best_practices/scene_organization.md +++ b/tutorials/best_practices/scene_organization.md @@ -28,7 +28,7 @@ it. One of the biggest things to consider in OOP is maintaining focused, singular-purpose classes with -`loose coupling ( https://en.wikipedia.org/wiki/Loose_coupling )`_ +`loose coupling ( https://en.wikipedia.org/wiki/Loose_coupling )` to other parts of the codebase. This keeps the size of objects small (for maintainability) and improves their reusability. @@ -41,7 +41,7 @@ themselves. If a scene must interact with an external context, experienced developers recommend the use of -`Dependency Injection ( https://en.wikipedia.org/wiki/Dependency_injection )`_. +`Dependency Injection ( https://en.wikipedia.org/wiki/Dependency_injection )`. This technique involves having a high-level API provide the dependencies of the low-level API. Why do this? Because classes which rely on their external environment can inadvertently trigger bugs and unexpected behavior. @@ -159,7 +159,7 @@ Warning: To avoid creating and maintaining such documentation, one converts the dependent node ("child" above) into a tool script that implements - `_get_configuration_warning()`. + `get_configuration_warning()`. Returning a non-empty string from it will make the Scene dock generate a warning icon with the string as a tooltip by the node. This is the same icon that appears for nodes such as the @@ -185,10 +185,10 @@ adversely effecting other classes. Scripts and scenes, as extensions of engine classes, should abide by *all* OOP principles. Examples include... -- `SOLID ( https://en.wikipedia.org/wiki/SOLID )`_ -- `DRY ( https://en.wikipedia.org/wiki/Don%27t_repeat_yourself )`_ -- `KISS ( https://en.wikipedia.org/wiki/KISS_principle )`_ -- `YAGNI ( https://en.wikipedia.org/wiki/You_aren%27t_gonna_need_it )`_ +- `SOLID ( https://en.wikipedia.org/wiki/SOLID )` +- `DRY ( https://en.wikipedia.org/wiki/Don%27t_repeat_yourself )` +- `KISS ( https://en.wikipedia.org/wiki/KISS_principle )` +- `YAGNI ( https://en.wikipedia.org/wiki/You_aren%27t_gonna_need_it )` Choosing a node tree structure ------------------------------ diff --git a/tutorials/editor/external_editor.md b/tutorials/editor/external_editor.md index 9054b8b..7ab1cd5 100644 --- a/tutorials/editor/external_editor.md +++ b/tutorials/editor/external_editor.md @@ -56,5 +56,5 @@ Official editor plugins We have official plugins for the following code editors: -- `Visual Studio Code ( https://github.com/godotengine/godot-vscode-plugin )`_ -- `Emacs ( https://github.com/godotengine/emacs-gdscript-mode )`_ +- `Visual Studio Code ( https://github.com/godotengine/godot-vscode-plugin )` +- `Emacs ( https://github.com/godotengine/emacs-gdscript-mode )` diff --git a/tutorials/export/changing_application_icon_for_windows.md b/tutorials/export/changing_application_icon_for_windows.md index d8b41f1..d82398f 100644 --- a/tutorials/export/changing_application_icon_for_windows.md +++ b/tutorials/export/changing_application_icon_for_windows.md @@ -15,11 +15,11 @@ it uses a Windows-only format called ICO. You can create your application icon in any program but you will have to convert it to an ICO file using a program such as GIMP. -`This video tutorial ( https://www.youtube.com/watch?v=uqV3UfM-n5Y )`_ goes over how to +`This video tutorial ( https://www.youtube.com/watch?v=uqV3UfM-n5Y )` goes over how to export an ICO file with GIMP. It is also possible to convert a PNG image to an hiDPI-friendly ICO file -using this `ImageMagick ( https://www.imagemagick.org/ )`_ command: +using this `ImageMagick ( https://www.imagemagick.org/ )` command: .. code-block:: none @@ -82,7 +82,7 @@ the project. Before selecting it in the export options, you will need to install an extra tool called **rcedit**. -You can download it `here ( https://github.com/electron/rcedit/releases )`_. +You can download it `here ( https://github.com/electron/rcedit/releases )`. After downloading, you need to tell Godot the path to the rcedit executable on your computer. @@ -94,7 +94,7 @@ Note: Linux and macOS users will also need to install - `WINE ( https://www.winehq.org/ )`_ to use rcedit. + `WINE ( https://www.winehq.org/ )` to use rcedit. ![](img/icon_rcedit.png) diff --git a/tutorials/export/exporting_basics.md b/tutorials/export/exporting_basics.md index c3669b5..97e9330 100644 --- a/tutorials/export/exporting_basics.md +++ b/tutorials/export/exporting_basics.md @@ -335,4 +335,4 @@ Note: emerging technology and you may find some things that don't work. Make sure you have updated your browser to the most recent version, and report any bugs you find on the - `Godot GitHub repository ( https://github.com/godotengine/godot/issues )`_. + `Godot GitHub repository ( https://github.com/godotengine/godot/issues )`. diff --git a/tutorials/export/exporting_for_android.md b/tutorials/export/exporting_for_android.md index 1fdfc77..414b61b 100644 --- a/tutorials/export/exporting_for_android.md +++ b/tutorials/export/exporting_for_android.md @@ -109,10 +109,10 @@ Launcher icons are used by Android launcher apps to represent your application t There are two types of icons required by Godot: - **Main Icon:** The "classic" icon. This will be used on all Android versions up to Android 8 (Oreo), exclusive. Must be at least 192×192 px. -- **Adaptive Icons:** Starting from Android 8 (inclusive), `Adaptive Icons ( https://developer.android.com/guide/practices/ui_guidelines/icon_design_adaptive )`_ were introduced. Applications will need to include separate background and foreground icons to have a native look. The user's launcher application will control the icon's animation and masking. Must be at least 432×432 px. +- **Adaptive Icons:** Starting from Android 8 (inclusive), `Adaptive Icons ( https://developer.android.com/guide/practices/ui_guidelines/icon_design_adaptive )` were introduced. Applications will need to include separate background and foreground icons to have a native look. The user's launcher application will control the icon's animation and masking. Must be at least 432×432 px. See also: - It's important to adhere to some rules when designing adaptive icons. `Google Design has provided a nice article ( https://medium.com/google-design/designing-adaptive-icons-515af294c783 )`_ that helps to understand those rules and some of the capabilities of adaptive icons. + It's important to adhere to some rules when designing adaptive icons. `Google Design has provided a nice article ( https://medium.com/google-design/designing-adaptive-icons-515af294c783 )` that helps to understand those rules and some of the capabilities of adaptive icons. .. caution:: The most important adaptive icon design rule is to have your icon critical elements inside the safe zone: a centered circle with a diameter of 66dp (264 pixels on `xxxhdpi`) to avoid being clipped by the launcher. diff --git a/tutorials/export/exporting_for_dedicated_servers.md b/tutorials/export/exporting_for_dedicated_servers.md index 65530d5..892a4ae 100644 --- a/tutorials/export/exporting_for_dedicated_servers.md +++ b/tutorials/export/exporting_for_dedicated_servers.md @@ -90,7 +90,7 @@ Starting the dedicated server If both your client and server are part of the same Godot project, you will have to add a way to start the server directly using a command-line argument. This can be done by adding the following code snippet in your main scene (or a -singleton)'s `_ready()` method:: +singleton)'s `ready()` method:: if "--server" in OS.get_cmdline_args(): # Run your server startup code here... diff --git a/tutorials/export/exporting_for_web.md b/tutorials/export/exporting_for_web.md index d419950..7c9737c 100644 --- a/tutorials/export/exporting_for_web.md +++ b/tutorials/export/exporting_for_web.md @@ -96,7 +96,7 @@ of limitations you should be aware of when porting a Godot game to the web. .. important:: Browser vendors are making more and more functionalities only - available in `secure contexts ( https://developer.mozilla.org/en-US/docs/Web/Security/Secure_Contexts )`_, + available in `secure contexts ( https://developer.mozilla.org/en-US/docs/Web/Security/Secure_Contexts )`, this means that such features are only be available if the web page is served via a secure HTTPS connection (localhost is usually exempt from such requirement). @@ -122,8 +122,8 @@ Background processing ~~~~~~~~~~~~~~~~~~~~~ The project will be paused by the browser when the tab is no longer the active -tab in the user's browser. This means functions such as `_process()` and -`_physics_process()` will no longer run until the tab is made active again by +tab in the user's browser. This means functions such as `process()` and +`physics_process()` will no longer run until the tab is made active again by the user (by switching back to the tab). This can cause networked games to disconnect if the user switches tabs for a long duration. @@ -158,7 +158,7 @@ Full screen and mouse capture Browsers do not allow arbitrarily **entering full screen**. The same goes for **capturing the cursor**. Instead, these actions have to occur as a response to a JavaScript input event. In Godot, this means entering full screen from within -a pressed input event callback such as `_input` or `_unhandled_input`. +a pressed input event callback such as `input` or `unhandled_input`. Querying the `Input` singleton is not sufficient, the relevant input event must currently be active. diff --git a/tutorials/export/exporting_projects.md b/tutorials/export/exporting_projects.md index 5a0f936..97bbd96 100644 --- a/tutorials/export/exporting_projects.md +++ b/tutorials/export/exporting_projects.md @@ -94,7 +94,7 @@ Export templates Apart from setting up the platform, the export templates must be installed to be able to export projects. They can be obtained as a TPZ file (which is a renamed ZIP archive) from the -`download page of the website ( https://www.godotengine.org/download )`_. +`download page of the website ( https://www.godotengine.org/download )`. Once downloaded, they can be installed using the **Install Export Templates** option in the editor: diff --git a/tutorials/i18n/internationalizing_games.md b/tutorials/i18n/internationalizing_games.md index ca51ed3..137528b 100644 --- a/tutorials/i18n/internationalizing_games.md +++ b/tutorials/i18n/internationalizing_games.md @@ -24,7 +24,7 @@ so this one could be seen more like a follow-up to that one. Note: We will be using the official demo as an example; you can - `download it from the Asset Library ( https://godotengine.org/asset-library/asset/134 )`_. + `download it from the Asset Library ( https://godotengine.org/asset-library/asset/134 )`. Configuring the imported translation ------------------------------------ diff --git a/tutorials/i18n/localization_using_gettext.md b/tutorials/i18n/localization_using_gettext.md index 540e3a0..9e1c0cb 100644 --- a/tutorials/i18n/localization_using_gettext.md +++ b/tutorials/i18n/localization_using_gettext.md @@ -9,7 +9,7 @@ format (text-based `.po` and compiled `.mo` since Godot 3.5). Note: For an introduction to gettext, check out - `A Quick Gettext Tutorial ( https://www.labri.fr/perso/fleury/posts/programming/a-quick-gettext-tutorial.html )`_. + `A Quick Gettext Tutorial ( https://www.labri.fr/perso/fleury/posts/programming/a-quick-gettext-tutorial.html )`. It's written with C projects in mind, but much of the advice also applies to Godot (with the exception of `xgettext`). @@ -17,9 +17,9 @@ Advantages ---------- - gettext is a standard format, which can be edited using any text editor - or GUI editors such as `Poedit ( https://poedit.net/ )`_. + or GUI editors such as `Poedit ( https://poedit.net/ )`. - gettext is supported by translation platforms such as - `Transifex ( https://www.transifex.com/ )`_ and `Weblate ( https://weblate.org/ )`_, + `Transifex ( https://www.transifex.com/ )` and `Weblate ( https://weblate.org/ )`, which makes it easier for people to collaborate to localization. - Compared to CSV, gettext works better with version control systems like Git, as each locale has its own messages file. @@ -50,12 +50,12 @@ such as updating message files. Therefore, it's strongly recommended to install them. - **Windows:** Download an installer from - `this page ( https://mlocati.github.io/articles/gettext-iconv-windows.html )`_. + `this page ( https://mlocati.github.io/articles/gettext-iconv-windows.html )`. Any architecture and binary type (shared or static) works; if in doubt, choose the 64-bit static installer. -- **macOS:** Install gettext either using `Homebrew ( https://brew.sh/ )`_ +- **macOS:** Install gettext either using `Homebrew ( https://brew.sh/ )` with the `brew install gettext` command, or using - `MacPorts ( https://www.macports.org/ )`_ with the + `MacPorts ( https://www.macports.org/ )` with the `sudo port install gettext` command. - **Linux:** On most distributions, install the `gettext` package from your distribution's package manager. diff --git a/tutorials/inputs/controllers_gamepads_joysticks.md b/tutorials/inputs/controllers_gamepads_joysticks.md index 8e16f3f..610cf20 100644 --- a/tutorials/inputs/controllers_gamepads_joysticks.md +++ b/tutorials/inputs/controllers_gamepads_joysticks.md @@ -203,7 +203,7 @@ powershell Windows (powershell) To test mappings on non-desktop platforms or to distribute your project with additional controller mappings, you can add them by calling `Input.add_joy_mapping()` -as early as possible in a script's `_ready()` function. +as early as possible in a script's `ready()` function. My controller works on a given platform, but not on another platform. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/tutorials/inputs/custom_mouse_cursor.md b/tutorials/inputs/custom_mouse_cursor.md index 60b3f30..d41d9d8 100644 --- a/tutorials/inputs/custom_mouse_cursor.md +++ b/tutorials/inputs/custom_mouse_cursor.md @@ -14,7 +14,7 @@ Note: You could display a "software" mouse cursor by hiding the mouse cursor and - moving a Sprite to the cursor position in a `_process` method, but this + moving a Sprite to the cursor position in a `process` method, but this will add at least one frame of latency compared to an "hardware" mouse cursor. Therefore, it's recommended to use the approach described here whenever possible. diff --git a/tutorials/inputs/input_examples.md b/tutorials/inputs/input_examples.md index aaa8af7..291b399 100644 --- a/tutorials/inputs/input_examples.md +++ b/tutorials/inputs/input_examples.md @@ -23,7 +23,7 @@ Events versus polling Sometimes you want your game to respond to a certain input event - pressing the "jump" button, for example. For other situations, you might want something to happen as long as a key is pressed, such as movement. In the first case, -you can use the `_input()` function, which will be called whenever an input +you can use the `input()` function, which will be called whenever an input event occurs. In the second case, Godot provides the `Input` singleton, which you can use to query the state of an input. @@ -47,7 +47,7 @@ This gives you the flexibility to mix-and-match the type of input processing you do. For the remainder of this tutorial, we'll focus on capturing individual -events in `_input()`. +events in `input()`. Input events ------------ diff --git a/tutorials/io/background_loading.md b/tutorials/io/background_loading.md index 95e9d8a..216e88e 100644 --- a/tutorials/io/background_loading.md +++ b/tutorials/io/background_loading.md @@ -106,7 +106,7 @@ with the main scene of the game: The function `goto_scene` is called from the game when the scene needs to be switched. It requests an interactive loader, and calls -`set_process(true)` to start polling the loader in the `_process` +`set_process(true)` to start polling the loader in the `process` callback. It also starts a "loading" animation, which could show a progress bar or loading screen. @@ -126,7 +126,7 @@ progress bar or loading screen. wait_frames = 1 -`_process` is where the loader is polled. `poll` is called, and then +`process` is where the loader is polled. `poll` is called, and then we deal with the return value from that call. `OK` means keep polling, `ERR_FILE_EOF` means loading is done, anything else means there was an error. Also note we skip one frame (via `wait_frames`, set on the diff --git a/tutorials/io/data_paths.md b/tutorials/io/data_paths.md index c8294ab..42e8143 100644 --- a/tutorials/io/data_paths.md +++ b/tutorials/io/data_paths.md @@ -156,7 +156,7 @@ Note: Self-contained mode ~~~~~~~~~~~~~~~~~~~ -If you create a file called `._sc_` or `_sc_` in the same directory as the +If you create a file called `._sc_` or `sc_` in the same directory as the editor binary (or in `MacOS/Contents/` for a macOS editor .app bundle), Godot will enable *self-contained mode*. This mode makes Godot write all editor data, settings, and cache to a directory diff --git a/tutorials/math/random_number_generation.md b/tutorials/math/random_number_generation.md index 82e5e37..71b1e04 100644 --- a/tutorials/math/random_number_generation.md +++ b/tutorials/math/random_number_generation.md @@ -43,7 +43,7 @@ In global scope, you can find a `randomize() once when your project starts to initialize the random seed.** Calling it multiple times is unnecessary and may impact performance negatively. -Putting it in your main scene script's `_ready()` method is a good choice: +Putting it in your main scene script's `ready()` method is a good choice: gdscript GDScript @@ -193,7 +193,7 @@ gdscript GDScript # Note: if the random element to pick is passed by reference, # such as an array or dictionary, - # use `_last_fruit = random_fruit.duplicate()` instead. + # use `last_fruit = random_fruit.duplicate()` instead. _last_fruit = random_fruit # Returns "apple", "orange", "pear", or "banana" every time the code runs. @@ -303,7 +303,7 @@ ends up empty. When that happens, you reinitialize it to its default value:: _fruits.shuffle() # Get a random fruit, since we shuffled the array, - # and remove it from the `_fruits` array. + # and remove it from the `fruits` array. var random_fruit = _fruits.pop_front() # Prints "apple", "orange", "pear", or "banana" every time the code runs. return random_fruit diff --git a/tutorials/networking/high_level_multiplayer.md b/tutorials/networking/high_level_multiplayer.md index 636b013..02de2bd 100644 --- a/tutorials/networking/high_level_multiplayer.md +++ b/tutorials/networking/high_level_multiplayer.md @@ -6,7 +6,7 @@ High-level multiplayer High-level vs low-level API --------------------------- -The following explains the differences of high- and low-level networking in Godot as well as some fundamentals. If you want to jump in head-first and add networking to your first nodes, skip to `Initializing the network`_ below. But make sure to read the rest later on! +The following explains the differences of high- and low-level networking in Godot as well as some fundamentals. If you want to jump in head-first and add networking to your first nodes, skip to `Initializing the network` below. But make sure to read the rest later on! Godot always supported standard low-level networking via UDP, TCP and some higher level protocols such as SSL and HTTP. These protocols are flexible and can be used for almost anything. However, using them to synchronize game state manually can be a large amount of work. Sometimes that work can't be avoided or is worth it, for example when working with a custom server implementation on the backend. But in most cases, it's worthwhile to consider Godot's high-level networking API, which sacrifices some of the fine-grained control of low-level networking for greater ease of use. @@ -320,7 +320,7 @@ every peer and RPC will work great! Here is an example: Note: Depending on when you execute pre_configure_game(), you may need to change any calls to `add_child()` - to be deferred via `call_deferred()`, as the SceneTree is locked while the scene is being created (e.g. when `_ready()` is being called). + to be deferred via `call_deferred()`, as the SceneTree is locked while the scene is being created (e.g. when `ready()` is being called). Synchronizing game start ^^^^^^^^^^^^^^^^^^^^^^^^ @@ -400,7 +400,7 @@ If you have paid attention to the previous example, it's possible you noticed th Each time this piece of code is executed on each peer, the peer makes itself master on the node it controls, and all other nodes remain as puppets with the server being their network master. To clarify, here is an example of how this looks in the -`bomber demo ( https://github.com/godotengine/godot-demo-projects/tree/master/networking/multiplayer_bomber )`_: +`bomber demo ( https://github.com/godotengine/godot-demo-projects/tree/master/networking/multiplayer_bomber )`: ![](img/nmms.png) diff --git a/tutorials/networking/webrtc.md b/tutorials/networking/webrtc.md index 728e0f8..5b7f67a 100644 --- a/tutorials/networking/webrtc.md +++ b/tutorials/networking/webrtc.md @@ -215,4 +215,4 @@ This will print something similar to this: Remote signaling with WebSocket ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -A more advanced demo using WebSocket for signaling peers and `WebRTCMultiplayer`_ under `networking/webrtc_signaling`. +A more advanced demo using WebSocket for signaling peers and `WebRTCMultiplayer` under `networking/webrtc_signaling`. diff --git a/tutorials/networking/websocket.md b/tutorials/networking/websocket.md index 6139a49..6b4ad59 100644 --- a/tutorials/networking/websocket.md +++ b/tutorials/networking/websocket.md @@ -160,4 +160,4 @@ This will print (when a client connects) something similar to this: Advanced chat demo ^^^^^^^^^^^^^^^^^^ -A more advanced chat demo which optionally uses the multiplayer mid-level abstraction and a high level multiplayer demo are available in the `godot demo projects ( https://github.com/godotengine/godot-demo-projects )`_ under `networking/websocket_chat` and `networking/websocket_multiplayer`. +A more advanced chat demo which optionally uses the multiplayer mid-level abstraction and a high level multiplayer demo are available in the `godot demo projects ( https://github.com/godotengine/godot-demo-projects )` under `networking/websocket_chat` and `networking/websocket_multiplayer`. diff --git a/tutorials/performance/batching.md b/tutorials/performance/batching.md index ac944fa..3836465 100644 --- a/tutorials/performance/batching.md +++ b/tutorials/performance/batching.md @@ -529,7 +529,7 @@ primitive types are currently available: - LINE With non-batched primitives, you may be able to get better performance by -drawing them manually with polys in a `_draw()` function. +drawing them manually with polys in a `draw()` function. See `doc_custom_drawing_in_2d` for more information. diff --git a/tutorials/performance/cpu_optimization.md b/tutorials/performance/cpu_optimization.md index cae91b1..ff6255e 100644 --- a/tutorials/performance/cpu_optimization.md +++ b/tutorials/performance/cpu_optimization.md @@ -191,8 +191,8 @@ Other languages ~~~~~~~~~~~~~~~ Third parties provide support for several other languages, including `Rust -( https://github.com/godot-rust/godot-rust )`_ and `Javascript -( https://github.com/GodotExplorer/ECMAScript )`_. +( https://github.com/godot-rust/godot-rust )` and `Javascript +( https://github.com/GodotExplorer/ECMAScript )`. C++ ~~~ @@ -226,8 +226,8 @@ SceneTree ========= Although Nodes are an incredibly powerful and versatile concept, be aware that -every node has a cost. Built-in functions such as `_process()` and -`_physics_process()` propagate through the tree. This housekeeping can reduce +every node has a cost. Built-in functions such as `process()` and +`physics_process()` propagate through the tree. This housekeeping can reduce performance when you have very large numbers of nodes (usually in the thousands). Each node is handled individually in the Godot renderer. Therefore, a smaller diff --git a/tutorials/performance/vertex_animation/animating_thousands_of_fish.md b/tutorials/performance/vertex_animation/animating_thousands_of_fish.md index 2ef0b2e..d6e17b1 100644 --- a/tutorials/performance/vertex_animation/animating_thousands_of_fish.md +++ b/tutorials/performance/vertex_animation/animating_thousands_of_fish.md @@ -3,7 +3,7 @@ Animating thousands of fish with MultiMeshInstance ================================================== -This tutorial explores a technique used in the game `ABZU ( https://www.gdcvault.com/play/1024409/Creating-the-Art-of-ABZ )`_ +This tutorial explores a technique used in the game `ABZU ( https://www.gdcvault.com/play/1024409/Creating-the-Art-of-ABZ )` for rendering and animating thousands of fish using vertex animation and static mesh instancing. @@ -25,7 +25,7 @@ Here is the fish we will be using for the example images, you can use any fish m ![](img/fish.png) Note: - The fish model in this tutorial is made by `QuaterniusDev ( http://quaternius.com )`_ and is + The fish model in this tutorial is made by `QuaterniusDev ( http://quaternius.com )` and is shared with a creative commons license. CC0 1.0 Universal (CC0 1.0) Public Domain Dedication https://creativecommons.org/publicdomain/zero/1.0/ diff --git a/tutorials/physics/interpolation/advanced_physics_interpolation.md b/tutorials/physics/interpolation/advanced_physics_interpolation.md index 6288261..2042a68 100644 --- a/tutorials/physics/interpolation/advanced_physics_interpolation.md +++ b/tutorials/physics/interpolation/advanced_physics_interpolation.md @@ -19,7 +19,7 @@ Cameras In many cases, a `Camera( Camera )` can use automatic interpolation just like any other node. However, for best results, especially at low physics tick rates, it is recommended that you take a manual approach to Camera interpolation. -This is because viewers are very sensitive to Camera movement. For instance, a Camera that realigns slightly every 1/10th of a second (at 10tps tick rate) will often be noticeable. You can get a much smoother result by moving the Camera each frame in `_process`, and following an interpolated target manually. +This is because viewers are very sensitive to Camera movement. For instance, a Camera that realigns slightly every 1/10th of a second (at 10tps tick rate) will often be noticeable. You can get a much smoother result by moving the Camera each frame in `process`, and following an interpolated target manually. Manual Camera interpolation ^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -39,7 +39,7 @@ There are two ways of doing this: Typical example ^^^^^^^^^^^^^^^ -A typical example of a custom approach is to use the `look_at` function in the Camera every frame in `_process()` to look at a target node (such as the player). +A typical example of a custom approach is to use the `look_at` function in the Camera every frame in `process()` to look at a target node (such as the player). But there is a problem. If we use the traditional `get_global_transform()` on a Camera "target" Node, this transform will only focus the Camera on the target *at the current physics tick*. This is *not* what we want, as the Camera will jump about on each physics tick as the target moves. Even though the Camera may be updated each frame, this does not help give smooth motion if the *target* is only changing each physics tick. @@ -48,12 +48,12 @@ get_global_transform_interpolated() What we really want to focus the Camera on, is not the position of the target on the physics tick, but the *interpolated* position, i.e. the position at which the target will be rendered. -We can do this using the `Spatial.get_global_transform_interpolated( Spatial_method_get_global_transform_interpolated )` function. This acts exactly like getting `Spatial.global_transform( Spatial_property_global_transform )` but it gives you the *interpolated* transform (during a `_process()` call). +We can do this using the `Spatial.get_global_transform_interpolated( Spatial_method_get_global_transform_interpolated )` function. This acts exactly like getting `Spatial.global_transform( Spatial_property_global_transform )` but it gives you the *interpolated* transform (during a `process()` call). .. important:: `get_global_transform_interpolated()` should only be used once or twice for special cases such as Cameras. It should **not** be used all over the place in your code (both for performance reasons, and to give correct gameplay). Note: - Aside from exceptions like the Camera, in most cases, your game logic should be in `_physics_process()`. In game logic you should be calling `get_global_transform()` or `get_transform()`, which will give the current physics transform (in global or local space respectively), which is usually what you will want for gameplay code. + Aside from exceptions like the Camera, in most cases, your game logic should be in `physics_process()`. In game logic you should be calling `get_global_transform()` or `get_transform()`, which will give the current physics transform (in global or local space respectively), which is usually what you will want for gameplay code. Example manual Camera script ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -94,7 +94,7 @@ Mouse look Mouse look is a very common way of controlling Cameras. But there is a problem. Unlike keyboard input which can be sampled periodically on the physics tick, mouse move events can come in continuously. The Camera will be expected to react and follow these mouse movements on the next frame, rather than waiting until the next physics tick. -In this situation, it can be better to disable physics interpolation for the Camera node (using `Node.physics_interpolation_mode( Node_property_physics_interpolation_mode )`) and directly apply the mouse input to the Camera rotation, rather than apply it in `_physics_process`. +In this situation, it can be better to disable physics interpolation for the Camera node (using `Node.physics_interpolation_mode( Node_property_physics_interpolation_mode )`) and directly apply the mouse input to the Camera rotation, rather than apply it in `physics_process`. Sometimes, especially with Cameras, you will want to use a combination of interpolation and non-interpolation: diff --git a/tutorials/physics/interpolation/physics_interpolation_introduction.md b/tutorials/physics/interpolation/physics_interpolation_introduction.md index 858d6ac..3ed3586 100644 --- a/tutorials/physics/interpolation/physics_interpolation_introduction.md +++ b/tutorials/physics/interpolation/physics_interpolation_introduction.md @@ -33,7 +33,7 @@ Adapt the tick rate? Instead of designing the game at a fixed physics tick rate, we could allow the tick rate to scale according to the end users hardware. We could for example use a fixed tick rate that works for that hardware, or even vary the duration of each physics tick to match a particular frame duration. -This works, but there is a problem. Physics (*and game logic*, which is often also run in the `_physics_process`) work best and most consistently when run at a **fixed**, predetermined tick rate. If you attempt to run a racing game physics that has been designed for 60 TPS (ticks per second) at e.g. 10 TPS, the physics will behave completely differently. Controls may be less responsive, collisions / trajectories can be completely different. You may test your game thoroughly at 60 TPS, then find it breaks on end users machines when it runs at a different tick rate. +This works, but there is a problem. Physics (*and game logic*, which is often also run in the `physics_process`) work best and most consistently when run at a **fixed**, predetermined tick rate. If you attempt to run a racing game physics that has been designed for 60 TPS (ticks per second) at e.g. 10 TPS, the physics will behave completely differently. Controls may be less responsive, collisions / trajectories can be completely different. You may test your game thoroughly at 60 TPS, then find it breaks on end users machines when it runs at a different tick rate. This can make quality assurance difficult with hard to reproduce bugs, especially in AAA games where problems of this sort can be very costly. This can also be problematic for multiplayer games for competitive integrity, as running the game at certain tick rates may be more advantageous than others. diff --git a/tutorials/physics/interpolation/physics_interpolation_quick_start_guide.md b/tutorials/physics/interpolation/physics_interpolation_quick_start_guide.md index 45a15f5..74d595e 100644 --- a/tutorials/physics/interpolation/physics_interpolation_quick_start_guide.md +++ b/tutorials/physics/interpolation/physics_interpolation_quick_start_guide.md @@ -4,6 +4,6 @@ Quick start guide ================= - Turn on physics interpolation: `ProjectSettings.physics/common/physics_interpolation( ProjectSettings_property_physics/common/physics_interpolation )` -- Make sure you move objects and run your game logic in `_physics_process()` rather than `_process()`. This includes moving objects directly *and indirectly* (by e.g. moving a parent, or using another mechanism to automatically move nodes). +- Make sure you move objects and run your game logic in `physics_process()` rather than `process()`. This includes moving objects directly *and indirectly* (by e.g. moving a parent, or using another mechanism to automatically move nodes). - Be sure to call `Node.reset_physics_interpolation( Node_method_reset_physics_interpolation )` on nodes *after* you first position or teleport them, to prevent "streaking" - Temporarily try setting `ProjectSettings.physics/common/physics_fps( ProjectSettings_property_physics/common/physics_fps )` to 10 to see the difference with and without interpolation. diff --git a/tutorials/physics/interpolation/using_physics_interpolation.md b/tutorials/physics/interpolation/using_physics_interpolation.md index 926aef4..45ffc9f 100644 --- a/tutorials/physics/interpolation/using_physics_interpolation.md +++ b/tutorials/physics/interpolation/using_physics_interpolation.md @@ -20,7 +20,7 @@ It is likely that nothing looks hugely different, particularly if you are runnin Move (almost) all game logic from _process to _physics_process ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -The most fundamental requirement for physics interpolation (which you may be doing already) is that you should be moving and performing game logic on your objects within `_physics_process` (which runs at a physics tick) rather than `_process` (which runs on a rendered frame). This means your scripts should typically be doing the bulk of their processing within `_physics_process`, including responding to input and AI. +The most fundamental requirement for physics interpolation (which you may be doing already) is that you should be moving and performing game logic on your objects within `physics_process` (which runs at a physics tick) rather than `process` (which runs on a rendered frame). This means your scripts should typically be doing the bulk of their processing within `physics_process`, including responding to input and AI. Setting the transform of objects only within physics ticks allows the automatic interpolation to deal with transforms *between* physics ticks, and ensures the game will run the same whatever machine it is run on. As a bonus, this also reduces CPU usage if the game is rendering at high FPS, since AI logic (for example) will no longer run on every rendered frame. @@ -74,4 +74,4 @@ Even if you intend to run physics at 60 TPS, in order to thoroughly test your in The gameplay may not work perfectly, but it should enable you to more easily see cases where you should be calling `Node.reset_physics_interpolation( Node_method_reset_physics_interpolation )`, or where you should be using your own custom interpolation on e.g. a `Camera( Camera )`. Once you have these cases fixed, you can set the physics tick rate back to the desired setting. -The other great advantage to testing at a low tick rate is you can often notice other game systems that are synchronized to the physics tick and creating glitches which you may want to work around. Typical examples include setting animation blend values, which you may decide to set in `_process()` and interpolate manually. +The other great advantage to testing at a low tick rate is you can often notice other game systems that are synchronized to the physics tick and creating glitches which you may want to work around. Typical examples include setting animation blend values, which you may decide to set in `process()` and interpolate manually. diff --git a/tutorials/physics/physics_introduction.md b/tutorials/physics/physics_introduction.md index 8af01de..c3e9f00 100644 --- a/tutorials/physics/physics_introduction.md +++ b/tutorials/physics/physics_introduction.md @@ -258,8 +258,8 @@ automatically be calculated by the physics engine. However, if you do wish to have some control over the body, you should take care - altering the `position`, `linear_velocity`, or other physics properties of a rigid body can result in unexpected behavior. If you need to alter any -of the physics-related properties, you should use the `_integrate_forces()` -callback instead of `_physics_process()`. In this callback, you have access +of the physics-related properties, you should use the `integrate_forces()` +callback instead of `physics_process()`. In this callback, you have access to the body's `Physics2DDirectBodyState`, which allows for safely changing properties and synchronizing them with the physics engine. @@ -292,7 +292,7 @@ properties directly, but rather applying forces (`thrust` and `torque`) to the body and letting the physics engine calculate the resulting movement. Note: - When a rigid body goes to sleep, the `_integrate_forces()` + When a rigid body goes to sleep, the `integrate_forces()` function will not be called. To override this behavior, you will need to keep the body awake by creating a collision, applying a force to it, or by disabling the `can_sleep` diff --git a/tutorials/physics/ragdoll_system.md b/tutorials/physics/ragdoll_system.md index d9ebe7e..8b399d9 100644 --- a/tutorials/physics/ragdoll_system.md +++ b/tutorials/physics/ragdoll_system.md @@ -11,7 +11,7 @@ Since version 3.1, Godot supports ragdoll physics. Ragdolls rely on physics simu In this tutorial, we will be using the Platformer3D demo to set up a ragdoll. Note: - You can download the Platformer3D demo on `GitHub ( https://github.com/godotengine/godot-demo-projects/tree/master/3d/platformer )`_ or using the `Asset Library ( https://godotengine.org/asset-library/asset/125 )`_. + You can download the Platformer3D demo on `GitHub ( https://github.com/godotengine/godot-demo-projects/tree/master/3d/platformer )` or using the `Asset Library ( https://godotengine.org/asset-library/asset/125 )`. Setting up the ragdoll ---------------------- @@ -61,7 +61,7 @@ This is the final result: Simulating the ragdoll ---------------------- -The ragdoll is now ready to use. To start the simulation and play the ragdoll animation, you need to call the `physical_bones_start_simulation` method. Attach a script to the skeleton node and call the method in the `_ready` method: +The ragdoll is now ready to use. To start the simulation and play the ragdoll animation, you need to call the `physical_bones_start_simulation` method. Attach a script to the skeleton node and call the method in the `ready` method: ``` func _ready(): diff --git a/tutorials/physics/ray-casting.md b/tutorials/physics/ray-casting.md index 5d73551..9ad79f6 100644 --- a/tutorials/physics/ray-casting.md +++ b/tutorials/physics/ray-casting.md @@ -203,5 +203,5 @@ gdscript GDScript ``` -Remember that during `_input()`, the space may be locked, so in practice -this query should be run in `_physics_process()`. +Remember that during `input()`, the space may be locked, so in practice +this query should be run in `physics_process()`. diff --git a/tutorials/physics/rigid_body.md b/tutorials/physics/rigid_body.md index 1247334..a25c768 100644 --- a/tutorials/physics/rigid_body.md +++ b/tutorials/physics/rigid_body.md @@ -23,7 +23,7 @@ There are several ways to control a rigid body's movement, depending on your des If you only need to place a rigid body once, for example to set its initial location, you can use the methods provided by the `Spatial` node, such as `set_global_transform()` or `look_at()`. However, these methods cannot be called every frame or the physics engine will not be able to correctly simulate the body's state. As an example, consider a rigid body that you want to rotate so that it points towards another object. A common mistake when implementing this kind of behavior is to use `look_at()` every frame, which breaks the physics simulation. Below, we'll demonstrate how to implement this correctly. -The fact that you can't use `set_global_transform()` or `look_at()` methods doesn't mean that you can't have full control of a rigid body. Instead, you can control it by using the `_integrate_forces()` callback. In this method, you can add *forces*, apply *impulses*, or set the *velocity* in order to achieve any movement you desire. +The fact that you can't use `set_global_transform()` or `look_at()` methods doesn't mean that you can't have full control of a rigid body. Instead, you can control it by using the `integrate_forces()` callback. In this method, you can add *forces*, apply *impulses*, or set the *velocity* in order to achieve any movement you desire. The "look at" method -------------------- diff --git a/tutorials/physics/soft_body.md b/tutorials/physics/soft_body.md index 461c021..f51f188 100644 --- a/tutorials/physics/soft_body.md +++ b/tutorials/physics/soft_body.md @@ -34,7 +34,7 @@ Cloak simulation Let's make a cloak in the Platformer3D demo. Note: - You can download the Platformer3D demo on `GitHub ( https://github.com/godotengine/godot-demo-projects/tree/master/3d/platformer )`_ or `the Asset Library ( https://godotengine.org/asset-library/asset/125 )`_. + You can download the Platformer3D demo on `GitHub ( https://github.com/godotengine/godot-demo-projects/tree/master/3d/platformer )` or `the Asset Library ( https://godotengine.org/asset-library/asset/125 )`. Open the `Player` scene, add a `SoftBody` node and assign a `PlaneMesh` to it. diff --git a/tutorials/physics/using_kinematic_body_2d.md b/tutorials/physics/using_kinematic_body_2d.md index 19e158e..ab451b5 100644 --- a/tutorials/physics/using_kinematic_body_2d.md +++ b/tutorials/physics/using_kinematic_body_2d.md @@ -40,7 +40,7 @@ a collision is detected with another body. After a KinematicBody2D has collided, any *collision response* must be coded manually. Warning: - You should only do Kinematic body movement in the `_physics_process()` callback. + You should only do Kinematic body movement in the `physics_process()` callback. The two movement methods serve different purposes, and later in this tutorial, you'll see examples of how they work. @@ -326,7 +326,7 @@ gdscript GDScript queue_free() ``` -The action happens in `_physics_process()`. After using `move_and_collide()`, if a +The action happens in `physics_process()`. After using `move_and_collide()`, if a collision occurs, a `KinematicCollision2D` object is returned (otherwise, the return is `Nil`). diff --git a/tutorials/platform/android/android_in_app_purchases.md b/tutorials/platform/android/android_in_app_purchases.md index 45fb017..2de9bdb 100644 --- a/tutorials/platform/android/android_in_app_purchases.md +++ b/tutorials/platform/android/android_in_app_purchases.md @@ -103,7 +103,7 @@ initiate the purchase flow for it. payment.purchase("my_iap_item") -Then, wait for the `_on_purchases_updated` callback and handle the purchase result: +Then, wait for the `on_purchases_updated` callback and handle the purchase result: :: diff --git a/tutorials/platform/android/android_plugin.md b/tutorials/platform/android/android_plugin.md index e688c40..943944c 100644 --- a/tutorials/platform/android/android_plugin.md +++ b/tutorials/platform/android/android_plugin.md @@ -40,23 +40,23 @@ Since we previously did not version the Android plugin systems, the new one is n As a prerequisite, make sure you understand how to set up a `custom build environment( doc_android_custom_build )` for Android. -At its core, a Godot Android plugin is a `Android archive library ( https://developer.android.com/studio/projects/android-library#aar-contents )`_ (*aar* archive file) +At its core, a Godot Android plugin is a `Android archive library ( https://developer.android.com/studio/projects/android-library#aar-contents )` (*aar* archive file) with the following caveats: -- The library must have a dependency on the Godot engine library (`godot-lib...aar`). A stable version is made available for each Godot release on the `Godot download page ( https://godotengine.org/download )`_. +- The library must have a dependency on the Godot engine library (`godot-lib...aar`). A stable version is made available for each Godot release on the `Godot download page ( https://godotengine.org/download )`. - The library must include a specifically configured `..aar`) from the `Godot download page ( https://godotengine.org/download )`_ (e.g.: `godot-lib.3.4.2.stable.release.aar`). + - Download the Godot engine library (`godot-lib...aar`) from the `Godot download page ( https://godotengine.org/download )` (e.g.: `godot-lib.3.4.2.stable.release.aar`). - Follow `these instructions ( https://developer.android.com/studio/projects/android-library#AddDependency )` to add the Godot engine library as a dependency for your plugin. - In the plugin module's `build.gradle` file, replace `implementation` with `compileOnly` for the dependency line for the Godot engine library. @@ -110,7 +110,7 @@ The instructions below assumes that you're using Android Studio. - The filepath can be relative (e.g.: `MyPlugin.aar`) in which case it's relative to the `res://android/plugins` directory. - The filepath can be absolute: `res://some_path/MyPlugin.aar`. - - If **binary_type** is `remote`, then this should be a declaration for a `remote gradle binary ( https://developer.android.com/studio/build/dependencies#dependency-types )`_ (e.g.: `org.godot.example:my-plugin:0.0.0`). + - If **binary_type** is `remote`, then this should be a declaration for a `remote gradle binary ( https://developer.android.com/studio/build/dependencies#dependency-types )` (e.g.: `org.godot.example:my-plugin:0.0.0`). The `dependencies` section and fields are optional and defined as follow: @@ -153,9 +153,9 @@ At runtime, the plugin will provide these paths to Godot core which will use the Reference implementations ^^^^^^^^^^^^^^^^^^^^^^^^^ -- `Godot Oculus Mobile plugin ( https://github.com/GodotVR/godot_oculus_mobile )`_ - - `Bundled gdnative resources ( https://github.com/GodotVR/godot_oculus_mobile/tree/master/plugin/src/main/assets/addons/godot_ovrmobile )`_ -- `Godot Google Play Billing plugin ( https://github.com/godotengine/godot-google-play-billing )`_ +- `Godot Oculus Mobile plugin ( https://github.com/GodotVR/godot_oculus_mobile )` + - `Bundled gdnative resources ( https://github.com/GodotVR/godot_oculus_mobile/tree/master/plugin/src/main/assets/addons/godot_ovrmobile )` +- `Godot Google Play Billing plugin ( https://github.com/godotengine/godot-google-play-billing )` Troubleshooting diff --git a/tutorials/platform/consoles.md b/tutorials/platform/consoles.md index 8a64c87..88a7184 100644 --- a/tutorials/platform/consoles.md +++ b/tutorials/platform/consoles.md @@ -64,16 +64,16 @@ your games to various consoles. Following is the list of providers: -- `Lone Wolf Technology ( http://www.lonewolftechnology.com/ )`_ offers +- `Lone Wolf Technology ( http://www.lonewolftechnology.com/ )` offers Switch and PS4 porting and publishing of Godot games. -- `Pineapple Works ( https://pineapple.works/ )`_ offers +- `Pineapple Works ( https://pineapple.works/ )` offers Switch, Xbox One & Xbox Series X/S (GDK) porting and publishing of Godot games (GDScript/C#). -- `RAWRLAB games ( https://www.rawrlab.com/ )`_ offers +- `RAWRLAB games ( https://www.rawrlab.com/ )` offers Switch porting of Godot games. -- `mazette! games ( https://mazette.games/ )`_ offers +- `mazette! games ( https://mazette.games/ )` offers Switch, Xbox One and Xbox Series X/S porting and publishing of Godot games. If your company offers porting, or porting *and* publishing services for Godot games, feel free to -`open an issue or pull request ( https://github.com/godotengine/godot-docs )`_ +`open an issue or pull request ( https://github.com/godotengine/godot-docs )` to add your company to the list above. diff --git a/tutorials/platform/ios/ios_plugin.md b/tutorials/platform/ios/ios_plugin.md index be9c2de..cfb7a85 100644 --- a/tutorials/platform/ios/ios_plugin.md +++ b/tutorials/platform/ios/ios_plugin.md @@ -37,12 +37,12 @@ At its core, a Godot iOS plugin is an iOS library (*.a* archive file or *.xcfram An iOS plugin can have the same functionality as a Godot module but provides more flexibility and doesn't require to rebuild the engine. -Here are the steps to get a plugin's development started. We recommend using `Xcode ( https://developer.apple.com/develop/ )`_ as your development environment. +Here are the steps to get a plugin's development started. We recommend using `Xcode ( https://developer.apple.com/develop/ )` as your development environment. See also: - The `Godot iOS Plugins ( https://github.com/godotengine/godot-ios-plugins )`_ Godot iOS plugins. + The `Godot iOS Plugins ( https://github.com/godotengine/godot-ios-plugins )` Godot iOS plugins. - The `Godot iOS plugin template ( https://github.com/naithar/godot_ios_plugin )`_ gives you all the boilerplate you need to get your iOS plugin started. + The `Godot iOS plugin template ( https://github.com/naithar/godot_ios_plugin )` gives you all the boilerplate you need to get your iOS plugin started. To build an iOS plugin: @@ -51,7 +51,7 @@ To build an iOS plugin: 2. Add the Godot engine header files as a dependency for your plugin library in `HEADER_SEARCH_PATHS`. You can find the setting inside the `Build Settings` tab: - - Download the Godot engine source from the `Godot GitHub page ( https://github.com/godotengine/godot )`_. + - Download the Godot engine source from the `Godot GitHub page ( https://github.com/godotengine/godot )`. - Run SCons to generate headers. You can learn the process by reading `doc_compiling_for_ios`. You don't have to wait for compilation to complete to move forward as headers are generated before the engine starts to compile. @@ -128,7 +128,7 @@ To build an iOS plugin: - **system**: contains a list of iOS system frameworks that are required for plugin. - - **capabilities**: contains a list of iOS capabilities that is required for plugin. A list of available capabilities can be found at `Apple UIRequiredDeviceCapabilities documentation page ( https://developer.apple.com/documentation/bundleresources/information_property_list/uirequireddevicecapabilities )`_. + - **capabilities**: contains a list of iOS capabilities that is required for plugin. A list of available capabilities can be found at `Apple UIRequiredDeviceCapabilities documentation page ( https://developer.apple.com/documentation/bundleresources/information_property_list/uirequireddevicecapabilities )`. - **files**: contains a list of files that should be copied on export. This is useful for data files or images. diff --git a/tutorials/platform/ios/plugins_for_ios.md b/tutorials/platform/ios/plugins_for_ios.md index 16bdd51..5741043 100644 --- a/tutorials/platform/ios/plugins_for_ios.md +++ b/tutorials/platform/ios/plugins_for_ios.md @@ -8,7 +8,7 @@ They are using same model of asynchronous calls explained below. ARKit and Camera access are also provided as plugins. -Latest updates, documentation and source code can be found at `Godot iOS plugins repository ( https://github.com/godotengine/godot-ios-plugins )`_ +Latest updates, documentation and source code can be found at `Godot iOS plugins repository ( https://github.com/godotengine/godot-ios-plugins )` Accessing plugin singletons --------------------------- @@ -90,7 +90,7 @@ The pending event interface consists of two methods: Store Kit --------- -Implemented in `Godot iOS InAppStore plugin ( https://github.com/godotengine/godot-ios-plugins/blob/master/plugins/inappstore/in_app_store.mm )`_. +Implemented in `Godot iOS InAppStore plugin ( https://github.com/godotengine/godot-ios-plugins/blob/master/plugins/inappstore/in_app_store.mm )`. The Store Kit API is accessible through the `InAppStore` singleton. It is initialized automatically. @@ -242,7 +242,7 @@ finalize the purchase on. Example: Game Center ----------- -Implemented in `Godot iOS GameCenter plugin ( https://github.com/godotengine/godot-ios-plugins/blob/master/plugins/gamecenter/game_center.mm )`_. +Implemented in `Godot iOS GameCenter plugin ( https://github.com/godotengine/godot-ios-plugins/blob/master/plugins/gamecenter/game_center.mm )`. The Game Center API is available through the "GameCenter" singleton. It has the following methods: diff --git a/tutorials/plugins/editor/inspector_plugins.md b/tutorials/plugins/editor/inspector_plugins.md index bf3fcc6..57f2d17 100644 --- a/tutorials/plugins/editor/inspector_plugins.md +++ b/tutorials/plugins/editor/inspector_plugins.md @@ -33,7 +33,7 @@ you should end up with a new `addons/my_inspector_plugin` folder that contains two files: `plugin.cfg` and `plugin.gd`. As before, `plugin.gd` is a script extending `EditorPlugin` and you -need to introduce new code for its `_enter_tree` and `_exit_tree` methods. +need to introduce new code for its `enter_tree` and `exit_tree` methods. To set up your inspector plugin, you must load its script, then create and add the instance by calling `add_inspector_plugin()`. If the plugin is disabled, you should remove the instance you have added by calling @@ -127,7 +127,7 @@ anything but can house any other control nodes, including complex scenes. There are three essential parts to the script extending `EditorProperty`: -1. You must define the `_init()` method to set up the control nodes' +1. You must define the `init()` method to set up the control nodes' structure. 2. You should implement the `update_property()` to handle changes to the data diff --git a/tutorials/plugins/editor/installing_plugins.md b/tutorials/plugins/editor/installing_plugins.md index 9338b48..935ecc5 100644 --- a/tutorials/plugins/editor/installing_plugins.md +++ b/tutorials/plugins/editor/installing_plugins.md @@ -11,7 +11,7 @@ Finding plugins ~~~~~~~~~~~~~~~ The preferred way to find Godot plugins is to use the -`Asset Library ( https://godotengine.org/asset-library/ )`_. While it can be +`Asset Library ( https://godotengine.org/asset-library/ )`. While it can be browsed online, it's more convenient to use it directly from the editor. To do so, click the **AssetLib** tab at the top of the editor: diff --git a/tutorials/plugins/editor/making_main_screen_plugins.md b/tutorials/plugins/editor/making_main_screen_plugins.md index c48cb15..1558658 100644 --- a/tutorials/plugins/editor/making_main_screen_plugins.md +++ b/tutorials/plugins/editor/making_main_screen_plugins.md @@ -22,7 +22,7 @@ Initializing the plugin First create a new plugin from the Plugins menu. For this tutorial, we'll put it in a folder called `main_screen`, but you can use any name you'd like. -The plugin script will come with `_enter_tree()` and `_exit_tree()` +The plugin script will come with `enter_tree()` and `exit_tree()` methods, but for a main screen plugin we need to add a few extra methods. Add five extra methods such that the script looks like this: @@ -140,14 +140,14 @@ Here is the full plugin script: A couple of specific lines were added. `MainPanel` is a constant that holds a reference to the scene, and we instance it into `main_panel_instance`. -The `_enter_tree()` function is called before `_ready()`. This is where +The `enter_tree()` function is called before `ready()`. This is where we instance the main panel scene, and add them as children of specific parts of the editor. We use `get_editor_interface().get_editor_viewport()` to obtain the viewport and add our main panel instance as a child to it. We call the `make_visible(false)` function to hide the main panel so it doesn't compete for space when first activating the plugin. -The `_exit_tree()` function is called when the plugin is deactivated. +The `exit_tree()` function is called when the plugin is deactivated. If the main screen still exists, we call `queue_free()` to free the instance and remove it from memory. diff --git a/tutorials/plugins/editor/making_plugins.md b/tutorials/plugins/editor/making_plugins.md index 4ea574b..202ed19 100644 --- a/tutorials/plugins/editor/making_plugins.md +++ b/tutorials/plugins/editor/making_plugins.md @@ -72,7 +72,7 @@ You should end up with a directory structure like this: The name and description help people understand what it does. Your name helps you get properly credited for your work. The version number helps others know if they have an outdated version; -if you are unsure on how to come up with the version number, check out `Semantic Versioning ( https://semver.org/ )`_. +if you are unsure on how to come up with the version number, check out `Semantic Versioning ( https://semver.org/ )`. The main script file will instruct Godot what your plugin does in the editor once it is active. @@ -93,8 +93,8 @@ Warning: It's important to deal with initialization and clean-up of resources. A good practice is to use the virtual function -`_enter_tree()` to initialize your plugin and -`_exit_tree()` to clean it up. Thankfully, +`enter_tree()` to initialize your plugin and +`exit_tree()` to clean it up. Thankfully, the dialog generates these callbacks for you. Your script should look something like this: @@ -194,7 +194,7 @@ gdscript GDScript ``` With that done, the plugin should already be available in the plugin list in the -**Project Settings**, so activate it as explained in `Checking the results`_. +**Project Settings**, so activate it as explained in `Checking the results`. Then try it out by adding your new node: @@ -312,7 +312,7 @@ it is a powerful way to create specialized editors without having to delve into C++ modules. You can make your own plugins to help yourself and share them in the -`Asset Library ( https://godotengine.org/asset-library/ )`_ so that people +`Asset Library ( https://godotengine.org/asset-library/ )` so that people can benefit from your work. diff --git a/tutorials/plugins/editor/spatial_gizmos.md b/tutorials/plugins/editor/spatial_gizmos.md index b30d742..11167f0 100644 --- a/tutorials/plugins/editor/spatial_gizmos.md +++ b/tutorials/plugins/editor/spatial_gizmos.md @@ -113,7 +113,7 @@ or all the handle related ones. # ... -Note that we created a material in the `_init` method, and retrieved it in the `redraw` +Note that we created a material in the `init` method, and retrieved it in the `redraw` method using `get_material()( EditorSpatialGizmoPlugin_method_get_material )`. This method retrieves one of the material's variants depending on the state of the gizmo (selected and/or editable). diff --git a/tutorials/plugins/editor/visual_shader_plugins.md b/tutorials/plugins/editor/visual_shader_plugins.md index 3d8ac50..7f0066e 100644 --- a/tutorials/plugins/editor/visual_shader_plugins.md +++ b/tutorials/plugins/editor/visual_shader_plugins.md @@ -13,7 +13,7 @@ file and it will be ready to use, provided the custom node is registered with This short tutorial will explain how to make a Perlin-3D noise node (original code from this `GPU noise shaders plugin -( https://github.com/curly-brace/Godot-3.0-Noise-Shaders/blob/master/assets/gpu_noise_shaders/classic_perlin3d.tres )`_. +( https://github.com/curly-brace/Godot-3.0-Noise-Shaders/blob/master/assets/gpu_noise_shaders/classic_perlin3d.tres )`. Create a Sprite and assign a `ShaderMaterial` to its material slot: diff --git a/tutorials/plugins/running_code_in_the_editor.md b/tutorials/plugins/running_code_in_the_editor.md index cb08287..ee31a07 100644 --- a/tutorials/plugins/running_code_in_the_editor.md +++ b/tutorials/plugins/running_code_in_the_editor.md @@ -51,7 +51,7 @@ gdscript GDScript Pieces of code do not have either of the 2 conditions above will run both in-editor and in-game. -Here is how a `_process()` function might look for you: +Here is how a `process()` function might look for you: gdscript GDScript @@ -91,7 +91,7 @@ Save the script and return to the editor. You should now see your object rotate. Note: If you don't see the changes, reload the scene (close it and open it again). -Now let's choose which code runs when. Modify your `_process()` function to look like this: +Now let's choose which code runs when. Modify your `process()` function to look like this: gdscript GDScript @@ -108,7 +108,7 @@ Save the script. Now the object will spin clockwise in the editor, but if you ru Editing variables ----------------- Add and export a variable speed to the script. The function set_speed after "setget" is executed with your input to change the variable. -Modify `_process()` to include the rotation speed. +Modify `process()` to include the rotation speed. gdscript GDScript diff --git a/tutorials/rendering/multiple_resolutions.md b/tutorials/rendering/multiple_resolutions.md index 78d8c6f..9fcfd2a 100644 --- a/tutorials/rendering/multiple_resolutions.md +++ b/tutorials/rendering/multiple_resolutions.md @@ -39,8 +39,8 @@ One size fits all The most common approach is to use a single *base* resolution and then fit it to everything else. This resolution is how most players are expected to play the game (given their hardware). For mobile, Google has useful `stats -( https://developer.android.com/about/dashboards )`_ online, and for desktop, -Steam `also does ( https://store.steampowered.com/hwsurvey/ )`_. +( https://developer.android.com/about/dashboards )` online, and for desktop, +Steam `also does ( https://store.steampowered.com/hwsurvey/ )`. As an example, Steam shows that the most common *primary display resolution* is 1920×1080, so a sensible approach is to develop a game for this resolution, then @@ -355,7 +355,7 @@ Non-game application - Keep the stretch aspect to its default value, `ignore` (its value won't be used since the stretch mode is `disabled`). - You can define a minimum window size by setting `OS.min_window_size` in a - script's `_ready()` function. This prevents the user from resizing the application + script's `ready()` function. This prevents the user from resizing the application below a certain size, which could break the UI layout. Note: diff --git a/tutorials/rendering/viewports.md b/tutorials/rendering/viewports.md index 77b5b96..ab3cb0a 100644 --- a/tutorials/rendering/viewports.md +++ b/tutorials/rendering/viewports.md @@ -127,7 +127,7 @@ For 2D, each `Viewport`. This suffices in most cases, but in case sharing them may be desired, it is possible to do so by setting the `Viewport's` manually. -For an example of how this works, see the demo projects `3D in 2D ( https://github.com/godotengine/godot-demo-projects/tree/master/viewport/3d_in_2d )`_ and `2D in 3D ( https://github.com/godotengine/godot-demo-projects/tree/master/viewport/2d_in_3d )`_ respectively. +For an example of how this works, see the demo projects `3D in 2D ( https://github.com/godotengine/godot-demo-projects/tree/master/viewport/3d_in_2d )` and `2D in 3D ( https://github.com/godotengine/godot-demo-projects/tree/master/viewport/2d_in_3d )` respectively. Capture ------- @@ -149,7 +149,7 @@ following code: # Set Sprite Texture. $sprite.texture = tex -But if you use this in `_ready()` or from the first frame of the `Viewport's` initialization, +But if you use this in `ready()` or from the first frame of the `Viewport's` initialization, you will get an empty texture because there is nothing to get as texture. You can deal with it using (for example): diff --git a/tutorials/scripting/gdscript/gdscript_advanced.md b/tutorials/scripting/gdscript/gdscript_advanced.md index a4ec89e..ca1b715 100644 --- a/tutorials/scripting/gdscript/gdscript_advanced.md +++ b/tutorials/scripting/gdscript/gdscript_advanced.md @@ -468,7 +468,7 @@ while() loops are the same everywhere: Custom iterators ---------------- You can create custom iterators in case the default ones don't quite meet your -needs by overriding the Variant class's `_iter_init`, `_iter_next`, and `_iter_get` +needs by overriding the Variant class's `iter_init`, `iter_next`, and `iter_get` functions in your script. An example implementation of a forward iterator follows: :: @@ -507,7 +507,7 @@ And it can be used like any other iterator: for i in itr: print(i) # Will print 0, 2, and 4. -Make sure to reset the state of the iterator in `_iter_init`, otherwise nested +Make sure to reset the state of the iterator in `iter_init`, otherwise nested for-loops that use custom iterators will not work as expected. Duck typing diff --git a/tutorials/scripting/gdscript/gdscript_basics.md b/tutorials/scripting/gdscript/gdscript_basics.md index 8c055a1..b22e17c 100644 --- a/tutorials/scripting/gdscript/gdscript_basics.md +++ b/tutorials/scripting/gdscript/gdscript_basics.md @@ -8,7 +8,7 @@ Introduction *GDScript* is a high-level, dynamically typed programming language used to create content. It uses a syntax similar to -`Python ( https://en.wikipedia.org/wiki/Python_%28programming_language%29 )`_ +`Python ( https://en.wikipedia.org/wiki/Python_%28programming_language%29 )` (blocks are indent-based and many keywords are similar). Its goal is to be optimized for and tightly integrated with Godot Engine, allowing great flexibility for content creation and integration. @@ -123,7 +123,7 @@ Identifiers ~~~~~~~~~~~ Any string that restricts itself to alphabetic characters (`a` to -`z` and `A` to `Z`), digits (`0` to `9`) and `_` qualifies +`z` and `A` to `Z`), digits (`0` to `9`) and `` qualifies as an identifier. Additionally, identifiers must not begin with a digit. Identifiers are case-sensitive (`foo` is different from `FOO`). @@ -135,17 +135,17 @@ keywords are reserved words (tokens), they can't be used as identifiers. Operators (like `in`, `not`, `and` or `or`) and names of built-in types as listed in the following sections are also reserved. -Keywords are defined in the `GDScript tokenizer ( https://github.com/godotengine/godot/blob/master/modules/gdscript/gdscript_tokenizer.cpp )`_ +Keywords are defined in the `GDScript tokenizer ( https://github.com/godotengine/godot/blob/master/modules/gdscript/gdscript_tokenizer.cpp )` in case you want to take a look under the hood. +------------+---------------------------------------------------------------------------------------------------------------+ | Keyword | Description | +============+===============================================================================================================+ -| if | See `if/else/elif`_. | +| if | See `if/else/elif`. | +------------+---------------------------------------------------------------------------------------------------------------+ -| elif | See `if/else/elif`_. | +| elif | See `if/else/elif`. | +------------+---------------------------------------------------------------------------------------------------------------+ -| else | See `if/else/elif`_. | +| else | See `if/else/elif`. | +------------+---------------------------------------------------------------------------------------------------------------+ | for | See for_. | +------------+---------------------------------------------------------------------------------------------------------------+ @@ -195,11 +195,11 @@ in case you want to take a look under the hood. +------------+---------------------------------------------------------------------------------------------------------------+ | breakpoint | Editor helper for debugger breakpoints. | +------------+---------------------------------------------------------------------------------------------------------------+ -| preload | Preloads a class or variable. See `Classes as resources`_. | +| preload | Preloads a class or variable. See `Classes as resources`. | +------------+---------------------------------------------------------------------------------------------------------------+ -| yield | Coroutine support. See `Coroutines with yield`_. | +| yield | Coroutine support. See `Coroutines with yield`. | +------------+---------------------------------------------------------------------------------------------------------------+ -| assert | Asserts a condition, logs error on failure. Ignored in non-debug builds. See `Assert keyword`_. | +| assert | Asserts a condition, logs error on failure. Ignored in non-debug builds. See `Assert keyword`. | +------------+---------------------------------------------------------------------------------------------------------------+ | remote | Networking RPC annotation. See `high-level multiplayer docs ( doc_high_level_multiplayer )`. | +------------+---------------------------------------------------------------------------------------------------------------+ @@ -309,7 +309,7 @@ Literals | `$NodePath` | Shorthand for `get_node("NodePath")` | +--------------------------+----------------------------------------+ -Integers and floats can have their numbers separated with `_` to make them more readable. +Integers and floats can have their numbers separated with `` to make them more readable. The following ways to write numbers are all valid:: 12_345_678 # Equal to 12345678. @@ -371,7 +371,7 @@ PoolRealArray store 32-bit single-precision "float" values. `String` ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -A sequence of characters in `Unicode format ( https://en.wikipedia.org/wiki/Unicode )`_. +A sequence of characters in `Unicode format ( https://en.wikipedia.org/wiki/Unicode )`. Strings can contain the following escape sequences: +---------------------+---------------------------------+ @@ -727,7 +727,7 @@ dictionary of that name. Functions ~~~~~~~~~ -Functions always belong to a `class Common -> Physics Fps. By default, it's set to run 60 times per second. @@ -58,11 +58,11 @@ gdscript GDScript pass ``` -The function `_process()` is not synchronized with physics. Its rate depends on +The function `process()` is not synchronized with physics. Its rate depends on hardware and game optimization. It also runs after the physics step in single-threaded games. -You can see the `_process()` function at work by creating a scene with a +You can see the `process()` function at work by creating a scene with a single Label node, with the following script attached to it: gdscript GDScript diff --git a/tutorials/scripting/nodes_and_scene_instances.md b/tutorials/scripting/nodes_and_scene_instances.md index abf5f56..7326dd6 100644 --- a/tutorials/scripting/nodes_and_scene_instances.md +++ b/tutorials/scripting/nodes_and_scene_instances.md @@ -11,7 +11,7 @@ Getting nodes You can get a reference to a node by calling the `Node.get_node() ( Node_method_get_node )` method. For this to work, the child node must be -present in the scene tree. Getting it in the parent node's `_ready()` function +present in the scene tree. Getting it in the parent node's `ready()` function guarantees that. If, for example, you have a scene tree like this, and you want to get a reference to the @@ -77,7 +77,7 @@ Syntactic sugar You can use two shorthands to shorten your code in GDScript. Firstly, putting the `onready` keyword before a member variable makes it initialize right before -the `_ready()` callback. +the `ready()` callback. .. code-block:: gdscript diff --git a/tutorials/scripting/overridable_functions.md b/tutorials/scripting/overridable_functions.md index 145956e..4c2e78a 100644 --- a/tutorials/scripting/overridable_functions.md +++ b/tutorials/scripting/overridable_functions.md @@ -14,22 +14,22 @@ See also: `doc_godot_notifications`. Two functions allow you to initialize and get nodes, besides the class's -constructor: `_enter_tree()` and `_ready()`. +constructor: `enter_tree()` and `ready()`. When the node enters the Scene Tree, it becomes active and the engine calls its -`_enter_tree()` method. That node's children may not be part of the active scene yet. As +`enter_tree()` method. That node's children may not be part of the active scene yet. As you can remove and re-add nodes to the scene tree, this function may be called multiple times throughout a node's lifetime. -Most of the time, you'll use `_ready()` instead. This function is called only -once in a node's lifetime, after `_enter_tree()`. `_ready()` ensures that all children +Most of the time, you'll use `ready()` instead. This function is called only +once in a node's lifetime, after `enter_tree()`. `ready()` ensures that all children have entered the scene tree first, so you can safely call `get_node()` on it. See also: To learn more about getting node references, read `doc_nodes_and_scene_instances`. -Another related callback is `_exit_tree()`, which the engine calls every time +Another related callback is `exit_tree()`, which the engine calls every time a node exits the scene tree. This can be when you call `Node.remove_child() ( Node_method_remove_child )` or when you free a node. @@ -50,7 +50,7 @@ gdscript GDScript pass ``` -The two virtual methods `_process()` and `_physics_process()` allow you to +The two virtual methods `process()` and `physics_process()` allow you to update the node, every frame and every physics frame respectively. For more information, read the dedicated documentation: `doc_idle_and_physics_processing`. @@ -70,11 +70,11 @@ gdscript GDScript Two more essential built-in node callback functions are `Node._unhandled_input()` and `Node._input()`, which you use to both receive -and process individual input events. The `_unhandled_input()` method receives +and process individual input events. The `unhandled_input()` method receives every key press, mouse click, etc. that have not been handled already in an -`_input()` callback or in a user interface component. You want to use it for -gameplay input in general. The `_input()` callback allows you to intercept and -process input events before `_unhandled_input()` gets them. +`input()` callback or in a user interface component. You want to use it for +gameplay input in general. The `input()` callback allows you to intercept and +process input events before `unhandled_input()` gets them. To learn more about inputs in Godot, see the `Input section