# Godot Engine Documentation in Vietnamese # Copyright (C) 2014-2022, Juan Linietsky, Ariel Manzur and the Godot community (CC-BY 3.0) # This file is distributed under the same license as the Godot Engine package. # # 01lifeleft <01lifeleft@gmail.com>, 2018. # 38569459 , 2018. # Dũng Đinh , 2019. # Giacat Buile , 2021. # Hai Long Nguyen Vu , 2020. # Hà Quang Dũng , 2021. # Hung , 2021. # IoeCmcomc , 2021-2022. # Kê Luyện , 2019. # mth2610 , 2018. # Nguyen Mao , 2021. # Peter Anh , 2019. # Rev , 2021. # Steve Dang , 2019-2020. # SyliawDeV , 2021. # Ta Anh , 2020. # TyTYct Hihi , 2019. # msgid "" msgstr "" "Project-Id-Version: Godot Engine latest\n" "Report-Msgid-Bugs-To: https://github.com/godotengine/godot-docs-l10n\n" "POT-Creation-Date: 2022-03-11 15:14+0100\n" "PO-Revision-Date: 2022-04-28 11:09+0000\n" "Last-Translator: IoeCmcomc \n" "Language-Team: Vietnamese \n" "Language: vi\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=1; plural=0;\n" "X-Generator: Weblate 4.12.1-dev\n" #: ../../docs/index.rst:64 msgid "General" msgstr "Tổng quan" #: ../../docs/index.rst:72 #: ../../docs/tutorials/platform/android/android_in_app_purchases.rst:35 #: ../../docs/tutorials/platform/android/android_in_app_purchases.rst:44 #: ../../docs/tutorials/vr/openxr/index.rst:16 #: ../../docs/community/contributing/index.rst:15 #: ../../docs/community/contributing/contributing_to_the_documentation.rst:15 msgid "Getting started" msgstr "Bắt đầu" #: ../../docs/index.rst:84 msgid "Tutorials" msgstr "Hướng dẫn" #: ../../docs/index.rst:114 msgid "Development" msgstr "Phát triển" #: ../../docs/index.rst:125 msgid "Community" msgstr "Cộng đồng" #: ../../docs/index.rst:136 msgid "Class reference" msgstr "Class tham khảo" #: ../../docs/index.rst:2 #, fuzzy msgid "Godot Docs – *3.4* branch" msgstr "Tài liệu Godot - nhánh *3.4*" #: ../../docs/index.rst:6 msgid "" "Godot's documentation is available in various languages and versions. Expand " "the \"Read the Docs\" panel at the bottom of the sidebar to see the list." msgstr "" "Tài liệu của Godot có các ngôn ngữ và phiên bản khác nhau. Mở rộng bảng " "\"Đọc tài liệu\" ở dưới cùng của thanh bên để xem danh sách." #: ../../docs/index.rst:10 #, fuzzy msgid "" "This is the documentation for the stable 3.4 branch. Looking for the " "documentation of the current **development** branch? `Have a look here " "`_. You can also browse the " "documentation for the current stable `3.3 `_ branch." msgstr "" "Tài liệu này dành cho nhánh 3.3 ổn định. Nếu bạn muốn tìm tài liệu cho nhánh " "**phát triển** hiện tại? `Nhấn vào đường dẫn sau `_. Bạn cũng có thể xem tài liệu dành cho nhánh `3.2 `_ ổn định cũ." #: ../../docs/index.rst:18 msgid "" "This documentation is translated from the `original English one `_ by community members on `Weblate `_." msgstr "" "Tài liệu này được dịch từ `bản gốc tiếng Anh ` _ bởi các thành viên cộng đồng trên` WebTable `_." #: ../../docs/index.rst:22 msgid "" "Depending on the translation effort's completion level, you may find " "paragraphs or whole pages which are still in English. You can help the " "community by providing new translations or reviewing existing ones on " "Weblate." msgstr "" "Tùy thuộc vào mức độ hoàn thành của nỗ lực dịch thuật, bạn có thể tìm thấy " "các đoạn hoặc toàn bộ trang vẫn bằng tiếng Anh. Bạn có thể giúp cộng đồng " "bằng cách cung cấp các bản dịch mới hoặc xem xét các bản dịch hiện có trên " "WebTable." #: ../../docs/index.rst:27 msgid "" "For the time being, localized translations are only available for the " "\"latest\" (development) branch, but should be suitable to learn how to use " "stable Godot releases nevertheless." msgstr "" "Hiện tại, các bản dịch được bản địa hóa chỉ có sẵn cho nhánh \"mới " "nhất\" (phát triển), nhưng vẫn phù hợp để tìm hiểu cách sử dụng các bản phát " "hành Godot ổn định." #: ../../docs/index.rst:31 msgid "" "Welcome to the official documentation of `Godot Engine `__, the free and open source community-driven 2D and 3D game engine! If " "you are new to this documentation, we recommend that you read the :ref:" "`introduction page ` to get an overview of what this " "documentation has to offer." msgstr "" "Chào mừng đến với tài liệu của `Godot Engine `, một " "công cụ phát triển game 2D và 3D mã nguồn mở, hoàn toàn miễn phí, được tạo " "ra vì cộng đồng! Nếu đây là lần đầu tiên bạn đến với tài liệu này, chúng tôi " "đề nghị bạn đọc trang giới thiệu để có cái nhìn tổng quan về tài liệu này." #: ../../docs/index.rst:37 msgid "" "The table of contents below and in the sidebar should let you easily access " "the documentation for your topic of interest. You can also use the search " "function in the top left corner." msgstr "" "Phần mục lục ở dưới đây và thanh bên cạnh sẽ giúp bạn dễ dàng truy cập đến " "những chủ đề bạn thích. Bạn cũng có thể dùng chức năng tìm kiếm ở góc trên " "bên trái." #: ../../docs/index.rst:41 msgid "" "You can also `download an HTML copy `__ for " "offline reading (updated every Monday). Extract the ZIP archive then open " "the top-level ``index.html`` in a web browser." msgstr "" "Bạn cũng có thể `tải một bản sao HTML `__ để đọc " "offline (cập nhật thứ hai hàng tuần). Giải nén tệp zip rồi mở ``index.html`` " "bằng trình duyệt." #: ../../docs/index.rst:45 msgid "" "Godot Engine is an open source project developed by a community of " "volunteers. The documentation team can always use your feedback and help to " "improve the tutorials and class reference. If you don't understand " "something, or cannot find what you are looking for in the docs, help us make " "the documentation better by letting us know!" msgstr "" "Godot Engine là 1 dự án mã nguồn mở được phát triển bởi các tình nguyện " "viên. Những phản hồi của bạn được dùng để giúp cải thiện các bài hướng dẫn " "và các tính năng liên quan. Nếu bạn không hiểu điều gì đó hoặc không tìm " "được thứ bạn muốn, xin hãy cho chúng tôi biết!" #: ../../docs/index.rst:52 #, fuzzy msgid "" "Submit an issue or pull request on the `GitHub repository `_, help us `translate the documentation " "`_ into your language, or " "talk to us on the ``#documentation`` channel on the `Godot Contributors Chat " "`_!" msgstr "" "Tạo một vấn đề (issue) hoặc yêu cầu (pull request) trên `GitHub repository " "`_, giúp chúng tôi `dịch " "bộ tài liệu `_ thành ngôn " "ngữ của bạn, thảo luận cùng nhau trên kênh ``#documentation`` trong `Discord " "`_, hoặc ``#godotengine-doc`` ở `irc.freenode." "net `_!" #: ../../docs/index.rst:61 msgid "weblate_widget" msgstr "weblate_widget" #: ../../docs/:0 #, fuzzy msgid "Translation status" msgstr "Sửa đổi giao diện" #: ../../docs/index.rst:62 msgid "" "The main documentation for the site is organized into the following sections:" msgstr "Phần tài liệu chính của trang được tổ chức như sau:" #: ../../docs/about/index.rst:2 #: ../../docs/tutorials/inputs/mouse_and_input_coordinates.rst:7 #: ../../docs/tutorials/scripting/gdscript/gdscript_advanced.rst:7 #: ../../docs/development/cpp/variant_class.rst:7 msgid "About" msgstr "Về chúng tôi" #: ../../docs/about/introduction.rst:4 #: ../../docs/getting_started/introduction/index.rst:6 #: ../../docs/tutorials/2d/2d_transforms.rst:7 #: ../../docs/tutorials/2d/using_tilemaps.rst:7 #: ../../docs/tutorials/2d/2d_movement.rst:7 #: ../../docs/tutorials/2d/2d_lights_and_shadows.rst:7 #: ../../docs/tutorials/2d/2d_meshes.rst:7 #: ../../docs/tutorials/2d/custom_drawing_in_2d.rst:7 #: ../../docs/tutorials/2d/2d_sprite_animation.rst:7 #: ../../docs/tutorials/3d/using_transforms.rst:7 #: ../../docs/tutorials/3d/3d_rendering_limitations.rst:7 #: ../../docs/tutorials/3d/spatial_material.rst:7 #: ../../docs/tutorials/3d/lights_and_shadows.rst:7 #: ../../docs/tutorials/3d/reflection_probes.rst:7 #: ../../docs/tutorials/3d/gi_probes.rst:7 #: ../../docs/tutorials/3d/baked_lightmaps.rst:7 #: ../../docs/tutorials/3d/high_dynamic_range.rst:7 #: ../../docs/tutorials/3d/using_gridmaps.rst:7 #: ../../docs/tutorials/3d/using_multi_mesh_instance.rst:7 #: ../../docs/tutorials/3d/portals/rooms_and_portals_example.rst:9 #: ../../docs/tutorials/animation/2d_skeletons.rst:7 #: ../../docs/tutorials/animation/animation_tree.rst:7 #: ../../docs/tutorials/audio/audio_buses.rst:7 #: ../../docs/tutorials/audio/audio_streams.rst:7 #: ../../docs/tutorials/audio/sync_with_audio.rst:7 #: ../../docs/tutorials/best_practices/introduction_best_practices.rst:4 #: ../../docs/tutorials/best_practices/project_organization.rst:7 #: ../../docs/tutorials/best_practices/version_control_systems.rst:7 #: ../../docs/tutorials/export/feature_tags.rst:7 #: ../../docs/tutorials/i18n/internationalizing_games.rst:7 #: ../../docs/tutorials/inputs/input_examples.rst:7 #: ../../docs/tutorials/io/saving_games.rst:7 #: ../../docs/tutorials/io/binary_serialization_api.rst:7 #: ../../docs/tutorials/math/vector_math.rst:7 #: ../../docs/tutorials/math/matrices_and_transforms.rst:7 #: ../../docs/tutorials/navigation/real_time_navigation_3d.rst:7 #: ../../docs/tutorials/networking/ssl_certificates.rst:7 #: ../../docs/tutorials/performance/index.rst:5 #: ../../docs/tutorials/performance/general_optimization.rst:7 #: ../../docs/tutorials/performance/gpu_optimization.rst:7 #: ../../docs/tutorials/performance/batching.rst:7 #: ../../docs/tutorials/physics/using_area_2d.rst:7 #: ../../docs/tutorials/physics/using_kinematic_body_2d.rst:7 #: ../../docs/tutorials/physics/ray-casting.rst:7 #: ../../docs/tutorials/physics/ragdoll_system.rst:7 #: ../../docs/tutorials/physics/kinematic_character_2d.rst:7 #: ../../docs/tutorials/platform/android/android_plugin.rst:7 #: ../../docs/tutorials/plugins/editor/import_plugins.rst:11 #: ../../docs/tutorials/plugins/editor/spatial_gizmos.rst:7 #: ../../docs/tutorials/rendering/viewports.rst:7 #: ../../docs/tutorials/scripting/gdscript/gdscript_basics.rst:7 #: ../../docs/tutorials/scripting/c_sharp/c_sharp_basics.rst:7 #: ../../docs/tutorials/scripting/gdnative/what_is_gdnative.rst:7 #: ../../docs/tutorials/scripting/gdnative/gdnative_c_example.rst:7 #: ../../docs/tutorials/scripting/gdnative/gdnative_cpp_example.rst:7 #: ../../docs/tutorials/scripting/filesystem.rst:7 #: ../../docs/tutorials/scripting/singletons_autoload.rst:7 #: ../../docs/tutorials/scripting/scene_tree.rst:7 #: ../../docs/tutorials/shaders/shader_reference/shading_language.rst:7 #: ../../docs/tutorials/shaders/your_first_shader/your_first_2d_shader.rst:7 #: ../../docs/tutorials/shaders/shader_materials.rst:7 #: ../../docs/tutorials/shaders/screen-reading_shaders.rst:7 #: ../../docs/tutorials/shaders/advanced_postprocessing.rst:7 #: ../../docs/tutorials/shaders/using_viewport_as_texture.rst:7 #: ../../docs/tutorials/shaders/custom_postprocessing.rst:7 #: ../../docs/tutorials/ui/bbcode_in_richtextlabel.rst:7 #: ../../docs/tutorials/vr/openxr/index.rst:9 #: ../../docs/tutorials/vr/oculus_mobile/developing_for_oculus_quest.rst:7 #: ../../docs/tutorials/vr/openvr/vr_starter_tutorial/vr_starter_tutorial_part_one.rst:7 #: ../../docs/tutorials/vr/openvr/vr_starter_tutorial/vr_starter_tutorial_part_two.rst:7 #: ../../docs/development/cpp/custom_godot_servers.rst:7 #: ../../docs/development/cpp/custom_resource_format_loaders.rst:7 #: ../../docs/development/cpp/custom_audiostreams.rst:7 #: ../../docs/development/editor/editor_style_guide.rst:7 #: ../../docs/community/contributing/best_practices_for_engine_contributors.rst:7 #: ../../docs/community/asset_library/submitting_to_assetlib.rst:7 msgid "Introduction" msgstr "Giới Thiệu" #: ../../docs/about/introduction.rst:11 msgid "" "Welcome to the official documentation of Godot Engine, the free and open " "source community-driven 2D and 3D game engine! Behind this mouthful, you " "will find a powerful yet user-friendly tool that you can use to develop any " "kind of game, for any platform and with no usage restriction whatsoever." msgstr "" "Chào mừng bạn đến với bộ tài liệu chính thức của Godot Engine, phần mềm phát " "triển game 2D và 3D miễn phí của cộng đồng mã nguồn mở! Đằng sau lời ngọt " "ngào này, bạn sẽ thấy một bộ công cụ mạnh mẽ nhưng thân thiện với người sử " "dụng mà bạn có thể sử dụng để phát triển bất kỳ loại trò chơi nào, cho bất " "kỳ nền tảng nào mà không hề bị hạn chế khi sử dụng." #: ../../docs/about/introduction.rst:16 msgid "" "This page gives a broad presentation of the engine and of the contents of " "this documentation, so that you know where to start if you are a beginner or " "where to look if you need info on a specific feature." msgstr "" "Trang này hướng tới mục đích đưa ra một bài thuyết trình rõ ràng về phần mềm " "và nội dung của bộ tài liệu này, để người mới sử dụng biết nên bắt đầu từ " "đâu, hoặc là nơi để tham khảo nếu đang cần tìm kiếm về một tính năng cụ thể " "nào đó." #: ../../docs/about/introduction.rst:21 msgid "Before you start" msgstr "Trước khi bạn bắt đầu" #: ../../docs/about/introduction.rst:23 msgid "" "The :ref:`Tutorials and resources ` page lists " "video tutorials contributed by the community. If you prefer video to text, " "those may be worth a look." msgstr "" "Trang \"Các hướng dẫn và tài liệu\" có liệt kê các video hướng dẫn được cộng " "đồng thực hiện. Hãy xem thử qua nếu bạn thích xem video hơn là đọc văn bản." #: ../../docs/about/introduction.rst:27 msgid "" "In case you have trouble with one of the tutorials or your project, you can " "find help on the various :ref:`Community channels `, " "especially the Godot Discord community, Q&A, and IRC." msgstr "" "Nếu bạn gặp khó khăn với một trong số các bài hướng dẫn hoặc dự án của bạn, " "bạn có thể tìm kiếm giúp đỡ trên các :ref:`Kênh cộng " "đồng`, đặc biệt là Discord cộng đồng của Godot, Q&A " "và IRC." #: ../../docs/about/introduction.rst:32 msgid "About Godot Engine" msgstr "Về Godot Engine" #: ../../docs/about/introduction.rst:34 msgid "" "A game engine is a complex tool, and it is therefore difficult to present " "Godot in a few words. Here's a quick synopsis, which you are free to reuse " "if you need a quick writeup about Godot Engine." msgstr "" "Phần mềm phát triển game là một công cụ phức tạp, do đó rất khó để miêu tả " "về Godot trong một vài từ. Tuy vậy, đây là bản trình bày trước công chúng " "của chúng tôi, bạn có thể sử dụng lại nó nếu cần viết nhanh về Godot Engine." #: ../../docs/about/introduction.rst:38 msgid "" "Godot Engine is a feature-packed, cross-platform game engine to create 2D " "and 3D games from a unified interface. It provides a comprehensive set of " "common tools, so users can focus on making games without having to reinvent " "the wheel. Games can be exported in one click to a number of platforms, " "including the major desktop platforms (Linux, macOS, Windows) as well as " "mobile (Android, iOS) and web-based (HTML5) platforms." msgstr "" "Godot Engine là một công cụ phát triển game đa nền tảng với đầy đủ tính " "năng, nhằm tạo ra các trò chơi 2D và 3D từ một giao diện thống nhất. Nó cung " "cấp một bộ công cụ chung để người dùng có thể tập trung làm game mà không " "cần phải viết lại những thứ có sẵn. Trò chơi có thể được xuất bản bằng một " "cú nhấn chuột cho một số nền tảng, bao gồm các nền tảng máy tính để bàn " "(Linux, macOS, Windows) cũng như cho điện thoại di động (Android, iOS) và " "nền tảng web (HTML5)." #: ../../docs/about/introduction.rst:45 msgid "" "Godot is completely free and open source under the permissive MIT license. " "No strings attached, no royalties, nothing. Users' games are 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 `_ not-for-profit." msgstr "" "Godot hoàn toàn miễn phí và mã nguồn mở theo giấy phép sử dụng MIT, không có " "bất kỳ ràng buộc hoặc chi phí nào cả. Trò chơi được tạo ra bởi người dùng " "hoàn toàn là của họ, đến tận dòng code cuối cùng. Sự phát triển của Godot là " "hoàn toàn độc lập và được thúc đẩy bởi cộng đồng, giúp người dùng có thể tuỳ " "biến phần mềm cho phù hợp với nhu cầu của họ. Godot được hỗ trợ bởi " "`Software Freedom Conservancy ` tutorial." msgstr "" "Để có cái nhìn chi tiết hơn về Godot Engine, chúng tôi khuyến khích bạn đọc " "thêm bộ tài liệu này, đặc biệt là bài hướng dẫn từng bước một: `Step by step " "` ." #: ../../docs/about/introduction.rst:57 msgid "About the documentation" msgstr "Về bộ tài liệu" #: ../../docs/about/introduction.rst:59 msgid "" "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 `_ markup " "language and then compiled into a static website/offline document using the " "open source `Sphinx `_ and `ReadTheDocs `_ tools." msgstr "" "Bộ tài liệu này được liên tục viết, sửa lỗi, chỉnh sửa và viết lại bởi các " "thành viên của cộng đồng Godot Engine. Nó được biên tập qua các tập tin văn " "bản trong ngôn ngữ đánh dấu `reStructuredText `_ và sau đó được biên soạn lại thành một trang web tĩnh/" "tài liệu ngoại tuyến sử dụng công cụ mã nguồn mở `Sphinx `_ và `ReadTheDocs `_ ." #: ../../docs/about/introduction.rst:66 msgid "" "You can contribute to Godot's documentation by opening issue tickets or " "sending patches via pull requests on its GitHub `source repository `_, or translating it into your language " "on `Hosted Weblate `_." msgstr "" "Bạn có thể đóng góp cho bộ tài liệu của Godot bằng cách gửi các yêu cầu " "(issue tickets) hoặc các bản vá thông qua GitHub của nó `_." #: ../../docs/about/introduction.rst:72 msgid "" "All the contents are under the permissive Creative Commons Attribution 3.0 " "(`CC-BY 3.0 `_) license, with " "attribution to \"Juan Linietsky, Ariel Manzur and the Godot Engine " "community\"." msgstr "" "Tất cả các nội dung đều thuộc giấy phép Creative Commons Attribution 3.0 (CC-" "BY 3.0 _ _), với sự cho phép " "của \"Juan Linietsky, Ariel Manzur và cộng đồng Godot Engine \"." #: ../../docs/about/introduction.rst:77 msgid "Organization of the documentation" msgstr "Cách tổ chức của bộ tài liệu" #: ../../docs/about/introduction.rst:79 msgid "" "This documentation is organized in five sections with an impressively " "unbalanced distribution of contents – but the way it is split up should be " "relatively intuitive:" msgstr "" "Bộ tài liệu này được tổ chức thành năm phần mất cân đối đến khó tin - tuy " "nhiên cách phân chia này lại tương đối trực quan:" #: ../../docs/about/introduction.rst:83 msgid "" "The :ref:`sec-general` section contains this introduction as well as " "information about the engine, its history, its licensing, authors, etc. It " "also contains the :ref:`doc_faq`." msgstr "" "Phần :ref:`sec-general` chứa thông tin giới thiệu này cũng như thông tin về " "phần mềm, lịch sử, giấy phép, tác giả, vv. Nó cũng chứa :ref:`doc_faq`." #: ../../docs/about/introduction.rst:86 msgid "" "The :ref:`sec-learn` section is the *raison d'être* of this documentation, " "as it contains all the necessary information on using the engine to make " "games. It starts with the :ref:`Step by step ` " "tutorial which should be the entry point for all new users." msgstr "" "Phần :ref:`sec-learn` là phần chính *raison d'être* của tài liệu này vì nó " "chứa tất cả các thông tin cần thiết về việc sử dụng phần mềm để có thể tạo " "ra các trò chơi. Nó bắt đầu bằng bài :ref:`Step by step ` và đây là điểm xuất phát tốt cho những người dùng mới." #: ../../docs/about/introduction.rst:91 msgid "" "The :ref:`sec-tutorials` section can be read as needed, in any order. It " "contains feature-specific tutorials and documentation." msgstr "" "Phần :ref:`sec-tutorials` có thể được đọc khi nào cần, theo bất kỳ thứ tự " "nào. Nó chứa nhiều bài hướng dẫn và tài liệu liên quan đến các tính năng cụ " "thể." #: ../../docs/about/introduction.rst:93 msgid "" "The :ref:`sec-devel` section is intended for advanced users and contributors " "to the engine development, with information on compiling the engine, " "developing C++ modules or editor plugins." msgstr "" "Phần :ref:`sec-devel` chỉ dành cho người dùng nâng cao và người dùng đóng " "góp vào sự phát triển của phần mềm, với thông tin về việc biên dịch phần " "mềm, phát triển các mô đun C ++ hoặc các phần mở rộng." #: ../../docs/about/introduction.rst:96 msgid "" "The :ref:`sec-community` section gives information related to contributing " "to engine development and the life of its community, e.g. how to report " "bugs, help with the documentation, etc. It also points to various community " "channels like IRC and Discord and contains a list of recommended third-party " "tutorials outside of this documentation." msgstr "" "Phần :ref:`sec-community` cung cấp thông tin liên quan đến đóng góp vào sự " "phát triển của phần mềm và hệ thống cộng đồng của nó, ví dụ: làm thế nào để " "báo lỗi, giúp viết các tài liệu, vv. Nó cũng chỉ đến các kênh cộng đồng khác " "nhau như IRC và Discord và chứa một danh sách các bài hướng dẫn được khuyến " "khích của bên thứ ba ngoài bộ tài liệu này." #: ../../docs/about/introduction.rst:101 msgid "" "Finally, the :ref:`sec-class-ref` is the documentation of the Godot API, " "which is also available directly within the engine's script editor. It is " "generated automatically from a file in the main source repository, therefore " "the generated files of the documentation are not meant to be modified. See :" "ref:`doc_updating_the_class_reference` for details." msgstr "" "Cuối cùng, phần :ref:`sec-class-ref` là tài liệu về Godot API, nó cũng có " "sẵn bên trong trình soạn thảo (script editor) của engine. Nó được tạo tự " "động từ một tệp trong kho lưu trữ chính, do đó các tệp được tạo ra của tài " "liệu không nên bị thay đổi. Xem :ref:`doc_updating_the_class_reference` để " "biết thêm chi tiết." #: ../../docs/about/introduction.rst:107 msgid "" "In addition to this documentation you may also want to take a look at the " "various `Godot demo projects `_." msgstr "" "Ngoài bộ tài liệu này, bạn cũng có thể xem thử các dự án demo có sẵn của " "Godot `Godot demo projects `_." #: ../../docs/about/introduction.rst:110 msgid "Have fun reading and making games with Godot Engine!" msgstr "Đọc và làm game với Godot Engine vui nhé!" #: ../../docs/about/faq.rst:1 msgid "FAQ" msgstr "FAQ" #: ../../docs/about/faq.rst:7 ../../docs/tutorials/performance/batching.rst:474 #: ../../docs/community/asset_library/what_is_assetlib.rst:42 msgid "Frequently asked questions" msgstr "Những câu hỏi thường gặp" #: ../../docs/about/faq.rst:10 msgid "" "What can I do with Godot? How much does it cost? What are the license terms?" msgstr "" "Tôi có thể làm gì với Godot? Nó mất bao nhiêu tiền? Điều kiện ràng buộc là " "gì?" #: ../../docs/about/faq.rst:12 msgid "" "Godot is `Free and Open-Source Software `_ available under the `OSI-approved `_ MIT license. This means it is free as in " "\"free speech\" as well as in \"free beer.\"" msgstr "" "Godot là phần mềm mã nguồn mở miễn phí có sẵn dưới giấy phép MIT `được công " "nhận bởi OSI `_. Thế nghĩa là bạn có " "quyền sử dụng tự do như ngôn luận và miễn phí như \"đồ chùa.\"" #: ../../docs/about/faq.rst:14 msgid "In short:" msgstr "Nói ngắn gọn:" #: ../../docs/about/faq.rst:16 #, fuzzy msgid "" "You are free to download and use Godot for any purpose: personal, non-" "profit, commercial, or otherwise." msgstr "" "Bạn có thể tự do tải và dùng Godot cho mọi mục đích, cá nhân, phi lợi nhuận, " "thương mại, gì cũng được." #: ../../docs/about/faq.rst:17 msgid "" "You are free to modify, distribute, redistribute, and remix Godot to your " "heart's content, for any reason, both non-commercially and commercially." msgstr "" "Bạn có thể tự do sửa đổi, phân phối, tái phân phối, và thay đổi Godot theo ý " "thích, vì bất kỳ lí do nào, cả phi thương mại lẫn thương mại." #: ../../docs/about/faq.rst:19 msgid "" "All the contents of this accompanying documentation are published under the " "permissive Creative Commons Attribution 3.0 (`CC-BY 3.0 `_) license, with attribution to \"Juan " "Linietsky, Ariel Manzur and the Godot Engine community.\"" msgstr "" "Tất cả nội dung của tài liệu này được cấp phép bởi giấy phép Creative " "Commons Attribution 3.0 (`CC-BY 3.0 `_), với thẩm quyền của \"Juan Linietsky, Ariel Manzur và cộng đồng " "Godot Engine\"." #: ../../docs/about/faq.rst:23 msgid "" "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." msgstr "" "Logos và icons có bản quyền giấy phép Creative Commons. Lưu ý rằng một số " "thư viện của bên thứ ba được bao gồm trong mã nguồn của Godot có thể có giấy " "phép khác." #: ../../docs/about/faq.rst:27 msgid "" "For full details, look at the `COPYRIGHT.txt `_ as well as the `LICENSE.txt `_ and `LOGO_LICENSE." "txt `_ " "files in the Godot repository." msgstr "" "Nếu muốn biết chi tiết, đọc tệp `COPYRIGHT.txt `_ và `LICENSE.txt `_và `LOGO_LICENSE.txt " "`_ trong " "thư viện lưu trữ của Godot." #: ../../docs/about/faq.rst:31 msgid "" "Also, see `the license page on the Godot website `_." msgstr "" "Đồng thời `xem trang giấy phép trên trang web của Godot tại `_." #: ../../docs/about/faq.rst:34 msgid "Which platforms are supported by Godot?" msgstr "Nền tảng nào được hỗ trợ bởi Godot?" #: ../../docs/about/faq.rst:36 msgid "**For the editor:**" msgstr "**Dành cho biên tập viên:**" #: ../../docs/about/faq.rst:38 #: ../../docs/tutorials/rendering/jitter_stutter.rst:59 #: ../../docs/development/compiling/compiling_with_mono.rst:334 msgid "Windows" msgstr "Windows" #: ../../docs/about/faq.rst:39 ../../docs/about/faq.rst:45 #: ../../docs/tutorials/editor/default_key_mapping.rst:27 #: ../../docs/tutorials/editor/default_key_mapping.rst:92 #: ../../docs/tutorials/editor/default_key_mapping.rst:145 #: ../../docs/tutorials/editor/default_key_mapping.rst:220 #: ../../docs/tutorials/editor/default_key_mapping.rst:301 #: ../../docs/tutorials/editor/default_key_mapping.rst:348 #: ../../docs/tutorials/editor/default_key_mapping.rst:373 #: ../../docs/tutorials/editor/default_key_mapping.rst:384 #: ../../docs/tutorials/editor/default_key_mapping.rst:397 #: ../../docs/tutorials/editor/default_key_mapping.rst:428 #: ../../docs/tutorials/editor/default_key_mapping.rst:441 #: ../../docs/tutorials/editor/default_key_mapping.rst:464 #: ../../docs/tutorials/editor/default_key_mapping.rst:481 #: ../../docs/tutorials/editor/default_key_mapping.rst:516 #: ../../docs/tutorials/inputs/controllers_gamepads_joysticks.rst:231 #: ../../docs/tutorials/rendering/jitter_stutter.rst:84 msgid "macOS" msgstr "macOS" #: ../../docs/about/faq.rst:40 ../../docs/about/faq.rst:46 msgid "X11 (Linux, \\*BSD)" msgstr "X11 (Linux, \\*BSD)" #: ../../docs/about/faq.rst:42 msgid "**For exporting your games:**" msgstr "**Để xuất bản trò chơi của bạn:**" #: ../../docs/about/faq.rst:44 msgid "Windows (and UWP)" msgstr "Windows (và UWP)" #: ../../docs/about/faq.rst:47 #: ../../docs/tutorials/export/exporting_basics.rst:326 #: ../../docs/tutorials/rendering/jitter_stutter.rst:90 #: ../../docs/development/compiling/compiling_with_mono.rst:326 msgid "Android" msgstr "Android" #: ../../docs/about/faq.rst:48 #: ../../docs/tutorials/export/exporting_basics.rst:382 #: ../../docs/tutorials/rendering/jitter_stutter.rst:96 #: ../../docs/development/compiling/compiling_with_mono.rst:328 msgid "iOS" msgstr "iOS" #: ../../docs/about/faq.rst:49 msgid "Web" msgstr "Web" #: ../../docs/about/faq.rst:51 msgid "" "Both 32- and 64-bit binaries are supported where it makes sense, with 64 " "being the default." msgstr "Cả 2 phiên bản 32 và 64 bit đều được hỗ trợ, với 64 bit là mặc định." #: ../../docs/about/faq.rst:54 msgid "" "Some users also report building and using Godot successfully on ARM-based " "systems with Linux, like the Raspberry Pi." msgstr "" "Vài người dùng được biết đang dựng và sử dụng thành công Godot trên hệ thống " "dựa trên ARM với Linux, như Raspberry Pi." #: ../../docs/about/faq.rst:57 msgid "" "Additionally, there is some unofficial third-party work being done on " "building for some consoles. However, none of this is included in the default " "build scripts or export templates at this time." msgstr "" "Ngoài ra, cũng có 1 số phiên bản không chính thức được xây dựng cho 1 số " "consoles. Tuy nhiên, không thứ gì trong những phiên bản này được xuất hiện " "trong bản chính thức cho đến hiện tại." #: ../../docs/about/faq.rst:61 msgid "" "For more on this, see the sections on :ref:`exporting ` and :ref:`compiling Godot yourself `." msgstr "" "Xem mục :ref:`exporting ` và :ref:`compiling " "Godot yourself ` để biết thêm chi tiết." #: ../../docs/about/faq.rst:65 msgid "Which programming languages are supported in Godot?" msgstr "Ngôn ngữ nào được hỗ trợ bởi Godot?" #: ../../docs/about/faq.rst:67 msgid "" "The officially supported languages for Godot are GDScript, Visual Scripting, " "C#, and C++. See the subcategories for each language in the :ref:`scripting " "` section." msgstr "" "Ngôn ngữ chính thức được hỗ trợ trong Godot là GDScript, Visual Scripting, " "C# và C++. Xem thêm thể loại con(subcategories) cho mỗi ngôn ngữ tại phần :" "ref:`scripting `." #: ../../docs/about/faq.rst:71 msgid "" "If you are just starting out with either Godot or game development in " "general, GDScript is the recommended language to learn and use since it is " "native to Godot. While scripting languages tend to be less performant than " "lower-level languages in the long run, for prototyping, developing Minimum " "Viable Products (MVPs), and focusing on Time-To-Market (TTM), GDScript will " "provide a fast, friendly, and capable way of developing your games." msgstr "" "Nếu bạn chỉ mới bắt đầu với Godot hoặc phát triển game nói chung, GDScript " "là ngôn ngữ được khuyến khích để học và sử dụng vì nó là đồ cây nhà lá vườn " "của Godot. Dù những ngôn ngữ soạn thảo thường chạy yếu hơn những ngôn ngữ " "bậc thấp về lâu dài, với prototyping, phát triển sản phẩm khả thi tối thiểu " "(MVPs), và tập trung vào Time-To-Market (TTM), GDScript sẽ cung cấp một giải " "pháp thiết kế game nhanh, thân thiện và hiệu quả." #: ../../docs/about/faq.rst:78 msgid "" "Note that C# support is still relatively new, and as such, you may encounter " "some 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 `_ is a great way to start your " "troubleshooting." msgstr "" "Cần chú ý rằng việc hỗ trợ C# vẫn còn mới, vì vậy bạn có thể sẽ gặp vài vấn " "đề về lâu dài. Cộng đồng phát triển thân thiện và cần cù luôn sẵn sàng để xử " "lí khi phát hiện những vấn đề mới, nhưng vì đây là dự án mã nguồn mở, chúng " "tôi khuyến khích bạn nên tự tìm hiểu về nó trước. Tìm kiếm trong những thảo " "luận trên `những vấn đề mở `_ " "là cách tuyệt vời để bắt đầu tìm hướng giải quyết." #: ../../docs/about/faq.rst:85 msgid "" "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 `_ " "and `Nim `_." msgstr "" "Với những ngôn ngữ mới, hỗ trợ là khả thi bằng nhóm thứ ba bằng cơ sở " "GDNative / NativeScript / PluginScript. (Xem câu hỏi về plugins bên dưới.) " "Những việc đang được thực hiện, ví dụ, trên phần không chính thức cho Godot " "cho `Python `_ và `Nim `_." #: ../../docs/about/faq.rst:93 msgid "What is GDScript and why should I use it?" msgstr "GDScript là gì và tại sao tôi nên sử dụng nó?" #: ../../docs/about/faq.rst:95 msgid "" "GDScript is Godot's integrated scripting language. It was built from the " "ground up to maximize Godot's potential in the least amount of code, " "affording both novice and expert developers alike to capitalize on Godot's " "strengths as fast as possible. If you've ever written anything in a language " "like Python before then you'll feel right at home. For examples, history, " "and a complete overview of the power GDScript offers you, check out the :ref:" "`GDScript scripting guide `." msgstr "" "GDScript là một ngôn ngữ kịch bản được tích hợp vào Godot. Nó được dựng từ " "đầu để phát huy tối đa tiềm năng của Godot trong việc sử dụng ít dòng code " "nhất, giúp cả lập trình viên nghiệp dư và thành thạo tận dụng tối đa sức " "mạnh của Godot nhanh nhất có thể. Nếu đã từng viết những ngôn ngữ như Python " "trước đây thì bạn sẽ cảm thấy rất quen thuộc. Nếu muốn có bài ví dụ, lịch " "sử, và một góc nhìn tổng quát về sức mạnh của GDScript, hãy xem thử `hướng " "dẫn sử dụng GDScript `_." #: ../../docs/about/faq.rst:102 msgid "" "There are several reasons to use GDScript--especially when you are " "prototyping, in alpha/beta stages of your project, or are not creating the " "next AAA title--but the most salient reason is the overall **reduction of " "complexity**." msgstr "" "Có vài lí do để sử dụng GDScript-- đặc biệt khi bạn đang viết bản chạy thử, " "trong quá trình alpha/beta của dự án, hoặc không có ý định tạo ra một tựa " "game AAA--nhưng lí do nổi bật nhất đó là **giảm độ phức tạp.**" #: ../../docs/about/faq.rst:106 msgid "" "The original intent of creating a tightly integrated, custom scripting " "language for Godot was two-fold: first, it reduces the amount of time " "necessary to get up and running with Godot, giving developers a rapid way of " "exposing themselves to the engine with a focus on productivity; second, it " "reduces the overall burden of maintenance, attenuates the dimensionality of " "issues, and allows the developers of the engine to focus on squashing bugs " "and improving features related to the engine core--rather than spending a " "lot of time trying to get a small set of incremental features working across " "a large set of languages." msgstr "" #: ../../docs/about/faq.rst:114 #, fuzzy msgid "" "Since Godot is an open-source project, it was imperative from the start to " "prioritize a more integrated and seamless experience over attracting " "additional users by supporting more familiar programming languages--" "especially when supporting those more familiar languages would result in a " "worse experience. We understand if you would rather use another language in " "Godot (see the list of supported options above). That being said, if you " "haven't given GDScript a try, try it for **three days**. Just like Godot, " "once you see how powerful it is and rapid your development becomes, we think " "GDScript will grow on you." msgstr "" "Câu trả lời ngắn là chúng tôi nghĩ những khó khăn cả về phía bạn (khi tìm " "hiểu về Godot và GDScript) và phía chúng tôi (bảo trì) đáng giá hơn việc thu " "hút thêm người dùng mới với ngôn ngữ mà họ quen thuộc và kết quả là một trải " "nghiệm tồi tệ. Chúng tôi thông cảm nếu bạn thích sử dụng ngôn ngữ khác trong " "Godot (xem danh sách các lựa chọn phía trên), nhưng chúng tôi khuyến khích " "bạn thử và trải nghiệm các lợi ích mà nó đem lại." #: ../../docs/about/faq.rst:123 msgid "" "More information about getting comfortable with GDScript or dynamically " "typed languages can be found in the :ref:`doc_gdscript_more_efficiently` " "tutorial." msgstr "" "Nhiều thông tin hơn về việc làm quen với GDScript hoặc ngôn ngữ nhập động có " "thể được tìm thấy trong bài hướng dẫn :ref:`doc_gdscript_more_efficiently`." #: ../../docs/about/faq.rst:127 msgid "What were the motivations behind creating GDScript?" msgstr "Động lực nào thúc đẩy việc tạo ra GDScript?" #: ../../docs/about/faq.rst:129 msgid "" "In the early days, the engine used the `Lua `__ " "scripting language. Lua is fast, but creating bindings to an object oriented " "system (by using fallbacks) was complex and slow and took an enormous amount " "of code. After some experiments with `Python `__, it " "also proved difficult to embed." msgstr "" #: ../../docs/about/faq.rst:135 msgid "" "The main reasons for creating a custom scripting language for Godot were:" msgstr "" "Những lí do chính trong việc tạo ra ngôn ngữ lập trình riêng cho Godot là:" #: ../../docs/about/faq.rst:137 #, fuzzy msgid "" "Poor threading support in most script VMs, and Godot uses threads (Lua, " "Python, Squirrel, JavaScript, ActionScript, etc.)." msgstr "" "Hỗ trợ thread kém trong đa số script VMs, và Godot sử dụng threads (Lua, " "Python, Squirrel, JS, AS, vv...)" #: ../../docs/about/faq.rst:139 #, fuzzy msgid "" "Poor class-extending support in most script VMs, and adapting to the way " "Godot works is highly inefficient (Lua, Python, JavaScript)." msgstr "" "Poor class-extending support in most script VMs, and adapting to the way " "Godot works is highly inefficient (Lua, Python, JS)." #: ../../docs/about/faq.rst:141 #, fuzzy msgid "" "Many existing languages have horrible interfaces for binding to C++, " "resulting in large amount of code, bugs, bottlenecks, and general " "inefficiency (Lua, Python, Squirrel, JavaScript, etc.) We wanted to focus on " "a great engine, not a great amount of integrations." msgstr "" "Giao diện phức tạp để kết nối với C++, kết quả là mã nguồn trở nên cồng " "kềnh, nhiều lỗi và không hiệu quả (Lua, Python, Squirrel, JS, vv.)" #: ../../docs/about/faq.rst:144 msgid "" "No native vector types (vector3, matrix4, etc.), resulting in highly reduced " "performance when using custom types (Lua, Python, Squirrel, JavaScript, " "ActionScript, etc.)." msgstr "" #: ../../docs/about/faq.rst:147 #, fuzzy msgid "" "Garbage collector results in stalls or unnecessarily large memory usage " "(Lua, Python, JavaScript, ActionScript, etc.)." msgstr "" "Thu gom rác thường làm đứng hoặc sử dụng quá nhiều bộ nhớ không cần thiết " "(Lua, Python, JS, AS, vv...)." #: ../../docs/about/faq.rst:149 #, fuzzy msgid "" "Difficulty to integrate with the code editor for providing code completion, " "live editing, etc. (all of them). This is well-supported by GDScript." msgstr "" "Khó khăn để tích hợp với code editor bằng cách cung cấp tính năng tự hoàn " "thành đoạn mã, chỉnh sửa trực tiếp, vv. (tất cả). Điều này được hỗ trợ tốt " "với GDScript." #: ../../docs/about/faq.rst:153 #, fuzzy msgid "GDScript was designed to curtail the issues above, and more." msgstr "GDScript đã được thiết kế để giải quyết những vấn đề và hơn nữa." #: ../../docs/about/faq.rst:156 msgid "What type of 3D model formats does Godot support?" msgstr "Godot hỗ trợ những định dạng mô hình 3D nào?" #: ../../docs/about/faq.rst:158 #, fuzzy msgid "" "Godot supports Collada via the `OpenCollada `_ exporter (Maya, 3DSMax). If you are " "using Blender, take a look at our own `Better Collada Exporter `_." msgstr "" "Godot hỗ trợ Collada qua `OpenCollada `_ exporter (Maya, 3DSMax)." #: ../../docs/about/faq.rst:161 msgid "As of Godot 3.0, glTF is supported." msgstr "Với Godot 3.0, glTF được hỗ trợ." #: ../../docs/about/faq.rst:163 msgid "" "FBX is supported via the Open Asset Import library. However, FBX is " "proprietary so we recommend using other formats listed above, if suitable " "for your workflow." msgstr "" #: ../../docs/about/faq.rst:167 #, fuzzy msgid "" "Will [insert closed SDK such as FMOD, GameWorks, etc.] be supported in Godot?" msgstr "Godot có hỗ trợ SDK đóng như PhysX, GameWorks, vv... không?" #: ../../docs/about/faq.rst:169 msgid "" "The aim of Godot is to create a free and open-source MIT-licensed engine " "that is modular and extendable. There are no plans for the core engine " "development community to support any third-party, closed-source/proprietary " "SDKs, as integrating with these would go against Godot's ethos." msgstr "" "Mục đích của Godot là tạo ra một công cụ được cấp phép MIT miễn phí và nguồn " "mở, có tính mô-đun và có thể mở rộng. Không có kế hoạch nào cho cộng đồng " "phát triển động cơ cốt lõi để hỗ trợ bất kỳ SDK độc quyền, nguồn đóng / độc " "quyền của bên thứ ba nào, vì việc tích hợp với chúng sẽ đi ngược lại các tôn " "chỉ của Godot." #: ../../docs/about/faq.rst:174 msgid "" "That said, because Godot is open-source and modular, nothing prevents you or " "anyone else interested in adding those libraries as a module and shipping " "your game with them--as either open- or closed-source." msgstr "" "Như đã nói, bởi vì Godot là mã nguồn mở và mô-đun, không có gì ngăn cản bạn " "hoặc bất kỳ ai thích thú với việc thêm các thư viện đó dưới dạng mô-đun và " "trao đổi trò chơi của bạn - dưới dạng nguồn mở hoặc nguồn đóng." #: ../../docs/about/faq.rst:178 msgid "" "To see how support for your SDK of choice could still be provided, look at " "the Plugins question below." msgstr "" #: ../../docs/about/faq.rst:181 msgid "" "If you know of a third-party SDK that is not supported by Godot but that " "offers free and open-source integration, consider starting the integration " "work yourself. Godot is not owned by one person; it belongs to the " "community, and it grows along with ambitious community contributors like you." msgstr "" "Nếu bạn biết tới một SDK bên thứ ba nào không được hỗ trợ bởi GOdot nhưng " "được cung cấp dưới dạng mã nguồn mở, hãy xem xét và tự mình tích hợp. Godot " "không được sở hữu bởi một cá nhân mà thuộc về cả cộng đồng, và nó sẽ phát " "triển với tham vọng của công động giống như bạn." #: ../../docs/about/faq.rst:187 msgid "Why does Godot use Vulkan or OpenGL instead of Direct3D?" msgstr "" #: ../../docs/about/faq.rst:189 msgid "" "Godot aims for cross-platform compatibility and open standards first and " "foremost. OpenGL and Vulkan are the technologies that are both open and " "available (nearly) on all platforms. Thanks to this design decision, a " "project developed with Godot on Windows will run out of the box on Linux, " "macOS, and more." msgstr "" #: ../../docs/about/faq.rst:195 msgid "" "Since Godot only has a few people working on its renderer, we would prefer " "having fewer rendering backends to maintain. On top of that, using a single " "API on all platforms allows for greater consistency with fewer platform-" "specific issues." msgstr "" #: ../../docs/about/faq.rst:200 msgid "" "In the long term, we may develop a Direct3D 12 renderer for Godot (mainly " "for the Xbox's purposes), but Vulkan and OpenGL will remain the default " "rendering backends on all platforms, including Windows." msgstr "" #: ../../docs/about/faq.rst:205 msgid "Why does Godot aim to keep its core feature set small?" msgstr "" #: ../../docs/about/faq.rst:207 msgid "" "Godot intentionally does not include features that can be implemented by add-" "ons unless they are used very often. One example of this would be advanced " "artificial intelligence functionality." msgstr "" #: ../../docs/about/faq.rst:211 #, fuzzy msgid "There are several reasons for this:" msgstr "Godot không có bất kỳ ràng buộc gì" #: ../../docs/about/faq.rst:213 msgid "" "**Code maintenance and surface for bugs.** Every time we accept new code in " "the Godot repository, existing contributors often take the reponsibility of " "maintaining it. Some contributors don't always stick around after getting " "their code merged, which can make it difficult for us to maintain the code " "in question. This can lead to poorly maintained features with bugs that are " "never fixed. On top of that, the \"API surface\" that needs to be tested and " "checked for regressions keeps increasing over time." msgstr "" #: ../../docs/about/faq.rst:221 msgid "" "**Ease of contribution.** By keeping the codebase small and tidy, it can " "remain fast and easy to compile from source. This makes it easier for new " "contributors to get started with Godot, without requiring them to purchase " "high-end hardware." msgstr "" #: ../../docs/about/faq.rst:226 msgid "" "**Keeping the binary size small for the editor.** Not everyone has a fast " "Internet connection. Ensuring that everyone can download the Godot editor, " "extract it and run it in less than 5 minutes makes Godot more accessible to " "developers in all countries." msgstr "" #: ../../docs/about/faq.rst:231 msgid "" "**Keeping the binary size small for export templates.** This directly " "impacts the size of projects exported with Godot. On mobile and web " "platforms, keeping file sizes low is primordial to ensure fast installation " "and loading on underpowered devices. Again, there are many countries where " "high-speed Internet is not readily available. To add to this, strict data " "usage caps are often in effect in those countries." msgstr "" #: ../../docs/about/faq.rst:238 msgid "" "For all the reasons above, we have to be selective of what we can accept as " "core functionality in Godot. This is why we are aiming to move some core " "functionality to officially supported add-ons in future versions of Godot. " "In terms of binary size, this also has the advance of making you pay only " "for what you actually use in your project. (In the meantime, you can :ref:" "`compile custom export templates with unused features disabled " "` to optimize the distribution size of your " "project.)" msgstr "" #: ../../docs/about/faq.rst:247 msgid "" "How should assets be created to handle multiple resolutions and aspect " "ratios?" msgstr "" "Làm sao để assets được tạo ra và kiểm soát được đúng với nhiều màn hình và " "độ tỉ lệ màn hình khác nhau?" #: ../../docs/about/faq.rst:249 #, fuzzy msgid "" "This question pops up often and it's probably thanks to the misunderstanding " "created by Apple when they originally doubled the resolution of their " "devices. It made people think that having the same assets in different " "resolutions was a good idea, so many continued towards that path. That " "originally worked to a point and only for Apple devices, but then several " "Android and Apple devices with different resolutions and aspect ratios were " "created, with a very wide range of sizes and DPIs." msgstr "" "Câu hỏi này xuất hiện thường xuyên vì sự hiểu lầm mà Apple tạo ra khi họ " "nhân đôi độ phân giải trong các thiết bị của họ. Điều này khiến mọi người " "nghĩ có ảnh(assets) với các độ phân giải khác nhau là một lựa chọn tốt nên " "nhiều người vẫn làm vậy. Nó chỉ làm việc với các thiết bị ban đầu của Apple, " "tuy nhiên sau đó thì các thiết bị Android và Apple với nhiều độ phân giải, " "tỉ lệ màn hình khác nhau được tạo ra, với nhiều kích thước và DPI." #: ../../docs/about/faq.rst:257 #, fuzzy msgid "" "The most common and proper way to achieve this is to, instead, use a single " "base resolution for the game and only handle different screen aspect ratios. " "This is mostly needed for 2D, as in 3D it's just a matter of Camera XFov or " "YFov." msgstr "" "Cách thông dụng nhất để đạt được điều đó là dùng một độ phân giải gốc cho " "trò chơi và chỉ quan tâm đến tỉ lệ màn hình. Điều này chủ yếu quan trọng " "trong 2D, khi mà trong 3D thì đó chỉ là vấn đề của Camera XFov hoặc YFov." #: ../../docs/about/faq.rst:261 #, fuzzy msgid "" "Choose a single base resolution for your game. Even if there are devices " "that go up to 2K and devices that go down to 400p, regular hardware scaling " "in your device will take care of this at little or no performance cost. Most " "common choices are either near 1080p (1920x1080) or 720p (1280x720). Keep in " "mind the higher the resolution, the larger your assets, the more memory they " "will take and the longer the time it will take for loading." msgstr "" "Chọn một độ phân giải gốc cho trò chơi của bạn. Thậm chí khi có thiết bị với " "độ phân giải đến 2K hoặc chỉ 400p, phần cứng trong thiết bị sẽ lo việc còn " "lại với 1 ít hoặc không ảnh hưởng đến hiệu năng. Phần lớn lựa chọn gần 1080p " "(1920x1080) hoặc 720p (1280x720). Lưu ý rằng độ phân giải càng cao thì kích " "thước tài nguyên của bạn càng lớn, chúng sẽ chiếm nhiều bộ nhớ và thời gian " "để nạp hơn." #: ../../docs/about/faq.rst:269 msgid "" "Use the stretch options in Godot; 2D stretching while keeping aspect ratios " "works best. Check the :ref:`doc_multiple_resolutions` tutorial on how to " "achieve this." msgstr "" #: ../../docs/about/faq.rst:273 msgid "" "Determine a minimum resolution and then decide if you want your game to " "stretch vertically or horizontally for different aspect ratios, or if there " "is one aspect ratio and you want black bars to appear instead. This is also " "explained in :ref:`doc_multiple_resolutions`." msgstr "" #: ../../docs/about/faq.rst:278 msgid "" "For user interfaces, use the :ref:`anchoring ` to " "determine where controls should stay and move. If UIs are more complex, " "consider learning about Containers." msgstr "" #: ../../docs/about/faq.rst:282 msgid "And that's it! Your game should work in multiple resolutions." msgstr "Thế là xong! Trò chơi của bạn sẽ hoạt động trên nhiều độ phân giải." #: ../../docs/about/faq.rst:284 msgid "" "If there is a desire to make your game also work on ancient devices with " "tiny screens (fewer than 300 pixels in width), you can use the export option " "to shrink images, and set that build to be used for certain screen sizes in " "the App Store or Google Play." msgstr "" "Nếu muốn trò chơi của bạn chạy được trên những thiết bị cổ đại với màn hình " "nhỏ (chiều rộng nhỏ hơn 300 pixel), bạn có thể sử dụng lựa chọn xuất là thu " "nhỏ hình ảnh, và chỉnh bản dựng đó để có thể sử dụng với một số kích cỡ màn " "hình trên App Store hoặc Google Play." #: ../../docs/about/faq.rst:290 msgid "How can I extend Godot?" msgstr "Làm sao để mở rộng Godot?" #: ../../docs/about/faq.rst:292 #, fuzzy msgid "" "For extending Godot, like creating Godot Editor plugins or adding support " "for additional languages, take a look at :ref:`EditorPlugins " "` and tool scripts." msgstr "" "Để mở rộng Godot, như tạo plugin cho Godot Editor hoặc hỗ trợ thêm ngôn ngữ " "khác, xem thử :ref:`EditorPlugins ` và tool scripts." #: ../../docs/about/faq.rst:296 #, fuzzy msgid "Also, see the official blog posts on these topics:" msgstr "" "Ngoài ra bạn có thể xem thử những bài blog chính thức về những vấn đề này:" #: ../../docs/about/faq.rst:298 msgid "" "`A look at the GDNative architecture `_" msgstr "" "`Xem thử cấu trúc của GDNative `_" #: ../../docs/about/faq.rst:299 msgid "`GDNative is here! `_" msgstr "`GDNative đây! `_" #: ../../docs/about/faq.rst:301 msgid "" "You can also take a look at the GDScript implementation, the Godot modules, " "as well as the `unofficial Python support `_ for Godot. This would be a good starting point to see how " "another third-party library integrates with Godot." msgstr "" "Bạn có thể xem qua cách GDScript được thực thi, đó cũng là 1 Mô-đun của " "Godot, đường dẫn `unofficial Python support `_ for Godot. Đây có lẽ là cách khá tốt để hiểu cách mà một thư " "viện bên thứ ba được tích hợp vào Godot." #: ../../docs/about/faq.rst:307 msgid "When is the next release of Godot out?" msgstr "" #: ../../docs/about/faq.rst:309 #, fuzzy msgid "" "When it's ready! See :ref:`doc_release_policy_when_is_next_release_out` for " "more information." msgstr "Xem: ref:`doc_instancing` để tìm hiểu thêm về cách sử dụng instance." #: ../../docs/about/faq.rst:313 msgid "I would like to contribute! How can I get started?" msgstr "Tôi muốn đóng góp! Làm sao để bắt đầu?" #: ../../docs/about/faq.rst:315 msgid "" "Awesome! As an open-source project, Godot thrives off of the innovation and " "ambition of developers like you." msgstr "" "Tuyệt vời! Vì là một dự án mã nguồn mở, Godot phát triển hơn là nhờ sự nhiệt " "huyết và sáng kiến của những lập trình viên như bạn." #: ../../docs/about/faq.rst:318 msgid "" "The first place to get started is in the `issues `_. Find an issue that resonates with you, then " "proceed to the `How to Contribute `_ guide to learn how to " "fork, modify, and submit a Pull Request (PR) with your changes." msgstr "" #: ../../docs/about/faq.rst:323 msgid "I have a great idea for Godot. How can I share it?" msgstr "Tôi có một sáng kiến tuyệt vời cho Godot. Làm sao để chia sẻ nó?" #: ../../docs/about/faq.rst:325 msgid "" "It might be tempting to want to bring ideas to Godot, like ones that 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 `_, `squashing bugs and addressing issues `_, and conversations between Godot " "community members." msgstr "" #: ../../docs/about/faq.rst:334 msgid "" "Most developers in the Godot community will be more interested to learn " "about things like:" msgstr "" "Đa số lập trình viên ở cộng đồng Godot sẽ thích thú hơn khi biết thêm về " "những điều như:" #: ../../docs/about/faq.rst:337 msgid "" "Your experience using the software and the problems you have (we care about " "this much more than ideas on how to improve it)." msgstr "" "Quá trình trải nghiệm phần mềm và những vấn đề bạn gặp phải (chúng tôi quan " "tâm tới điều này nhiều hơn là ý kiến về việc làm sao để cải thiện nó)." #: ../../docs/about/faq.rst:339 msgid "" "The features you would like to see implemented because you need them for " "your project." msgstr "" "Những tính năng bạn muốn thấy được tích hợp vì đang cần nó cho dự án của bạn." #: ../../docs/about/faq.rst:341 msgid "" "The concepts that were difficult to understand while learning the software." msgstr "Những khái niệm quá mơ hồ khi đang học phần mềm." #: ../../docs/about/faq.rst:342 msgid "The parts of your workflow you would like to see optimized." msgstr "Những phần trong tiến trình công việc mà bạn muốn thấy được tối ưu." #: ../../docs/about/faq.rst:343 msgid "" "Parts where you missed clear tutorials or where the documentation wasn't " "clear." msgstr "Những phần thiếu bài hướng dẫn rõ ràng hoặc tài liệu chưa dễ hiểu." #: ../../docs/about/faq.rst:345 msgid "" "Please don't feel like your ideas for Godot are unwelcome. Instead, try to " "reformulate them as a problem first, so developers and the community have a " "functional foundation to ground your ideas on." msgstr "" "Đừng nghĩ rẳng những ý tưởng của bạn cho Godot là vô ích. Bạn nên thử giải " "quyết nó như một vấn đề trước, sau đó các nhà phát triển và cộng đồng sẽ có " "một chức năng dựa trên ý tưởng đó." #: ../../docs/about/faq.rst:349 msgid "" "A good way to approach sharing your ideas and problems with the community is " "as a set of user stories. Explain what you are trying to do, what behavior " "you expect to happen, and then what behavior actually happened. Framing " "problems and ideas this way will help the whole community stay focused on " "improving developer experiences as a whole." msgstr "" #: ../../docs/about/faq.rst:355 msgid "" "Bonus points for bringing screenshots, concrete numbers, test cases, or " "example projects (if applicable)." msgstr "" "Cộng thêm điểm cho ai có ảnh chụp màn hình, số liệu cụ thể, bài test, hoặc " "project mẫu (nếu được)." #: ../../docs/about/faq.rst:361 msgid "Is it possible to use Godot to create non-game applications?" msgstr "" #: ../../docs/about/faq.rst:363 msgid "" "Yes! Godot features an extensive built-in UI system, and its small " "distribution size can make it a suitable alternative to frameworks like " "Electron or Qt." msgstr "" #: ../../docs/about/faq.rst:366 msgid "" "When creating a non-game application, make sure to enable :ref:`low-" "processor mode ` in the Project Settings to decrease CPU and GPU usage." msgstr "" #: ../../docs/about/faq.rst:370 msgid "" "That said, we wouldn't recommend using Godot to create a *mobile* " "application since low-processor mode isn't supported on mobile platforms yet." msgstr "" #: ../../docs/about/faq.rst:373 msgid "" "Check out `Material Maker `__ " "and `Pixelorama `__ for " "examples of open source applications made with Godot." msgstr "" #: ../../docs/about/faq.rst:380 msgid "Is it possible to use Godot as a library?" msgstr "" #: ../../docs/about/faq.rst:382 msgid "" "Godot is meant to be used with its editor. We recommend you give it a try, " "as it will most likely save you time in the long term. There are no plans to " "make Godot usable as a library, as it would make the rest of the engine more " "convoluted and difficult to use for casual users." msgstr "" #: ../../docs/about/faq.rst:387 msgid "" "If you want to use a rendering library, look into using an established " "rendering engine instead. Keep in mind rendering engines usually have " "smaller communities compared to Godot. This will make it more difficult to " "find answers to your questions." msgstr "" #: ../../docs/about/faq.rst:393 msgid "What user interface toolkit does Godot use?" msgstr "" #: ../../docs/about/faq.rst:395 msgid "" "Godot does not use a standard :abbr:`GUI (Graphical User Interface)` toolkit " "like GTK, Qt or wxWidgets. Instead, Godot uses its own user interface " "toolkit, rendered using OpenGL ES or Vulkan. This toolkit is exposed in the " "form of Control nodes, which are used to render the editor (which is written " "in C++). These Control nodes can also be used in projects from any scripting " "language supported by Godot." msgstr "" #: ../../docs/about/faq.rst:402 msgid "" "This custom toolkit makes it possible to benefit from hardware acceleration " "and have a consistent appearance across all platforms. On top of that, it " "doesn't have to deal with the LGPL licensing caveats that come with GTK or " "Qt. Lastly, this means Godot is \"eating its own dog food\" since the editor " "itself is one of the most complex users of Godot's UI system." msgstr "" #: ../../docs/about/faq.rst:408 msgid "" "This custom UI toolkit :ref:`can't be used as a library " "`, but you can still :ref:`use Godot to create " "non-game applications by using the editor `." msgstr "" #: ../../docs/about/faq.rst:415 msgid "Why does Godot not use STL (Standard Template Library)?" msgstr "" #: ../../docs/about/faq.rst:417 msgid "" "Like many other libraries (Qt as an example), Godot does not make use of " "STL. We believe STL is a great general purpose library, but we had special " "requirements for Godot." msgstr "" #: ../../docs/about/faq.rst:421 msgid "" "STL templates create very large symbols, which results in huge debug " "binaries. We use few templates with very short names instead." msgstr "" #: ../../docs/about/faq.rst:422 msgid "" "Most of our containers cater to special needs, like Vector, which uses copy " "on write and we use to pass data around, or the RID system, which requires " "O(1) access time for performance. Likewise, our hash map implementations are " "designed to integrate seamlessly with internal engine types." msgstr "" #: ../../docs/about/faq.rst:423 msgid "" "Our containers have memory tracking built-in, which helps better track " "memory usage." msgstr "" #: ../../docs/about/faq.rst:424 msgid "" "For large arrays, we use pooled memory, which can be mapped to either a " "preallocated buffer or virtual memory." msgstr "" #: ../../docs/about/faq.rst:425 msgid "" "We use our custom String type, as the one provided by STL is too basic and " "lacks proper internationalization support." msgstr "" #: ../../docs/about/faq.rst:428 msgid "Why does Godot not use exceptions?" msgstr "" #: ../../docs/about/faq.rst:430 msgid "" "We believe games should not crash, no matter what. If an unexpected " "situation happens, Godot will print an error (which can be traced even to " "script), but then it will try to recover as gracefully as possible and keep " "going." msgstr "" #: ../../docs/about/faq.rst:435 msgid "" "Additionally, exceptions significantly increase binary size for the " "executable." msgstr "" #: ../../docs/about/faq.rst:439 msgid "Why does Godot not enforce RTTI?" msgstr "" #: ../../docs/about/faq.rst:441 msgid "" "Godot provides its own type-casting system, which can optionally use RTTI " "internally. Disabling RTTI in Godot means considerably smaller binary sizes " "can be achieved, at a little performance cost." msgstr "" #: ../../docs/about/faq.rst:446 msgid "Why does Godot not force users to implement DoD (Data oriented Design)?" msgstr "" #: ../../docs/about/faq.rst:448 msgid "" "While Godot internally for a lot of the heavy performance tasks attempts to " "use cache coherency as well as possible, we believe most users don't really " "need to be forced to use DoD practices." msgstr "" #: ../../docs/about/faq.rst:452 msgid "" "DoD is mostly a cache coherency optimization that can only gain you " "significant performance improvements when dealing with dozens of thousands " "of objects (which are processed every frame with little modification). As " "in, if you are moving a few hundred sprites or enemies per frame, DoD won't " "help you, and you should consider a different approach to optimization." msgstr "" #: ../../docs/about/faq.rst:459 msgid "" "The vast majority of games do not need this and Godot provides handy helpers " "to do the job for most cases when you do." msgstr "" #: ../../docs/about/faq.rst:462 msgid "" "If a game that really needs to process such large amount of objects is " "needed, our recommendation is to use C++ and GDNative for the high " "performance parts and GDScript (or C#) for the rest of the game." msgstr "" #: ../../docs/about/faq.rst:467 msgid "How can I support Godot development or contribute?" msgstr "Làm sao để hỗ trợ hoặc góp sức cho việc phát triển Godot?" #: ../../docs/about/faq.rst:469 msgid "See :ref:`doc_ways_to_contribute`." msgstr "Xem :ref:`doc_ways_to_contribute`." #: ../../docs/about/faq.rst:472 msgid "Who is working on Godot? How can I contact you?" msgstr "Ai đang phát triển Godot? Làm sao để liên hê người đó?" #: ../../docs/about/faq.rst:474 msgid "" "See the corresponding page on the `Godot website `_." msgstr "" #: ../../docs/about/troubleshooting.rst:4 #: ../../docs/tutorials/inputs/controllers_gamepads_joysticks.rst:178 #: ../../docs/tutorials/platform/android/android_plugin.rst:162 #: ../../docs/development/compiling/compiling_for_windows.rst:240 #: ../../docs/development/compiling/compiling_for_android.rst:196 #: ../../docs/development/editor/creating_icons.rst:92 msgid "Troubleshooting" msgstr "" #: ../../docs/about/troubleshooting.rst:6 msgid "" "This page lists common issues encountered when using Godot and possible " "solutions." msgstr "" #: ../../docs/about/troubleshooting.rst:10 msgid "" "See :ref:`doc_using_the_web_editor` for caveats specific to the HTML5 " "version of the Godot editor." msgstr "" #: ../../docs/about/troubleshooting.rst:14 msgid "" "Everything I do in the editor or project manager appears delayed by one " "frame." msgstr "" #: ../../docs/about/troubleshooting.rst:16 msgid "" "This is a `known bug `__ " "on Intel graphics drivers on Windows. Updating to the latest graphics driver " "version *provided by Intel* should fix the issue." msgstr "" #: ../../docs/about/troubleshooting.rst:20 msgid "" "You should use the graphics driver provided by Intel rather than the one " "provided by your desktop or laptop's manufacturer because their version is " "often outdated." msgstr "" #: ../../docs/about/troubleshooting.rst:25 msgid "" "The grid disappears and meshes turn black when I rotate the 3D camera in the " "editor." msgstr "" #: ../../docs/about/troubleshooting.rst:27 msgid "" "This is a `known bug `__ " "on Intel graphics drivers on Windows." msgstr "" #: ../../docs/about/troubleshooting.rst:30 msgid "" "The only workaround, for now, is to switch to the GLES2 renderer. You can " "switch the renderer in the top-right corner of the editor or the Project " "Settings." msgstr "" #: ../../docs/about/troubleshooting.rst:33 msgid "" "If you use a computer allowing you to switch your graphics card, like NVIDIA " "Optimus, you can use the dedicated graphics card to run Godot." msgstr "" #: ../../docs/about/troubleshooting.rst:37 msgid "The editor or project takes a very long time to start." msgstr "" #: ../../docs/about/troubleshooting.rst:39 msgid "" "This is a `known bug `__ " "on Windows when you have specific USB peripherals connected. In particular, " "Corsair's iCUE software seems to cause the bug. Try updating your USB " "peripherals' drivers to their latest version. If the bug persists, you need " "to disconnect the faulty peripherals before opening the editor. You can then " "connect the peripheral again." msgstr "" #: ../../docs/about/troubleshooting.rst:47 msgid "" "Editor tooltips in the Inspector and Node docks blink when they're displayed." msgstr "" #: ../../docs/about/troubleshooting.rst:49 msgid "" "This is a `known issue `__ caused by the third-party Stardock Fences application on " "Windows. The only known workaround is to disable Stardock Fences while using " "Godot." msgstr "" #: ../../docs/about/troubleshooting.rst:54 msgid "The Godot editor appears frozen after clicking the system console." msgstr "" #: ../../docs/about/troubleshooting.rst:56 msgid "" "When running Godot on Windows with the system console enabled, you can " "accidentally enable *selection mode* by clicking inside the command window. " "This Windows-specific behavior pauses the application to let you select text " "inside the system console. Godot cannot override this system-specific " "behavior." msgstr "" #: ../../docs/about/troubleshooting.rst:61 msgid "" "To solve this, select the system console window and press Enter to leave " "selection mode." msgstr "" #: ../../docs/about/troubleshooting.rst:65 msgid "" "Some text such as \"NO DC\" appears in the top-left corner of the project " "manager and editor window." msgstr "" #: ../../docs/about/troubleshooting.rst:67 msgid "" "This is caused by the NVIDIA graphics driver injecting an overlay to display " "information." msgstr "" #: ../../docs/about/troubleshooting.rst:69 msgid "" "To disable this overlay on Windows, restore your graphics driver settings to " "the default values in the NVIDIA Control Panel." msgstr "" #: ../../docs/about/troubleshooting.rst:72 msgid "" "To disable this overlay on Linux, open ``nvidia-settings``, go to **X Screen " "0 > OpenGL Settings** then uncheck **Enable Graphics API Visual Indicator**." msgstr "" #: ../../docs/about/troubleshooting.rst:76 msgid "The project window appears blurry, unlike the editor." msgstr "" #: ../../docs/about/troubleshooting.rst:78 msgid "" "Unlike the editor, the project isn't marked as DPI-aware by default. This is " "done to improve performance, especially on integrated graphics, where " "rendering 3D scenes in hiDPI is slow." msgstr "" #: ../../docs/about/troubleshooting.rst:82 msgid "" "To resolve this, open **Project > Project Settings** and enable **Display > " "Window > Dpi > Allow Hidpi**. On top of that, make sure your project is " "configured to support :ref:`multiple resolutions `." msgstr "" #: ../../docs/about/troubleshooting.rst:87 msgid "The project window doesn't appear centered when I run the project." msgstr "" #: ../../docs/about/troubleshooting.rst:89 msgid "" "This is a `known bug `__. " "To resolve this, open **Project > Project Settings** and enable **Display > " "Window > Dpi > Allow Hidpi**. On top of that, make sure your project is " "configured to support :ref:`multiple resolutions `." msgstr "" #: ../../docs/about/troubleshooting.rst:95 msgid "" "The project works when run from the editor, but fails to load some files " "when running from an exported copy." msgstr "" #: ../../docs/about/troubleshooting.rst:97 msgid "" "This is usually caused by forgetting to specify a filter for non-resource " "files in the Export dialog. By default, Godot will only include actual " "*resources* into the PCK file. Some files commonly used, such as JSON files, " "are not considered resources. For example, if you load ``test.json`` in the " "exported project, you need to specify ``*.json`` in the non-resource export " "filter. See :ref:`doc_exporting_projects_export_mode` for more information." msgstr "" #: ../../docs/about/troubleshooting.rst:104 msgid "" "On Windows, this can also be due to :ref:`case sensitivity " "` issues. If you reference a " "resource in your script with a different case than on the filesystem, " "loading will fail once you export the project. This is because the virtual " "PCK filesystem is case-sensitive, while Windows's filesystem is case-" "insensitive by default." msgstr "" #: ../../docs/about/list_of_features.rst:4 #, fuzzy msgid "List of features" msgstr "Chụp" #: ../../docs/about/list_of_features.rst:6 msgid "This page aims to list all features currently supported by Godot." msgstr "" #: ../../docs/about/list_of_features.rst:10 msgid "" "This page lists features supported by the current stable version of Godot " "(3.3). `More features `__ are available in the latest development version " "(4.0)." msgstr "" #: ../../docs/about/list_of_features.rst:15 msgid "Features" msgstr "Tính năng" #: ../../docs/about/list_of_features.rst:18 msgid "Platforms" msgstr "" #: ../../docs/about/list_of_features.rst:20 msgid "**Can run both the editor and exported projects:**" msgstr "" #: ../../docs/about/list_of_features.rst:22 msgid "Windows 7 and later (64-bit and 32-bit)." msgstr "" #: ../../docs/about/list_of_features.rst:23 msgid "macOS 10.12 and later (64-bit, x86 and ARM)." msgstr "" #: ../../docs/about/list_of_features.rst:24 msgid "Linux (64-bit and 32-bit, x86 and ARM)." msgstr "" #: ../../docs/about/list_of_features.rst:26 msgid "" "Binaries are statically linked and can run on any distribution if compiled " "on an old enough base distribution." msgstr "" #: ../../docs/about/list_of_features.rst:28 msgid "Official binaries are compiled on Ubuntu 14.04." msgstr "" #: ../../docs/about/list_of_features.rst:30 msgid "HTML5 via WebAssembly (Firefox, Chrome, Edge, Opera)." msgstr "" #: ../../docs/about/list_of_features.rst:32 msgid "**Runs exported projects:**" msgstr "" #: ../../docs/about/list_of_features.rst:34 msgid "Android 4.4 and later." msgstr "" #: ../../docs/about/list_of_features.rst:35 msgid "iOS 10.0 and later." msgstr "" #: ../../docs/about/list_of_features.rst:36 msgid ":ref:`Consoles `." msgstr "" #: ../../docs/about/list_of_features.rst:37 msgid "" ":ref:`Headless Linux and macOS servers " "`." msgstr "" #: ../../docs/about/list_of_features.rst:39 msgid "" "Godot aims to be as platform-independent as possible and can be ported to " "new platforms with relative ease." msgstr "" #: ../../docs/about/list_of_features.rst:43 #: ../../docs/tutorials/editor/external_editor.rst:34 #: ../../docs/development/compiling/compiling_with_mono.rst:196 msgid "Editor" msgstr "Trình chỉnh sửa" #: ../../docs/about/list_of_features.rst:45 #: ../../docs/about/list_of_features.rst:90 #: ../../docs/about/list_of_features.rst:355 msgid "**Features:**" msgstr "" #: ../../docs/about/list_of_features.rst:47 msgid "Scene tree editor." msgstr "" #: ../../docs/about/list_of_features.rst:48 #, fuzzy msgid "Script editor." msgstr "Thiết lập scene" #: ../../docs/about/list_of_features.rst:49 msgid "" "Support for :ref:`external script editors ` such as " "Visual Studio Code or Vim." msgstr "" #: ../../docs/about/list_of_features.rst:51 msgid "GDScript :ref:`debugger `." msgstr "" #: ../../docs/about/list_of_features.rst:53 msgid "No support for debugging in threads yet." msgstr "" #: ../../docs/about/list_of_features.rst:54 msgid "Performance monitoring tools." msgstr "" #: ../../docs/about/list_of_features.rst:55 msgid "Live script reloading." msgstr "" #: ../../docs/about/list_of_features.rst:56 msgid "Live scene editing." msgstr "" #: ../../docs/about/list_of_features.rst:58 msgid "" "Changes will reflect in the editor and will be kept after closing the " "running project." msgstr "" #: ../../docs/about/list_of_features.rst:60 msgid "Remote inspector." msgstr "" #: ../../docs/about/list_of_features.rst:62 msgid "" "Changes won't reflect in the editor and won't be kept after closing the " "running project." msgstr "" #: ../../docs/about/list_of_features.rst:64 msgid "Live camera replication." msgstr "" #: ../../docs/about/list_of_features.rst:66 msgid "Move the in-editor camera and see the result in the running project." msgstr "" #: ../../docs/about/list_of_features.rst:68 msgid "Use the editor in dozens of languages contributed by the community." msgstr "" #: ../../docs/about/list_of_features.rst:70 msgid "**Plugins:**" msgstr "" #: ../../docs/about/list_of_features.rst:72 msgid "" "Editor plugins can be downloaded from the :ref:`asset library " "` to extend editor functionality." msgstr "" #: ../../docs/about/list_of_features.rst:74 msgid "" "Create your own plugins using GDScript to add new features or speed up your " "workflow." msgstr "" #: ../../docs/about/list_of_features.rst:75 msgid "" "Download projects from the asset library in the project manager and import " "them directly." msgstr "" #: ../../docs/about/list_of_features.rst:78 msgid "2D graphics" msgstr "" #: ../../docs/about/list_of_features.rst:80 #: ../../docs/about/list_of_features.rst:147 msgid "**Two renderers available:**" msgstr "" #: ../../docs/about/list_of_features.rst:82 #: ../../docs/about/list_of_features.rst:149 msgid "OpenGL ES 3.0 renderer (uses OpenGL 3.3 on desktop platforms)." msgstr "" #: ../../docs/about/list_of_features.rst:84 #: ../../docs/about/list_of_features.rst:151 msgid "High-end visuals. Recommended on desktop platforms." msgstr "" #: ../../docs/about/list_of_features.rst:86 #: ../../docs/about/list_of_features.rst:154 msgid "OpenGL ES 2.0 renderer (uses OpenGL 2.1 on desktop platforms)." msgstr "" #: ../../docs/about/list_of_features.rst:88 #: ../../docs/about/list_of_features.rst:156 msgid "Recommended on mobile and Web platforms." msgstr "" #: ../../docs/about/list_of_features.rst:92 msgid "Sprite, polygon and line rendering." msgstr "" #: ../../docs/about/list_of_features.rst:94 msgid "" "High-level tools to draw lines and polygons such as Polygon2D and Line2D." msgstr "" #: ../../docs/about/list_of_features.rst:96 msgid "AnimatedSprite as a helper for creating animated sprites." msgstr "" #: ../../docs/about/list_of_features.rst:97 msgid "Parallax layers." msgstr "" #: ../../docs/about/list_of_features.rst:99 msgid "Pseudo-3D support by automatically duplicating a layer several times." msgstr "" #: ../../docs/about/list_of_features.rst:101 msgid "2D lighting with normal maps." msgstr "" #: ../../docs/about/list_of_features.rst:103 msgid "Hard or soft shadows." msgstr "" #: ../../docs/about/list_of_features.rst:105 msgid "" "Font rendering using bitmaps (BitmapFont) or rasterization using FreeType " "(DynamicFont)." msgstr "" #: ../../docs/about/list_of_features.rst:107 msgid "Bitmap fonts can be exported using tools like BMFont." msgstr "" #: ../../docs/about/list_of_features.rst:108 msgid "" "DynamicFont supports monochrome fonts as well as colored fonts (e.g. for " "emoji). Supported formats are TTF, OTF and WOFF1." msgstr "" #: ../../docs/about/list_of_features.rst:110 msgid "" "DynamicFont supports optional font outlines with adjustable width and color." msgstr "" #: ../../docs/about/list_of_features.rst:111 msgid "" "Support for font oversampling to keep fonts sharp at higher resolutions." msgstr "" #: ../../docs/about/list_of_features.rst:113 msgid "GPU-based particles with support for custom particle shaders." msgstr "" #: ../../docs/about/list_of_features.rst:114 #: ../../docs/about/list_of_features.rst:228 msgid "CPU-based particles." msgstr "" #: ../../docs/about/list_of_features.rst:117 #, fuzzy msgid "2D tools" msgstr "Công cụ" #: ../../docs/about/list_of_features.rst:119 msgid "2D camera with built-in smoothing and drag margins." msgstr "" #: ../../docs/about/list_of_features.rst:120 msgid "Path2D node to represent a path in 2D space." msgstr "" #: ../../docs/about/list_of_features.rst:122 #: ../../docs/about/list_of_features.rst:269 msgid "Can be drawn in the editor or generated procedurally." msgstr "" #: ../../docs/about/list_of_features.rst:123 msgid "PathFollow2D node to make nodes follow a Path2D." msgstr "" #: ../../docs/about/list_of_features.rst:125 msgid "2D geometry helper class." msgstr "" #: ../../docs/about/list_of_features.rst:126 msgid "Line2D node to draw textured 2D lines." msgstr "" #: ../../docs/about/list_of_features.rst:129 msgid "2D physics" msgstr "" #: ../../docs/about/list_of_features.rst:131 #: ../../docs/about/list_of_features.rst:277 msgid "**Physics bodies:**" msgstr "" #: ../../docs/about/list_of_features.rst:133 #: ../../docs/about/list_of_features.rst:279 #, fuzzy msgid "Static bodies." msgstr "Tạo các node" #: ../../docs/about/list_of_features.rst:134 #: ../../docs/about/list_of_features.rst:280 msgid "Rigid bodies." msgstr "" #: ../../docs/about/list_of_features.rst:135 #: ../../docs/about/list_of_features.rst:281 msgid "Kinematic bodies." msgstr "" #: ../../docs/about/list_of_features.rst:136 #: ../../docs/about/list_of_features.rst:283 msgid "Joints." msgstr "" #: ../../docs/about/list_of_features.rst:137 #: ../../docs/about/list_of_features.rst:286 msgid "Areas to detect bodies entering or leaving it." msgstr "" #: ../../docs/about/list_of_features.rst:139 #: ../../docs/about/list_of_features.rst:288 msgid "**Collision detection:**" msgstr "" #: ../../docs/about/list_of_features.rst:141 msgid "Built-in shapes: line, box, circle, capsule." msgstr "" #: ../../docs/about/list_of_features.rst:142 msgid "" "Collision polygons (can be drawn manually or generated from a sprite in the " "editor)." msgstr "" #: ../../docs/about/list_of_features.rst:145 msgid "3D graphics" msgstr "" #: ../../docs/about/list_of_features.rst:152 msgid "HDR rendering with sRGB." msgstr "" #: ../../docs/about/list_of_features.rst:157 msgid "LDR rendering for greater compatibility." msgstr "" #: ../../docs/about/list_of_features.rst:158 msgid "" "Not all features are available. Features available only when using the " "OpenGL ES 3.0 renderer are marked *GLES3* below." msgstr "" #: ../../docs/about/list_of_features.rst:161 msgid "**Camera:**" msgstr "" #: ../../docs/about/list_of_features.rst:163 msgid "Perspective, orthographic and frustum-offset cameras." msgstr "" #: ../../docs/about/list_of_features.rst:165 msgid "**Physically-based rendering:**" msgstr "" #: ../../docs/about/list_of_features.rst:167 msgid "Follows the Disney PBR model." msgstr "" #: ../../docs/about/list_of_features.rst:168 msgid "Uses a roughness-metallic workflow with support for ORM textures." msgstr "" #: ../../docs/about/list_of_features.rst:169 #, fuzzy msgid "Normal mapping." msgstr "Tạo nội dung" #: ../../docs/about/list_of_features.rst:170 msgid "" "*GLES3:* Parallax/relief mapping with automatic level of detail based on " "distance." msgstr "" #: ../../docs/about/list_of_features.rst:171 msgid "*GLES3:* Sub-surface scattering and transmittance." msgstr "" #: ../../docs/about/list_of_features.rst:172 msgid "*GLES3:* Proximity fade (soft particles)." msgstr "" #: ../../docs/about/list_of_features.rst:173 msgid "" "Distance fade which can use alpha blending or dithering to avoid going " "through the transparent pipeline." msgstr "" #: ../../docs/about/list_of_features.rst:175 msgid "Dithering can be determined on a per-pixel or per-object basis." msgstr "" #: ../../docs/about/list_of_features.rst:177 msgid "**Real-time lighting:**" msgstr "" #: ../../docs/about/list_of_features.rst:179 msgid "Directional lights (sun/moon). Up to 4 per scene." msgstr "" #: ../../docs/about/list_of_features.rst:180 msgid "Omnidirectional lights." msgstr "" #: ../../docs/about/list_of_features.rst:181 msgid "Spot lights with adjustable cone angle and attenuation." msgstr "" #: ../../docs/about/list_of_features.rst:183 msgid "**Shadow mapping:**" msgstr "" #: ../../docs/about/list_of_features.rst:185 msgid "" "*DirectionalLight:* Orthogonal (fastest), PSSM 2-split and 4-split. Supports " "blending between splits." msgstr "" #: ../../docs/about/list_of_features.rst:187 msgid "" "*OmniLight:* Dual paraboloid (fast) or cubemap (slower but more accurate). " "Supports colored projector textures in the form of panoramas." msgstr "" #: ../../docs/about/list_of_features.rst:189 msgid "*SpotLight:* Single texture." msgstr "" #: ../../docs/about/list_of_features.rst:191 msgid "**Global illumination with indirect lighting:**" msgstr "" #: ../../docs/about/list_of_features.rst:193 msgid "Baked lightmaps (fast, but can't be updated at run-time)." msgstr "" #: ../../docs/about/list_of_features.rst:195 msgid "" "Supports baking indirect light only or baking both direct and indirect " "lighting. The bake mode can be adjusted on a per-light basis to allow for " "hybrid light baking setups." msgstr "" #: ../../docs/about/list_of_features.rst:198 msgid "" "Supports lighting dynamic objects using an automatic octree-based system. No " "manual probe placement is required." msgstr "" #: ../../docs/about/list_of_features.rst:200 msgid "Lightmaps are baked on the CPU." msgstr "" #: ../../docs/about/list_of_features.rst:202 msgid "*GLES3:* GI probes (slower, semi-real-time). Supports reflections." msgstr "" #: ../../docs/about/list_of_features.rst:204 msgid "**Reflections:**" msgstr "" #: ../../docs/about/list_of_features.rst:206 msgid "*GLES3:* Voxel-based reflections (when using GI probes)." msgstr "" #: ../../docs/about/list_of_features.rst:207 msgid "" "Fast baked reflections or slow real-time reflections using ReflectionProbe. " "Parallax correction can optionally be enabled." msgstr "" #: ../../docs/about/list_of_features.rst:209 msgid "*GLES3:* Screen-space reflections." msgstr "" #: ../../docs/about/list_of_features.rst:210 msgid "" "Reflection techniques can be mixed together for greater accuracy or " "scalability." msgstr "" #: ../../docs/about/list_of_features.rst:212 msgid "**Sky:**" msgstr "" #: ../../docs/about/list_of_features.rst:214 msgid "Panorama sky (using an HDRI)." msgstr "" #: ../../docs/about/list_of_features.rst:215 msgid "Procedural sky." msgstr "" #: ../../docs/about/list_of_features.rst:217 msgid "**Fog:**" msgstr "" #: ../../docs/about/list_of_features.rst:219 msgid "Depth fog with an adjustable attenuation curve." msgstr "" #: ../../docs/about/list_of_features.rst:220 msgid "Height fog (floor or ceiling) with adjustable attenuation." msgstr "" #: ../../docs/about/list_of_features.rst:221 msgid "" "Support for automatic depth fog color depending on the camera direction (to " "match the sun color)." msgstr "" #: ../../docs/about/list_of_features.rst:223 msgid "Optional transmittance to make lights more visible in the fog." msgstr "" #: ../../docs/about/list_of_features.rst:225 #, fuzzy msgid "**Particles:**" msgstr "Tạo các node" #: ../../docs/about/list_of_features.rst:227 msgid "*GLES3:* GPU-based particles with support for custom particle shaders." msgstr "" #: ../../docs/about/list_of_features.rst:230 #, fuzzy msgid "**Post-processing:**" msgstr "Đang xử lý" #: ../../docs/about/list_of_features.rst:232 msgid "Tonemapping (Linear, Reinhard, Filmic, ACES)." msgstr "" #: ../../docs/about/list_of_features.rst:233 msgid "*GLES3:* Automatic exposure adjustments based on viewport brightness." msgstr "" #: ../../docs/about/list_of_features.rst:234 msgid "*GLES3:* Near and far depth of field." msgstr "" #: ../../docs/about/list_of_features.rst:235 msgid "*GLES3:* Screen-space ambient occlusion." msgstr "" #: ../../docs/about/list_of_features.rst:236 msgid "" "*GLES3:* Optional debanding to avoid color banding (effective when HDR " "rendering is enabled)." msgstr "" #: ../../docs/about/list_of_features.rst:237 msgid "" "Glow/bloom with optional bicubic upscaling and several blend modes " "available: Screen, Soft Light, Add, Replace." msgstr "" #: ../../docs/about/list_of_features.rst:239 msgid "Color correction using an one-dimensional ramp." msgstr "" #: ../../docs/about/list_of_features.rst:240 msgid "Brightness, contrast and saturation adjustments." msgstr "" #: ../../docs/about/list_of_features.rst:242 msgid "**Texture filtering:**" msgstr "" #: ../../docs/about/list_of_features.rst:244 msgid "Nearest, bilinear, trilinear or anisotropic filtering." msgstr "" #: ../../docs/about/list_of_features.rst:246 msgid "**Texture compression:**" msgstr "" #: ../../docs/about/list_of_features.rst:248 msgid "*GLES3:* BPTC for high-quality compression (not supported on macOS)." msgstr "" #: ../../docs/about/list_of_features.rst:249 msgid "*GLES3:* ETC2 (not supported on macOS)." msgstr "" #: ../../docs/about/list_of_features.rst:250 msgid "ETC1 (recommended when using the GLES2 renderer)." msgstr "" #: ../../docs/about/list_of_features.rst:251 msgid "*GLES3:* S3TC (not supported on mobile/Web platforms)." msgstr "" #: ../../docs/about/list_of_features.rst:253 msgid "**Anti-aliasing:**" msgstr "" #: ../../docs/about/list_of_features.rst:255 #, fuzzy msgid "Multi-sample antialiasing (MSAA)." msgstr "Nhiều instance" #: ../../docs/about/list_of_features.rst:256 #, fuzzy msgid "Fast approximate antialiasing (FXAA)." msgstr "Nhiều instance" #: ../../docs/about/list_of_features.rst:258 msgid "" "Most of these effects can be adjusted for better performance or to further " "improve quality. This can be helpful when using Godot for offline rendering." msgstr "" #: ../../docs/about/list_of_features.rst:262 #, fuzzy msgid "3D tools" msgstr "Công cụ" #: ../../docs/about/list_of_features.rst:264 msgid "Built-in meshes: cube, cylinder/cone, (hemi)sphere, prism, plane, quad." msgstr "" #: ../../docs/about/list_of_features.rst:265 msgid "" "Tools for :ref:`procedural geometry generation `." msgstr "" #: ../../docs/about/list_of_features.rst:266 msgid "" ":ref:`Constructive solid geometry ` (intended for " "prototyping)." msgstr "" #: ../../docs/about/list_of_features.rst:267 msgid "Path3D node to represent a path in 3D space." msgstr "" #: ../../docs/about/list_of_features.rst:270 msgid "PathFollow3D node to make nodes follow a Path3D." msgstr "" #: ../../docs/about/list_of_features.rst:272 msgid "3D geometry helper class." msgstr "" #: ../../docs/about/list_of_features.rst:275 msgid "3D physics" msgstr "" #: ../../docs/about/list_of_features.rst:282 msgid "Vehicle bodies (intended for arcade physics, not simulation)." msgstr "" #: ../../docs/about/list_of_features.rst:284 msgid "Soft bodies." msgstr "" #: ../../docs/about/list_of_features.rst:285 msgid "Ragdolls." msgstr "" #: ../../docs/about/list_of_features.rst:290 msgid "Built-in shapes: cuboid, sphere, capsule, cylinder." msgstr "" #: ../../docs/about/list_of_features.rst:291 msgid "Generate triangle collision shapes for any mesh from the editor." msgstr "" #: ../../docs/about/list_of_features.rst:292 msgid "" "Generate one or several convex collision shapes for any mesh from the editor." msgstr "" #: ../../docs/about/list_of_features.rst:295 #: ../../docs/tutorials/shaders/index.rst:2 msgid "Shaders" msgstr "" #: ../../docs/about/list_of_features.rst:297 msgid "*2D:* Custom vertex, fragment, and light shaders." msgstr "" #: ../../docs/about/list_of_features.rst:298 msgid "*3D:* Custom vertex, fragment, light, and sky shaders." msgstr "" #: ../../docs/about/list_of_features.rst:299 msgid "" "Text-based shaders using a :ref:`shader language inspired by GLSL " "`." msgstr "" #: ../../docs/about/list_of_features.rst:300 #, fuzzy msgid "Visual shader editor." msgstr "Android" #: ../../docs/about/list_of_features.rst:302 #, fuzzy msgid "Support for visual shader plugins." msgstr "Android" #: ../../docs/about/list_of_features.rst:305 #: ../../docs/about/docs_changelog.rst:113 #: ../../docs/tutorials/networking/http_request_class.rst:29 #: ../../docs/tutorials/scripting/index.rst:2 msgid "Scripting" msgstr "" #: ../../docs/about/list_of_features.rst:307 #, fuzzy msgid "**General:**" msgstr "Tổng quan" #: ../../docs/about/list_of_features.rst:309 msgid "Object-oriented design pattern with scripts extending nodes." msgstr "" #: ../../docs/about/list_of_features.rst:310 msgid "Signals and groups for communicating between scripts." msgstr "" #: ../../docs/about/list_of_features.rst:311 msgid "" "Support for :ref:`cross-language scripting `." msgstr "" #: ../../docs/about/list_of_features.rst:312 msgid "" "Many 2D and 3D linear algebra data types such as vectors and transforms." msgstr "" #: ../../docs/about/list_of_features.rst:314 msgid ":ref:`GDScript: `" msgstr "" #: ../../docs/about/list_of_features.rst:316 msgid "" ":ref:`High-level interpreted language ` with :ref:`optional " "static typing `." msgstr "" #: ../../docs/about/list_of_features.rst:318 msgid "Syntax inspired by Python." msgstr "" #: ../../docs/about/list_of_features.rst:319 msgid "Syntax highlighting is provided on GitHub." msgstr "" #: ../../docs/about/list_of_features.rst:320 msgid "" ":ref:`Use threads ` to perform asynchronous " "actions or make use of multiple processor cores." msgstr "" #: ../../docs/about/list_of_features.rst:323 msgid ":ref:`C#: `" msgstr "" #: ../../docs/about/list_of_features.rst:325 msgid "Packaged in a separate binary to keep file sizes and dependencies down." msgstr "" #: ../../docs/about/list_of_features.rst:326 msgid "Uses Mono 6.x." msgstr "" #: ../../docs/about/list_of_features.rst:328 msgid "Full support for the C# 7.0 syntax and features." msgstr "" #: ../../docs/about/list_of_features.rst:330 msgid "Supports all platforms." msgstr "" #: ../../docs/about/list_of_features.rst:331 msgid "" "Using an external editor is recommended to benefit from IDE functionality." msgstr "" #: ../../docs/about/list_of_features.rst:333 msgid ":ref:`VisualScript: `" msgstr "" #: ../../docs/about/list_of_features.rst:335 msgid "" ":ref:`Graph-based visual scripting language `." msgstr "" #: ../../docs/about/list_of_features.rst:336 msgid "" "Works best when used for specific purposes (such as level-specific logic) " "rather than as a language to create entire projects." msgstr "" #: ../../docs/about/list_of_features.rst:339 msgid "**GDNative (C, C++, Rust, D, ...):**" msgstr "" #: ../../docs/about/list_of_features.rst:341 msgid "" "When you need it, link to native libraries for higher performance and third-" "party integrations." msgstr "" #: ../../docs/about/list_of_features.rst:343 msgid "" "For scripting game logic, GDScript or C# are recommended if their " "performance is suitable." msgstr "" #: ../../docs/about/list_of_features.rst:346 msgid "Official bindings for C and C++." msgstr "" #: ../../docs/about/list_of_features.rst:348 msgid "Use any build system and language features you wish." msgstr "" #: ../../docs/about/list_of_features.rst:350 msgid "" "Maintained D, Kotlin, Python, Nim, and Rust bindings provided by the " "community." msgstr "" #: ../../docs/about/list_of_features.rst:353 #: ../../docs/about/docs_changelog.rst:28 #: ../../docs/tutorials/audio/index.rst:2 #: ../../docs/tutorials/export/exporting_for_web.rst:161 msgid "Audio" msgstr "Âm thanh" #: ../../docs/about/list_of_features.rst:357 msgid "Mono, stereo, 5.1 and 7.1 output." msgstr "" #: ../../docs/about/list_of_features.rst:358 msgid "Non-positional and positional playback in 2D and 3D." msgstr "" #: ../../docs/about/list_of_features.rst:360 msgid "Optional Doppler effect in 2D and 3D." msgstr "" #: ../../docs/about/list_of_features.rst:362 msgid "" "Support for re-routable :ref:`audio buses ` and effects " "with dozens of effects included." msgstr "" #: ../../docs/about/list_of_features.rst:364 msgid "" "Listener3D node to listen from a position different than the camera in 3D." msgstr "" #: ../../docs/about/list_of_features.rst:365 msgid "" "Audio input to record microphones with real-time access using the " "AudioEffectCapture class." msgstr "" #: ../../docs/about/list_of_features.rst:366 #, fuzzy msgid "MIDI input." msgstr "Nhập" #: ../../docs/about/list_of_features.rst:368 msgid "No support for MIDI output yet." msgstr "" #: ../../docs/about/list_of_features.rst:370 msgid "**APIs used:**" msgstr "" #: ../../docs/about/list_of_features.rst:372 msgid "*Windows:* WASAPI." msgstr "" #: ../../docs/about/list_of_features.rst:373 msgid "*macOS:* CoreAudio." msgstr "" #: ../../docs/about/list_of_features.rst:374 msgid "*Linux:* PulseAudio or ALSA." msgstr "" #: ../../docs/about/list_of_features.rst:377 msgid "Import" msgstr "Nhập" #: ../../docs/about/list_of_features.rst:379 msgid "Support for :ref:`custom import plugins `." msgstr "" #: ../../docs/about/list_of_features.rst:381 msgid "**Formats:**" msgstr "" #: ../../docs/about/list_of_features.rst:383 msgid "*Images:* See :ref:`doc_import_images`." msgstr "" #: ../../docs/about/list_of_features.rst:384 #, fuzzy msgid "*Audio:*" msgstr "Âm thanh" #: ../../docs/about/list_of_features.rst:386 msgid "WAV with optional IMA-ADPCM compression." msgstr "" #: ../../docs/about/list_of_features.rst:387 msgid "Ogg Vorbis." msgstr "" #: ../../docs/about/list_of_features.rst:388 msgid "MP3." msgstr "" #: ../../docs/about/list_of_features.rst:390 msgid "*3D scenes:*" msgstr "" #: ../../docs/about/list_of_features.rst:392 msgid "glTF 2.0 *(recommended)*." msgstr "" #: ../../docs/about/list_of_features.rst:393 msgid "" "`ESCN `__ (direct " "export from Blender)." msgstr "" #: ../../docs/about/list_of_features.rst:395 msgid "FBX (experimental)." msgstr "" #: ../../docs/about/list_of_features.rst:396 msgid "Collada (.dae)." msgstr "" #: ../../docs/about/list_of_features.rst:397 msgid "Wavefront OBJ (static scenes only, can be loaded directly as a mesh)." msgstr "" #: ../../docs/about/list_of_features.rst:400 #: ../../docs/tutorials/rendering/viewports.rst:38 #: ../../docs/tutorials/ui/custom_gui_controls.rst:112 msgid "Input" msgstr "Đầu vào" #: ../../docs/about/list_of_features.rst:402 msgid "" "Input mapping system using hardcoded input events or remappable input " "actions." msgstr "" #: ../../docs/about/list_of_features.rst:404 msgid "" "Axis values can be mapped to two different actions with a configurable " "deadzone." msgstr "" #: ../../docs/about/list_of_features.rst:405 msgid "Use the same code to support both keyboards and gamepads." msgstr "" #: ../../docs/about/list_of_features.rst:407 #, fuzzy msgid "Keyboard input." msgstr "Kiểm tra đầu vào." #: ../../docs/about/list_of_features.rst:409 msgid "" "Keys can be mapped in \"physical\" mode to be independent of the keyboard " "layout." msgstr "" #: ../../docs/about/list_of_features.rst:411 msgid "Mouse input." msgstr "" #: ../../docs/about/list_of_features.rst:413 msgid "" "The mouse cursor can be visible, hidden, captured or confined within the " "window." msgstr "" #: ../../docs/about/list_of_features.rst:414 msgid "" "When captured, raw input will be used on Windows and Linux to sidestep the " "OS' mouse acceleration settings." msgstr "" #: ../../docs/about/list_of_features.rst:417 msgid "Gamepad input (up to 8 simultaneous controllers)." msgstr "" #: ../../docs/about/list_of_features.rst:418 msgid "Pen/tablet input with pressure support." msgstr "" #: ../../docs/about/list_of_features.rst:419 msgid "" "Gamepad, keyboard and mouse input support are also available on Android." msgstr "" #: ../../docs/about/list_of_features.rst:422 #: ../../docs/tutorials/navigation/index.rst:2 msgid "Navigation" msgstr "Điều hướng" #: ../../docs/about/list_of_features.rst:424 msgid "A* algorithm in 2D and 3D." msgstr "" #: ../../docs/about/list_of_features.rst:425 msgid "Navigation meshes." msgstr "" #: ../../docs/about/list_of_features.rst:427 msgid "Support for dynamic obstacle avoidance planned in Godot 4.0." msgstr "" #: ../../docs/about/list_of_features.rst:429 msgid "Generate navigation meshes from the editor." msgstr "" #: ../../docs/about/list_of_features.rst:432 #: ../../docs/about/docs_changelog.rst:60 #: ../../docs/tutorials/export/exporting_for_web.rst:173 #: ../../docs/tutorials/networking/index.rst:2 msgid "Networking" msgstr "" #: ../../docs/about/list_of_features.rst:434 msgid "Low-level TCP networking using StreamPeer and TCP_Server." msgstr "" #: ../../docs/about/list_of_features.rst:435 msgid "Low-level UDP networking using PacketPeer and UDPServer." msgstr "" #: ../../docs/about/list_of_features.rst:436 msgid "Low-level HTTP requests using HTTPClient." msgstr "" #: ../../docs/about/list_of_features.rst:437 msgid "High-level HTTP requests using HTTPRequest." msgstr "" #: ../../docs/about/list_of_features.rst:439 msgid "Supports HTTPS out of the box using bundled certificates." msgstr "" #: ../../docs/about/list_of_features.rst:441 msgid "High-level multiplayer API using UDP and ENet." msgstr "" #: ../../docs/about/list_of_features.rst:443 msgid "Automatic replication using remote procedure calls (RPCs)." msgstr "" #: ../../docs/about/list_of_features.rst:444 msgid "Supports unreliable, reliable and ordered transfers." msgstr "" #: ../../docs/about/list_of_features.rst:446 msgid "WebSocket client and server, available on all platforms." msgstr "" #: ../../docs/about/list_of_features.rst:447 msgid "WebRTC client and server, available on all platforms." msgstr "" #: ../../docs/about/list_of_features.rst:448 msgid "" "Support for UPnP to sidestep the requirement to forward ports when hosting a " "server behind a NAT." msgstr "" #: ../../docs/about/list_of_features.rst:452 #: ../../docs/about/docs_changelog.rst:45 ../../docs/tutorials/i18n/index.rst:2 msgid "Internationalization" msgstr "" #: ../../docs/about/list_of_features.rst:454 msgid "Full support for Unicode including emoji." msgstr "" #: ../../docs/about/list_of_features.rst:455 msgid "" "Store localization strings using :ref:`CSV ` " "or :ref:`gettext `." msgstr "" #: ../../docs/about/list_of_features.rst:457 msgid "" "Use localized strings in your project automatically in GUI elements or by " "using the ``tr()`` function." msgstr "" #: ../../docs/about/list_of_features.rst:459 msgid "" "Support for right-to-left typesetting and text shaping planned in Godot 4.0." msgstr "" #: ../../docs/about/list_of_features.rst:462 msgid "Windowing and OS integration" msgstr "" #: ../../docs/about/list_of_features.rst:464 msgid "Move, resize, minimize, and maximize the window spawned by the project." msgstr "" #: ../../docs/about/list_of_features.rst:465 msgid "Change the window title and icon." msgstr "" #: ../../docs/about/list_of_features.rst:466 msgid "" "Request attention (will cause the title bar to blink on most platforms)." msgstr "" #: ../../docs/about/list_of_features.rst:467 msgid "Fullscreen mode." msgstr "" #: ../../docs/about/list_of_features.rst:469 msgid "" "Doesn't use exclusive fullscreen, so the screen resolution can't be changed " "this way. Use a Viewport with a different resolution instead." msgstr "" #: ../../docs/about/list_of_features.rst:472 msgid "Borderless window (fullscreen or non-fullscreen)." msgstr "" #: ../../docs/about/list_of_features.rst:473 msgid "Ability to keep the window always on top." msgstr "" #: ../../docs/about/list_of_features.rst:474 msgid "Transparent window with per-pixel transparency." msgstr "" #: ../../docs/about/list_of_features.rst:475 msgid "Global menu integration on macOS." msgstr "" #: ../../docs/about/list_of_features.rst:476 msgid "Execute commands in a blocking or non-blocking manner." msgstr "" #: ../../docs/about/list_of_features.rst:477 msgid "" "Open file paths and URLs using default or custom protocol handlers (if " "registered on the system)." msgstr "" #: ../../docs/about/list_of_features.rst:478 msgid "Parse custom command line arguments." msgstr "" #: ../../docs/about/list_of_features.rst:481 msgid "Mobile" msgstr "" #: ../../docs/about/list_of_features.rst:483 msgid "In-app purchases on Android and iOS." msgstr "" #: ../../docs/about/list_of_features.rst:484 msgid "Support for advertisements using third-party modules." msgstr "" #: ../../docs/about/list_of_features.rst:485 msgid "Support for subview embedding on Android." msgstr "" #: ../../docs/about/list_of_features.rst:488 msgid "XR support (AR and VR)" msgstr "" #: ../../docs/about/list_of_features.rst:490 msgid "Support for ARKit on iOS out of the box." msgstr "" #: ../../docs/about/list_of_features.rst:491 #, fuzzy msgid "Support for the OpenXR APIs." msgstr "Android" #: ../../docs/about/list_of_features.rst:493 msgid "" "Includes support for popular headsets like the Meta Quest and the Valve " "Index." msgstr "" #: ../../docs/about/list_of_features.rst:495 #, fuzzy msgid "Support for the OpenVR APIs." msgstr "Android" #: ../../docs/about/list_of_features.rst:498 msgid "GUI system" msgstr "" #: ../../docs/about/list_of_features.rst:500 msgid "" "Godot's GUI is built using the same Control nodes used to make games in " "Godot. The editor UI can easily be extended in many ways using add-ons." msgstr "" #: ../../docs/about/list_of_features.rst:503 #, fuzzy msgid "**Nodes:**" msgstr "Node" #: ../../docs/about/list_of_features.rst:505 #, fuzzy msgid "Buttons." msgstr "Button (nút, phím)" #: ../../docs/about/list_of_features.rst:506 msgid "Checkboxes, check buttons, radio buttons." msgstr "" #: ../../docs/about/list_of_features.rst:507 msgid "Text entry using LineEdit (single line) and TextEdit (multiple lines)." msgstr "" #: ../../docs/about/list_of_features.rst:508 msgid "Dropdown menus using PopupMenu and OptionButton." msgstr "" #: ../../docs/about/list_of_features.rst:509 msgid "Scrollbars." msgstr "" #: ../../docs/about/list_of_features.rst:510 #, fuzzy msgid "Labels." msgstr "Label (nhãn)" #: ../../docs/about/list_of_features.rst:511 msgid "" "RichTextLabel for :ref:`text formatted using BBCode " "`." msgstr "" #: ../../docs/about/list_of_features.rst:512 msgid "Trees (can also be used to represent tables)." msgstr "" #: ../../docs/about/list_of_features.rst:513 msgid "" "Containers (horizontal, vertical, grid, center, margin, draggable " "splitter, ...)." msgstr "" #: ../../docs/about/list_of_features.rst:514 msgid "Controls can be rotated and scaled." msgstr "" #: ../../docs/about/list_of_features.rst:516 msgid "**Sizing:**" msgstr "" #: ../../docs/about/list_of_features.rst:518 msgid "Anchors to keep GUI elements in a specific corner, edge or centered." msgstr "" #: ../../docs/about/list_of_features.rst:519 msgid "Containers to place GUI elements automatically following certain rules." msgstr "" #: ../../docs/about/list_of_features.rst:521 msgid ":ref:`Stack ` layouts." msgstr "" #: ../../docs/about/list_of_features.rst:522 #, fuzzy msgid ":ref:`Grid ` layouts." msgstr "Xem :ref:`doc_ways_to_contribute`." #: ../../docs/about/list_of_features.rst:523 msgid "" ":ref:`Margin ` and :ref:`centered " "` layouts." msgstr "" #: ../../docs/about/list_of_features.rst:525 msgid ":ref:`Draggable splitter ` layouts." msgstr "" #: ../../docs/about/list_of_features.rst:527 msgid "" "Scale to multiple resolutions using the ``2d`` or ``viewport`` stretch modes." msgstr "" #: ../../docs/about/list_of_features.rst:528 msgid "" "Support any aspect ratio using anchors and the ``expand`` stretch aspect." msgstr "" #: ../../docs/about/list_of_features.rst:530 msgid "**Theming:**" msgstr "" #: ../../docs/about/list_of_features.rst:532 msgid "Built-in theme editor." msgstr "" #: ../../docs/about/list_of_features.rst:534 msgid "Generate a theme based on the current editor theme settings." msgstr "" #: ../../docs/about/list_of_features.rst:536 msgid "Procedural vector-based theming using :ref:`class_StyleBoxFlat`." msgstr "" #: ../../docs/about/list_of_features.rst:538 msgid "Supports rounded/beveled corners, drop shadows and per-border widths." msgstr "" #: ../../docs/about/list_of_features.rst:540 msgid "Texture-based theming using :ref:`class_StyleBoxTexture`." msgstr "" #: ../../docs/about/list_of_features.rst:542 msgid "" "Godot's small distribution size can make it a suitable alternative to " "frameworks like Electron or Qt." msgstr "" #: ../../docs/about/list_of_features.rst:546 #: ../../docs/about/docs_changelog.rst:153 #: ../../docs/tutorials/animation/index.rst:2 #: ../../docs/tutorials/assets_pipeline/escn_exporter/animation.rst:2 #: ../../docs/development/file_formats/tscn.rst:381 msgid "Animation" msgstr "Hoạt hình" #: ../../docs/about/list_of_features.rst:548 msgid "Direct kinematics and inverse kinematics." msgstr "" #: ../../docs/about/list_of_features.rst:549 msgid "Support for animating any property with customizable interpolation." msgstr "" #: ../../docs/about/list_of_features.rst:550 msgid "Support for calling methods in animation tracks." msgstr "" #: ../../docs/about/list_of_features.rst:551 msgid "Support for playing sounds in animation tracks." msgstr "" #: ../../docs/about/list_of_features.rst:552 msgid "Support for Bézier curves in animation." msgstr "" #: ../../docs/about/list_of_features.rst:555 #, fuzzy msgid "File formats" msgstr "Tạo nội dung" #: ../../docs/about/list_of_features.rst:557 msgid "" "Scenes and resources can be saved in :ref:`text-based " "` or binary formats." msgstr "" #: ../../docs/about/list_of_features.rst:559 msgid "" "Text-based formats are human-readable and more friendly to version control." msgstr "" #: ../../docs/about/list_of_features.rst:560 msgid "Binary formats are faster to save/load for large scenes/resources." msgstr "" #: ../../docs/about/list_of_features.rst:562 msgid "Read and write text or binary files using :ref:`class_File`." msgstr "" #: ../../docs/about/list_of_features.rst:564 msgid "Can optionally be compressed or encrypted." msgstr "" #: ../../docs/about/list_of_features.rst:566 msgid "Read and write :ref:`class_JSON` files." msgstr "" #: ../../docs/about/list_of_features.rst:567 msgid "" "Read and write INI-style configuration files using :ref:`class_ConfigFile`." msgstr "" #: ../../docs/about/list_of_features.rst:569 msgid "Can (de)serialize any Godot datatype, including Vector, Color, ..." msgstr "" #: ../../docs/about/list_of_features.rst:571 msgid "Read XML files using :ref:`class_XMLParser`." msgstr "" #: ../../docs/about/list_of_features.rst:572 msgid "" "Pack game data into a PCK file (custom format optimized for fast seeking), " "into a ZIP archive, or directly into the executable for single-file " "distribution." msgstr "" #: ../../docs/about/list_of_features.rst:574 msgid "" ":ref:`Export additional PCK files` that can be read by " "the engine to support mods and DLCs." msgstr "" #: ../../docs/about/list_of_features.rst:578 #: ../../docs/about/docs_changelog.rst:205 msgid "Miscellaneous" msgstr "" #: ../../docs/about/list_of_features.rst:580 msgid "" ":ref:`Low-level access to servers ` which allows " "bypassing the scene tree's overhead when needed." msgstr "" #: ../../docs/about/list_of_features.rst:582 msgid "Command line interface for automation." msgstr "" #: ../../docs/about/list_of_features.rst:584 msgid "Export and deploy projects using continuous integration platforms." msgstr "" #: ../../docs/about/list_of_features.rst:585 msgid "" "`Completion scripts `__ are available for Bash, zsh and fish." msgstr "" #: ../../docs/about/list_of_features.rst:588 msgid "" "Support for :ref:`C++ modules ` statically linked " "into the engine binary." msgstr "" #: ../../docs/about/list_of_features.rst:590 msgid "Engine and editor written in C++03." msgstr "" #: ../../docs/about/list_of_features.rst:592 msgid "" "Can be :ref:`compiled ` using GCC, " "Clang and MSVC. MinGW is also supported." msgstr "" #: ../../docs/about/list_of_features.rst:594 msgid "" "Friendly towards packagers. In most cases, system libraries can be used " "instead of the ones provided by Godot. The build system doesn't download " "anything. Builds can be fully reproducible." msgstr "" #: ../../docs/about/list_of_features.rst:597 msgid "Godot 4.0 will be written in C++17." msgstr "" #: ../../docs/about/list_of_features.rst:599 msgid "Licensed under the permissive MIT license." msgstr "" #: ../../docs/about/list_of_features.rst:601 msgid "" "Open developement process with :ref:`contributions welcome " "`." msgstr "" #: ../../docs/about/list_of_features.rst:605 msgid "" "The `Godot proposals repository `__ lists features that have been requested by the community and " "may be implemented in future Godot releases." msgstr "" #: ../../docs/about/docs_changelog.rst:4 msgid "Documentation changelog" msgstr "" #: ../../docs/about/docs_changelog.rst:6 msgid "" "The documentation is continually being improved. The release of version 3.2 " "includes many new tutorials, many fixes and updates for old tutorials, and " "many updates to the :ref:`class reference `. Below is a list " "of new tutorials added since version 3.1." msgstr "" #: ../../docs/about/docs_changelog.rst:11 msgid "" "This document only contains new tutorials so not all changes are reflected, " "many tutorials have been substantially updated but are not reflected in this " "document." msgstr "" #: ../../docs/about/docs_changelog.rst:15 msgid "New tutorials since version 3.1" msgstr "" #: ../../docs/about/docs_changelog.rst:18 #: ../../docs/about/docs_changelog.rst:118 msgid "Project workflow" msgstr "" #: ../../docs/about/docs_changelog.rst:20 msgid ":ref:`doc_android_custom_build`" msgstr "" #: ../../docs/about/docs_changelog.rst:23 #: ../../docs/about/docs_changelog.rst:134 ../../docs/tutorials/2d/index.rst:2 #: ../../docs/tutorials/performance/index.rst:70 msgid "2D" msgstr "" #: ../../docs/about/docs_changelog.rst:25 #, fuzzy msgid ":ref:`doc_2d_sprite_animation`" msgstr "Xem :ref:`doc_ways_to_contribute`." #: ../../docs/about/docs_changelog.rst:30 #, fuzzy msgid ":ref:`doc_recording_with_microphone`" msgstr "Xem :ref:`doc_ways_to_contribute`." #: ../../docs/about/docs_changelog.rst:31 #, fuzzy msgid ":ref:`doc_sync_with_audio`" msgstr "Xem :ref:`doc_ways_to_contribute`." #: ../../docs/about/docs_changelog.rst:34 ../../docs/tutorials/math/index.rst:2 msgid "Math" msgstr "" #: ../../docs/about/docs_changelog.rst:36 #, fuzzy msgid ":ref:`doc_beziers_and_curves`" msgstr "Xem :ref:`doc_ways_to_contribute`." #: ../../docs/about/docs_changelog.rst:37 #, fuzzy msgid ":ref:`doc_interpolation`" msgstr "Xem :ref:`doc_ways_to_contribute`." #: ../../docs/about/docs_changelog.rst:40 #: ../../docs/tutorials/inputs/index.rst:2 msgid "Inputs" msgstr "" #: ../../docs/about/docs_changelog.rst:42 #, fuzzy msgid ":ref:`doc_input_examples`" msgstr "Xem :ref:`doc_ways_to_contribute`." #: ../../docs/about/docs_changelog.rst:47 msgid ":ref:`doc_localization_using_gettext`" msgstr "" #: ../../docs/about/docs_changelog.rst:50 #: ../../docs/about/docs_changelog.rst:170 msgid "Shading" msgstr "" #: ../../docs/about/docs_changelog.rst:55 msgid "Your First Shader Series:" msgstr "" #: ../../docs/about/docs_changelog.rst:53 #: ../../docs/about/docs_changelog.rst:177 #, fuzzy msgid ":ref:`doc_introduction_to_shaders`" msgstr "Android" #: ../../docs/about/docs_changelog.rst:54 msgid ":ref:`doc_your_first_canvasitem_shader`" msgstr "" #: ../../docs/about/docs_changelog.rst:55 msgid ":ref:`doc_your_first_spatial_shader`" msgstr "" #: ../../docs/about/docs_changelog.rst:56 msgid ":ref:`doc_your_second_spatial_shader`" msgstr "" #: ../../docs/about/docs_changelog.rst:57 #, fuzzy msgid ":ref:`doc_visual_shaders`" msgstr "Android" #: ../../docs/about/docs_changelog.rst:62 #, fuzzy msgid ":ref:`doc_webrtc`" msgstr "Xem :ref:`doc_ways_to_contribute`." #: ../../docs/about/docs_changelog.rst:65 msgid "VR" msgstr "" #: ../../docs/about/docs_changelog.rst:67 #, fuzzy msgid ":ref:`doc_vr_starter_tutorial_part_one`" msgstr "Xem :ref:`doc_ways_to_contribute`." #: ../../docs/about/docs_changelog.rst:68 #, fuzzy msgid ":ref:`doc_vr_starter_tutorial_part_two`" msgstr "Xem :ref:`doc_ways_to_contribute`." #: ../../docs/about/docs_changelog.rst:71 #: ../../docs/about/docs_changelog.rst:184 #: ../../docs/tutorials/plugins/index.rst:2 msgid "Plugins" msgstr "Tiện ích" #: ../../docs/about/docs_changelog.rst:73 #, fuzzy msgid ":ref:`doc_android_plugin`" msgstr "Android" #: ../../docs/about/docs_changelog.rst:74 #, fuzzy msgid ":ref:`doc_inspector_plugins`" msgstr "Android" #: ../../docs/about/docs_changelog.rst:75 #, fuzzy msgid ":ref:`doc_visual_shader_plugins`" msgstr "Android" #: ../../docs/about/docs_changelog.rst:78 #: ../../docs/about/docs_changelog.rst:195 msgid "Multi-threading" msgstr "" #: ../../docs/about/docs_changelog.rst:80 #, fuzzy msgid ":ref:`doc_using_multiple_threads`" msgstr "Xem :ref:`doc_ways_to_contribute`." #: ../../docs/about/docs_changelog.rst:83 #: ../../docs/about/docs_changelog.rst:200 #, fuzzy msgid "Creating content" msgstr "Tạo nội dung" #: ../../docs/about/docs_changelog.rst:90 msgid "Procedural geometry series:" msgstr "" #: ../../docs/about/docs_changelog.rst:86 msgid ":ref:`Procedural geometry `" msgstr "" #: ../../docs/about/docs_changelog.rst:87 #, fuzzy msgid ":ref:`doc_arraymesh`" msgstr "Xem :ref:`doc_ways_to_contribute`." #: ../../docs/about/docs_changelog.rst:88 #, fuzzy msgid ":ref:`doc_surfacetool`" msgstr "Xem :ref:`doc_ways_to_contribute`." #: ../../docs/about/docs_changelog.rst:89 #, fuzzy msgid ":ref:`doc_meshdatatool`" msgstr "Xem :ref:`doc_ways_to_contribute`." #: ../../docs/about/docs_changelog.rst:90 #, fuzzy msgid ":ref:`doc_immediategeometry`" msgstr "Xem :ref:`doc_ways_to_contribute`." #: ../../docs/about/docs_changelog.rst:93 #: ../../docs/tutorials/performance/index.rst:2 msgid "Optimization" msgstr "" #: ../../docs/about/docs_changelog.rst:95 msgid ":ref:`doc_using_multimesh`" msgstr "" #: ../../docs/about/docs_changelog.rst:96 msgid ":ref:`doc_using_servers`" msgstr "" #: ../../docs/about/docs_changelog.rst:99 msgid "Legal" msgstr "" #: ../../docs/about/docs_changelog.rst:101 msgid ":ref:`doc_complying_with_licenses`" msgstr "" #: ../../docs/about/docs_changelog.rst:104 msgid "New tutorials since version 3.0" msgstr "" #: ../../docs/about/docs_changelog.rst:107 #: ../../docs/getting_started/step_by_step/index.rst:2 #: ../../docs/tutorials/2d/2d_lights_and_shadows.rst:108 #: ../../docs/development/compiling/compiling_with_script_encryption_key.rst:18 msgid "Step by step" msgstr "Từng bước" #: ../../docs/about/docs_changelog.rst:109 msgid ":ref:`doc_signals`" msgstr "" #: ../../docs/about/docs_changelog.rst:110 #, fuzzy msgid ":ref:`doc_exporting_basics`" msgstr "Xem :ref:`doc_ways_to_contribute`." #: ../../docs/about/docs_changelog.rst:115 msgid ":ref:`doc_gdscript_static_typing`" msgstr "" #: ../../docs/about/docs_changelog.rst:120 msgid "Best Practices:" msgstr "" #: ../../docs/about/docs_changelog.rst:122 msgid ":ref:`doc_introduction_best_practices`" msgstr "" #: ../../docs/about/docs_changelog.rst:123 msgid ":ref:`doc_what_are_godot_classes`" msgstr "" #: ../../docs/about/docs_changelog.rst:124 msgid ":ref:`doc_scene_organization`" msgstr "" #: ../../docs/about/docs_changelog.rst:125 msgid ":ref:`doc_scenes_versus_scripts`" msgstr "" #: ../../docs/about/docs_changelog.rst:126 msgid ":ref:`doc_autoloads_versus_internal_nodes`" msgstr "" #: ../../docs/about/docs_changelog.rst:127 msgid ":ref:`doc_node_alternatives`" msgstr "" #: ../../docs/about/docs_changelog.rst:128 msgid ":ref:`doc_godot_interfaces`" msgstr "" #: ../../docs/about/docs_changelog.rst:129 msgid ":ref:`doc_godot_notifications`" msgstr "" #: ../../docs/about/docs_changelog.rst:130 msgid ":ref:`doc_data_preferences`" msgstr "" #: ../../docs/about/docs_changelog.rst:131 msgid ":ref:`doc_logic_preferences`" msgstr "" #: ../../docs/about/docs_changelog.rst:136 msgid ":ref:`doc_2d_lights_and_shadows`" msgstr "" #: ../../docs/about/docs_changelog.rst:137 msgid ":ref:`doc_2d_meshes`" msgstr "" #: ../../docs/about/docs_changelog.rst:140 ../../docs/tutorials/3d/index.rst:2 #: ../../docs/tutorials/performance/index.rst:82 msgid "3D" msgstr "3D" #: ../../docs/about/docs_changelog.rst:142 msgid ":ref:`doc_csg_tools`" msgstr "" #: ../../docs/about/docs_changelog.rst:143 msgid ":ref:`doc_animating_thousands_of_fish`" msgstr "" #: ../../docs/about/docs_changelog.rst:144 msgid ":ref:`doc_controlling_thousands_of_fish`" msgstr "" #: ../../docs/about/docs_changelog.rst:147 #: ../../docs/tutorials/performance/cpu_optimization.rst:246 #: ../../docs/tutorials/physics/index.rst:2 msgid "Physics" msgstr "Vật lí" #: ../../docs/about/docs_changelog.rst:149 msgid ":ref:`doc_ragdoll_system`" msgstr "" #: ../../docs/about/docs_changelog.rst:150 msgid ":ref:`doc_soft_body`" msgstr "" #: ../../docs/about/docs_changelog.rst:155 msgid ":ref:`doc_2d_skeletons`" msgstr "" #: ../../docs/about/docs_changelog.rst:156 #, fuzzy msgid ":ref:`doc_animation_tree`" msgstr "Xem :ref:`doc_ways_to_contribute`." #: ../../docs/about/docs_changelog.rst:159 msgid "GUI" msgstr "" #: ../../docs/about/docs_changelog.rst:161 #, fuzzy msgid ":ref:`doc_gui_containers`" msgstr "Xem :ref:`doc_ways_to_contribute`." #: ../../docs/about/docs_changelog.rst:164 msgid "Viewports" msgstr "" #: ../../docs/about/docs_changelog.rst:166 msgid ":ref:`doc_viewport_as_texture`" msgstr "" #: ../../docs/about/docs_changelog.rst:167 msgid ":ref:`doc_custom_postprocessing`" msgstr "" #: ../../docs/about/docs_changelog.rst:172 #, fuzzy msgid ":ref:`doc_converting_glsl_to_godot_shaders`" msgstr "Android" #: ../../docs/about/docs_changelog.rst:173 msgid ":ref:`doc_advanced_postprocessing`" msgstr "" #: ../../docs/about/docs_changelog.rst:175 msgid "Shading Reference:" msgstr "" #: ../../docs/about/docs_changelog.rst:178 msgid ":ref:`doc_shading_language`" msgstr "" #: ../../docs/about/docs_changelog.rst:179 msgid ":ref:`doc_spatial_shader`" msgstr "" #: ../../docs/about/docs_changelog.rst:180 msgid ":ref:`doc_canvas_item_shader`" msgstr "" #: ../../docs/about/docs_changelog.rst:181 msgid ":ref:`doc_particle_shader`" msgstr "" #: ../../docs/about/docs_changelog.rst:186 #, fuzzy msgid ":ref:`doc_making_main_screen_plugins`" msgstr "Tạo nội dung" #: ../../docs/about/docs_changelog.rst:187 msgid ":ref:`doc_spatial_gizmo_plugins`" msgstr "" #: ../../docs/about/docs_changelog.rst:190 #: ../../docs/tutorials/platform/index.rst:2 msgid "Platform-specific" msgstr "" #: ../../docs/about/docs_changelog.rst:192 msgid ":ref:`doc_customizing_html5_shell`" msgstr "" #: ../../docs/about/docs_changelog.rst:197 msgid ":ref:`doc_thread_safe_apis`" msgstr "" #: ../../docs/about/docs_changelog.rst:202 msgid ":ref:`doc_making_trees`" msgstr "" #: ../../docs/about/docs_changelog.rst:207 msgid ":ref:`doc_jitter_stutter`" msgstr "" #: ../../docs/about/docs_changelog.rst:208 msgid ":ref:`doc_running_code_in_the_editor`" msgstr "" #: ../../docs/about/docs_changelog.rst:209 msgid ":ref:`doc_change_scenes_manually`" msgstr "" #: ../../docs/about/docs_changelog.rst:210 msgid ":ref:`doc_gles2_gles3_differences`" msgstr "" #: ../../docs/about/docs_changelog.rst:213 #: ../../docs/tutorials/scripting/gdnative/gdnative_c_example.rst:349 #: ../../docs/development/compiling/index.rst:2 #: ../../docs/development/compiling/compiling_for_windows.rst:107 #: ../../docs/development/compiling/compiling_for_x11.rst:95 #: ../../docs/development/compiling/compiling_for_osx.rst:37 #: ../../docs/development/compiling/compiling_for_ios.rst:20 #: ../../docs/development/compiling/compiling_for_uwp.rst:33 msgid "Compiling" msgstr "" #: ../../docs/about/docs_changelog.rst:215 msgid ":ref:`doc_optimizing_for_size`" msgstr "" #: ../../docs/about/docs_changelog.rst:216 msgid ":ref:`doc_compiling_with_script_encryption_key`" msgstr "" #: ../../docs/about/docs_changelog.rst:219 #: ../../docs/development/cpp/index.rst:2 msgid "Engine development" msgstr "" #: ../../docs/about/docs_changelog.rst:221 msgid ":ref:`doc_binding_to_external_libraries`" msgstr "" #: ../../docs/about/release_policy.rst:4 msgid "Godot release policy" msgstr "" #: ../../docs/about/release_policy.rst:6 msgid "" "Godot's release policy is in constant evolution. What is described below is " "intended to give a general idea of what to expect, but what will actually " "happen depends on the choices of core contributors, and the needs of the " "community at a given time." msgstr "" #: ../../docs/about/release_policy.rst:12 msgid "Godot versioning" msgstr "" #: ../../docs/about/release_policy.rst:14 msgid "" "Godot loosely follows `Semantic Versioning `__ with a " "``major.minor.patch`` versioning system, albeit with an interpretation of " "each term adapted to the complexity of a game engine:" msgstr "" #: ../../docs/about/release_policy.rst:18 msgid "" "The ``major`` version is incremented when major compatibility breakages " "happen which imply significant porting work to move projects from one major " "version to another." msgstr "" #: ../../docs/about/release_policy.rst:22 msgid "" "For example, porting Godot projects from Godot 2.1 to Godot 3.0 required " "running the project through a conversion tool, and then performing a number " "of further adjustments manually for what the tool could not do automatically." msgstr "" #: ../../docs/about/release_policy.rst:26 msgid "" "The ``minor`` version is incremented for feature releases which do not break " "compatibility in a major way. Minor compatibility breakage in very specific " "areas *may* happen in minor versions, but the vast majority of projects " "should not be affected or require significant porting work." msgstr "" #: ../../docs/about/release_policy.rst:31 msgid "" "The reason for this is that as a game engine, Godot covers many areas such " "as rendering, physics, scripting, etc., and fixing bugs or implementing new " "features in a given area may sometimes require changing the behavior of a " "feature, or modifying the interface of a given class, even if the rest of " "the engine API remains backwards compatible." msgstr "" #: ../../docs/about/release_policy.rst:39 msgid "" "Upgrading to a new minor version is therefore recommended for all users, but " "some testing is necessary to ensure that your project still behaves as " "expected in a new minor version." msgstr "" #: ../../docs/about/release_policy.rst:43 msgid "" "The ``patch`` version is incremented for maintenance releases which focus on " "fixing bugs and security issues, implementing new requirements for platform " "support, and backporting safe usability enhancements. Patch releases are " "backwards compatible." msgstr "" #: ../../docs/about/release_policy.rst:48 msgid "" "Patch versions may include minor new features which do not impact the " "existing API, and thus have no risk of impacting existing projects." msgstr "" #: ../../docs/about/release_policy.rst:53 msgid "" "Updating to new patch versions is therefore considered safe and strongly " "recommended to all users of a given stable branch." msgstr "" #: ../../docs/about/release_policy.rst:56 msgid "" "We call ``major.minor`` combinations *stable branches*. Each stable branch " "starts with a ``major.minor`` release (without the ``0`` for ``patch``) and " "is further developed for maintenance releases in a Git branch of the same " "name (for example patch updates for the 3.3 stable branch are developed in " "the ``3.3`` Git branch)." msgstr "" #: ../../docs/about/release_policy.rst:64 msgid "" "As mentioned in the introduction, Godot's release policy is evolving, and " "earlier Godot releases may not have followed the above rules to the letter. " "In particular, the 3.2 stable branch received a number of new features in " "3.2.2 which would have warranted a ``minor`` version increment." msgstr "" #: ../../docs/about/release_policy.rst:70 msgid "Release support timeline" msgstr "" #: ../../docs/about/release_policy.rst:72 msgid "" "Stable branches are supported *at minimum* until the next stable branch is " "released and has received its first patch update. In practice, we support " "stable branches on a *best effort* basis for as long as they have active " "users who need maintenance updates." msgstr "" #: ../../docs/about/release_policy.rst:77 msgid "" "Whenever a new major version is released, we make the previous stable branch " "a long-term supported release, and do our best to provide fixes for issues " "encountered by users of that branch who cannot port complex projects to the " "new major version. This was the case for the 2.1 branch, and will be the " "case for the latest 3.x stable branch by the time Godot 4.0 is released." msgstr "" #: ../../docs/about/release_policy.rst:83 msgid "" "In a given minor release series, only the latest patch release receives " "support. If you experience an issue using an older patch release, please " "upgrade to the latest patch release of that series and test again before " "reporting an issue on GitHub." msgstr "" #: ../../docs/about/release_policy.rst:89 msgid "**Version**" msgstr "" #: ../../docs/about/release_policy.rst:89 msgid "**Release date**" msgstr "" #: ../../docs/about/release_policy.rst:89 msgid "**Support level**" msgstr "" #: ../../docs/about/release_policy.rst:91 #, fuzzy msgid "Godot 4.0" msgstr "Trong Godot 3.1:" #: ../../docs/about/release_policy.rst:91 msgid "~2022 (see below)" msgstr "" #: ../../docs/about/release_policy.rst:91 msgid "|unstable| *Current focus of development (unstable).*" msgstr "" #: ../../docs/about/release_policy.rst:120 #, fuzzy msgid "unstable" msgstr "Mở" #: ../../docs/about/release_policy.rst:93 #, fuzzy msgid "Godot 3.5" msgstr "Trong Godot 3.1:" #: ../../docs/about/release_policy.rst:93 msgid "Q2 2022" msgstr "" #: ../../docs/about/release_policy.rst:93 msgid "" "|supported| *Beta.* Receives new features as well as bug fixes while under " "development." msgstr "" #: ../../docs/about/release_policy.rst:117 msgid "supported" msgstr "" #: ../../docs/about/release_policy.rst:96 #, fuzzy msgid "Godot 3.4" msgstr "Trong Godot 3.1:" #: ../../docs/about/release_policy.rst:96 msgid "November 2021" msgstr "" #: ../../docs/about/release_policy.rst:96 msgid "" "|supported| Receives fixes for bugs, security and platform support issues, " "as well as backwards-compatible usability enhancements." msgstr "" #: ../../docs/about/release_policy.rst:99 #, fuzzy msgid "Godot 3.3" msgstr "Trong Godot 3.1:" #: ../../docs/about/release_policy.rst:99 msgid "April 2021" msgstr "" #: ../../docs/about/release_policy.rst:99 msgid "|partial| Receives fixes for security and platform support issues only." msgstr "" #: ../../docs/about/release_policy.rst:118 #, fuzzy msgid "partial" msgstr "Hạt" #: ../../docs/about/release_policy.rst:101 #, fuzzy msgid "Godot 3.2" msgstr "Trong Godot 3.1:" #: ../../docs/about/release_policy.rst:101 msgid "January 2020" msgstr "" #: ../../docs/about/release_policy.rst:101 msgid "" "|eol| No longer supported as fully superseded by the compatible 3.3 release " "(last update: 3.2.3)." msgstr "" #: ../../docs/about/release_policy.rst:119 msgid "eol" msgstr "" #: ../../docs/about/release_policy.rst:104 #, fuzzy msgid "Godot 3.1" msgstr "Trong Godot 3.1:" #: ../../docs/about/release_policy.rst:104 msgid "March 2019" msgstr "" #: ../../docs/about/release_policy.rst:104 msgid "|eol| No longer supported (last update: 3.1.2)." msgstr "" #: ../../docs/about/release_policy.rst:106 #, fuzzy msgid "Godot 3.0" msgstr "Trong Godot 3.1:" #: ../../docs/about/release_policy.rst:106 msgid "January 2018" msgstr "" #: ../../docs/about/release_policy.rst:106 msgid "|eol| No longer supported (last update: 3.0.6)." msgstr "" #: ../../docs/about/release_policy.rst:108 #, fuzzy msgid "Godot 2.1" msgstr "Trong Godot 3.1:" #: ../../docs/about/release_policy.rst:108 msgid "July 2016" msgstr "" #: ../../docs/about/release_policy.rst:108 msgid "|eol| No longer supported (last update: 2.1.6)." msgstr "" #: ../../docs/about/release_policy.rst:110 #, fuzzy msgid "Godot 2.0" msgstr "Trong Godot 3.1:" #: ../../docs/about/release_policy.rst:110 msgid "February 2016" msgstr "" #: ../../docs/about/release_policy.rst:110 msgid "|eol| No longer supported (last update: 2.0.4.1)." msgstr "" #: ../../docs/about/release_policy.rst:112 #, fuzzy msgid "Godot 1.1" msgstr "Trong Godot 3.1:" #: ../../docs/about/release_policy.rst:112 msgid "May 2015" msgstr "" #: ../../docs/about/release_policy.rst:112 #: ../../docs/about/release_policy.rst:114 msgid "|eol| No longer supported." msgstr "" #: ../../docs/about/release_policy.rst:114 #, fuzzy msgid "Godot 1.0" msgstr "Trong Godot 3.1:" #: ../../docs/about/release_policy.rst:114 msgid "December 2014" msgstr "" #: ../../docs/about/release_policy.rst:122 msgid "" "**Legend:** |supported| Full support – |partial| Partial support – |eol| No " "support (end of life) – |unstable| Development version" msgstr "" #: ../../docs/about/release_policy.rst:128 msgid "" "Pre-release Godot versions aren't intended to be used in production and are " "provided for testing purposes only." msgstr "" #: ../../docs/about/release_policy.rst:134 msgid "When is the next release out?" msgstr "" #: ../../docs/about/release_policy.rst:136 msgid "" "While Godot contributors aren't working under any deadlines, we have " "historically had one major or minor release per year, with several " "maintenance updates between each." msgstr "" #: ../../docs/about/release_policy.rst:140 msgid "" "Starting with Godot 3.3, we aim to accelerate our development cycles for " "minor releases, so you can expect a new minor release every 3 to 6 months." msgstr "" #: ../../docs/about/release_policy.rst:143 msgid "" "Maintenance (patch) releases will be released as needed with potentially " "very short development cycles, to provide users of the current stable branch " "with the latest bug fixes for their production needs." msgstr "" #: ../../docs/about/release_policy.rst:147 msgid "" "As for the upcoming Godot 4.0, we can only say that we aim for a **2022** " "release, but any closer estimate is likely to be hard to uphold. Alpha " "builds will be published as soon as the main features for Godot 4.0 are " "finalized." msgstr "" #: ../../docs/about/complying_with_licenses.rst:4 #, fuzzy msgid "Complying with licenses" msgstr "Script một scene" #: ../../docs/about/complying_with_licenses.rst:7 msgid "What are licenses?" msgstr "" #: ../../docs/about/complying_with_licenses.rst:9 msgid "" "Godot is created and distributed under the `MIT License `_. 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." msgstr "" #: ../../docs/about/complying_with_licenses.rst:14 msgid "" "The license is the legal requirement for you (or your company) to use and " "distribute the software (and derivative projects, including games made with " "it). Your game or project can have a different license, but it still needs " "to comply with the original one." msgstr "" #: ../../docs/about/complying_with_licenses.rst:20 #: ../../docs/tutorials/export/exporting_for_mac.rst:10 #: ../../docs/tutorials/export/exporting_for_windows.rst:16 #: ../../docs/tutorials/export/exporting_for_ios.rst:11 #: ../../docs/development/compiling/compiling_for_windows.rst:9 #: ../../docs/development/compiling/compiling_for_x11.rst:9 #: ../../docs/development/compiling/compiling_for_osx.rst:9 #: ../../docs/development/compiling/compiling_for_android.rst:20 #: ../../docs/development/compiling/compiling_for_ios.rst:9 #: ../../docs/development/compiling/cross-compiling_for_ios_on_linux.rst:27 #: ../../docs/development/compiling/compiling_for_uwp.rst:9 #: ../../docs/development/compiling/compiling_for_web.rst:9 #: ../../docs/development/compiling/compiling_with_mono.rst:9 #: ../../docs/community/asset_library/submitting_to_assetlib.rst:23 msgid "Requirements" msgstr "" #: ../../docs/about/complying_with_licenses.rst:22 msgid "" "In the case of the MIT license, the only requirement is to include the " "license text somewhere in your game or derivative project." msgstr "" #: ../../docs/about/complying_with_licenses.rst:25 msgid "This text reads as follows:" msgstr "" #: ../../docs/about/complying_with_licenses.rst:27 msgid "This game uses Godot Engine, available under the following license:" msgstr "" #: ../../docs/about/complying_with_licenses.rst:29 msgid "" "Copyright (c) 2007-2021 Juan Linietsky, Ariel Manzur. Copyright (c) " "2014-2021 Godot Engine contributors." msgstr "" #: ../../docs/about/complying_with_licenses.rst:32 #: ../../docs/about/complying_with_licenses.rst:122 msgid "" "Permission is hereby granted, free of charge, to any person obtaining a copy " "of this software and associated documentation files (the \"Software\"), to " "deal in the Software without restriction, including without limitation the " "rights to use, copy, modify, merge, publish, distribute, sublicense, and/or " "sell copies of the Software, and to permit persons to whom the Software is " "furnished to do so, subject to the following conditions:" msgstr "" #: ../../docs/about/complying_with_licenses.rst:34 #: ../../docs/about/complying_with_licenses.rst:124 msgid "" "The above copyright notice and this permission notice shall be included in " "all copies or substantial portions of the Software." msgstr "" #: ../../docs/about/complying_with_licenses.rst:36 #: ../../docs/about/complying_with_licenses.rst:126 msgid "" "THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR " "IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, " "FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE " "AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER " "LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING " "FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS " "IN THE SOFTWARE." msgstr "" #: ../../docs/about/complying_with_licenses.rst:40 msgid "" "Your games do not need to be under the same license. You are free to release " "your Godot projects under any license and to create commercial games with " "the engine." msgstr "" #: ../../docs/about/complying_with_licenses.rst:45 msgid "Inclusion" msgstr "" #: ../../docs/about/complying_with_licenses.rst:47 msgid "" "The license does not specify how it has to be included, so anything is valid " "as long as it can be displayed under some condition. These are the most " "common approaches (only need to implement one of them, not all)." msgstr "" #: ../../docs/about/complying_with_licenses.rst:52 msgid "Credits screen" msgstr "" #: ../../docs/about/complying_with_licenses.rst:54 msgid "" "Include the above license text somewhere in the credits screen. It can be at " "the bottom after showing the rest of the credits. Most large studios use " "this approach with open source licenses." msgstr "" #: ../../docs/about/complying_with_licenses.rst:59 #, fuzzy msgid "Licenses screen" msgstr "Cấp phép" #: ../../docs/about/complying_with_licenses.rst:61 msgid "" "Some games have a special menu (often in the settings) to display licenses." msgstr "" #: ../../docs/about/complying_with_licenses.rst:64 msgid "Output log" msgstr "" #: ../../docs/about/complying_with_licenses.rst:66 msgid "" "Just printing the licensing text using the :ref:`print() " "` function may be enough on platforms where a " "global output log is readable. This is the case on desktop platforms, " "Android and HTML5 (but not iOS and UWP)." msgstr "" #: ../../docs/about/complying_with_licenses.rst:71 msgid "Accompanying file" msgstr "" #: ../../docs/about/complying_with_licenses.rst:73 msgid "" "If the game is distributed on desktop platforms, a file containing the " "license can be added to the software that is installed to the user PC." msgstr "" #: ../../docs/about/complying_with_licenses.rst:77 msgid "Printed manual" msgstr "" #: ../../docs/about/complying_with_licenses.rst:79 msgid "" "If the game includes printed manuals, license text can be included there." msgstr "" #: ../../docs/about/complying_with_licenses.rst:82 #, fuzzy msgid "Link to the license" msgstr "Script một scene" #: ../../docs/about/complying_with_licenses.rst:84 msgid "" "The Godot Engine developers consider that a link to godotengine.org/license " "in your game documentation or credits would be an acceptable way to satisfy " "the license terms." msgstr "" #: ../../docs/about/complying_with_licenses.rst:89 msgid "Third-party licenses" msgstr "" #: ../../docs/about/complying_with_licenses.rst:91 msgid "" "Godot itself contains software written by `third parties `_. 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 means you need to provide attribution for " "all the libraries listed below." msgstr "" #: ../../docs/about/complying_with_licenses.rst:98 msgid "Here's a list of libraries requiring attribution:" msgstr "" #: ../../docs/about/complying_with_licenses.rst:101 msgid "FreeType" msgstr "" #: ../../docs/about/complying_with_licenses.rst:103 msgid "" "Godot uses `FreeType `_ to render fonts. Its " "license requires attribution, so the following text must be included " "together with the Godot license:" msgstr "" #: ../../docs/about/complying_with_licenses.rst:107 msgid "" "Portions of this software are copyright © The FreeType Project (www." "freetype.org). All rights reserved." msgstr "" #: ../../docs/about/complying_with_licenses.rst:109 msgid "" "Note that should correspond to the value from the FreeType version " "used in your build. This information can be found in the editor by opening " "the **Help > About** dialog and going to the **Third-party Licenses** tab." msgstr "" #: ../../docs/about/complying_with_licenses.rst:114 msgid "ENet" msgstr "" #: ../../docs/about/complying_with_licenses.rst:116 msgid "" "Godot includes the `ENet `_ library to handle high-" "level multiplayer. ENet has similar licensing terms as Godot:" msgstr "" #: ../../docs/about/complying_with_licenses.rst:120 msgid "Copyright (c) 2002-2020 Lee Salzman" msgstr "" #: ../../docs/about/complying_with_licenses.rst:129 msgid "MBedTLS" msgstr "" #: ../../docs/about/complying_with_licenses.rst:131 msgid "" "If the project is done with Godot 3.1 or above and it utilizes SSL (usually " "through HTTP requests), the `MBedTLS `_ Apache license " "needs to be complied by including the following text:" msgstr "" #: ../../docs/about/complying_with_licenses.rst:135 msgid "Copyright The Mbed TLS Contributors" msgstr "" #: ../../docs/about/complying_with_licenses.rst:137 msgid "" "Licensed under the Apache License, Version 2.0 (the \"License\"); you may " "not use this file except in compliance with the License. You may obtain a " "copy of the License at" msgstr "" #: ../../docs/about/complying_with_licenses.rst:141 msgid "http://www.apache.org/licenses/LICENSE-2.0" msgstr "http://www.apache.org/licenses/LICENSE-2.0" #: ../../docs/about/complying_with_licenses.rst:143 msgid "" "Unless required by applicable law or agreed to in writing, software " "distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT " "WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the " "License for the specific language governing permissions and limitations " "under the License." msgstr "" #: ../../docs/about/complying_with_licenses.rst:149 msgid "" "Keep in mind that Godot 2.x and 3.0 use `OpenSSL `_ " "instead." msgstr "" #: ../../docs/getting_started/introduction/index.rst:8 msgid "" "This series will introduce you to Godot and give you an overview of its " "features." msgstr "" #: ../../docs/getting_started/introduction/index.rst:11 msgid "" "In the following pages, you will get answers to questions such as \"Is Godot " "for me?\" or \"What can I do with Godot?\". We will then introduce the " "engine's most essential concepts, run you through the editor's interface, " "and give you tips to make the most of your time learning it." msgstr "" #: ../../docs/getting_started/introduction/introduction_to_godot.rst:4 #, fuzzy msgid "Introduction to Godot" msgstr "Hướng dẫn Godot's editor" #: ../../docs/getting_started/introduction/introduction_to_godot.rst:6 msgid "" "This article is here to help you figure out whether Godot might be a good " "fit for you. We will introduce some broad features of the engine to give you " "a feel for what you can achieve with it and answer questions such as \"what " "do I need to know to get started?\"." msgstr "" #: ../../docs/getting_started/introduction/introduction_to_godot.rst:11 msgid "" "This is by no means an exhaustive overview. We will introduce many more " "features in this getting started series." msgstr "" #: ../../docs/getting_started/introduction/introduction_to_godot.rst:15 msgid "What is Godot?" msgstr "" #: ../../docs/getting_started/introduction/introduction_to_godot.rst:17 msgid "" "Godot is a general-purpose 2D and 3D game engine designed to support all " "sorts of projects. You can use it to create games or applications you can " "then release on desktop or mobile, as well as on the web." msgstr "" #: ../../docs/getting_started/introduction/introduction_to_godot.rst:21 msgid "" "You can also create console games with it, although you either need strong " "programming skills or a developer to port the game for you." msgstr "" #: ../../docs/getting_started/introduction/introduction_to_godot.rst:24 msgid "" "The Godot team can't provide an open-source console export due to the " "licensing terms imposed by console manufacturers. Regardless of the engine " "you use, though, releasing games on consoles is always a lot of work. You " "can read more on that here: :ref:`doc_consoles`." msgstr "" #: ../../docs/getting_started/introduction/introduction_to_godot.rst:30 msgid "What can the engine do?" msgstr "" #: ../../docs/getting_started/introduction/introduction_to_godot.rst:32 msgid "" "Godot was initially developed in-house by an Argentinan game studio. Its " "development started in 2001, and the engine was rewritten and improved " "tremendously since its open-source release in 2014." msgstr "" #: ../../docs/getting_started/introduction/introduction_to_godot.rst:36 msgid "" "Some examples of games created with Godot include Ex-Zodiac and Helms of " "Fury." msgstr "" #: ../../docs/getting_started/introduction/introduction_to_godot.rst:42 msgid "" "As for applications, the open-source pixel art drawing program Pixelorama is " "powered by Godot, and so is the voxel RPG creator RPG in a box." msgstr "" #: ../../docs/getting_started/introduction/introduction_to_godot.rst:47 msgid "You can find many more examples in the official showcase videos:" msgstr "" #: ../../docs/getting_started/introduction/introduction_to_godot.rst:49 msgid "`April 2020 desktop and console showcase`_" msgstr "" #: ../../docs/getting_started/introduction/introduction_to_godot.rst:50 msgid "`April 2020 mobile showcase`_" msgstr "" #: ../../docs/getting_started/introduction/introduction_to_godot.rst:53 #, fuzzy msgid "How does it work and look?" msgstr "Làm sao để mở rộng Godot?" #: ../../docs/getting_started/introduction/introduction_to_godot.rst:55 msgid "" "Godot comes with a fully-fledged game editor with integrated tools to answer " "the most common needs. It includes a code editor, an animation editor, a " "tilemap editor, a shader editor, a debugger, a profiler, and more." msgstr "" #: ../../docs/getting_started/introduction/introduction_to_godot.rst:61 msgid "" "The team strives to offer a feature-rich game editor with a consistent user " "experience. While there is always room for improvement, the user interface " "keeps getting refined." msgstr "" #: ../../docs/getting_started/introduction/introduction_to_godot.rst:65 msgid "" "Of course, if you prefer, you can work with external programs. We officially " "support importing 3D scenes designed in Blender_ and maintain plugins to " "code in VSCode_ and Emacs_ for GDScript and C#. We also support Visual " "Studio for C# on Windows." msgstr "" #: ../../docs/getting_started/introduction/introduction_to_godot.rst:73 #: ../../docs/tutorials/scripting/index.rst:12 #, fuzzy msgid "Programming languages" msgstr "Ngôn ngữ thiết kế" #: ../../docs/getting_started/introduction/introduction_to_godot.rst:75 msgid "Let's talk about the available programming languages." msgstr "" #: ../../docs/getting_started/introduction/introduction_to_godot.rst:77 msgid "" "You can code your games using :ref:`GDScript `, a Godot-specific and tightly integrated language with a " "lightweight syntax, or :ref:`C# `, which is popular " "in the games industry. These are the two main scripting languages we support." msgstr "" #: ../../docs/getting_started/introduction/introduction_to_godot.rst:82 msgid "" "Godot also supports a node-based visual programming language named :ref:" "`VisualScript `." msgstr "" #: ../../docs/getting_started/introduction/introduction_to_godot.rst:85 msgid "" "With the :ref:`GDNative ` technology, you can also " "write gameplay or high-performance algorithms in C or C++ without " "recompiling the engine. You can use this technology to integrate third-party " "libraries and other Software Development Kits (SDK) in the engine." msgstr "" #: ../../docs/getting_started/introduction/introduction_to_godot.rst:90 msgid "" "Of course, you can also directly add modules and features to the engine, as " "it's completely free and open-source." msgstr "" #: ../../docs/getting_started/introduction/introduction_to_godot.rst:93 msgid "" "These are the five officially supported programming languages. The community " "maintains support for many more. For more information, see :ref:`GDNative " "third-party bindings `." msgstr "" #: ../../docs/getting_started/introduction/introduction_to_godot.rst:99 msgid "What do I need to know to use Godot?" msgstr "" #: ../../docs/getting_started/introduction/introduction_to_godot.rst:101 msgid "" "Godot is a feature-packed game engine. With its thousands of features, there " "is a lot to learn. To make the most of it, you need good programming " "foundations. While we try to make the engine accessible, you will benefit a " "lot from knowing how to think like a programmer first." msgstr "" #: ../../docs/getting_started/introduction/introduction_to_godot.rst:106 msgid "" "Godot relies on the object-oriented programming paradigm. Being comfortable " "with concepts such as classes and objects will help you code efficiently in " "it." msgstr "" #: ../../docs/getting_started/introduction/introduction_to_godot.rst:109 msgid "" "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 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." msgstr "" #: ../../docs/getting_started/introduction/introduction_to_godot.rst:114 msgid "" "In CS50, you will learn multiple programming languages. Don't be afraid of " "that: programming languages have many similarities. The skills you learn " "with one language transfer well to others." msgstr "" #: ../../docs/getting_started/introduction/introduction_to_godot.rst:118 msgid "" "We will provide you with more Godot-specific learning resources in :ref:" "`doc_learning_new_features`." msgstr "" #: ../../docs/getting_started/introduction/introduction_to_godot.rst:121 msgid "" "In the next part, you will get an overview of the engine's essential " "concepts." msgstr "" #: ../../docs/getting_started/introduction/key_concepts_overview.rst:8 msgid "Overview of Godot's key concepts" msgstr "" #: ../../docs/getting_started/introduction/key_concepts_overview.rst:10 msgid "" "Every game engine revolves around abstractions you use to build your " "applications. In Godot, a game is a **tree** of **nodes** that you group " "together into **scenes**. You can then wire these nodes so they can " "communicate using **signals**." msgstr "" #: ../../docs/getting_started/introduction/key_concepts_overview.rst:15 msgid "" "These are the four concepts you will learn here. We're going to look at them " "briefly to give you a sense of how the engine works. In the getting started " "series, you will get to use them in practice." msgstr "" #: ../../docs/getting_started/introduction/key_concepts_overview.rst:20 #: ../../docs/getting_started/step_by_step/nodes_and_scenes.rst:38 #: ../../docs/tutorials/best_practices/what_are_godot_classes.rst:49 msgid "Scenes" msgstr "Scene (còn gọi là cảnh)" #: ../../docs/getting_started/introduction/key_concepts_overview.rst:22 msgid "" "In Godot, you break down your game in reusable scenes. A scene can be a " "character, a weapon, a menu in the user interface, a single house, an entire " "level, or anything you can think of. Godot's scenes are flexible; they fill " "the role of both prefabs and scenes in some other game engines." msgstr "" #: ../../docs/getting_started/introduction/key_concepts_overview.rst:29 msgid "" "You can also nest scenes. For example, you can put your character in a " "level, and drag and drop a scene as a child of it." msgstr "" #: ../../docs/getting_started/introduction/key_concepts_overview.rst:35 #: ../../docs/getting_started/step_by_step/nodes_and_scenes.rst:13 #: ../../docs/tutorials/2d/2d_lights_and_shadows.rst:46 #: ../../docs/tutorials/assets_pipeline/importing_scenes.rst:143 #: ../../docs/development/file_formats/tscn.rst:30 msgid "Nodes" msgstr "Nút" #: ../../docs/getting_started/introduction/key_concepts_overview.rst:37 msgid "" "A scene is composed of one or more **nodes**. Nodes are your game's smallest " "building blocks that you arrange into trees. Here's an example of a " "character's nodes." msgstr "" #: ../../docs/getting_started/introduction/key_concepts_overview.rst:43 msgid "" "It is made of a ``KinematicBody2D`` node named \"Character\", a ``Sprite``, " "a ``Camera2D``, and a ``CollisionShape2D``." msgstr "" #: ../../docs/getting_started/introduction/key_concepts_overview.rst:46 msgid "" "The node names end with \"2D\" because this is a 2D scene. Their 3D " "counterpart have names that end with \"3D\"." msgstr "" #: ../../docs/getting_started/introduction/key_concepts_overview.rst:49 msgid "" "Notice how nodes and scenes look the same in the editor. When you save a " "tree of nodes as a scene, it then shows as a single node, with its internal " "structure hidden in the editor." msgstr "" #: ../../docs/getting_started/introduction/key_concepts_overview.rst:53 msgid "" "Godot provides an extensive library of base node types you can combine and " "extend to build more powerful ones. 2D, 3D, or user interface, you will do " "most things with these nodes." msgstr "" #: ../../docs/getting_started/introduction/key_concepts_overview.rst:60 #: ../../docs/development/file_formats/tscn.rst:71 msgid "The scene tree" msgstr "" #: ../../docs/getting_started/introduction/key_concepts_overview.rst:62 msgid "" "All your game's scenes come together in the **scene tree**, literally a tree " "of scenes. And as scenes are trees of nodes, the scene tree also is a tree " "of nodes. But it's easier to think of your game in terms of scenes as they " "can represent characters, weapons, doors, or your user interface." msgstr "" #: ../../docs/getting_started/introduction/key_concepts_overview.rst:70 #: ../../docs/tutorials/scripting/gdscript/gdscript_basics.rst:1394 #: ../../docs/tutorials/scripting/gdscript/gdscript_styleguide.rst:582 #: ../../docs/tutorials/scripting/visual_script/nodes_purposes.rst:164 #: ../../docs/tutorials/scripting/gdnative/gdnative_cpp_example.rst:559 #: ../../docs/development/cpp/object_class.rst:219 msgid "Signals" msgstr "Tín hiệu" #: ../../docs/getting_started/introduction/key_concepts_overview.rst:72 msgid "" "Nodes emit signals when some event occurs. This feature allows you to make " "nodes communicate without hard-wiring them in code. It gives you a lot of " "flexibility in how you structure your scenes." msgstr "" #: ../../docs/getting_started/introduction/key_concepts_overview.rst:78 #, fuzzy msgid "" "Signals are Godot's version of the *observer* pattern. You can read more " "about it here: https://gameprogrammingpatterns.com/observer.html" msgstr "" "Bạn có thể đọc thêm về observer pattern ở đây: http://gameprogrammingpotypes." "com/observer.html" #: ../../docs/getting_started/introduction/key_concepts_overview.rst:82 msgid "" "For example, buttons emit a signal when pressed. You can connect to this " "signal to run code in reaction to this event, like starting the game or " "opening a menu." msgstr "" #: ../../docs/getting_started/introduction/key_concepts_overview.rst:85 msgid "" "Other built-in signals can tell you when two objects collided, when a " "character or monster entered a given area, and much more. You can also " "define new signals tailored to your game." msgstr "" #: ../../docs/getting_started/introduction/key_concepts_overview.rst:90 #: ../../docs/getting_started/step_by_step/instancing.rst:212 #: ../../docs/getting_started/step_by_step/scripting_languages.rst:172 #: ../../docs/getting_started/step_by_step/scripting_player_input.rst:124 #: ../../docs/getting_started/step_by_step/signals.rst:325 #: ../../docs/tutorials/2d/2d_movement.rst:355 #: ../../docs/tutorials/2d/2d_sprite_animation.rst:264 #: ../../docs/tutorials/export/exporting_pcks.rst:138 #: ../../docs/tutorials/scripting/gdscript/static_typing.rst:381 msgid "Summary" msgstr "" #: ../../docs/getting_started/introduction/key_concepts_overview.rst:92 msgid "" "Nodes, scenes, the scene tree, and signals are four core concepts in Godot " "that you will manipulate all the time." msgstr "" #: ../../docs/getting_started/introduction/key_concepts_overview.rst:95 msgid "" "Nodes are your game's smallest building blocks. You combine them to create " "scenes that you then combine and nest into the scene tree. You can then use " "signals to make nodes react to events in other nodes or different scene tree " "branches." msgstr "" #: ../../docs/getting_started/introduction/key_concepts_overview.rst:99 msgid "" "After this short breakdown, you probably have many questions. Bear with us " "as you will get many answers throughout the getting started series." msgstr "" #: ../../docs/getting_started/introduction/first_look_at_the_editor.rst:10 #: ../../docs/getting_started/introduction/first_look_at_the_editor.rst:40 #, fuzzy msgid "First look at Godot's editor" msgstr "Cái nhìn đầu tiên của bạn về editor (trình soạn thảo) của Godot," #: ../../docs/getting_started/introduction/first_look_at_the_editor.rst:12 msgid "" "This page will give you a brief overview of Godot's interface. We're going " "to look at the different main screens and docks to help you situate yourself." msgstr "" #: ../../docs/getting_started/introduction/first_look_at_the_editor.rst:15 msgid "" "For a comprehensive breakdown of the editor's interface and how to use it, " "see the :ref:`Editor manual `." msgstr "" #: ../../docs/getting_started/introduction/first_look_at_the_editor.rst:19 #, fuzzy msgid "The Project manager" msgstr "Project manager (Quản lý dự án)" #: ../../docs/getting_started/introduction/first_look_at_the_editor.rst:21 #, fuzzy msgid "" "When you launch Godot, the first window you see is the Project Manager. In " "the default tab, \"Projects,\" you can manage existing projects, import or " "create new ones, and more." msgstr "" "Khi bạn khởi chạy Godot, cửa sổ đầu tiên bạn sẽ thấy là Project Manager. Nó " "cho phép bạn tạo, xóa, import hoặc chơi các dự án trò chơi." #: ../../docs/getting_started/introduction/first_look_at_the_editor.rst:27 msgid "" "At the top of the window, there is another tab named \"Templates\". You can " "search for demo projects in the open-source asset library, which includes " "many projects developed by the community." msgstr "" #: ../../docs/getting_started/introduction/first_look_at_the_editor.rst:33 msgid "" "You can also change the editor's language using the drop-down menu to the " "right of the engine's version in the window's top-right corner. By default, " "it is in English (EN)." msgstr "" #: ../../docs/getting_started/introduction/first_look_at_the_editor.rst:42 msgid "" "When you open a new or an existing project, the editor's interface appears. " "Let's look at its main areas." msgstr "" #: ../../docs/getting_started/introduction/first_look_at_the_editor.rst:47 msgid "" "By default, it features **menus**, **main screens**, and playtest buttons " "along the window's top edge." msgstr "" #: ../../docs/getting_started/introduction/first_look_at_the_editor.rst:52 #, fuzzy msgid "" "In the center is the **viewport** with its **toolbar** at the top, where " "you'll find tools to move, scale, or lock the scene's nodes." msgstr "" "Ở trung tâm, bạn có ** Thanh công cụ ** ở trên cùng, nơi bạn sẽ tìm các công " "cụ để di chuyển, thu phóng tỷ lệ hoặc khóa các đối tượng trong scene của " "bạn. Nó thay đổi khi bạn chuyển đến các không gian làm việc khác nhau." #: ../../docs/getting_started/introduction/first_look_at_the_editor.rst:57 msgid "" "On either side of the viewport sit the **docks**. And at the bottom of the " "window lies the **bottom panel**." msgstr "" #: ../../docs/getting_started/introduction/first_look_at_the_editor.rst:60 msgid "" "The toolbar changes based on the context and selected node. Here is the 2D " "toolbar." msgstr "" #: ../../docs/getting_started/introduction/first_look_at_the_editor.rst:64 msgid "Below is the 3D one." msgstr "" #: ../../docs/getting_started/introduction/first_look_at_the_editor.rst:68 msgid "" "Let's look at the docks. The **FileSystem** dock lists your project files, " "be it scripts, images, audio samples, and more." msgstr "" #: ../../docs/getting_started/introduction/first_look_at_the_editor.rst:73 msgid "The **Scene** dock lists the active scene's nodes." msgstr "" #: ../../docs/getting_started/introduction/first_look_at_the_editor.rst:77 msgid "The **Inspector** allows you to edit the properties of a selected node." msgstr "" #: ../../docs/getting_started/introduction/first_look_at_the_editor.rst:81 #, fuzzy msgid "" "The **bottom panel**, situated below the viewport, is the host for the debug " "console, the animation editor, the audio mixer, and more. They can take " "precious space, that's why they're folded by default." msgstr "" "** Bảng điều khiển dưới cùng ** là máy chủ lưu trữ cho bảng điều khiển gỡ " "lỗi (debug,) trình chỉnh sửa animation, bộ trộn âm thanh." #: ../../docs/getting_started/introduction/first_look_at_the_editor.rst:87 msgid "" "When you click on one, it expands vertically. Below, you can see the " "animation editor opened." msgstr "" #: ../../docs/getting_started/introduction/first_look_at_the_editor.rst:92 msgid "The four main screens" msgstr "" #: ../../docs/getting_started/introduction/first_look_at_the_editor.rst:94 #, fuzzy msgid "" "There are four main screen buttons centered at the top of the editor: 2D, " "3D, Script, and AssetLib." msgstr "" "Bạn có thể thấy bốn nút về không gian làm việc ở trên cùng: 2D, 3D, Script " "và AssetLib." #: ../../docs/getting_started/introduction/first_look_at_the_editor.rst:97 #, fuzzy msgid "" "You'll use the **2D screen** for all types of games. In addition to 2D " "games, the 2D screen is where you'll build your interfaces." msgstr "" "Bạn có thể sử dụng ** không gian làm việc 2D ** cho tất cả các loại trò " "chơi. Ngoài các trò chơi 2D, không gian làm việc 2D là nơi bạn sẽ xây dựng " "giao diện của mình. Nhấn F1 để truy cập nó." #: ../../docs/getting_started/introduction/first_look_at_the_editor.rst:102 #, fuzzy msgid "" "In the **3D screen**, you can work with meshes, lights, and design levels " "for 3D games." msgstr "" "Trong ** không gian làm việc 3D **, bạn có thể làm việc với các lưới, đèn và " "design level cho các trò chơi 3D. Nhấn F2 để truy cập nó." #: ../../docs/getting_started/introduction/first_look_at_the_editor.rst:107 #, fuzzy msgid "" "Notice the perspective button under the toolbar. Clicking on it opens a list " "of options related to the 3D view." msgstr "" "Lưu ý văn bản [perspective] dưới thanh công cụ, đó là nút mở danh sách các " "tùy chọn liên quan đến chế độ xem 3D." #: ../../docs/getting_started/introduction/first_look_at_the_editor.rst:112 #, fuzzy msgid "" "Read :ref:`doc_introduction_to_3d` for more detail about the **3D main " "screen**." msgstr "" "Đọc: Ref: ' doc_introduction_to_3d ' để biết thêm chi tiết về * * 3D " "Workspace * *." #: ../../docs/getting_started/introduction/first_look_at_the_editor.rst:115 msgid "" "The **Script screen** is a complete code editor with a debugger, rich auto-" "completion, and built-in code reference." msgstr "" #: ../../docs/getting_started/introduction/first_look_at_the_editor.rst:120 #, fuzzy msgid "" "Finally, the **AssetLib** is a library of free and open-source add-ons, " "scripts, and assets to use in your projects." msgstr "" "Cuối cùng, ** AssetLib ** là một thư viện các tiện ích, script và tài sản " "miễn phí để sử dụng trong các dự án của bạn." #: ../../docs/getting_started/introduction/first_look_at_the_editor.rst:125 msgid "" "You can learn more about the asset library in :ref:`doc_what_is_assetlib`." msgstr "" #: ../../docs/getting_started/introduction/first_look_at_the_editor.rst:129 #, fuzzy msgid "Integrated class reference" msgstr "Class tham khảo" #: ../../docs/getting_started/introduction/first_look_at_the_editor.rst:131 msgid "Godot comes with a built-in class reference." msgstr "" #: ../../docs/getting_started/introduction/first_look_at_the_editor.rst:133 msgid "" "You can search for information about a class, method, property, constant, or " "signal by any one of the following methods:" msgstr "" #: ../../docs/getting_started/introduction/first_look_at_the_editor.rst:136 msgid "" "Pressing :kbd:`F1` (or :kbd:`Alt + Space` on macOS) anywhere in the editor." msgstr "" #: ../../docs/getting_started/introduction/first_look_at_the_editor.rst:137 msgid "" "Clicking the \"Search Help\" button in the top-right of the Script main " "screen." msgstr "" #: ../../docs/getting_started/introduction/first_look_at_the_editor.rst:138 msgid "Clicking on the Help menu and Search Help." msgstr "" #: ../../docs/getting_started/introduction/first_look_at_the_editor.rst:139 msgid "" "Clicking while pressing the :kbd:`Ctrl` key on a class name, function name, " "or built-in variable in the script editor." msgstr "" #: ../../docs/getting_started/introduction/first_look_at_the_editor.rst:145 msgid "" "When you do any of these, a window pops up. Type to search for any item. You " "can also use it to browse available objects and methods." msgstr "" #: ../../docs/getting_started/introduction/first_look_at_the_editor.rst:150 msgid "" "Double-click on an item to open the corresponding page in the script main " "screen." msgstr "" #: ../../docs/getting_started/introduction/learning_new_features.rst:8 #, fuzzy msgid "Learning new features" msgstr "Chụp" #: ../../docs/getting_started/introduction/learning_new_features.rst:10 msgid "" "Godot is a feature-rich game engine. There is a lot to learn about it. This " "page explains how you can use the online manual, built-in code reference, " "and join online communities to learn new features and techniques." msgstr "" #: ../../docs/getting_started/introduction/learning_new_features.rst:15 msgid "Making the most of this manual" msgstr "" #: ../../docs/getting_started/introduction/learning_new_features.rst:17 msgid "" "What you are reading now is the user manual. It documents each of the " "engine's concepts and available features. When learning a new topic, you can " "start by browsing the corresponding section of this website. The left menu " "allows you to explore broad topics while the search bar will help you find " "more specific pages. If a page exists for a given theme, it will often link " "to more related content." msgstr "" #: ../../docs/getting_started/introduction/learning_new_features.rst:26 msgid "" "The manual has a companion class reference that explains each Godot class's " "available functions and properties when programming. While the manual covers " "general features, concepts, and how to use the editor, the reference is all " "about using Godot's scripting API (Application Programming Interface). You " "can access it both online and offline. We recommend browsing the reference " "offline, from within the Godot editor. To do so, go to Help -> Search or " "press :kbd:`F1`." msgstr "" #: ../../docs/getting_started/introduction/learning_new_features.rst:36 msgid "" "To browse it online, head to the manual's :ref:`Class Reference ` section." msgstr "" #: ../../docs/getting_started/introduction/learning_new_features.rst:39 msgid "A class reference's page tells you:" msgstr "" #: ../../docs/getting_started/introduction/learning_new_features.rst:41 msgid "" "Where the class exists in the inheritance hierarchy. You can click the top " "links to jump to parent classes and see the properties and methods a type " "inherits." msgstr "" #: ../../docs/getting_started/introduction/learning_new_features.rst:47 msgid "A summary of the class's role and use cases." msgstr "" #: ../../docs/getting_started/introduction/learning_new_features.rst:49 msgid "" "An explanation of the class's properties, methods, signals, enums, and " "constants." msgstr "" #: ../../docs/getting_started/introduction/learning_new_features.rst:52 msgid "Links to manual pages further detailing the class." msgstr "" #: ../../docs/getting_started/introduction/learning_new_features.rst:54 msgid "" "If the manual or class reference is missing or has insufficient information, " "please open an Issue in the official `godot-docs `_ GitHub repository to report it." msgstr "" #: ../../docs/getting_started/introduction/learning_new_features.rst:59 msgid "" "You can Ctrl-click any underlined text like the name of a class, property, " "method, signal, or constant to jump to it." msgstr "" #: ../../docs/getting_started/introduction/learning_new_features.rst:63 msgid "Learning to think like a programmer" msgstr "" #: ../../docs/getting_started/introduction/learning_new_features.rst:65 msgid "" "Teaching programming foundations and how to think like a game developer is " "beyond the scope of Godot's documentation. If you're new to programming, we " "recommend two excellent free resources to get you started:" msgstr "" #: ../../docs/getting_started/introduction/learning_new_features.rst:69 msgid "" "Harvard university offers a free courseware to learn to program, `CS50 " "`_. 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." msgstr "" #: ../../docs/getting_started/introduction/learning_new_features.rst:76 msgid "" "If you prefer books, check out the free ebook `Automate The Boring Stuff " "With Python `_ by Al Sweigart's." msgstr "" #: ../../docs/getting_started/introduction/learning_new_features.rst:80 msgid "Learning with the community" msgstr "" #: ../../docs/getting_started/introduction/learning_new_features.rst:82 msgid "" "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 `_." msgstr "" #: ../../docs/getting_started/introduction/learning_new_features.rst:87 msgid "" "The best place to ask for questions and find already answered ones is the " "official `Questions & Answers `_ 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 sure to look for existing answers that might solve your problem " "on this website or using your preferred search engine." msgstr "" #: ../../docs/getting_started/introduction/learning_new_features.rst:95 msgid "" "Asking questions well and providing details will help others answer you " "faster and better. When asking questions, we recommend including the " "following information:" msgstr "" #: ../../docs/getting_started/introduction/learning_new_features.rst:99 msgid "" "**Describe your goal**. You want to explain what you are trying to achieve " "design-wise. If you are having trouble figuring out how to make a solution " "work, there may be a different, easier solution that accomplishes the same " "goal." msgstr "" #: ../../docs/getting_started/introduction/learning_new_features.rst:104 msgid "" "If there is an error involved, **share the exact error message**. You can " "copy the exact error message in the editor's Debugger bottom panel by " "clicking the Copy Error icon. Knowing what it says can help community " "members better identify how you triggered the error." msgstr "" #: ../../docs/getting_started/introduction/learning_new_features.rst:109 msgid "" "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 `_ to share " "long files." msgstr "" #: ../../docs/getting_started/introduction/learning_new_features.rst:115 msgid "" "**Share a screenshot** of your *Scene* dock along with your written code. " "Most of the code you write affects nodes in your scenes. As a result, you " "should think of those scenes as part of your source code." msgstr "" #: ../../docs/getting_started/introduction/learning_new_features.rst:121 msgid "" "Also, please don't take a picture with your phone, the low quality and " "screen reflections can make it hard to understand the image. Your operating " "system should have a built-in tool to take screenshots with the :kbd:`PrtSc` " "(Print Screen) key." msgstr "" #: ../../docs/getting_started/introduction/learning_new_features.rst:126 msgid "" "Alternatively, you can use a program like `ShareX `_ " "on Windows or `FlameShot `_ on Linux." msgstr "" #: ../../docs/getting_started/introduction/learning_new_features.rst:129 msgid "" "Sharing a video of your running game can also be really **useful to " "troubleshoot your game**. You can use programs like `OBS Studio `_ and `Screen to GIF `_ to " "capture your screen." msgstr "" #: ../../docs/getting_started/introduction/learning_new_features.rst:134 msgid "" "You can then use a service like `streamable `_ or a " "cloud provider to upload and share your videos for free." msgstr "" #: ../../docs/getting_started/introduction/learning_new_features.rst:137 msgid "" "If you're not using the stable version of Godot, please mention the version " "you're using. The answer can be different as available features and the " "interface evolve rapidly." msgstr "" #: ../../docs/getting_started/introduction/learning_new_features.rst:141 msgid "" "Following these guidelines will maximize your chances of getting the answer " "you're looking for. They will save time both to you and the persons helping " "you." msgstr "" #: ../../docs/getting_started/introduction/learning_new_features.rst:145 #, fuzzy msgid "Community tutorials" msgstr "Cộng đồng" #: ../../docs/getting_started/introduction/learning_new_features.rst:147 msgid "" "This manual aims to provide a comprehensive reference of Godot's features. " "Aside from the 2D and 3D getting started series, it does not contain " "tutorials to implement specific game genres. If you're looking for a " "tutorial about creating a role-playing game, a platformer, or other, please " "see :ref:`doc_community_tutorials`, which lists content made by the Godot " "community." msgstr "" #: ../../docs/getting_started/introduction/godot_design_philosophy.rst:4 msgid "Godot's design philosophy" msgstr "" #: ../../docs/getting_started/introduction/godot_design_philosophy.rst:6 msgid "Now that you've gotten your feet wet, let's talk about Godot's design." msgstr "" #: ../../docs/getting_started/introduction/godot_design_philosophy.rst:8 msgid "" "**Every game engine is different and fits different needs.** Not only do " "they offer a range of features, but the design of each engine is unique. " "This leads to different workflows and different ways to form your games' " "structures. This all stems from their respective design philosophies." msgstr "" #: ../../docs/getting_started/introduction/godot_design_philosophy.rst:13 msgid "" "This page is here to help you understand how Godot works, starting with some " "of its core pillars. It is not a list of available features, nor is it an " "engine comparison. To know if any engine can be a good fit for your project, " "you need to try it out for yourself and understand its design and " "limitations." msgstr "" #: ../../docs/getting_started/introduction/godot_design_philosophy.rst:19 msgid "" "Please watch `Godot explained in 5 minutes `_ if you're looking for an overview of the engine's features." msgstr "" #: ../../docs/getting_started/introduction/godot_design_philosophy.rst:24 msgid "Object-oriented design and composition" msgstr "" #: ../../docs/getting_started/introduction/godot_design_philosophy.rst:26 msgid "" "Godot embraces object-oriented design at its core with its flexible scene " "system and Node hierarchy. It tries to stay away from strict programming " "patterns to offer an intuitive way to structure your game." msgstr "" #: ../../docs/getting_started/introduction/godot_design_philosophy.rst:30 msgid "" "For one, Godot lets you **compose or aggregate** scenes. It's like nested " "prefabs: you can create a BlinkingLight scene and a BrokenLantern scene that " "uses the BlinkingLight. Then, create a city filled with BrokenLanterns. " "Change the BlinkingLight's color, save, and all the BrokenLanterns in the " "city will update instantly." msgstr "" #: ../../docs/getting_started/introduction/godot_design_philosophy.rst:37 msgid "On top of that, you can **inherit** from any scene." msgstr "" #: ../../docs/getting_started/introduction/godot_design_philosophy.rst:39 msgid "" "A Godot scene could be a Weapon, a Character, an Item, a Door, a Level, part " "of a level… anything you'd like. It works like a class in pure code, except " "you're free to design it by using the editor, using only the code, or mixing " "and matching the two." msgstr "" #: ../../docs/getting_started/introduction/godot_design_philosophy.rst:44 msgid "" "It's different from prefabs you find in several 3D engines, as you can then " "inherit from and extend those scenes. You may create a Magician that extends " "your Character. Modify the Character in the editor and the Magician will " "update as well. It helps you build your projects so that their structure " "matches the game's design." msgstr "" #: ../../docs/getting_started/introduction/godot_design_philosophy.rst:50 #: ../../docs/getting_started/first_2d_game/index.rst:10 #: ../../docs/getting_started/first_3d_game/index.rst:10 #: ../../docs/getting_started/first_3d_game/02.player_input.rst:16 #: ../../docs/getting_started/first_3d_game/03.player_movement_code.rst:13 #: ../../docs/getting_started/first_3d_game/04.mob_scene.rst:18 #: ../../docs/getting_started/first_3d_game/05.spawning_mobs.rst:9 #: ../../docs/getting_started/first_3d_game/06.jump_and_squash.rst:40 #: ../../docs/getting_started/first_3d_game/07.killing_player.rst:21 #: ../../docs/getting_started/first_3d_game/08.score_and_replay.rst:18 #: ../../docs/getting_started/first_3d_game/09.adding_animations.rst:10 #: ../../docs/community/asset_library/using_assetlib.rst:16 #: ../../docs/community/asset_library/submitting_to_assetlib.rst:122 msgid "|image0|" msgstr "| hình ảnh0 |" #: ../../docs/getting_started/introduction/godot_design_philosophy.rst:183 #: ../../docs/getting_started/first_2d_game/index.rst:77 #: ../../docs/getting_started/first_3d_game/index.rst:70 #: ../../docs/getting_started/first_3d_game/02.player_input.rst:159 #: ../../docs/getting_started/first_3d_game/03.player_movement_code.rst:403 #: ../../docs/getting_started/first_3d_game/04.mob_scene.rst:322 #: ../../docs/getting_started/first_3d_game/05.spawning_mobs.rst:335 #: ../../docs/getting_started/first_3d_game/06.jump_and_squash.rst:345 #: ../../docs/getting_started/first_3d_game/07.killing_player.rst:462 #: ../../docs/getting_started/first_3d_game/08.score_and_replay.rst:452 #: ../../docs/getting_started/first_3d_game/09.adding_animations.rst:536 #: ../../docs/community/asset_library/using_assetlib.rst:185 #: ../../docs/community/asset_library/submitting_to_assetlib.rst:210 #, fuzzy msgid "image0" msgstr "| hình ảnh0 |" #: ../../docs/getting_started/introduction/godot_design_philosophy.rst:52 msgid "" "Also note that Godot offers many different types of objects called nodes, " "each with a specific purpose. Nodes are part of a tree and always inherit " "from their parents up to the Node class. Although the engine does feature " "some nodes like collision shapes that a parent physics body will use, most " "nodes work independently from one another." msgstr "" #: ../../docs/getting_started/introduction/godot_design_philosophy.rst:58 msgid "" "In other words, Godot's nodes do not work like components in some other game " "engines." msgstr "" #: ../../docs/getting_started/introduction/godot_design_philosophy.rst:61 #: ../../docs/getting_started/first_3d_game/01.game_setup.rst:17 #: ../../docs/getting_started/first_3d_game/02.player_input.rst:36 #: ../../docs/getting_started/first_3d_game/03.player_movement_code.rst:331 #: ../../docs/getting_started/first_3d_game/04.mob_scene.rst:23 #: ../../docs/getting_started/first_3d_game/05.spawning_mobs.rst:19 #: ../../docs/getting_started/first_3d_game/06.jump_and_squash.rst:47 #: ../../docs/getting_started/first_3d_game/07.killing_player.rst:25 #: ../../docs/getting_started/first_3d_game/08.score_and_replay.rst:22 #: ../../docs/getting_started/first_3d_game/09.adding_animations.rst:24 #: ../../docs/community/asset_library/using_assetlib.rst:48 msgid "|image1|" msgstr "|hình1|" #: ../../docs/getting_started/introduction/godot_design_philosophy.rst:184 #: ../../docs/getting_started/first_3d_game/01.game_setup.rst:148 #: ../../docs/getting_started/first_3d_game/02.player_input.rst:160 #: ../../docs/getting_started/first_3d_game/03.player_movement_code.rst:404 #: ../../docs/getting_started/first_3d_game/04.mob_scene.rst:323 #: ../../docs/getting_started/first_3d_game/05.spawning_mobs.rst:336 #: ../../docs/getting_started/first_3d_game/06.jump_and_squash.rst:346 #: ../../docs/getting_started/first_3d_game/07.killing_player.rst:463 #: ../../docs/getting_started/first_3d_game/08.score_and_replay.rst:453 #: ../../docs/getting_started/first_3d_game/09.adding_animations.rst:537 #: ../../docs/community/asset_library/using_assetlib.rst:186 #, fuzzy msgid "image1" msgstr "|hình1|" #: ../../docs/getting_started/introduction/godot_design_philosophy.rst:63 msgid "" "Sprite is a Node2D, a CanvasItem and a Node. It has all the properties and " "features of its three parent classes, like transforms or the ability to draw " "custom shapes and render with a custom shader." msgstr "" #: ../../docs/getting_started/introduction/godot_design_philosophy.rst:68 msgid "All-inclusive package" msgstr "" #: ../../docs/getting_started/introduction/godot_design_philosophy.rst:70 msgid "" "Godot tries to provide its own tools to answer most common needs. It has a " "dedicated scripting workspace, an animation editor, a tilemap editor, a " "shader editor, a debugger, a profiler, the ability to hot-reload locally and " "on remote devices, etc." msgstr "" #: ../../docs/getting_started/introduction/godot_design_philosophy.rst:75 #: ../../docs/getting_started/first_3d_game/01.game_setup.rst:24 #: ../../docs/getting_started/first_3d_game/02.player_input.rst:41 #: ../../docs/getting_started/first_3d_game/03.player_movement_code.rst:339 #: ../../docs/getting_started/first_3d_game/04.mob_scene.rst:27 #: ../../docs/getting_started/first_3d_game/05.spawning_mobs.rst:24 #: ../../docs/getting_started/first_3d_game/06.jump_and_squash.rst:58 #: ../../docs/getting_started/first_3d_game/07.killing_player.rst:33 #: ../../docs/getting_started/first_3d_game/08.score_and_replay.rst:30 #: ../../docs/getting_started/first_3d_game/09.adding_animations.rst:32 #: ../../docs/community/asset_library/using_assetlib.rst:58 msgid "|image2|" msgstr "|hình2|" #: ../../docs/getting_started/introduction/godot_design_philosophy.rst:185 #: ../../docs/getting_started/first_3d_game/01.game_setup.rst:149 #: ../../docs/getting_started/first_3d_game/02.player_input.rst:161 #: ../../docs/getting_started/first_3d_game/03.player_movement_code.rst:405 #: ../../docs/getting_started/first_3d_game/04.mob_scene.rst:324 #: ../../docs/getting_started/first_3d_game/05.spawning_mobs.rst:337 #: ../../docs/getting_started/first_3d_game/06.jump_and_squash.rst:347 #: ../../docs/getting_started/first_3d_game/07.killing_player.rst:464 #: ../../docs/getting_started/first_3d_game/08.score_and_replay.rst:454 #: ../../docs/getting_started/first_3d_game/09.adding_animations.rst:538 #: ../../docs/community/asset_library/using_assetlib.rst:187 #, fuzzy msgid "image2" msgstr "|hình2|" #: ../../docs/getting_started/introduction/godot_design_philosophy.rst:77 msgid "" "The goal is to offer a full package to create games and a continuous user " "experience. You can still work with external programs as long as there is an " "import plugin for it. Or you can create one, like the `Tiled Map Importer " "`__." msgstr "" #: ../../docs/getting_started/introduction/godot_design_philosophy.rst:82 msgid "" "That is also partly why Godot offers its own programming languages GDScript " "and VisualScript, along with C#. They're designed for the needs of game " "developers and game designers, and they're tightly integrated in the engine " "and the editor." msgstr "" #: ../../docs/getting_started/introduction/godot_design_philosophy.rst:87 msgid "" "GDScript lets you write code using an indentation-based syntax, yet it " "detects types and offers a static language's quality of auto-completion. It " "is also optimized for gameplay code with built-in types like Vectors and " "Colors." msgstr "" #: ../../docs/getting_started/introduction/godot_design_philosophy.rst:91 msgid "" "Note that with GDNative, you can write high-performance code using compiled " "languages like C, C++, Rust, or Python (using the Cython compiler) without " "recompiling the engine." msgstr "" #: ../../docs/getting_started/introduction/godot_design_philosophy.rst:95 #: ../../docs/getting_started/first_3d_game/01.game_setup.rst:28 #: ../../docs/getting_started/first_3d_game/02.player_input.rst:55 #: ../../docs/getting_started/first_3d_game/03.player_movement_code.rst:352 #: ../../docs/getting_started/first_3d_game/04.mob_scene.rst:31 #: ../../docs/getting_started/first_3d_game/05.spawning_mobs.rst:42 #: ../../docs/getting_started/first_3d_game/06.jump_and_squash.rst:64 #: ../../docs/getting_started/first_3d_game/07.killing_player.rst:47 #: ../../docs/getting_started/first_3d_game/08.score_and_replay.rst:34 #: ../../docs/getting_started/first_3d_game/09.adding_animations.rst:36 #: ../../docs/community/asset_library/using_assetlib.rst:81 msgid "|image3|" msgstr "|hình3|" #: ../../docs/getting_started/introduction/godot_design_philosophy.rst:186 #: ../../docs/getting_started/first_3d_game/01.game_setup.rst:150 #: ../../docs/getting_started/first_3d_game/02.player_input.rst:162 #: ../../docs/getting_started/first_3d_game/03.player_movement_code.rst:406 #: ../../docs/getting_started/first_3d_game/04.mob_scene.rst:325 #: ../../docs/getting_started/first_3d_game/05.spawning_mobs.rst:338 #: ../../docs/getting_started/first_3d_game/06.jump_and_squash.rst:348 #: ../../docs/getting_started/first_3d_game/07.killing_player.rst:465 #: ../../docs/getting_started/first_3d_game/08.score_and_replay.rst:455 #: ../../docs/getting_started/first_3d_game/09.adding_animations.rst:539 #: ../../docs/community/asset_library/using_assetlib.rst:188 #, fuzzy msgid "image3" msgstr "|hình3|" #: ../../docs/getting_started/introduction/godot_design_philosophy.rst:97 msgid "" "*VisualScript is a node-based programming language that integrates well in " "the editor. You can drag and drop nodes or resources into the graph to " "create new code blocks.*" msgstr "" #: ../../docs/getting_started/introduction/godot_design_philosophy.rst:101 msgid "" "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." msgstr "" #: ../../docs/getting_started/introduction/godot_design_philosophy.rst:106 #: ../../docs/getting_started/first_3d_game/01.game_setup.rst:33 #: ../../docs/getting_started/first_3d_game/02.player_input.rst:63 #: ../../docs/getting_started/first_3d_game/03.player_movement_code.rst:357 #: ../../docs/getting_started/first_3d_game/04.mob_scene.rst:42 #: ../../docs/getting_started/first_3d_game/05.spawning_mobs.rst:51 #: ../../docs/getting_started/first_3d_game/06.jump_and_squash.rst:74 #: ../../docs/getting_started/first_3d_game/07.killing_player.rst:53 #: ../../docs/getting_started/first_3d_game/08.score_and_replay.rst:39 #: ../../docs/getting_started/first_3d_game/09.adding_animations.rst:41 #: ../../docs/community/asset_library/using_assetlib.rst:86 msgid "|image4|" msgstr "| hình ảnh4 |" #: ../../docs/getting_started/introduction/godot_design_philosophy.rst:187 #: ../../docs/getting_started/first_3d_game/01.game_setup.rst:151 #: ../../docs/getting_started/first_3d_game/02.player_input.rst:163 #: ../../docs/getting_started/first_3d_game/03.player_movement_code.rst:407 #: ../../docs/getting_started/first_3d_game/04.mob_scene.rst:326 #: ../../docs/getting_started/first_3d_game/05.spawning_mobs.rst:339 #: ../../docs/getting_started/first_3d_game/06.jump_and_squash.rst:349 #: ../../docs/getting_started/first_3d_game/07.killing_player.rst:466 #: ../../docs/getting_started/first_3d_game/08.score_and_replay.rst:456 #: ../../docs/getting_started/first_3d_game/09.adding_animations.rst:540 #: ../../docs/community/asset_library/using_assetlib.rst:189 #, fuzzy msgid "image4" msgstr "| hình ảnh4 |" #: ../../docs/getting_started/introduction/godot_design_philosophy.rst:108 msgid "" "*A State Machine editor plugin in Godot 2 by kubecz3k. It lets you manage " "states and transitions visually.*" msgstr "" #: ../../docs/getting_started/introduction/godot_design_philosophy.rst:112 msgid "Open source" msgstr "" #: ../../docs/getting_started/introduction/godot_design_philosophy.rst:114 msgid "" "Godot offers a fully open source codebase under the **MIT license**. This " "means all the technologies that ship with it have to be Free (as in freedom) " "as well. For the most part, they're developed from the ground up by " "contributors." msgstr "" #: ../../docs/getting_started/introduction/godot_design_philosophy.rst:119 msgid "" "Anyone can plug in proprietary tools for the needs of their projects — they " "just won't ship with the engine. This may include Google AdMob, or FMOD. Any " "of these can come as third-party plugins instead." msgstr "" #: ../../docs/getting_started/introduction/godot_design_philosophy.rst:124 msgid "" "On the other hand, an open codebase means you can **learn from and extend " "the engine** to your heart's content. You can also debug games easily, as " "Godot will print errors with a stack trace, even if they come from the " "engine itself." msgstr "" #: ../../docs/getting_started/introduction/godot_design_philosophy.rst:130 msgid "" "This **does not affect the work you do with Godot** in any way: there's no " "strings attached to the engine or anything you make with it." msgstr "" #: ../../docs/getting_started/introduction/godot_design_philosophy.rst:134 msgid "Community-driven" msgstr "" #: ../../docs/getting_started/introduction/godot_design_philosophy.rst:136 msgid "" "**Godot is made by its community, for the community, and for all game " "creators out there.** It's the needs of the users and open discussions that " "drive the core updates. New features from the core developers often focus on " "what will benefit the most users first." msgstr "" #: ../../docs/getting_started/introduction/godot_design_philosophy.rst:141 msgid "" "That said, although a handful of core developers work on it full-time, the " "project has over 600 contributors at the time of writing. Benevolent " "programmers work on features they may need themselves, so you'll see " "improvements in all corners of the engine at the same time in every major " "release." msgstr "" #: ../../docs/getting_started/introduction/godot_design_philosophy.rst:148 msgid "The Godot editor is a Godot game" msgstr "" #: ../../docs/getting_started/introduction/godot_design_philosophy.rst:150 msgid "" "The Godot editor runs on the game engine. It uses the engine's own UI " "system, it can hot-reload code and scenes when you test your projects, or " "run game code in the editor. This means you can **use the same code** and " "scenes for your games, or **build plugins and extend the editor.**" msgstr "" #: ../../docs/getting_started/introduction/godot_design_philosophy.rst:155 msgid "" "This leads to a reliable and flexible UI system, as it powers the editor " "itself. With the ``tool`` keyword, you can run any game code in the editor." msgstr "" #: ../../docs/getting_started/introduction/godot_design_philosophy.rst:158 #: ../../docs/getting_started/first_3d_game/01.game_setup.rst:46 #: ../../docs/getting_started/first_3d_game/02.player_input.rst:68 #: ../../docs/getting_started/first_3d_game/03.player_movement_code.rst:366 #: ../../docs/getting_started/first_3d_game/04.mob_scene.rst:78 #: ../../docs/getting_started/first_3d_game/05.spawning_mobs.rst:55 #: ../../docs/getting_started/first_3d_game/06.jump_and_squash.rst:83 #: ../../docs/getting_started/first_3d_game/07.killing_player.rst:119 #: ../../docs/getting_started/first_3d_game/08.score_and_replay.rst:51 #: ../../docs/getting_started/first_3d_game/09.adding_animations.rst:49 #: ../../docs/community/asset_library/using_assetlib.rst:90 msgid "|image5|" msgstr "| hình ảnh 5 |" #: ../../docs/getting_started/introduction/godot_design_philosophy.rst:188 #: ../../docs/getting_started/first_3d_game/01.game_setup.rst:152 #: ../../docs/getting_started/first_3d_game/02.player_input.rst:164 #: ../../docs/getting_started/first_3d_game/03.player_movement_code.rst:408 #: ../../docs/getting_started/first_3d_game/04.mob_scene.rst:327 #: ../../docs/getting_started/first_3d_game/05.spawning_mobs.rst:340 #: ../../docs/getting_started/first_3d_game/06.jump_and_squash.rst:350 #: ../../docs/getting_started/first_3d_game/07.killing_player.rst:467 #: ../../docs/getting_started/first_3d_game/08.score_and_replay.rst:457 #: ../../docs/getting_started/first_3d_game/09.adding_animations.rst:541 #: ../../docs/community/asset_library/using_assetlib.rst:190 #, fuzzy msgid "image5" msgstr "| hình ảnh 5 |" #: ../../docs/getting_started/introduction/godot_design_philosophy.rst:160 msgid "" "*RPG in a Box is a voxel RPG editor made with Godot 2. It uses Godot's UI " "tools for its node-based programming system and for the rest of the " "interface.*" msgstr "" #: ../../docs/getting_started/introduction/godot_design_philosophy.rst:164 msgid "" "Put the ``tool`` keyword at the top of any GDScript file and it will run in " "the editor. This lets you import and export plugins, create plugins like " "custom level editors, or create scripts with the same nodes and API you use " "in your projects." msgstr "" #: ../../docs/getting_started/introduction/godot_design_philosophy.rst:171 msgid "" "The editor is fully written in C++ and is statically compiled into the " "binary. This means you can't import it as a typical project that would have " "a ``project.godot`` file." msgstr "" #: ../../docs/getting_started/introduction/godot_design_philosophy.rst:176 msgid "Separate 2D and 3D engines" msgstr "" #: ../../docs/getting_started/introduction/godot_design_philosophy.rst:178 msgid "" "Godot offers dedicated 2D and 3D rendering engines. As a result, **the base " "unit for 2D scenes is pixels.** Even though the engines are separate, you " "can render 2D in 3D, 3D in 2D, and overlay 2D sprites and interfaces over " "your 3D world." msgstr "" #: ../../docs/getting_started/step_by_step/index.rst:4 msgid "" "This series builds upon the :ref:`Introduction to Godot ` and will get you started with the editor and the engine. You " "will learn more about nodes and scenes, code your first classes with " "GDScript, use signals to make nodes communicate with one another, and more." msgstr "" #: ../../docs/getting_started/step_by_step/index.rst:9 msgid "" "The following lessons are here to prepare you for :ref:" "`doc_your_first_2d_game`, a step-by-step tutorial where you will code a game " "from scratch. By the end of it, you will have the necessary foundations to " "explore more features in other sections. We also included links to pages " "that cover a given topic in-depth where appropriate." msgstr "" #: ../../docs/getting_started/step_by_step/nodes_and_scenes.rst:6 #, fuzzy msgid "Nodes and Scenes" msgstr "Các scene và node" #: ../../docs/getting_started/step_by_step/nodes_and_scenes.rst:8 msgid "" "In :ref:`doc_key_concepts_overview`, we saw that a Godot game is a tree of " "scenes and that each scene is a tree of nodes. In this lesson, we explain a " "bit more about them. You will also create your first scene." msgstr "" #: ../../docs/getting_started/step_by_step/nodes_and_scenes.rst:15 msgid "" "**Nodes are the fundamental building blocks of your game**. They are like " "the ingredients in a recipe. There are dozens of kinds that can display an " "image, play a sound, represent a camera, and much more." msgstr "" #: ../../docs/getting_started/step_by_step/nodes_and_scenes.rst:21 #, fuzzy msgid "All nodes have the following attributes:" msgstr "Cảnh Mob sẽ sử dụng các node sau:" #: ../../docs/getting_started/step_by_step/nodes_and_scenes.rst:23 msgid "A name." msgstr "" #: ../../docs/getting_started/step_by_step/nodes_and_scenes.rst:24 #, fuzzy msgid "Editable properties." msgstr "Nó có thuộc tính có thể chỉnh sửa." #: ../../docs/getting_started/step_by_step/nodes_and_scenes.rst:25 #, fuzzy msgid "They receive callbacks to update every frame." msgstr "Nó có thể nhận được một callback để xử lý mọi frame." #: ../../docs/getting_started/step_by_step/nodes_and_scenes.rst:26 #, fuzzy msgid "You can extend them with new properties and functions." msgstr "Nó có thể được mở rộng (để có nhiều hàm nhiều chức năng hơn)." #: ../../docs/getting_started/step_by_step/nodes_and_scenes.rst:27 #, fuzzy msgid "You can add them to another node as a child." msgstr "Nó có thể được thêm vào một node khác như là một node con." #: ../../docs/getting_started/step_by_step/nodes_and_scenes.rst:29 msgid "" "The last attribute is key. **Together, nodes form a tree**, which is a " "powerful feature to organize projects. Since different nodes have different " "functions, combining them produces more complex behavior. As we saw before, " "you can build a playable character the camera follows using a kinematic body " "node named \"Character\", a sprite node, a camera node, and a collision " "shape node." msgstr "" #: ../../docs/getting_started/step_by_step/nodes_and_scenes.rst:40 msgid "" "When you organize nodes in a tree, like our character, we call this " "construct a scene. Once saved, scenes work like new node types in the " "editor, where you can add them as a child of an existing node. In that case, " "the instance of the scene appears as a single node with its internals hidden." msgstr "" #: ../../docs/getting_started/step_by_step/nodes_and_scenes.rst:45 msgid "" "Scenes allow you to structure your game's code however you want. You can " "**compose nodes** to create custom and complex node types, like a game " "character that runs and jumps, a life bar, a chest with which you can " "interact, and more." msgstr "" #: ../../docs/getting_started/step_by_step/nodes_and_scenes.rst:51 #, fuzzy msgid "" "The Godot editor essentially is a **scene editor**. It has plenty of tools " "for editing 2D and 3D scenes, as well as user interfaces. A Godot project " "can contain as many of these scenes as you need. The engine only requires " "one as your application's **main scene**. This is the scene Godot will first " "load when you or a player runs the game." msgstr "" "Về cơ bản, trình soạn thảo Godot là **scene editor**. Nó có nhiều công cụ để " "chỉnh sửa scene 2D và 3D cũng như giao diện người dùng, nhưng trình chỉnh " "sửa dựa trên khái niệm chỉnh sửa scene và các node tạo ra nó." #: ../../docs/getting_started/step_by_step/nodes_and_scenes.rst:57 msgid "On top of acting like nodes, scenes have the following attributes:" msgstr "" #: ../../docs/getting_started/step_by_step/nodes_and_scenes.rst:59 msgid "They always have one root node, like the \"Character\" in our example." msgstr "" #: ../../docs/getting_started/step_by_step/nodes_and_scenes.rst:60 msgid "You can save them to your hard drive and load them later." msgstr "" #: ../../docs/getting_started/step_by_step/nodes_and_scenes.rst:61 msgid "" "You can create as many instances of a scene as you'd like. You could have " "five or ten characters in your game, created from your Character scene." msgstr "" #: ../../docs/getting_started/step_by_step/nodes_and_scenes.rst:65 #, fuzzy msgid "Creating your first scene" msgstr "Tạo nội dung" #: ../../docs/getting_started/step_by_step/nodes_and_scenes.rst:67 msgid "" "Let's create our first scene with a single node. To do so, you will need to " "create a new project first. After opening the project, you should see an " "empty editor." msgstr "" #: ../../docs/getting_started/step_by_step/nodes_and_scenes.rst:73 msgid "" "In an empty scene, the Scene dock on the left shows several options to add a " "root node quickly. \"2D Scene\" adds a Node2D node, \"3D Scene\" adds a " "Spatial node, \"User Interface\" adds a Control node, and \"Other Node\" " "lets you select any node. It is equivalent to pressing the \"Add Child " "Node\" button. These presets are here for convenience; they are not " "mandatory." msgstr "" #: ../../docs/getting_started/step_by_step/nodes_and_scenes.rst:79 msgid "" "We're going to add a single Label node to our scene. Its function is to draw " "text on the screen." msgstr "" #: ../../docs/getting_started/step_by_step/nodes_and_scenes.rst:82 msgid "" "Press the \"Add Child Node\" button at the top left of the Scene dock to " "create a node. This button adds the chosen node as a child of the currently " "selected one or, in an empty scene, as the root." msgstr "" #: ../../docs/getting_started/step_by_step/nodes_and_scenes.rst:88 #, fuzzy msgid "The Create Node dialog opens, showing the long list of available nodes." msgstr "" "Điều này sẽ mở hộp thoại Create Node, hiển thị danh sách dài các node có thể " "được tạo:" #: ../../docs/getting_started/step_by_step/nodes_and_scenes.rst:92 msgid "Select the Label node. You can type its name to filter down the list." msgstr "" #: ../../docs/getting_started/step_by_step/nodes_and_scenes.rst:96 msgid "" "Click on the Label node to select it and click the Create button at the " "bottom of the window." msgstr "" #: ../../docs/getting_started/step_by_step/nodes_and_scenes.rst:101 msgid "" "A lot happens when you add a scene's first node. The scene changes to the 2D " "workspace because Label is a 2D node type. The Label appears, selected, in " "the top-left corner of the viewport. The node appears in the Scene dock on " "the left, and the node's properties appear in the Inspector dock on the " "right." msgstr "" #: ../../docs/getting_started/step_by_step/nodes_and_scenes.rst:107 #, fuzzy msgid "Changing a node's properties" msgstr "Nó có thuộc tính có thể chỉnh sửa." #: ../../docs/getting_started/step_by_step/nodes_and_scenes.rst:109 #, fuzzy msgid "" "The next step is to change the Label's \"Text\" property. Let's change it to " "\"Hello World\"." msgstr "" "Bước tiếp theo sẽ là thay đổi Thuộc tính \"Text\" của label. Hãy thay đổi nó " "thành \"Hello World\":" #: ../../docs/getting_started/step_by_step/nodes_and_scenes.rst:112 msgid "" "Head to the Inspector dock on the right of the viewport. Click inside the " "field below the Text property and type \"Hello World\"." msgstr "" #: ../../docs/getting_started/step_by_step/nodes_and_scenes.rst:117 msgid "You will see the text draw in the viewport as you type." msgstr "" #: ../../docs/getting_started/step_by_step/nodes_and_scenes.rst:119 msgid "" "You can move your Label node in the viewport by selecting the move tool in " "the toolbar." msgstr "" #: ../../docs/getting_started/step_by_step/nodes_and_scenes.rst:124 msgid "" "With the Label selected, click and drag anywhere in the viewport to move it " "to the center of the view delimited by the rectangle." msgstr "" #: ../../docs/getting_started/step_by_step/nodes_and_scenes.rst:130 #, fuzzy msgid "Running the scene" msgstr "Script một scene" #: ../../docs/getting_started/step_by_step/nodes_and_scenes.rst:132 #, fuzzy msgid "" "Everything's ready to run the scene! Press the Play Scene button in the top-" "right of the screen or press :kbd:`F6`." msgstr "" "Ok, mọi thứ đã sẵn sàng để chạy sceneh! Nhấn nút PLAY SCENE trên thanh trên " "cùng (hoặc nhấn F6):" #: ../../docs/getting_started/step_by_step/nodes_and_scenes.rst:137 msgid "A popup invites you to save the scene, which is required to run it." msgstr "" #: ../../docs/getting_started/step_by_step/nodes_and_scenes.rst:141 msgid "" "Click the Yes button, and in the file browser that appears, press the Save " "button to save it as \"Label.tscn\"." msgstr "" #: ../../docs/getting_started/step_by_step/nodes_and_scenes.rst:146 msgid "" "The Save Scene As dialog, like other file dialogs in the editor, only allows " "you to save files inside the project. The ``res://`` path at the top of the " "window represents the project's root directory and stands for \"resource " "path\". For more information about file paths in Godot, see :ref:" "`doc_filesystem`." msgstr "" #: ../../docs/getting_started/step_by_step/nodes_and_scenes.rst:152 msgid "" "The application should open in a new window and display the text \"Hello " "World\"." msgstr "" #: ../../docs/getting_started/step_by_step/nodes_and_scenes.rst:156 msgid "Close the window or press :kbd:`F8` to quit the running scene." msgstr "" #: ../../docs/getting_started/step_by_step/nodes_and_scenes.rst:160 #, fuzzy msgid "" "If this doesn't immediately work and you have a hiDPI display on at least " "one of your monitors, go to Project -> Project Settings -> Display -> Window " "then enable Allow Hidpi under Dpi." msgstr "" "Nếu điều này không hoạt động ngay lập tức và bạn có màn hình hiDPI trên ít " "nhất một màn hình của mình, hãy truy cập **Project → Project Settings → " "Display → Window** then enable **Allow Hidpi** under **Dpi**." #: ../../docs/getting_started/step_by_step/nodes_and_scenes.rst:165 #, fuzzy msgid "Setting the main scene" msgstr "Script một scene" #: ../../docs/getting_started/step_by_step/nodes_and_scenes.rst:167 msgid "" "To run our test scene, we used the Play Scene button. Another button next to " "it allows you to set and run the project's main scene. You can press :kbd:" "`F5` to do so." msgstr "" #: ../../docs/getting_started/step_by_step/nodes_and_scenes.rst:173 msgid "A popup window appears and invites you to select the main scene." msgstr "" #: ../../docs/getting_started/step_by_step/nodes_and_scenes.rst:177 msgid "" "Click the Select button, and in the file dialog that appears, double click " "on Label.tscn." msgstr "" #: ../../docs/getting_started/step_by_step/nodes_and_scenes.rst:182 msgid "" "The demo should run again. Moving forward, every time you run the project, " "Godot will use this scene as a starting point." msgstr "" #: ../../docs/getting_started/step_by_step/nodes_and_scenes.rst:185 msgid "" "The editor saves the main scene's path in a project.godot file in your " "project's directory. While you can edit this text file directly to change " "project settings, you can also use the \"Project -> Project Settings\" " "window to do so." msgstr "" #: ../../docs/getting_started/step_by_step/nodes_and_scenes.rst:190 msgid "" "In the next part, we will discuss another key concept in games and in Godot: " "creating instances of a scene." msgstr "" #: ../../docs/getting_started/step_by_step/instancing.rst:4 #, fuzzy msgid "Creating instances" msgstr "Chỉnh sửa instance" #: ../../docs/getting_started/step_by_step/instancing.rst:6 msgid "" "In the previous part, we saw that a scene is a collection of nodes organized " "in a tree structure, with a single node as its root. You can split your " "project into any number of scenes. This feature helps you break down and " "organize your game's different components." msgstr "" #: ../../docs/getting_started/step_by_step/instancing.rst:11 msgid "" "You can create as many scenes as you'd like and save them to the disk with " "the ``.tscn`` extension, which stands for \"text scene\". The ``Label.tscn`` " "file from the previous lesson was an example. We call those files \"Packed " "Scenes\" as they pack information about your scene's content." msgstr "" #: ../../docs/getting_started/step_by_step/instancing.rst:16 msgid "" "Here's the example of a ball. It's composed of a :ref:`RigidBody2D " "` node as its root named Ball, which allows the ball to " "fall and bounce on walls, a :ref:`Sprite ` node, and a :ref:" "`CollisionShape2D `." msgstr "" #: ../../docs/getting_started/step_by_step/instancing.rst:23 msgid "" "Once you saved a scene, it works as a blueprint: you can reproduce it in " "other scenes as many times as you'd like. Replicating an object from a " "template like so is called **instancing**." msgstr "" #: ../../docs/getting_started/step_by_step/instancing.rst:29 msgid "" "As we mentioned in the previous part, instanced scenes behave like a node: " "the editor hides their content by default. When you instance the Ball, you " "only see the Ball node. Notice also how each duplicate has a unique name." msgstr "" #: ../../docs/getting_started/step_by_step/instancing.rst:33 msgid "" "Every instance of the Ball scene starts with the same structure and " "properties as ``Ball.tscn``. However, you can modify each independently, " "such as changing how they bounce, how heavy they are, or any property " "exposed by the source scene." msgstr "" #: ../../docs/getting_started/step_by_step/instancing.rst:39 msgid "In practice" msgstr "" #: ../../docs/getting_started/step_by_step/instancing.rst:41 #, fuzzy msgid "" "Let's use instancing in practice to see how it works exactly in Godot. We " "invite you to download the ball's sample project we prepared for you: :" "download:`instancing.zip `." msgstr "" "Để tìm hiểu cách hoạt động của instance, hãy bắt đầu bằng cách tải xuống một " "dự án mẫu :: download: `instance.zip `." #: ../../docs/getting_started/step_by_step/instancing.rst:45 #, fuzzy msgid "" "Extract the archive on your computer. Then, open Godot, and in the project " "manager, click the Import button to import the project." msgstr "" "Giải nén dự án này bất cứ nơi nào bạn muốn. Sau đó mở Godot và thêm dự án " "này vào project manager bằng nút 'Import':" #: ../../docs/getting_started/step_by_step/instancing.rst:50 msgid "" "In the pop-up that appears, click the browse button and navigate to the " "folder you extracted." msgstr "" #: ../../docs/getting_started/step_by_step/instancing.rst:55 msgid "Double-click the ``project.godot`` file to open it." msgstr "" #: ../../docs/getting_started/step_by_step/instancing.rst:59 msgid "Finally, click the Import & Edit button." msgstr "" #: ../../docs/getting_started/step_by_step/instancing.rst:63 msgid "" "The project contains two packed scenes: ``Main.tscn``, containing walls " "against which the ball collides, and ``Ball.tscn``. The Main scene should " "open automatically." msgstr "" #: ../../docs/getting_started/step_by_step/instancing.rst:69 msgid "" "Let's add a ball as a child of the Main node. In the Scene dock, select the " "Main node. Then, click the link icon at the top of the scene dock. This " "button allows you to add an instance of a scene as a child of the currently " "selected node." msgstr "" #: ../../docs/getting_started/step_by_step/instancing.rst:75 msgid "Double-click the ball scene to instance it." msgstr "" #: ../../docs/getting_started/step_by_step/instancing.rst:79 msgid "The ball appears in the top-left corner of the viewport." msgstr "" #: ../../docs/getting_started/step_by_step/instancing.rst:83 msgid "Click on it and drag it towards the center of the view." msgstr "" #: ../../docs/getting_started/step_by_step/instancing.rst:87 msgid "Play the game by pressing F5. You should see it fall." msgstr "" #: ../../docs/getting_started/step_by_step/instancing.rst:89 msgid "" "Now, we want to create more instances of the Ball node. With the ball still " "selected, press :kbd:`Ctrl-D` (:kbd:`Cmd-D` on macOS) to call the duplicate " "command. Click and drag to move the new ball to a different location." msgstr "" #: ../../docs/getting_started/step_by_step/instancing.rst:95 msgid "You can repeat this process until you have several in the scene." msgstr "" #: ../../docs/getting_started/step_by_step/instancing.rst:99 msgid "" "Play the game again. You should now see every ball fall independently from " "one another. This is what instances do. Each is an independent reproduction " "of a template scene." msgstr "" #: ../../docs/getting_started/step_by_step/instancing.rst:104 #, fuzzy msgid "Editing scenes and instances" msgstr "Chỉnh sửa instance" #: ../../docs/getting_started/step_by_step/instancing.rst:106 msgid "There is more to instances. With this feature, you can:" msgstr "" #: ../../docs/getting_started/step_by_step/instancing.rst:108 msgid "" "Change the properties of one ball without affecting the others using the " "Inspector." msgstr "" #: ../../docs/getting_started/step_by_step/instancing.rst:110 msgid "" "Change the default properties of every Ball by opening ``Ball.tscn`` scene " "and making a change to the Ball node there. Upon saving, all instances of " "the Ball in the project will see their values update." msgstr "" #: ../../docs/getting_started/step_by_step/instancing.rst:114 msgid "" "Changing a property on an instance always overrides values from the " "corresponding packed scene." msgstr "" #: ../../docs/getting_started/step_by_step/instancing.rst:117 msgid "" "Let's try this. Open ``Ball.tscn`` and select the Ball node. In the " "Inspector on the right, click on the PhysicsMaterial property to expand it." msgstr "" #: ../../docs/getting_started/step_by_step/instancing.rst:122 msgid "" "Set its Bounce property to ``2`` by clicking on the number field, typing " "``2``, and pressing :kbd:`Enter`." msgstr "" #: ../../docs/getting_started/step_by_step/instancing.rst:127 msgid "" "Play the game by pressing :kbd:`F5` and notice how all balls now bounce a " "lot more. As the Ball scene is a template for all instances, modifying it " "and saving causes all instances to update accordingly." msgstr "" #: ../../docs/getting_started/step_by_step/instancing.rst:131 msgid "" "Let's now adjust an individual instance. Head back to the Main scene by " "clicking on the corresponding tab above the viewport." msgstr "" #: ../../docs/getting_started/step_by_step/instancing.rst:136 msgid "" "Select one of the instanced Ball nodes and, in the Inspector, set its " "Gravity Scale value to ``10``." msgstr "" #: ../../docs/getting_started/step_by_step/instancing.rst:141 msgid "A grey \"revert\" button appears next to the adjusted property." msgstr "" #: ../../docs/getting_started/step_by_step/instancing.rst:145 #, fuzzy msgid "" "This icon indicates you are overriding a value from the source packed scene. " "Even if you modify the property in the original scene, the value override " "will be preserved in the instance. Clicking the revert icon will restore the " "property to the value in the saved scene." msgstr "" "Lưu ý rằng nút \"revert\" (trở lại) màu xám xuất hiện bên cạnh thuộc tính " "được điều chỉnh. Khi có nút này, điều đó có nghĩa là bạn đã sửa đổi một " "thuộc tính trong cảnh được kích hoạt để ghi đè giá trị của nó trong scene đã " "lưu. Ngay cả khi thuộc tính đó được sửa đổi trong cảnh ban đầu, giá trị tùy " "chỉnh sẽ vẫn còn. Nhấn nút revert sẽ khôi phục thuộc tính về giá trị trong " "cảnh đã lưu." #: ../../docs/getting_started/step_by_step/instancing.rst:150 msgid "" "Rerun the game and notice how this ball now falls much faster than the " "others." msgstr "" #: ../../docs/getting_started/step_by_step/instancing.rst:152 msgid "" "If you change a value on the ``PhysicsMaterial`` of one instance, it will " "affect all the others. This is because ``PhysicsMaterial`` is a resource, " "and resources are shared between instances. To make a resource unique for " "one instance, right-click on it in the Inspector and click Make Unique in " "the contextual menu." msgstr "" #: ../../docs/getting_started/step_by_step/instancing.rst:158 msgid "" "Resources are another essential building block of Godot games we will cover " "in a later lesson." msgstr "" #: ../../docs/getting_started/step_by_step/instancing.rst:162 msgid "Scene instances as a design language" msgstr "" #: ../../docs/getting_started/step_by_step/instancing.rst:164 msgid "" "Instances and scenes in Godot offer an excellent design language, setting " "the engine apart from others out there. We designed Godot around this " "concept from the ground up." msgstr "" #: ../../docs/getting_started/step_by_step/instancing.rst:168 msgid "" "We recommend dismissing architectural code patterns when making games with " "Godot, such as Model-View-Controller (MVC) or Entity-Relationship diagrams. " "Instead, you can start by imagining the elements players will see in your " "game and structure your code around them." msgstr "" #: ../../docs/getting_started/step_by_step/instancing.rst:173 #, fuzzy msgid "For example, you could break down a shooter game like so:" msgstr "" "Ví dụ, đây là cách một trò chơi bắn súng đơn giản có thể được tưởng tượng:" #: ../../docs/getting_started/step_by_step/instancing.rst:177 #, fuzzy msgid "" "You can come up with a diagram like this for almost any type of game. Each " "rectangle represents an entity that's visible in the game from the player's " "perspective. The arrows tell you which scene owns which." msgstr "" "Bạn có thể đưa ra một sơ đồ như thế này cho hầu hết mọi loại trò chơi. Viết " "xuống các phần của trò chơi mà bạn có thể hình dung, sau đó thêm mũi tên để " "thể hiện quyền sở hữu của một thành phần khác." #: ../../docs/getting_started/step_by_step/instancing.rst:181 #, fuzzy msgid "" "Once you have a diagram, we recommended creating a scene for each element " "listed in it to develop your game. You'll use instancing, either by code or " "directly in the editor, to build your tree of scenes." msgstr "" "Khi bạn có một sơ đồ như thế này, quy trình được đề xuất để tạo trò chơi là " "tạo scene cho từng thành phần được liệt kê trong sơ đồ. Bạn sẽ sử dụng " "instance (bằng code hoặc trực tiếp trong editor - trình chỉnh sửa) cho các " "mối quan hệ sở hữu." #: ../../docs/getting_started/step_by_step/instancing.rst:185 #, fuzzy msgid "" "Programmers tend to spend a lot of time designing abstract architectures and " "trying to fit components into it. Designing based on scenes makes " "development faster and more straightforward, allowing you to focus on the " "game logic itself. Because most game components map directly to a scene, " "using a design based on scene instantiation means you need little other " "architectural code." msgstr "" "Rất nhiều thời gian dành cho các trò chơi lập trình (hoặc phần mềm nói " "chung) là dành cho việc thiết kế một kiến trúc và các thành phần trò chơi " "phù hợp với kiến trúc đó. Thiết kế dựa trên các scene thay thế cách tiếp cận " "đó và làm cho sự phát triển nhanh hơn và đơn giản hơn, cho phép bạn tập " "trung vào logic trò chơi. Bởi vì hầu hết các thành phần trò chơi ánh xạ trực " "tiếp đến một scene, sử dụng thiết kế dựa trên khởi tạo scene có nghĩa là cần " "ít những kiến trúc khác." #: ../../docs/getting_started/step_by_step/instancing.rst:191 #, fuzzy msgid "" "Here's the example of a scene diagram for an open-world game with tons of " "assets and nested elements:" msgstr "" "Chúng ta hãy xem xét thêm một ví dụ, hơi phức tạp hơn, ví dụ về một trò chơi " "kiểu thế giới mở với nhiều tài sản và các yếu tố lồng nhau:" #: ../../docs/getting_started/step_by_step/instancing.rst:196 msgid "" "Imagine we started by creating the room. We could make a couple of different " "room scenes, with unique arrangements of furniture in them. Later, we could " "make a house scene that uses multiple room instances for the interior. We " "would create a citadel out of many instanced houses and a large terrain on " "which we would place the citadel. Each of these would be a scene instancing " "one or more sub-scenes." msgstr "" #: ../../docs/getting_started/step_by_step/instancing.rst:202 #, fuzzy msgid "" "Later, we could create scenes representing guards and add them to the " "citadel. They would be indirectly added to the overall game world." msgstr "" "Sau đó, chúng ta có thể tạo ra các scene đại diện cho lính canh (guard) (và " "các NPC khác) và thêm chúng vào thành cổ. Kết quả là, họ sẽ được gián tiếp " "thêm vào tổng thể trò chơi thế giới." #: ../../docs/getting_started/step_by_step/instancing.rst:205 #, fuzzy msgid "" "With Godot, it's easy to iterate on your game like this, as all you need to " "do is create and instantiate more scenes. We designed the editor to be " "accessible to programmers, designers, and artists alike. A typical team " "development process can involve 2D or 3D artists, level designers, game " "designers, and animators, all working with the Godot editor." msgstr "" "Với Godot, thật dễ dàng để lặp lại trò chơi của bạn như thế này, vì tất cả " "những gì bạn cần làm là tạo và ví dụ nhiều scene hơn. Hơn nữa, UI editor " "được thiết kế thân thiện với người dùng cho cả lập trình viên và người không " "lập trình. Một quy trình phát triển nhóm điển hình có thể có sự tham gia của " "các nghệ sĩ 2D hoặc 3D, nhà thiết kế cấp độ, nhà thiết kế trò chơi và nhà " "làm phim hoạt hình, tất cả đều làm việc với giao diện editor." #: ../../docs/getting_started/step_by_step/instancing.rst:214 msgid "" "Instancing, the process of producing an object from a blueprint has many " "handy uses. With scenes, it gives you:" msgstr "" #: ../../docs/getting_started/step_by_step/instancing.rst:217 #, fuzzy msgid "The ability to divide your game into reusable components." msgstr "Khả năng chia nhỏ các scene và làm cho chúng dễ quản lý hơn." #: ../../docs/getting_started/step_by_step/instancing.rst:218 msgid "A tool to structure and encapsulate complex systems." msgstr "" #: ../../docs/getting_started/step_by_step/instancing.rst:219 msgid "" "A language to think about your game project's structure in a natural way." msgstr "" #: ../../docs/getting_started/step_by_step/scripting_languages.rst:7 #, fuzzy msgid "Scripting languages" msgstr "Script một scene" #: ../../docs/getting_started/step_by_step/scripting_languages.rst:9 msgid "" "This lesson will give you an overview of the available scripting languages " "in Godot. You will learn the pros and cons of each option. In the next part, " "you will write your first script using GDScript." msgstr "" #: ../../docs/getting_started/step_by_step/scripting_languages.rst:13 msgid "" "**Scripts attach to a node and extend its behavior**. This means that " "scripts inherit all functions and properties of the node they attach to." msgstr "" #: ../../docs/getting_started/step_by_step/scripting_languages.rst:16 msgid "" "For example, take a game where a Camera2D node follows a ship. The Camera2D " "node follows its parent by default. Imagine you want it to shake when the " "player takes damage. As this feature is not built-into Godot, you would " "attach a script to it and code the camera shake." msgstr "" #: ../../docs/getting_started/step_by_step/scripting_languages.rst:24 msgid "Available scripting languages" msgstr "" #: ../../docs/getting_started/step_by_step/scripting_languages.rst:26 msgid "" "Godot offers **five gameplay programming languages**: GDScript, C#, " "VisualScript, and C++ and C via its GDNative technology. There are more :ref:" "`community-supported languages `, " "but these are the official ones." msgstr "" #: ../../docs/getting_started/step_by_step/scripting_languages.rst:31 msgid "" "You can use multiple languages in a single project. For instance, in a team, " "you could code gameplay logic in GDScript as it's fast to write, let level " "designers script quests in the graphical language VisualScript, and use C# " "or C++ to implement complex algorithms and maximize their performance. Or " "you can write everything in GDScript or C#. It's your call." msgstr "" #: ../../docs/getting_started/step_by_step/scripting_languages.rst:37 msgid "" "We provide this flexibility to answer the needs of different game projects " "and developers." msgstr "" #: ../../docs/getting_started/step_by_step/scripting_languages.rst:41 #, fuzzy msgid "Which language should I use?" msgstr "GDScript là gì và tại sao tôi nên sử dụng nó?" #: ../../docs/getting_started/step_by_step/scripting_languages.rst:43 msgid "" "If you're a beginner, we recommend to **start with GDScript**. We made this " "language specifically for Godot and the needs of game developers. It has a " "lightweight and straightforward syntax and provides the tightest integration " "with Godot." msgstr "" #: ../../docs/getting_started/step_by_step/scripting_languages.rst:50 msgid "" "For C#, you will need an external code editor like `VSCode `_ or Visual Studio. While C# support is now mature, you " "will also 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." msgstr "" #: ../../docs/getting_started/step_by_step/scripting_languages.rst:56 msgid "Let's look at each language's features, as well as its pros and cons." msgstr "" #: ../../docs/getting_started/step_by_step/scripting_languages.rst:59 #: ../../docs/getting_started/first_2d_game/01.project_setup.rst:13 #: ../../docs/tutorials/performance/cpu_optimization.rst:171 #: ../../docs/tutorials/scripting/gdscript/index.rst:2 #: ../../docs/tutorials/scripting/c_sharp/c_sharp_differences.rst:30 #: ../../docs/tutorials/scripting/c_sharp/c_sharp_differences.rst:59 #: ../../docs/tutorials/scripting/c_sharp/c_sharp_differences.rst:221 #: ../../docs/tutorials/scripting/c_sharp/c_sharp_differences.rst:236 #: ../../docs/tutorials/scripting/c_sharp/c_sharp_differences.rst:248 #: ../../docs/tutorials/scripting/c_sharp/c_sharp_differences.rst:259 #: ../../docs/tutorials/scripting/c_sharp/c_sharp_differences.rst:267 #: ../../docs/tutorials/scripting/c_sharp/c_sharp_differences.rst:282 #: ../../docs/tutorials/scripting/c_sharp/c_sharp_differences.rst:294 #: ../../docs/tutorials/scripting/c_sharp/c_sharp_differences.rst:351 #: ../../docs/tutorials/scripting/debug/overview_of_debugging_tools.rst:113 msgid "GDScript" msgstr "" #: ../../docs/getting_started/step_by_step/scripting_languages.rst:61 msgid "" ":ref:`GDScript` is an `object-oriented `_ and `imperative `_ programming language built for " "Godot. It's made by and for game developers to save you time coding games. " "Its features include:" msgstr "" #: ../../docs/getting_started/step_by_step/scripting_languages.rst:67 msgid "A simple syntax that leads to short files." msgstr "" #: ../../docs/getting_started/step_by_step/scripting_languages.rst:68 msgid "Blazing fast compilation and loading times." msgstr "" #: ../../docs/getting_started/step_by_step/scripting_languages.rst:69 #, fuzzy msgid "" "Tight editor integration, with code completion for nodes, signals, and more " "information from the scene it's attached to." msgstr "" "Tích hợp trình chỉnh sửa là một niềm vui để làm việc, với việc hoàn thành mã " "cho các node, signal (tín hiệu ) và nhiều mục khác liên quan đến scene đang " "được chỉnh sửa." #: ../../docs/getting_started/step_by_step/scripting_languages.rst:71 #, fuzzy msgid "" "Built-in vector and transform types, making it efficient for heavy use of " "linear algebra, a must for games." msgstr "" "Có các loại vectơ tích hợp (như vectơ, biến đổi, v.v.), làm cho nó hiệu quả " "khi sử dụng nhiều đại số tuyến tính." #: ../../docs/getting_started/step_by_step/scripting_languages.rst:73 #, fuzzy msgid "" "Supports multiple threads as efficiently as statically typed languages. This " "is one of the features we couldn't provide easily with a third-party " "language like Lua or Python." msgstr "" "Hỗ trợ nhiều luồng hiệu quả như các ngôn ngữ được nhập tĩnh - một trong " "những hạn chế khiến chúng tôi tránh các VMs như Lua, Squirrel, v.v." #: ../../docs/getting_started/step_by_step/scripting_languages.rst:76 msgid "" "No `garbage collection `_, 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." msgstr "" #: ../../docs/getting_started/step_by_step/scripting_languages.rst:81 msgid "" "`Gradual typing `_. Variables " "have dynamic types by default, but you also can use type hints for strong " "type checks." msgstr "" #: ../../docs/getting_started/step_by_step/scripting_languages.rst:85 msgid "" "GDScript looks like Python as you structure your code blocks using " "indentations, but it doesn't work the same way in practice. It's inspired by " "multiple languages, including Squirrel, Lua, and Python." msgstr "" #: ../../docs/getting_started/step_by_step/scripting_languages.rst:91 msgid "Why don't we use Python or Lua directly?" msgstr "" #: ../../docs/getting_started/step_by_step/scripting_languages.rst:93 msgid "" "Years ago, Godot used Python, then Lua. Both languages' integration took a " "lot of work and had severe limitations. For example, threading support was a " "big challenge with Python." msgstr "" #: ../../docs/getting_started/step_by_step/scripting_languages.rst:97 msgid "" "Developing a dedicated language doesn't take us more work and we can tailor " "it to game developers' needs. We're now working on performance optimizations " "and features that would've been difficult to offer with third-party " "languages." msgstr "" #: ../../docs/getting_started/step_by_step/scripting_languages.rst:103 msgid ".NET / C#" msgstr ".NET / C #" #: ../../docs/getting_started/step_by_step/scripting_languages.rst:105 #, fuzzy msgid "" "As Microsoft's `C# `_ 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." msgstr "" "Vì C # của Microsoft được các nhà phát triển trò chơi yêu thích, chúng tôi " "đã thêm hỗ trợ chính thức cho nó. C # là một ngôn ngữ trưởng thành với hàng " "tấn mã được viết cho nó và hỗ trợ đã được thêm vào nhờ vào sự đóng góp hào " "phóng từ Microsoft." #: ../../docs/getting_started/step_by_step/scripting_languages.rst:113 #, fuzzy msgid "" "C# offers a good tradeoff between performance and ease of use, although you " "should be aware of its garbage collector." msgstr "" "Nó có một sự đánh đổi tuyệt vời giữa hiệu suất và dễ sử dụng, mặc dù người " "ta phải nhận thức được công cụ thu gom rác của nó." #: ../../docs/getting_started/step_by_step/scripting_languages.rst:116 msgid "" "You must use the Mono edition of the Godot editor to script in C#. You can " "download it on the Godot website's `download `_ page." msgstr "" #: ../../docs/getting_started/step_by_step/scripting_languages.rst:120 #, fuzzy msgid "" "Since Godot uses the `Mono `_ .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." msgstr "" "Vì Godot sử dụng `Mono ` _ .NET runtime, theo lý " "thuyết, mọi thư viện hoặc khung .NET của bên thứ ba đều có thể được sử dụng " "để viết kịch bản trong Godot, cũng như bất kỳ Cơ sở hạ tầng ngôn ngữ chung " "nào- ngôn ngữ lập trình tuân thủ, chẳng hạn như F #, Boo hoặc ClojureCLR. " "Tuy nhiên, trên thực tế, C # là tùy chọn .NET được hỗ trợ chính thức duy " "nhất." #: ../../docs/getting_started/step_by_step/scripting_languages.rst:125 msgid "" "GDScript code itself doesn't execute as fast as compiled C# or C++. However, " "most script code calls functions written with fast algorithms in C++ code " "inside the engine. In many cases, writing gameplay logic in GDScript, C#, or " "C++ won't have a significant impact on performance." msgstr "" #: ../../docs/getting_started/step_by_step/scripting_languages.rst:132 #: ../../docs/tutorials/scripting/visual_script/index.rst:2 msgid "VisualScript" msgstr "VisualScript" #: ../../docs/getting_started/step_by_step/scripting_languages.rst:134 msgid "" ":ref:`Visual Scripting` is a graph-based visual " "programming language where you connect blocks. It can be a great tool for " "non-programmers like game designers and artists." msgstr "" #: ../../docs/getting_started/step_by_step/scripting_languages.rst:140 msgid "" "You can use other languages to create custom blocks that are specific to " "your game. For example, to script AIs, quests, or dialogues. That's where " "the strength of VisualScript lies." msgstr "" #: ../../docs/getting_started/step_by_step/scripting_languages.rst:144 msgid "" "While it provides all the basic building blocks you need to code complete " "games, we do not recommend to use VisualScript this way. Programming " "everything with it is slow compared to using other programming languages." msgstr "" #: ../../docs/getting_started/step_by_step/scripting_languages.rst:150 msgid "" "For more information, see :ref:`Getting started with VisualScript " "`." msgstr "" #: ../../docs/getting_started/step_by_step/scripting_languages.rst:154 msgid "C and C++ via GDNative" msgstr "" #: ../../docs/getting_started/step_by_step/scripting_languages.rst:156 #, fuzzy msgid "" "GDNative allows you to write game code in C or C++ without needing to " "recompile or even restart Godot." msgstr "" "Cuối cùng, một trong những bổ sung sáng giá nhất của chúng tôi cho phiên bản " "3.0: GDNative cho phép tạo kịch bản trong C ++ mà không cần phải biên dịch " "lại (hoặc thậm chí khởi động lại) Godot." #: ../../docs/getting_started/step_by_step/scripting_languages.rst:161 #, fuzzy msgid "" "You can use any version of the language or mix compiler brands and versions " "for the generated shared libraries, thanks to our use of an internal C API " "Bridge." msgstr "" "Bất kỳ phiên bản C ++ nào cũng có thể được sử dụng và trộn các thương hiệu " "và phiên bản trình biên dịch cho các thư viện chia sẻ được tạo ra hoạt động " "hoàn hảo, nhờ vào việc chúng tôi sử dụng Cầu API C nội bộ." #: ../../docs/getting_started/step_by_step/scripting_languages.rst:164 #, fuzzy msgid "" "This language is the best choice for performance. You don't need to use it " "throughout an entire game, as you can write other parts in GDScript, C#, or " "VisualScript." msgstr "" "Ngôn ngữ này là lựa chọn tốt nhất cho hiệu suất và không cần sử dụng trong " "toàn bộ trò chơi, vì các phần khác có thể được viết bằng GDScript hoặc " "Visual Script. Tuy nhiên, API rõ ràng và dễ sử dụng vì nó giống với API C ++ " "thực tế của Godot." #: ../../docs/getting_started/step_by_step/scripting_languages.rst:168 msgid "" "When working with GDNative, the available types, functions, and properties " "closely resemble Godot's actual C++ API." msgstr "" #: ../../docs/getting_started/step_by_step/scripting_languages.rst:174 msgid "" "Scripts are files containing code that you attach to a node to extend its " "functionality." msgstr "" #: ../../docs/getting_started/step_by_step/scripting_languages.rst:177 msgid "" "Godot supports five official scripting languages, offering you flexibility " "between performance and ease of use." msgstr "" #: ../../docs/getting_started/step_by_step/scripting_languages.rst:180 msgid "" "You can mix languages, for instance, to implement demanding algorithms with " "C or C++ and write most of the game logic with GDScript or C#." msgstr "" #: ../../docs/getting_started/step_by_step/scripting_first_script.rst:19 #, fuzzy msgid "Creating your first script" msgstr "Tạo nội dung" #: ../../docs/getting_started/step_by_step/scripting_first_script.rst:21 msgid "" "In this lesson, you will code your first script to make the Godot icon turn " "in circles using GDScript. As we mentioned :ref:`in the introduction `, we assume you have programming foundations." msgstr "" #: ../../docs/getting_started/step_by_step/scripting_first_script.rst:27 msgid "" "To learn more about GDScript, its keywords, and its syntax, head to the :ref:" "`GDScript reference`." msgstr "" #: ../../docs/getting_started/step_by_step/scripting_first_script.rst:31 #: ../../docs/tutorials/2d/using_tilemaps.rst:21 msgid "Project setup" msgstr "Thiết lập dự án" #: ../../docs/getting_started/step_by_step/scripting_first_script.rst:33 msgid "" "Please create a new project to start with a clean slate. Your project should " "contain one picture: the Godot icon, which we often use for prototyping in " "the community." msgstr "" #: ../../docs/getting_started/step_by_step/scripting_first_script.rst:39 msgid "" "We need to create a Sprite node to display it in the game. In the Scene " "dock, click the Other Node button." msgstr "" #: ../../docs/getting_started/step_by_step/scripting_first_script.rst:44 msgid "" "Type \"Sprite\" in the search bar to filter nodes and double-click on Sprite " "to create the node." msgstr "" #: ../../docs/getting_started/step_by_step/scripting_first_script.rst:49 msgid "Your Scene tab should now only have a Sprite node." msgstr "" #: ../../docs/getting_started/step_by_step/scripting_first_script.rst:53 msgid "" "A Sprite node needs a texture to display. In the Inspector on the right, you " "can see that the Texture property says \"[empty]\". To display the Godot " "icon, click and drag the file ``icon.png`` from the FileSystem dock onto the " "Texture slot." msgstr "" #: ../../docs/getting_started/step_by_step/scripting_first_script.rst:61 msgid "" "You can create Sprite nodes automatically by dragging and dropping images on " "the viewport." msgstr "" #: ../../docs/getting_started/step_by_step/scripting_first_script.rst:66 msgid "" "Then, click and drag the icon in the viewport to center it in the game view." msgstr "" #: ../../docs/getting_started/step_by_step/scripting_first_script.rst:71 #, fuzzy msgid "Creating a new script" msgstr "Tạo nội dung" #: ../../docs/getting_started/step_by_step/scripting_first_script.rst:73 msgid "" "To create and attach a new script to our node, right-click on Sprite in the " "scene dock and select \"Attach Script\"." msgstr "" #: ../../docs/getting_started/step_by_step/scripting_first_script.rst:78 #, fuzzy msgid "" "The Attach node Script window appears. It allows you to select the script's " "language and file path, among other options." msgstr "" "Hộp thoại tạo script sẽ bật lên. Hộp thoại này cho phép bạn đặt ngôn ngữ của " "scritp, tên lớp (class) và các tùy chọn liên quan khác." #: ../../docs/getting_started/step_by_step/scripting_first_script.rst:81 msgid "" "Change the Template from Default to Empty to start with a clean file. Leave " "the other options by default and click the Create button to create the " "script." msgstr "" #: ../../docs/getting_started/step_by_step/scripting_first_script.rst:86 msgid "" "The Script workspace should appear with your new file open and the following " "line of code:" msgstr "" #: ../../docs/getting_started/step_by_step/scripting_first_script.rst:94 msgid "" "Every GDScript file is implicitly a class. The ``extends`` keyword defines " "the class this script inherits or extends. In this case, it's ``Sprite``, " "meaning our script will get access to all the properties and functions of " "the Sprite node, including classes it extends, like ``Node2D``, " "``CanvasItem``, and ``Node``." msgstr "" #: ../../docs/getting_started/step_by_step/scripting_first_script.rst:100 msgid "" "In GDScript, if you omit the line with the ``extends`` keyword, your class " "will implicitly extend :ref:`Reference `, which Godot uses " "to manage your application's memory." msgstr "" #: ../../docs/getting_started/step_by_step/scripting_first_script.rst:104 msgid "" "Inherited properties include the ones you can see in the Inspector dock, " "like our node's ``texture``." msgstr "" #: ../../docs/getting_started/step_by_step/scripting_first_script.rst:109 msgid "" "By default, the Inspector displays a node's properties in \"Title Case\", " "with capitalized words separated by a space. In GDScript code, these " "properties are in \"snake_case\", lowercase, and words separated by an " "underscore." msgstr "" #: ../../docs/getting_started/step_by_step/scripting_first_script.rst:113 msgid "" "You can hover any property's name in the Inspector to see a description and " "its identifier in code." msgstr "" #: ../../docs/getting_started/step_by_step/scripting_first_script.rst:117 msgid "Hello, world!" msgstr "" #: ../../docs/getting_started/step_by_step/scripting_first_script.rst:119 msgid "" "Our script currently doesn't do anything. Let's make it print the text " "\"Hello, world!\" to the Output bottom panel to get started." msgstr "" #: ../../docs/getting_started/step_by_step/scripting_first_script.rst:122 msgid "Add the following code to your script:" msgstr "" #: ../../docs/getting_started/step_by_step/scripting_first_script.rst:130 msgid "" "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 this function." msgstr "" #: ../../docs/getting_started/step_by_step/scripting_first_script.rst:135 msgid "" "GDScript is an indent-based language. The tab at the start of the line that " "says ``print()`` is necessary for the code to work. If you omit it or don't " "indent a line correctly, the editor will highlight it in red and display the " "following error message: \"Unexpected indentation.\"" msgstr "" #: ../../docs/getting_started/step_by_step/scripting_first_script.rst:140 msgid "" "Save the scene if you haven't already, then press :kbd:`F6` to run it. Look " "at the Output bottom panel that expands. It should display \"Hello, world!\"" msgstr "" #: ../../docs/getting_started/step_by_step/scripting_first_script.rst:145 msgid "" "Delete the ``_init()`` function, so you're only left with the line ``extends " "Sprite``." msgstr "" #: ../../docs/getting_started/step_by_step/scripting_first_script.rst:149 msgid "Turning around" msgstr "" #: ../../docs/getting_started/step_by_step/scripting_first_script.rst:151 msgid "" "It's time to make our node move and rotate. To do so, we're going to add two " "member variables to our script: the movement speed in pixels per second and " "the angular speed in radians per second." msgstr "" #: ../../docs/getting_started/step_by_step/scripting_first_script.rst:163 msgid "" "Member variables sit at the top of the script, before functions. Every node " "instance with this script attached to it will have its own copy of the " "``speed`` and ``angular_speed`` properties." msgstr "" #: ../../docs/getting_started/step_by_step/scripting_first_script.rst:167 msgid "" "As in some other engines, angles in Godot work in radians by default, but " "you have built-in functions and properties available if you prefer to " "calculate angles in degrees instead." msgstr "" #: ../../docs/getting_started/step_by_step/scripting_first_script.rst:171 msgid "" "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. 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." msgstr "" #: ../../docs/getting_started/step_by_step/scripting_first_script.rst:179 msgid "" "Games work by rendering many images per second, each called a frame, and " "they do so in a loop. We measure the rate at which a game produces images in " "Frames Per Second (FPS). Most games aim for 60 FPS, although you might find " "figures like 30 FPS on slower mobile devices or 90 to 240 for virtual " "reality games." msgstr "" #: ../../docs/getting_started/step_by_step/scripting_first_script.rst:185 msgid "" "The engine and game developers do their best to update the game world and " "render images at a constant time interval, but there are always small " "variations in frame render times. That's why the engine provides us with " "this delta time value, making our motion independent of our framerate." msgstr "" #: ../../docs/getting_started/step_by_step/scripting_first_script.rst:190 msgid "At the bottom of the script, define the function:" msgstr "" #: ../../docs/getting_started/step_by_step/scripting_first_script.rst:198 msgid "" "The ``func`` keyword defines a new function. After it, we have to write the " "function's name and arguments it takes in parentheses. A colon ends the " "definition, and the indented blocks that follow are the function's content " "or instructions." msgstr "" #: ../../docs/getting_started/step_by_step/scripting_first_script.rst:203 msgid "" "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." msgstr "" #: ../../docs/getting_started/step_by_step/scripting_first_script.rst:208 msgid "" "The line inside the function, ``rotation += angular_speed * delta``, " "increments our sprite's rotation every frame. Here, ``rotation`` is a " "property inherited from the class ``Node2D``, which ``Sprite`` extends. It " "controls the rotation of our node and works with radians." msgstr "" #: ../../docs/getting_started/step_by_step/scripting_first_script.rst:213 msgid "" "In the code editor, you can ctrl-click on any built-in property or function " "like ``position``, ``rotation``, or ``_process`` to open the corresponding " "documentation in a new tab." msgstr "" #: ../../docs/getting_started/step_by_step/scripting_first_script.rst:217 msgid "Run the scene to see the Godot icon turn in-place." msgstr "" #: ../../docs/getting_started/step_by_step/scripting_first_script.rst:222 #, fuzzy msgid "Moving forward" msgstr "Tiến tới" #: ../../docs/getting_started/step_by_step/scripting_first_script.rst:224 msgid "" "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." msgstr "" #: ../../docs/getting_started/step_by_step/scripting_first_script.rst:234 msgid "" "As we already saw, the ``var`` keyword defines a new variable. If you put it " "at the top of the script, it defines a property of the class. Inside a " "function, it defines a local variable: it only exists within the function's " "scope." msgstr "" #: ../../docs/getting_started/step_by_step/scripting_first_script.rst:238 msgid "" "We define a local variable named ``velocity``, a 2D vector representing both " "a direction and a speed. To make the node move forward, we start from the " "Vector2 class's constant Vector2.UP, a vector pointing up, and rotate it by " "calling the ``Vector2.rotated()`` method. This expression, ``Vector2.UP." "rotated(rotation)``, is a vector pointing forward relative to our icon. " "Multiplied by our ``speed`` property, it gives us a velocity we can use to " "move the node forward." msgstr "" #: ../../docs/getting_started/step_by_step/scripting_first_script.rst:245 msgid "" "We add ``velocity * delta`` to the node's ``position`` to move it. The " "position itself is of type :ref:`Vector2 `, a built-in type " "in Godot representing a 2D vector." msgstr "" #: ../../docs/getting_started/step_by_step/scripting_first_script.rst:249 msgid "Run the scene to see the Godot head run in circles." msgstr "" #: ../../docs/getting_started/step_by_step/scripting_first_script.rst:253 msgid "" "Moving a node like that does not take into account colliding with walls or " "the floor. In :ref:`doc_your_first_2d_game`, you will learn another approach " "to moving objects while detecting collisions." msgstr "" #: ../../docs/getting_started/step_by_step/scripting_first_script.rst:257 msgid "" "Our node currently moves by itself. In the next part, we'll use player input " "to control it." msgstr "" #: ../../docs/getting_started/step_by_step/scripting_player_input.rst:8 msgid "Listening to player input" msgstr "" #: ../../docs/getting_started/step_by_step/scripting_player_input.rst:10 msgid "" "Building upon the previous lesson, let's look at another important feature " "of any game: giving control to the player. To add this, we need to modify " "our code." msgstr "" #: ../../docs/getting_started/step_by_step/scripting_player_input.rst:15 msgid "You have two main tools to process the player's input in Godot:" msgstr "" #: ../../docs/getting_started/step_by_step/scripting_player_input.rst:17 msgid "" "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 :ref:`doc_inputevent`." msgstr "" #: ../../docs/getting_started/step_by_step/scripting_player_input.rst:22 msgid "" "The ``Input`` singleton. A singleton is a globally accessible object. Godot " "provides access to several in scripts. It's the right tool to check for " "input every frame." msgstr "" #: ../../docs/getting_started/step_by_step/scripting_player_input.rst:26 msgid "" "We're going to use the ``Input`` singleton here as we need to know if the " "player wants to turn or move every frame." msgstr "" #: ../../docs/getting_started/step_by_step/scripting_player_input.rst:29 msgid "" "For turning, we should use a new variable: ``direction``. Update the top of " "the ``_process()`` function like so, up to the line where we increment the " "sprite's ``rotation``." msgstr "" #: ../../docs/getting_started/step_by_step/scripting_player_input.rst:45 msgid "" "Our ``direction`` local variable is a multiplier representing the direction " "in which the player wants to turn. A value of ``0`` means the player isn't " "pressing the left or the right arrow key. A value of ``1`` means the player " "wants to turn right, and ``-1`` means they want to turn left." msgstr "" #: ../../docs/getting_started/step_by_step/scripting_player_input.rst:50 msgid "" "To produce these values, we introduce conditions and the use of ``Input``. A " "condition starts with the ``if`` keyword in GDScript and ends with a colon. " "The condition is the expression between the keyword and the end of the line." msgstr "" #: ../../docs/getting_started/step_by_step/scripting_player_input.rst:54 msgid "" "To check if a key was pressed this frame, we call ``Input." "is_action_pressed()``. The method takes a text string representing an input " "action and returns ``true`` if the action is pressed, ``false`` otherwise." msgstr "" #: ../../docs/getting_started/step_by_step/scripting_player_input.rst:58 msgid "" "The two actions we use above, \"ui_left\" and \"ui_right\", are predefined " "in every Godot project. They respectively trigger when the player presses " "the left and right arrows on the keyboard or left and right on a gamepad's D-" "pad." msgstr "" #: ../../docs/getting_started/step_by_step/scripting_player_input.rst:62 msgid "" "You can see and edit input actions in your project by going to Project -> " "Project Settings and clicking on the Input Map tab." msgstr "" #: ../../docs/getting_started/step_by_step/scripting_player_input.rst:65 msgid "" "Finally, we use the ``direction`` as a multiplier when we update the node's " "``rotation``: ``rotation += angular_speed * direction * delta``." msgstr "" #: ../../docs/getting_started/step_by_step/scripting_player_input.rst:68 msgid "" "If you run the scene with this code, the icon should rotate when you press :" "kbd:`Left` and :kbd:`Right`." msgstr "" #: ../../docs/getting_started/step_by_step/scripting_player_input.rst:72 msgid "Moving when pressing \"up\"" msgstr "" #: ../../docs/getting_started/step_by_step/scripting_player_input.rst:74 msgid "" "To only move when pressing a key, we need to modify the code that calculates " "the velocity. Replace the line starting with ``var velocity`` with the code " "below." msgstr "" #: ../../docs/getting_started/step_by_step/scripting_player_input.rst:86 msgid "" "We initialize the ``velocity`` with a value of ``Vector2.ZERO``, another " "constant of the built-in ``Vector`` type representing a 2D vector of length " "0." msgstr "" #: ../../docs/getting_started/step_by_step/scripting_player_input.rst:89 msgid "" "If the player presses the \"ui_up\" action, we then update the velocity's " "value, causing the sprite to move forward." msgstr "" #: ../../docs/getting_started/step_by_step/scripting_player_input.rst:92 msgid "Here is the complete ``Sprite.gd`` file for reference." msgstr "" #: ../../docs/getting_started/step_by_step/scripting_player_input.rst:118 msgid "" "If you run the scene, you should now be able to rotate with the left and " "right arrow keys and move forward by pressing :kbd:`Up`." msgstr "" #: ../../docs/getting_started/step_by_step/scripting_player_input.rst:126 msgid "" "In summary, every script in Godot represents a class and extends one of the " "engine's built-in classes. The node types your classes inherit from give you " "access to properties like ``rotation`` and ``position`` in our sprite's " "case. You also inherit many functions, which we didn't get to use in this " "example." msgstr "" #: ../../docs/getting_started/step_by_step/scripting_player_input.rst:131 msgid "" "In GDScript, the variables you put at the top of the file are your class's " "properties, also called member variables. Besides variables, you can define " "functions, which, for the most part, will be your classes' methods." msgstr "" #: ../../docs/getting_started/step_by_step/scripting_player_input.rst:135 msgid "" "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 button presses from the users. There are quite a few more." msgstr "" #: ../../docs/getting_started/step_by_step/scripting_player_input.rst:140 msgid "" "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." msgstr "" #: ../../docs/getting_started/step_by_step/scripting_player_input.rst:143 msgid "" "In the next lesson, we'll build upon the relationship between scripts and " "nodes by having our nodes trigger code in scripts." msgstr "" #: ../../docs/getting_started/step_by_step/signals.rst:6 #: ../../docs/tutorials/scripting/instancing_with_signals.rst:1 msgid "Signal" msgstr "Tín hiệu" #: ../../docs/getting_started/step_by_step/signals.rst:12 #, fuzzy msgid "Using Signals" msgstr "Tín hiệu" #: ../../docs/getting_started/step_by_step/signals.rst:14 msgid "" "In this lesson, we will look at signals. They are messages that nodes emit " "when something specific happens to them, like a button being pressed. Other " "nodes can connect to that signal and call a function when the event occurs." msgstr "" #: ../../docs/getting_started/step_by_step/signals.rst:18 msgid "" "It is 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 `_ and keeps your code flexible." msgstr "" #: ../../docs/getting_started/step_by_step/signals.rst:24 msgid "" "For example, you might have a life bar on the screen that represents the " "player’s health. When the player takes damage or uses a healing potion, you " "want the bar to reflect the change. To do so, in Godot, you would use " "signals." msgstr "" #: ../../docs/getting_started/step_by_step/signals.rst:28 #, fuzzy msgid "" "As mentioned in the introduction, signals are Godot's version of the " "observer pattern. You can learn more about it here: https://" "gameprogrammingpatterns.com/observer.html" msgstr "" "Bạn có thể đọc thêm về observer pattern ở đây: http://gameprogrammingpotypes." "com/observer.html" #: ../../docs/getting_started/step_by_step/signals.rst:32 msgid "" "We will now use a signal to make our Godot icon from last part move and stop " "by pressing a button." msgstr "" #: ../../docs/getting_started/step_by_step/signals.rst:38 #: ../../docs/tutorials/animation/introduction.rst:106 #: ../../docs/tutorials/physics/kinematic_character_2d.rst:79 msgid "Scene setup" msgstr "Thiết lập scene" #: ../../docs/getting_started/step_by_step/signals.rst:40 msgid "Create a new scene by going to the menu Scene -> New Scene." msgstr "" #: ../../docs/getting_started/step_by_step/signals.rst:44 msgid "" "In the Scene dock, click the 2D Scene button. This will add a Node2D as our " "root." msgstr "" #: ../../docs/getting_started/step_by_step/signals.rst:50 msgid "" "In the FileSystem dock, click and drag the ``Sprite.tscn`` file you saved " "previously onto the Node2D to instantiate it." msgstr "" #: ../../docs/getting_started/step_by_step/signals.rst:55 msgid "" "We want to add another node as a sibling of the Sprite. To do so, right-" "click on Node2D and select Add Child Node." msgstr "" #: ../../docs/getting_started/step_by_step/signals.rst:60 msgid "Search for the Button node type and add it." msgstr "" #: ../../docs/getting_started/step_by_step/signals.rst:64 msgid "" "The node is small by default. Click and drag on the bottom-right handle of " "the Button in the viewport to resize it." msgstr "" #: ../../docs/getting_started/step_by_step/signals.rst:69 msgid "" "If you don't see the handles, ensure the select tool is active in the " "toolbar." msgstr "" #: ../../docs/getting_started/step_by_step/signals.rst:73 msgid "Click and drag on the button itself to move it closer to the sprite." msgstr "" #: ../../docs/getting_started/step_by_step/signals.rst:75 msgid "" "You can also write a label on the Button by editing its Text property in the " "Inspector." msgstr "" #: ../../docs/getting_started/step_by_step/signals.rst:80 #, fuzzy msgid "Your scene tree and viewport should look like this." msgstr "Scene tree của bạn sẽ trông như thế này:" #: ../../docs/getting_started/step_by_step/signals.rst:85 #, fuzzy msgid "Connecting a signal in the editor" msgstr "Kết nối signal trong mã" #: ../../docs/getting_started/step_by_step/signals.rst:87 msgid "" "Here, we want to connect the Button's \"pressed\" signal to our Sprite, and " "we want to call a new function that will toggle its motion on and off. We " "need to have a script attached to the Sprite node, which we do from the " "previous lesson." msgstr "" #: ../../docs/getting_started/step_by_step/signals.rst:91 msgid "" "You can connect signals in the Node dock. Select the Button node and, on the " "right side of the editor, click on the tab named \"Node\" next to the " "Inspector." msgstr "" #: ../../docs/getting_started/step_by_step/signals.rst:96 msgid "The dock displays a list of signals available on the selected node." msgstr "" #: ../../docs/getting_started/step_by_step/signals.rst:100 msgid "Double-click the \"pressed\" signal to open the node connection window." msgstr "" #: ../../docs/getting_started/step_by_step/signals.rst:104 msgid "" "There, you can connect the signal to the Sprite node. The node needs a " "receiver method, a function that Godot will call when the Button emits the " "signal. The editor generates one for you. By convention, we name these " "callback methods \"_on_NodeName_signal_name\". Here, it'll be " "\"_on_Button_pressed\"." msgstr "" #: ../../docs/getting_started/step_by_step/signals.rst:111 msgid "" "When connecting signals via the editor's Node dock, you can use two modes. " "The simple one only allows you to connect to nodes that have a script " "attached to them and creates a new callback function on them." msgstr "" #: ../../docs/getting_started/step_by_step/signals.rst:117 msgid "" "The advanced view lets you connect to any node and any built-in function, " "add arguments to the callback, and set options. You can toggle the mode in " "the window's bottom-right by clicking the radio button." msgstr "" #: ../../docs/getting_started/step_by_step/signals.rst:122 msgid "" "Click the connect button to complete the signal connection and jump to the " "Script workspace. You should see the new method with a connection icon in " "the left margin." msgstr "" #: ../../docs/getting_started/step_by_step/signals.rst:128 msgid "" "If you click the icon, a window pops up and displays information about the " "connection. This feature is only available when connecting nodes in the " "editor." msgstr "" #: ../../docs/getting_started/step_by_step/signals.rst:133 msgid "" "Let's replace the line with the ``pass`` keyword with code that'll toggle " "the node's motion." msgstr "" #: ../../docs/getting_started/step_by_step/signals.rst:136 msgid "" "Our Sprite moves thanks to code in the ``_process()`` function. Godot " "provides a method to toggle processing on and off: :ref:`Node.set_process() " "`. Another method of the Node class, " "``is_processing()``, returns ``true`` if idle processing is active. We can " "use the ``not`` keyword to invert the value." msgstr "" #: ../../docs/getting_started/step_by_step/signals.rst:148 msgid "" "This function will toggle processing and, in turn, the icon's motion on and " "off upon pressing the button." msgstr "" #: ../../docs/getting_started/step_by_step/signals.rst:151 msgid "" "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:" msgstr "" #: ../../docs/getting_started/step_by_step/signals.rst:163 #, fuzzy msgid "Your complete ``Sprite.gd`` code should look like the following." msgstr "Scene tree của bạn sẽ trông như thế này:" #: ../../docs/getting_started/step_by_step/signals.rst:181 #, fuzzy msgid "" "Run the scene now and click the button to see the sprite start and stop." msgstr "Chạy scene và nhấn nút. Bạn sẽ nhận được kết quả sau:" #: ../../docs/getting_started/step_by_step/signals.rst:184 #, fuzzy msgid "Connecting a signal via code" msgstr "Kết nối signal trong mã" #: ../../docs/getting_started/step_by_step/signals.rst:186 msgid "" "You can connect signals via code instead of using the editor. This is " "necessary when you create nodes or instantiate scenes inside of a script." msgstr "" #: ../../docs/getting_started/step_by_step/signals.rst:189 msgid "" "Let's use a different node here. Godot has a :ref:`Timer ` node " "that's useful to implement skill cooldown times, weapon reloading, and more." msgstr "" #: ../../docs/getting_started/step_by_step/signals.rst:192 #, fuzzy msgid "" "Head back to the 2D workspace. You can either click the \"2D\" text at the " "top of the window or press :kbd:`Ctrl + F1` (:kbd:`Alt + 1` on macOS)." msgstr "" "Trong ** không gian làm việc 3D **, bạn có thể làm việc với các lưới, đèn và " "design level cho các trò chơi 3D. Nhấn F2 để truy cập nó." #: ../../docs/getting_started/step_by_step/signals.rst:195 msgid "" "In the Scene dock, right-click on the Sprite node and add a new node. Search " "for Timer and add the corresponding node. Your scene should now look like " "this." msgstr "" #: ../../docs/getting_started/step_by_step/signals.rst:200 msgid "" "With the Timer node selected, go to the Inspector and check the " "**Autostart** property." msgstr "" #: ../../docs/getting_started/step_by_step/signals.rst:204 msgid "" "Click the script icon next to Sprite to jump back to the scripting workspace." msgstr "" #: ../../docs/getting_started/step_by_step/signals.rst:208 msgid "We need to do two operations to connect the nodes via code:" msgstr "" #: ../../docs/getting_started/step_by_step/signals.rst:210 msgid "Get a reference to the Timer from the Sprite." msgstr "" #: ../../docs/getting_started/step_by_step/signals.rst:211 msgid "Call the Timer's ``connect()`` method." msgstr "" #: ../../docs/getting_started/step_by_step/signals.rst:213 msgid "" "To connect to a signal via code, you need to call the ``connect()`` method " "of the node you want to listen to. In this case, we want to listen to the " "Timer's \"timeout\" signal." msgstr "" #: ../../docs/getting_started/step_by_step/signals.rst:217 msgid "" "To get a reference to a node relative to the current one, we use the method :" "ref:`Node.get_node() `. We can store the " "reference in a variable." msgstr "" #: ../../docs/getting_started/step_by_step/signals.rst:231 msgid "" "The function ``get_node()`` looks at the Sprite's children and gets nodes by " "their name. For example, if you renamed the Timer node to \"BlinkingTimer\" " "in the editor, you would have to change the call to " "``get_node(\"BlinkingTimer\")``." msgstr "" #: ../../docs/getting_started/step_by_step/signals.rst:237 msgid "" "We can now connect the Timer to the Sprite in the ``_ready()`` function." msgstr "" #: ../../docs/getting_started/step_by_step/signals.rst:246 msgid "" "The line reads like so: we connect the Timer's \"timeout\" signal to the " "node to which the script is attached (``self``). When the Timer emits " "\"timeout\", we want to call the function \"_on_Timer_timeout\", that we " "need to define. Let's add it at the bottom of our script and use it to " "toggle our sprite's visibility." msgstr "" #: ../../docs/getting_started/step_by_step/signals.rst:257 msgid "" "The ``visible`` property is a boolean that controls the visibility of our " "node. The line ``visible = not visible`` toggles the value. If ``visible`` " "is ``true``, it becomes ``false``, and vice-versa." msgstr "" #: ../../docs/getting_started/step_by_step/signals.rst:262 msgid "Custom signals" msgstr "Tùy chỉnh signals (Custom signals)" #: ../../docs/getting_started/step_by_step/signals.rst:264 msgid "" "You can define custom signals in a script. Say, for example, that you want " "to show a game over screen when the player's health reaches zero. To do so, " "you could define a signal named \"died\" or \"health_depleted\" when their " "health reaches 0." msgstr "" #: ../../docs/getting_started/step_by_step/signals.rst:278 msgid "" "As signals represent events that just occurred, we generally use an action " "verb in the past tense in their names." msgstr "" #: ../../docs/getting_started/step_by_step/signals.rst:281 msgid "" "Your signals work the same way as built-in ones: they appear in the Node tab " "and you can connect to them like any other." msgstr "" #: ../../docs/getting_started/step_by_step/signals.rst:286 #, fuzzy msgid "To emit a signal in your scripts, call ``emit_signal()``." msgstr "Để phát signal qua mã, hãy sử dụng hàm ``emit_signal``:" #: ../../docs/getting_started/step_by_step/signals.rst:296 msgid "" "A signal can optionally declare one or more arguments. Specify the argument " "names between parentheses:" msgstr "" #: ../../docs/getting_started/step_by_step/signals.rst:308 msgid "" "The signal arguments show up in the editor's node dock, and Godot can use " "them to generate callback functions for you. However, you can still emit any " "number of arguments when you emit signals. So it's up to you to emit the " "correct values." msgstr "" #: ../../docs/getting_started/step_by_step/signals.rst:313 #, fuzzy msgid "" "To emit values along with the signal, add them as extra arguments to the " "``emit_signal()`` function:" msgstr "Để phát signal qua mã, hãy sử dụng hàm ``emit_signal``:" #: ../../docs/getting_started/step_by_step/signals.rst:327 msgid "" "Any node in Godot emits signals when something specific happens to them, " "like a button being pressed. Other nodes can connect to individual signals " "and react to selected events." msgstr "" #: ../../docs/getting_started/step_by_step/signals.rst:331 msgid "" "Signals have many uses. With them, you can react to a node entering or " "exiting the game world, to a collision, to a character entering or leaving " "an area, to an element of the interface changing size, and much more." msgstr "" #: ../../docs/getting_started/step_by_step/signals.rst:335 #, fuzzy msgid "" "For example, an :ref:`Area2D ` representing a coin emits a " "``body_entered`` signal whenever the player's physics body enters its " "collision shape, allowing you to know when the player collected it." msgstr "" "Nhiều loại node tích hợp của Godot cung cấp tín hiệu bạn có thể sử dụng để " "phát hiện các sự kiện. Ví dụ: an: ref: `Area2D ` đại diện cho " "một đồng xu sẽ phát ra tín hiệu `` body_entered`` bất cứ khi nào cơ thể vật " "lý của người chơi (nhân vật) đi vào hình dạng va chạm của nó (đồng xu), cho " "phép bạn biết khi nào đồng xu được thu thập." #: ../../docs/getting_started/step_by_step/signals.rst:339 #, fuzzy msgid "" "In the next section, :ref:`doc_your_first_2d_game`, you'll create a complete " "2D game and put everything you learned so far into practice." msgstr "" "Trong phần tiếp theo ,: ref: `doc_your_first_game`, bạn sẽ xây dựng một trò " "chơi hoàn chỉnh bao gồm một số cách sử dụng tín hiệu để kết nối các thành " "phần trò chơi khác nhau." #: ../../docs/getting_started/first_2d_game/index.rst:4 #, fuzzy msgid "Your first 2D game" msgstr "Trò chơi đầu tiên của bạn" #: ../../docs/getting_started/first_2d_game/index.rst:6 msgid "" "In this step-by-step tutorial series, you will create your first complete 2D " "game with Godot. By the end of the series, you will have a simple yet " "complete game of your own, like the image below." msgstr "" #: ../../docs/getting_started/first_2d_game/index.rst:12 #, fuzzy msgid "" "You will learn how the Godot editor works, how to structure a project, and " "build a 2D game." msgstr "" "Hướng dẫn này sẽ chỉ bạn cách thực hiện dự án Godot đầu tiên của bạn. Bạn sẽ " "tìm hiểu cách trình soạn thảo Godot hoạt động, cách cấu trúc một dự án và " "cách xây dựng một trò chơi 2D." #: ../../docs/getting_started/first_2d_game/index.rst:15 #, fuzzy msgid "" "This project is an introduction to the Godot engine. It assumes that you " "have some programming experience already. If you're new to programming " "entirely, you should start here: :ref:`doc_scripting`." msgstr "" "Dự án này là một giới thiệu về Godot engine. Nó giả định rằng bạn đã có một " "số kinh nghiệm lập trình. Nếu bạn chưa quen với lập trình hoàn toàn, bạn nên " "bắt đầu ở đây :: ref: `doc_scripting`." #: ../../docs/getting_started/first_2d_game/index.rst:19 #, fuzzy msgid "" "The game is called \"Dodge the Creeps!\". Your character must move and avoid " "the enemies for as long as possible. Here is a preview of the final result:" msgstr "" "Trò chơi có tên là \"Dodge the Creeps!\". Nhân vật của bạn phải di chuyển và " "tránh kẻ thù càng lâu càng tốt. Đây là bản xem trước của kết quả cuối cùng:" #: ../../docs/getting_started/first_2d_game/index.rst:22 #: ../../docs/getting_started/first_3d_game/index.rst:17 msgid "You will learn to:" msgstr "" #: ../../docs/getting_started/first_2d_game/index.rst:24 msgid "Create a complete 2D game with the Godot editor." msgstr "" #: ../../docs/getting_started/first_2d_game/index.rst:25 #, fuzzy msgid "Structure a simple game project." msgstr "Tạo hoặc nhập vào một dự án" #: ../../docs/getting_started/first_2d_game/index.rst:26 msgid "Move the player character and change its sprite." msgstr "" #: ../../docs/getting_started/first_2d_game/index.rst:27 msgid "Spawn random enemies." msgstr "" #: ../../docs/getting_started/first_2d_game/index.rst:28 msgid "Count the score." msgstr "" #: ../../docs/getting_started/first_2d_game/index.rst:30 #: ../../docs/getting_started/first_3d_game/index.rst:28 msgid "And more." msgstr "" #: ../../docs/getting_started/first_2d_game/index.rst:32 msgid "" "You'll find another series where you'll create a similar game but in 3D. We " "recommend you to start with this one, though." msgstr "" #: ../../docs/getting_started/first_2d_game/index.rst:35 msgid "**Why start with 2D?**" msgstr "" #: ../../docs/getting_started/first_2d_game/index.rst:37 #, fuzzy msgid "" "3D games are much more complex than 2D ones. It would be best if you stuck " "to 2D until you understood the game development process and how to use Godot " "well." msgstr "" "**Tại sao 2D? ** Trò chơi 3D phức tạp hơn nhiều so với trò chơi 2D. Bạn nên " "bám sát 2D cho đến khi bạn hiểu rõ về quy trình phát triển trò chơi." #: ../../docs/getting_started/first_2d_game/index.rst:40 msgid "You can find a completed version of this project at these locations:" msgstr "" #: ../../docs/getting_started/first_2d_game/index.rst:42 msgid "https://github.com/kidscancode/Godot3_dodge/releases" msgstr "https://github.com/kidscancode/Godot3_dodge/releases" #: ../../docs/getting_started/first_2d_game/index.rst:43 msgid "https://github.com/godotengine/godot-demo-projects" msgstr "https://github.com/godotengine/godot-demo-projects" #: ../../docs/getting_started/first_2d_game/index.rst:46 #: ../../docs/tutorials/scripting/c_sharp/c_sharp_basics.rst:44 #: ../../docs/tutorials/scripting/gdnative/gdnative_c_example.rst:47 msgid "Prerequisites" msgstr "" #: ../../docs/getting_started/first_2d_game/index.rst:48 msgid "" "This step-by-step tutorial is intended for beginners who followed the " "complete :ref:`Getting Started `." msgstr "" #: ../../docs/getting_started/first_2d_game/index.rst:51 #, fuzzy msgid "" "If you're an experienced programmer, you can find the complete demo's source " "code here: `Godot demo projects `__." msgstr "" "Ngoài bộ tài liệu này, bạn cũng có thể xem thử các dự án demo có sẵn của " "Godot `Godot demo projects `_." #: ../../docs/getting_started/first_2d_game/index.rst:55 msgid "" "We prepared some game assets you'll need to download so we can jump straight " "to the code." msgstr "" #: ../../docs/getting_started/first_2d_game/index.rst:58 msgid "You can download them by clicking the link below." msgstr "" #: ../../docs/getting_started/first_2d_game/index.rst:60 msgid ":download:`dodge_assets.zip `." msgstr "" #: ../../docs/getting_started/first_2d_game/index.rst:63 #: ../../docs/getting_started/first_3d_game/index.rst:53 #, fuzzy msgid "Contents" msgstr "Tiếp tục" #: ../../docs/getting_started/first_2d_game/01.project_setup.rst:4 #: ../../docs/tutorials/scripting/gdnative/gdnative_cpp_example.rst:21 msgid "Setting up the project" msgstr "" #: ../../docs/getting_started/first_2d_game/01.project_setup.rst:6 msgid "In this short first part, we'll set up and organize the project." msgstr "" #: ../../docs/getting_started/first_2d_game/01.project_setup.rst:8 #, fuzzy msgid "Launch Godot and create a new project." msgstr "Tạo một dự án mới" #: ../../docs/getting_started/first_2d_game/01.project_setup.rst:15 #: ../../docs/getting_started/first_2d_game/01.project_setup.rst:22 #, fuzzy msgid "" "Download :download:`dodge_assets.zip `. The archive " "contains the images and sounds you'll be using to make the game. Extract the " "archive and move the ``art/`` and ``fonts/`` directories to your project's " "directory." msgstr "" "Khởi động Godot và tạo một dự án mới. Sau đó, tải xuống: download: " "`dodge_assets.zip ` - hình ảnh và âm thanh bạn sẽ " "sử dụng để tạo trò chơi. Giải nén các tệp này vào thư mục dự án của bạn." #: ../../docs/getting_started/first_2d_game/01.project_setup.rst:20 #: ../../docs/tutorials/performance/cpu_optimization.rst:180 #: ../../docs/tutorials/scripting/c_sharp/index.rst:2 #: ../../docs/tutorials/scripting/c_sharp/c_sharp_differences.rst:30 #: ../../docs/tutorials/scripting/c_sharp/c_sharp_differences.rst:59 #: ../../docs/tutorials/scripting/c_sharp/c_sharp_differences.rst:221 #: ../../docs/tutorials/scripting/c_sharp/c_sharp_differences.rst:236 #: ../../docs/tutorials/scripting/c_sharp/c_sharp_differences.rst:248 #: ../../docs/tutorials/scripting/c_sharp/c_sharp_differences.rst:259 #: ../../docs/tutorials/scripting/c_sharp/c_sharp_differences.rst:267 #: ../../docs/tutorials/scripting/c_sharp/c_sharp_differences.rst:282 #: ../../docs/tutorials/scripting/c_sharp/c_sharp_differences.rst:294 #: ../../docs/tutorials/scripting/c_sharp/c_sharp_differences.rst:351 msgid "C#" msgstr "" #: ../../docs/getting_started/first_2d_game/01.project_setup.rst:27 msgid "" "Ensure that you have the required dependencies to use C# in Godot. You need " "the .NET Core 3.1 SDK, and an editor such as VS Code. See :ref:" "`doc_c_sharp_setup`." msgstr "" #: ../../docs/getting_started/first_2d_game/01.project_setup.rst:31 #, fuzzy msgid "GDNative C++" msgstr "GDNative / C ++" #: ../../docs/getting_started/first_2d_game/01.project_setup.rst:33 msgid "" "Download :download:`dodge_assets_with_gdnative.zip `. The archive contains the images and sounds " "you'll be using to make the game. It also contains a starter GDNative " "project including a ``SConstruct`` file, a ``dodge_the_creeps.gdnlib`` file, " "a ``player.gdns`` file, and an ``entry.cpp`` file." msgstr "" #: ../../docs/getting_started/first_2d_game/01.project_setup.rst:40 msgid "" "Ensure that you have the required dependencies to use GDNative C++. You need " "a C++ compiler such as GCC or Clang or MSVC that supports C++14. On Windows " "you can download Visual Studio 2019 and select the C++ workload. You also " "need SCons to use the build system (the SConstruct file). Then you need to " "`download the Godot C++ bindings `_ and place them in your project." msgstr "" #: ../../docs/getting_started/first_2d_game/01.project_setup.rst:47 #, fuzzy msgid "Your project folder should look like this." msgstr "Scene tree của bạn sẽ trông như thế này:" #: ../../docs/getting_started/first_2d_game/01.project_setup.rst:51 #, fuzzy msgid "" "This game is designed for portrait mode, so we need to adjust the size of " "the game window. Click on *Project -> Project Settings* to open the project " "settings window and in the left column, open the *Display -> Window* tab. " "There, set \"Width\" to ``480`` and \"Height\" to ``720``." msgstr "" "Trò chơi này sẽ sử dụng chế độ dọc, vì vậy chúng tôi cần điều chỉnh kích " "thước của cửa sổ trò chơi. Nhấp vào Project -> Project Settings -> Display -" "> Window và đặt \"Width\" thành `` 480`` và \"Height\" thành `` 720``." #: ../../docs/getting_started/first_2d_game/01.project_setup.rst:58 msgid "" "Also, scroll down to the bottom of the section and, under the \"Stretch\" " "options, set ``Mode`` to \"2d\" and ``Aspect`` to \"keep\". This ensures " "that the game scales consistently on different sized screens." msgstr "" #: ../../docs/getting_started/first_2d_game/01.project_setup.rst:65 #, fuzzy msgid "Organizing the project" msgstr "Tổ chức dự án" #: ../../docs/getting_started/first_2d_game/01.project_setup.rst:67 msgid "" "In this project, we will make 3 independent scenes: ``Player``, ``Mob``, and " "``HUD``, which we will combine into the game's ``Main`` scene." msgstr "" #: ../../docs/getting_started/first_2d_game/01.project_setup.rst:70 #, fuzzy msgid "" "In a larger project, it might be useful to create folders to hold the " "various scenes and their scripts, but for this relatively small game, you " "can save your scenes and scripts in the project's root folder, identified by " "``res://``. You can see your project folders in the FileSystem dock in the " "lower left corner:" msgstr "" "Trong dự án này, chúng tôi sẽ thực hiện 3 cảnh độc lập: `` Player``, `` " "Mob`` và `` HUD``, chúng tôi sẽ kết hợp vào cảnh `` Main`` của trò chơi. " "Trong một dự án lớn hơn, có thể hữu ích khi tạo các thư mục để chứa các cảnh " "khác nhau và tập lệnh của chúng, nhưng đối với trò chơi tương đối nhỏ này, " "bạn có thể lưu cảnh và tập lệnh của mình trong thư mục gốc của dự án, được " "gọi là `` res: // ``. Bạn có thể thấy các thư mục dự án của mình trong " "FileSystem Dock ở góc dưới bên trái:" #: ../../docs/getting_started/first_2d_game/01.project_setup.rst:77 msgid "" "With the project in place, we're ready to design the player scene in the " "next lesson." msgstr "" #: ../../docs/getting_started/first_2d_game/02.player_scene.rst:4 #, fuzzy msgid "Creating the player scene" msgstr "Tạo nội dung" #: ../../docs/getting_started/first_2d_game/02.player_scene.rst:6 msgid "" "With the project settings in place, we can start working on the player-" "controlled character." msgstr "" #: ../../docs/getting_started/first_2d_game/02.player_scene.rst:9 #, fuzzy msgid "" "The first scene will define the ``Player`` object. One of the benefits of " "creating a separate Player scene is that we can test it separately, even " "before we've created other parts of the game." msgstr "" "Cảnh đầu tiên chúng ta sẽ định nghĩa đối tượng `` Player``. Một trong những " "lợi ích của việc tạo cảnh Người chơi riêng là chúng tôi có thể kiểm tra " "riêng, ngay cả trước khi chúng tôi tạo các phần khác của trò chơi." #: ../../docs/getting_started/first_2d_game/02.player_scene.rst:14 msgid "Node structure" msgstr "Cấu trúc node" #: ../../docs/getting_started/first_2d_game/02.player_scene.rst:16 msgid "" "To begin, we need to choose a root node for the player object. As a general " "rule, a scene's root node should reflect the object's desired functionality " "- what the object *is*. Click the \"Other Node\" button and add an :ref:" "`Area2D ` node to the scene." msgstr "" #: ../../docs/getting_started/first_2d_game/02.player_scene.rst:23 msgid "" "Godot will display a warning icon next to the node in the scene tree. You " "can ignore it for now. We will address it later." msgstr "" #: ../../docs/getting_started/first_2d_game/02.player_scene.rst:26 #, fuzzy msgid "" "With ``Area2D`` we can detect objects that overlap or run into the player. " "Change the node's name to ``Player`` by double-clicking on it. Now that " "we've set the scene's root node, we can add additional nodes to give it more " "functionality." msgstr "" "Với `` Area2D``, chúng ta có thể phát hiện các đối tượng chồng lấp hoặc chạy " "vào player. Thay đổi tên của nó thành `` Player`` bằng cách nhấp vào tên của " "node. Đây là node gốc của cảnh. Chúng tôi có thể thêm các node bổ sung cho " "player để thêm chức năng." #: ../../docs/getting_started/first_2d_game/02.player_scene.rst:31 msgid "" "Before we add any children to the ``Player`` node, we want to make sure we " "don't accidentally move or resize them by clicking on them. Select the node " "and click the icon to the right of the lock; its tooltip says \"Makes sure " "the object's children are not selectable.\"" msgstr "" "Trước khi chúng tôi thêm bất kỳ node con khác nào vào node `` Player``, " "chúng tôi muốn đảm bảo rằng chúng tôi không vô tình di chuyển hoặc thay đổi " "kích thước chúng bằng cách nhấp vào chúng. Chọn nút và nhấp vào biểu tượng ở " "bên phải của khóa; tooltip của nó nói \"Chắc chắn rằng con của đối tượng " "không thể chọn được.\"" #: ../../docs/getting_started/first_2d_game/02.player_scene.rst:38 #, fuzzy msgid "" "Save the scene. Click Scene -> Save, or press :kbd:`Ctrl + S` on Windows/" "Linux or :kbd:`Cmd + S` on macOS." msgstr "" "Lưu lại cảnh. Nhấp vào Scene -> Save hoặc nhấn `` Ctrl + S`` trên Windows / " "Linux hoặc `` Command + S`` trên Mac." #: ../../docs/getting_started/first_2d_game/02.player_scene.rst:41 msgid "For this project, we will be following the Godot naming conventions." msgstr "Đối với dự án này, chúng tôi sẽ tuân theo các quy ước đặt tên Godot." #: ../../docs/getting_started/first_2d_game/02.player_scene.rst:43 msgid "" "**GDScript**: Classes (nodes) use PascalCase, variables and functions use " "snake_case, and constants use ALL_CAPS (See :ref:`doc_gdscript_styleguide`)." msgstr "" "**GDScript**: Các lớp (node) sử dụng PascalCase, các biến và hàm sử dụng " "snake_case và các hằng sử dụng ALL_CAPS (Xem: ref: " "`doc_gdscript_styleguide`)." #: ../../docs/getting_started/first_2d_game/02.player_scene.rst:47 #, fuzzy msgid "" "**C#**: Classes, export variables and methods use PascalCase, private fields " "use _camelCase, local variables and parameters use camelCase (See :ref:" "`doc_c_sharp_styleguide`). Be careful to type the method names precisely " "when connecting signals." msgstr "" "**C #**: Các lớp, biến xuất và phương thức sử dụng PascalCase, trường riêng " "sử dụng _camelCase, biến cục bộ và tham số sử dụng camelCase (Xem: ref: " "`doc_c_sharp_styleguide`). Hãy cẩn thận để nhập tên phương thức chính xác " "khi kết nối tín hiệu." #: ../../docs/getting_started/first_2d_game/02.player_scene.rst:54 msgid "Sprite animation" msgstr "Sprite động" #: ../../docs/getting_started/first_2d_game/02.player_scene.rst:56 #, fuzzy msgid "" "Click on the ``Player`` node and add an :ref:`AnimatedSprite " "` node as a child. The ``AnimatedSprite`` will handle " "the appearance and animations for our player. Notice that there is a warning " "symbol next to the node. An ``AnimatedSprite`` requires a :ref:`SpriteFrames " "` resource, which is a list of the animations it can " "display. To create one, find the ``Frames`` property in the Inspector and " "click \"[empty]\" -> \"New SpriteFrames\". Click again to open the " "\"SpriteFrames\" panel:" msgstr "" "Nhấp vào node ``Player`` và thêm node: ref: `AnimatedSprite " "` như là node con. ``AnimatedSprite`` sẽ xử lý sự xuất " "hiện và hình ảnh động cho player của chúng tôi. Lưu ý rằng có một biểu tượng " "cảnh báo bên cạnh node. Một``AnimatedSprite`` yêu cầu tài nguyên: ref: " "`SpriteFrames `, đây là danh sách các hình ảnh động mà " "nó có thể hiển thị. Để tạo một cái, hãy tìm thuộc tính ``Frames`` trong " "Inspector và bấm \"[empty]\" -> \"New SpriteFrames\". Điều này sẽ tự động " "mở bảng SpriteFrames." #: ../../docs/getting_started/first_2d_game/02.player_scene.rst:67 #, fuzzy msgid "" "On the left is a list of animations. Click the \"default\" one and rename it " "to \"walk\". Then click the \"New Animation\" button to create a second " "animation named \"up\". Find the player images in the \"FileSystem\" tab - " "they're in the ``art`` folder you unzipped earlier. Drag the two images for " "each animation, named ``playerGrey_up[1/2]`` and ``playerGrey_walk[1/2]``, " "into the \"Animation Frames\" side of the panel for the corresponding " "animation:" msgstr "" "Bên trái là danh sách các hình ảnh động. Nhấp vào \"default\" và đổi tên " "thành \"right\". Sau đó nhấp vào nút \"Add\" để tạo hình động thứ hai có tên " "\"up\". Kéo hai hình ảnh cho mỗi hình ảnh động, được đặt tên là " "``playerGrey_up [1/2] `` và ``playerGrey_walk [1/2] ``, vào bên cạnh " "\"Animation Frames\" vào bên cạnh của bảng:" #: ../../docs/getting_started/first_2d_game/02.player_scene.rst:76 #, fuzzy msgid "" "The player images are a bit too large for the game window, so we need to " "scale them down. Click on the ``AnimatedSprite`` node and set the ``Scale`` " "property to ``(0.5, 0.5)``. You can find it in the Inspector under the " "``Node2D`` heading." msgstr "" "Hình ảnh player hơi lớn so với cửa sổ trò chơi, vì vậy chúng tôi cần thu nhỏ " "chúng xuống. Nhấp vào node ``AnimatedSprite`` và đặt thuộc tính ``Scale`` " "thành `` (0,5, 0,5) ``. Bạn có thể tìm thấy nó trong Inspector dưới tiêu đề " "`` Node2D``." #: ../../docs/getting_started/first_2d_game/02.player_scene.rst:83 #, fuzzy msgid "" "Finally, add a :ref:`CollisionShape2D ` as a child " "of ``Player``. This will determine the player's \"hitbox\", or the bounds of " "its collision area. For this character, a ``CapsuleShape2D`` node gives the " "best fit, so next to \"Shape\" in the Inspector, click \"[empty]\"\" -> " "\"New CapsuleShape2D\". Using the two size handles, resize the shape to " "cover the sprite:" msgstr "" "Cuối cùng, thêm một: ref: `CollisionShape2D ` khi là " "con của `` Player``. Điều này sẽ xác định \"hitbox\" của player, hoặc giới " "hạn của khu vực va chạm của nó. Đối với nhân vật này, node `` " "CapsuleShape2D`` mang lại sự phù hợp nhất, vì vậy, bên cạnh \"Shape\" trong " "Inspector, nhấp vào \"[empty]\" \"->\"New CapsuleShape2D\". Sử dụng hai tay " "cầm kích thước, thay đổi kích thước hình dạng thành che sprite:" #: ../../docs/getting_started/first_2d_game/02.player_scene.rst:92 #, fuzzy msgid "When you're finished, your ``Player`` scene should look like this:" msgstr "Khi bạn kết thúc, cảnh `` Player`` của bạn sẽ giống như thế này:" #: ../../docs/getting_started/first_2d_game/02.player_scene.rst:96 msgid "Make sure to save the scene again after these changes." msgstr "" #: ../../docs/getting_started/first_2d_game/02.player_scene.rst:98 msgid "" "In the next part, we'll add a script to the player node to move and animate " "it. Then, we'll set up collision detection to know when the player got hit " "by something." msgstr "" #: ../../docs/getting_started/first_2d_game/03.coding_the_player.rst:4 #, fuzzy msgid "Coding the player" msgstr "Di chuyển player" #: ../../docs/getting_started/first_2d_game/03.coding_the_player.rst:6 msgid "" "In this lesson, we'll add player movement, animation, and set it up to " "detect collisions." msgstr "" #: ../../docs/getting_started/first_2d_game/03.coding_the_player.rst:9 #, fuzzy msgid "" "To do so, we need to add some functionality that we can't get from a built-" "in node, so we'll add a script. Click the ``Player`` node and click the " "\"Attach Script\" button:" msgstr "" "Bây giờ chúng tôi cần thêm một số chức năng mà chúng tôi không thể có được " "từ một node tích hợp, vì vậy chúng tôi sẽ thêm một tập lệnh. Nhấp vào nút `` " "Player`` và nhấp vào nút \"Thêm tập lệnh\":" #: ../../docs/getting_started/first_2d_game/03.coding_the_player.rst:15 msgid "" "In the script settings window, you can leave the default settings alone. " "Just click \"Create\":" msgstr "" "Trong cửa sổ cài đặt tập lệnh, bạn có thể để các cài đặt mặc định. Chỉ cần " "nhấp vào \"Create\":" #: ../../docs/getting_started/first_2d_game/03.coding_the_player.rst:18 msgid "" "If you're creating a C# script or other languages, select the language from " "the `language` drop down menu before hitting create." msgstr "" "Nếu bạn đang tạo tập lệnh C # hoặc các ngôn ngữ khác, hãy chọn ngôn ngữ từ " "trình đơn thả xuống `language 'trước khi nhấn tạo." #: ../../docs/getting_started/first_2d_game/03.coding_the_player.rst:23 msgid "" "If this is your first time encountering GDScript, please read :ref:" "`doc_scripting` before continuing." msgstr "" #: ../../docs/getting_started/first_2d_game/03.coding_the_player.rst:26 #, fuzzy msgid "Start by declaring the member variables this object will need:" msgstr "" "Bắt đầu bằng cách khai báo các biến thành viên mà đối tượng này sẽ cần:" #: ../../docs/getting_started/first_2d_game/03.coding_the_player.rst:86 msgid "" "Using the ``export`` keyword on the first variable ``speed`` allows us to " "set its value in the Inspector. This can be handy for values that you want " "to be able to adjust just like a node's built-in properties. Click on the " "``Player`` node and you'll see the property now appears in the \"Script " "Variables\" section of the Inspector. Remember, if you change the value " "here, it will override the value written in the script." msgstr "" "Sử dụng từ khóa ``export`` trên biến đầu tiên ``speed`` cho phép chúng ta " "đặt giá trị của nó trong Inspector. Điều này có thể hữu ích cho các giá trị " "mà bạn muốn có thể điều chỉnh giống như các thuộc tính tích hợp của node. " "Nhấp vào node ``Player`` và bạn sẽ thấy thuộc tính hiện xuất hiện trong phần " "\"Script Variables\" của Inspector. Hãy nhớ rằng, nếu bạn thay đổi giá trị ở " "đây, nó sẽ ghi đè giá trị được ghi trong tập lệnh." #: ../../docs/getting_started/first_2d_game/03.coding_the_player.rst:93 msgid "" "If you're using C#, you need to (re)build the project assemblies whenever " "you want to see new export variables or signals. This build can be manually " "triggered by clicking the word \"Mono\" at the bottom of the editor window " "to reveal the Mono Panel, then clicking the \"Build Project\" button." msgstr "" "Nếu bạn đang sử dụng C #, bạn cần (tái) xây dựng các cụm dự án bất cứ khi " "nào bạn muốn xem các biến hoặc tín hiệu xuất mới. Bản dựng này có thể được " "kích hoạt thủ công bằng cách nhấp vào từ \"Mono\" ở dưới cùng của cửa sổ " "trình chỉnh sửa để hiển thị Bảng điều khiển Mono, sau đó nhấp vào nút " "\"Build Project\"." #: ../../docs/getting_started/first_2d_game/03.coding_the_player.rst:101 msgid "" "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:" msgstr "" "Hàm ``_ready()`` được gọi khi một node đi vào scene tree, đây là thời điểm " "tốt để tìm kích thước của cửa sổ trò chơi:" #: ../../docs/getting_started/first_2d_game/03.coding_the_player.rst:129 msgid "" "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:" msgstr "" "Bây giờ chúng ta có thể sử dụng hàm `` _ process () `` để xác định những gì " "player sẽ làm. `` _ process () `` được gọi trên mọi khung hình, vì vậy chúng " "tôi sẽ sử dụng nó để cập nhật các yếu tố trong trò chơi của chúng tôi, điều " "mà chúng tôi mong đợi sẽ thay đổi thường xuyên. Đối với player, chúng ta cần " "làm như sau:" #: ../../docs/getting_started/first_2d_game/03.coding_the_player.rst:134 msgid "Check for input." msgstr "Kiểm tra đầu vào." #: ../../docs/getting_started/first_2d_game/03.coding_the_player.rst:135 msgid "Move in the given direction." msgstr "Di chuyển theo hướng đã cho." #: ../../docs/getting_started/first_2d_game/03.coding_the_player.rst:136 msgid "Play the appropriate animation." msgstr "Bật hoạt hình thích hợp." #: ../../docs/getting_started/first_2d_game/03.coding_the_player.rst:138 #, fuzzy msgid "" "First, we need to check for input - is the player pressing a key? For this " "game, we have 4 direction inputs to check. Input actions are defined in the " "Project Settings under \"Input Map\". Here, you can define custom events and " "assign different keys, mouse events, or other inputs to them. For this game, " "we will map the arrow keys to the four directions." msgstr "" "Đầu tiên, chúng ta cần kiểm tra các nút đầu vào - player có đang bấm 1 phím " "nào không ? Đối với trò chơi này, chúng tôi có 4 đầu vào hướng để kiểm tra. " "Các hành động đầu vào được xác định trong Project Settings trong \"Input " "Map\". Tại đây, bạn có thể xác định các sự kiện tùy chỉnh và gán các phím, " "sự kiện chuột hoặc các đầu vào khác cho chúng. Đối với bản demo này, chúng " "tôi sẽ sử dụng các sự kiện mặc định được gán cho các phím mũi tên trên bàn " "phím." #: ../../docs/getting_started/first_2d_game/03.coding_the_player.rst:144 msgid "" "Click on *Project -> Project Settings* to open the project settings window " "and click on the *Input Map* tab at the top. Type \"move_right\" in the top " "bar and click the \"Add\" button to add the ``move_right`` action." msgstr "" #: ../../docs/getting_started/first_2d_game/03.coding_the_player.rst:150 msgid "" "We need to assign a key to this action. Click the \"+\" icon on the right, " "then click the \"Key\" option in the drop-down menu. A dialog asks you to " "type in the desired key. Press the right arrow on your keyboard and click " "\"Ok\"." msgstr "" #: ../../docs/getting_started/first_2d_game/03.coding_the_player.rst:156 msgid "Repeat these steps to add three more mappings:" msgstr "" #: ../../docs/getting_started/first_2d_game/03.coding_the_player.rst:158 msgid "``move_left`` mapped to the left arrow key." msgstr "" #: ../../docs/getting_started/first_2d_game/03.coding_the_player.rst:159 msgid "``move_up`` mapped to the up arrow key." msgstr "" #: ../../docs/getting_started/first_2d_game/03.coding_the_player.rst:160 msgid "And ``move_down`` mapped to the down arrow key." msgstr "" #: ../../docs/getting_started/first_2d_game/03.coding_the_player.rst:162 #, fuzzy msgid "Your input map tab should look like this:" msgstr "Scene tree của bạn sẽ trông như thế này:" #: ../../docs/getting_started/first_2d_game/03.coding_the_player.rst:166 msgid "Click the \"Close\" button to close the project settings." msgstr "" #: ../../docs/getting_started/first_2d_game/03.coding_the_player.rst:170 msgid "" "We only mapped one key to each input action, but you can map multiple keys, " "joystick buttons, or mouse buttons to the same input action." msgstr "" #: ../../docs/getting_started/first_2d_game/03.coding_the_player.rst:173 #, fuzzy msgid "" "You can detect whether a key is pressed using ``Input.is_action_pressed()``, " "which returns ``true`` if it's pressed or ``false`` if it isn't." msgstr "" "Bạn có thể phát hiện liệu một phím được nhấn bằng cách sử dụng `` Input." "is_action_pressed ()``, sẽ trả về `` true`` nếu nó được nhấn hoặc `` false`` " "nếu không." #: ../../docs/getting_started/first_2d_game/03.coding_the_player.rst:252 #, fuzzy msgid "" "We start by setting the ``velocity`` to ``(0, 0)`` - by default, the player " "should not be moving. Then we check each input and add/subtract from the " "``velocity`` to obtain a total direction. For example, if you hold ``right`` " "and ``down`` at the same time, the resulting ``velocity`` vector will be " "``(1, 1)``. In this case, since we're adding a horizontal and a vertical " "movement, the player would move *faster* diagonally than if it just moved " "horizontally." msgstr "" "Chúng ta bắt đầu bằng cách đặt ``velocity`` thành ``(0, 0)`` - theo mặc " "định, player không nên di chuyển. Sau đó, chúng ta kiểm tra từng đầu vào và " "cộng / trừ từ ``velocity`` để có được tổng hướng. Ví dụ: nếu bạn giữ " "``right`` và ``down`` cùng một lúc, vectơ ``velocity`` sẽ là ``(1, 1)``. " "Trong trường hợp này, vì chúng ta đang thêm một chuyển động ngang và dọc, " "player sẽ di chuyển * nhanh hơn * so với khi nó chỉ di chuyển theo chiều " "ngang." #: ../../docs/getting_started/first_2d_game/03.coding_the_player.rst:259 #, fuzzy msgid "" "We can prevent that if we *normalize* the velocity, which means we set its " "*length* to ``1``, then multiply by the desired speed. This means no more " "fast diagonal movement." msgstr "" "Chúng ta có thể ngăn chặn điều đó nếu chúng ta *normalize* (bình thường hóa) " "vận tốc, có nghĩa là chúng ta đặt *length* (chiều dài) của nó thành `` 1`` " "và nhân với tốc độ mong muốn. Điều này có nghĩa là không có chuyển động chéo " "nhanh hơn." #: ../../docs/getting_started/first_2d_game/03.coding_the_player.rst:263 #, fuzzy msgid "" "If you've never used vector math before, or need a refresher, you can see an " "explanation of vector usage in Godot at :ref:`doc_vector_math`. It's good to " "know but won't be necessary for the rest of this tutorial." msgstr "" "Nếu bạn chưa bao giờ sử dụng toán học vectơ trước đây hoặc cần làm mới, bạn " "có thể xem giải thích về việc sử dụng vectơ trong Godot tại: ref: " "`doc_vector_math`. Thật tốt khi biết nhưng sẽ không cần thiết cho phần còn " "lại của hướng dẫn này." #: ../../docs/getting_started/first_2d_game/03.coding_the_player.rst:267 #, fuzzy msgid "" "We also check whether the player is moving so we can call ``play()`` or " "``stop()`` on the AnimatedSprite." msgstr "" "Chúng tôi cũng kiểm tra xem player có di chuyển hay không để chúng tôi có " "thể bắt đầu hoặc dừng hoạt hình AnimatedSprite." #: ../../docs/getting_started/first_2d_game/03.coding_the_player.rst:270 #, fuzzy msgid "" "``$`` is shorthand for ``get_node()``. So in the code above, " "``$AnimatedSprite.play()`` is the same as ``get_node(\"AnimatedSprite\")." "play()``." msgstr "" "``$`` là viết tắt của ``get_node ()``. Vì vậy, trong đoạn mã trên, ``$ " "AnimatedSprite.play ()`` giống như ``get_node (\"AnimatedSprite\"). Play " "()``." #: ../../docs/getting_started/first_2d_game/03.coding_the_player.rst:274 #, fuzzy msgid "" "In GDScript, ``$`` returns the node at the relative path from the current " "node, or returns ``null`` if the node is not found. Since AnimatedSprite is " "a child of the current node, we can use ``$AnimatedSprite``." msgstr "" "Trong GDScript, ``$`` trả về node tại đường dẫn tương đối từ node hiện tại " "hoặc trả về ``null`` nếu không tìm thấy node. Vì AnimatedSprite là con của " "node hiện tại, chúng ta có thể sử dụng ``$ AnimatedSprite``." #: ../../docs/getting_started/first_2d_game/03.coding_the_player.rst:279 #, fuzzy msgid "" "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`):" msgstr "" "Bây giờ chúng ta đã có hướng di chuyển, chúng ta có thể cập nhật vị trí của " "player và sử dụng ``clamp()`` để ngăn không cho nó rời khỏi màn hình bằng " "cách thêm phần sau vào dưới cùng của hàm ``_ process``:" #: ../../docs/getting_started/first_2d_game/03.coding_the_player.rst:307 msgid "" "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." msgstr "" #: ../../docs/getting_started/first_2d_game/03.coding_the_player.rst:312 msgid "" "Click \"Play Scene\" (:kbd:`F6`, :kbd:`Cmd + R` on macOS) and confirm you " "can move the player around the screen in all directions." msgstr "" #: ../../docs/getting_started/first_2d_game/03.coding_the_player.rst:315 msgid "If you get an error in the \"Debugger\" panel that says" msgstr "" #: ../../docs/getting_started/first_2d_game/03.coding_the_player.rst:317 msgid "" "``Attempt to call function 'play' in base 'null instance' on a null " "instance``" msgstr "" #: ../../docs/getting_started/first_2d_game/03.coding_the_player.rst:320 #, fuzzy msgid "" "this likely means you spelled the name of the AnimatedSprite node wrong. " "Node names are case-sensitive and ``$NodeName`` must match the name you see " "in the scene tree." msgstr "" "Nếu bạn gặp lỗi trong bảng \"Debugger\" đề cập đến \"null instance\", điều " "này có thể có nghĩa là bạn đã viết sai tên node. Tên node có phân biệt chữ " "hoa chữ thường và ``$NodeName`` hoặc ``get_node (\"NodeName\")`` phải khớp " "với tên bạn nhìn thấy trong scene tree." #: ../../docs/getting_started/first_2d_game/03.coding_the_player.rst:325 msgid "Choosing animations" msgstr "Chọn hình ảnh động (animation)" #: ../../docs/getting_started/first_2d_game/03.coding_the_player.rst:327 #, fuzzy msgid "" "Now that the player can move, we need to change which animation the " "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:" msgstr "" "Bây giờ player có thể di chuyển, chúng ta cần thay đổi hoạt hình nào mà " "AnimatedSprite đang phát dựa trên hướng mà player sẽ di chuyển. Chúng ta có " "một hình động \"right\", nên được lật theo chiều ngang bằng cách sử dụng " "thuộc tính ``flip_h`` cho chuyển động bên trái và một hình động \"up\", nên " "được lật theo chiều dọc với `` flip_v`` cho chuyển động đi xuống. Chúng ta " "hãy đặt mã này vào cuối hàm ``_ process ()`` của chúng ta:" #: ../../docs/getting_started/first_2d_game/03.coding_the_player.rst:373 #, fuzzy msgid "" "The boolean assignments in the code above are a common shorthand for " "programmers. Since we're doing a comparison test (boolean) and also " "*assigning* a boolean value, we can do both at the same time. Consider this " "code versus the one-line boolean assignment above:" msgstr "" "Các phép gán boolean trong đoạn mã trên là một cách viết tắt phổ biến cho " "các lập trình viên. Xem xét mã này so với phép gán boolean rút gọn ở trên:" #: ../../docs/getting_started/first_2d_game/03.coding_the_player.rst:397 msgid "" "Play the scene again and check that the animations are correct in each of " "the directions." msgstr "" #: ../../docs/getting_started/first_2d_game/03.coding_the_player.rst:400 msgid "" "A common mistake here is to type the names of the animations wrong. The " "animation names in the SpriteFrames panel must match what you type in the " "code. If you named the animation ``\"Walk\"``, you must also use a capital " "\"W\" in the code." msgstr "" #: ../../docs/getting_started/first_2d_game/03.coding_the_player.rst:405 #, fuzzy msgid "" "When you're sure the movement is working correctly, add this line to " "``_ready()``, so the player will be hidden when the game starts:" msgstr "" "Phát lại cảnh và kiểm tra xem các hình động có chính xác theo từng hướng " "không. Khi bạn chắc chắn rằng chuyển động đang hoạt động chính xác, hãy thêm " "dòng này vào ``_ready()``, để player sẽ bị ẩn khi trò chơi bắt đầu:" #: ../../docs/getting_started/first_2d_game/03.coding_the_player.rst:422 msgid "Preparing for collisions" msgstr "Chuẩn bị va chạm" #: ../../docs/getting_started/first_2d_game/03.coding_the_player.rst:424 msgid "" "We want ``Player`` to detect when it's hit by an enemy, but we haven't made " "any enemies yet! That's OK, because we're going to use Godot's *signal* " "functionality to make it work." msgstr "" "Chúng ta muốn `` Player`` phát hiện khi nó tấn công kẻ thù, nhưng chúng tôi " "chưa tạo ra bất kỳ kẻ thù nào! Không sao, vì chúng ta sẽ sử dụng chức năng * " "signal * của Godot để làm cho nó hoạt động." #: ../../docs/getting_started/first_2d_game/03.coding_the_player.rst:428 #, fuzzy msgid "Add the following at the top of the script, after ``extends Area2D``:" msgstr "Thêm phần sau vào đầu tập lệnh, sau ``extends Area2d``:" #: ../../docs/getting_started/first_2d_game/03.coding_the_player.rst:457 msgid "" "This defines a custom signal called \"hit\" that we will have our player " "emit (send out) when it collides with an enemy. We will use ``Area2D`` to " "detect the collision. Select the ``Player`` node and click the \"Node\" tab " "next to the Inspector tab to see the list of signals the player can emit:" msgstr "" "Điều này xác định một tín hiệu tùy chỉnh được gọi là \"hit\" mà chúng ta sẽ " "có người chơi phát ra (gửi đi) khi nó va chạm với kẻ thù. Chúng tôi sẽ sử " "dụng ``Area2D`` để phát hiện va chạm. Chọn nút ``Player`` và nhấp vào tab " "\"Node\" bên cạnh tab Inspector để xem danh sách các signal mà player có thể " "phát ra:" #: ../../docs/getting_started/first_2d_game/03.coding_the_player.rst:464 #, fuzzy msgid "" "Notice our custom \"hit\" signal is there as well! Since our enemies are " "going to be ``RigidBody2D`` nodes, we want the ``body_entered(body: Node)`` " "signal. This signal will be emitted when a body contacts the player. Click " "\"Connect..\" and the \"Connect a Signal\" window appears. We don't need to " "change any of these settings so click \"Connect\" again. Godot will " "automatically create a function in your player's script." msgstr "" "Lưu ý tín hiệu \"hit\" tùy chỉnh của chúng ta là có! Vì kẻ thù của chúng ta " "sẽ là các node `` RigidBody2D``, nên chúng ta muốn tín hiệu ``body_entered " "(Object body)``; điều này sẽ được phát ra khi một cơ thể tiếp xúc với " "player. Nhấp vào \"Connect..\" và sau đó \"Connect\" lại trên cửa sổ " "\"Connecting Signal\". Chúng ta không cần thay đổi bất kỳ cài đặt nào trong " "số này - Godot sẽ tự động tạo một chức năng trong tập lệnh củaplayer của " "bạn. Hàm này sẽ được gọi bất cứ khi nào tín hiệu được phát ra - nó * xử lý * " "tín hiệu." #: ../../docs/getting_started/first_2d_game/03.coding_the_player.rst:473 msgid "" "Note the green icon indicating that a signal is connected to this function. " "Add this code to the function:" msgstr "" #: ../../docs/getting_started/first_2d_game/03.coding_the_player.rst:505 msgid "" "Each time an enemy hits the player, the signal is going to be emitted. We " "need to disable the player's collision so that we don't trigger the ``hit`` " "signal more than once." msgstr "" "Mỗi khi kẻ địch tấn công player, tín hiệu sẽ được phát ra. Chúng ta cần phải " "vô hiệu hóa va chạm của player để không kích hoạt tín hiệu `` hit`` nhiều " "lần." #: ../../docs/getting_started/first_2d_game/03.coding_the_player.rst:509 #, fuzzy msgid "" "Disabling the area's collision shape can cause an error if it happens in the " "middle of the engine's collision processing. Using ``set_deferred()`` tells " "Godot to wait to disable the shape until it's safe to do so." msgstr "" "Vô hiệu hóa hình dạng va chạm của khu vực có thể gây ra lỗi nếu nó xảy ra ở " "giữa quá trình xử lý va chạm của engine. Sử dụng ``set_deferred()`` cho phép " "chúng ta chờ Godot chờ để vô hiệu hóa hình dạng cho đến khi an toàn để làm " "như vậy." #: ../../docs/getting_started/first_2d_game/03.coding_the_player.rst:514 #, fuzzy msgid "" "The last piece is to add a function we can call to reset the player when " "starting a new game." msgstr "" "Phần cuối cùng cho player của chúng ta là thêm một chức năng mà chúng ta có " "thể gọi để đặt lại player khi bắt đầu trò chơi mới." #: ../../docs/getting_started/first_2d_game/03.coding_the_player.rst:543 msgid "With the player working, we'll work on the enemy in the next lesson." msgstr "" #: ../../docs/getting_started/first_2d_game/04.creating_the_enemy.rst:4 #, fuzzy msgid "Creating the enemy" msgstr "Tạo nội dung" #: ../../docs/getting_started/first_2d_game/04.creating_the_enemy.rst:6 #, fuzzy msgid "" "Now it's time to make the enemies our player will have to dodge. Their " "behavior will not be very complex: mobs will spawn randomly at the edges of " "the screen, choose a random direction, and move in a straight line." msgstr "" "Bây giờ là lúc để làm cho kẻ thù, player của chúng ta sẽ phải né tránh. Hành " "vi của chúng sẽ không phức tạp lắm: các mob sẽ sinh sản ngẫu nhiên ở các " "cạnh của màn hình và di chuyển theo hướng ngẫu nhiên theo một đường thẳng, " "sau đó biến mất khi chúng rời khỏi màn hình." #: ../../docs/getting_started/first_2d_game/04.creating_the_enemy.rst:10 #, fuzzy msgid "" "We'll create a ``Mob`` scene, which we can then *instance* to create any " "number of independent mobs in the game." msgstr "" "Chúng tôi sẽ xây dựng cảnh này thành một cảnh `` Mob``, sau đó chúng tôi có " "thể *instance* để tạo bất kỳ số lượng mob độc lập nào trong trò chơi." #: ../../docs/getting_started/first_2d_game/04.creating_the_enemy.rst:14 msgid "Node setup" msgstr "Thiết lập node" #: ../../docs/getting_started/first_2d_game/04.creating_the_enemy.rst:16 #, fuzzy msgid "Click Scene -> New Scene and add the following nodes:" msgstr "Nhấp vào Scene -> New Scene và chúng tôi sẽ tạo Mob." #: ../../docs/getting_started/first_2d_game/04.creating_the_enemy.rst:18 msgid ":ref:`RigidBody2D ` (named ``Mob``)" msgstr ":ref:`RigidBody2D ` (tên là `` Mob``)" #: ../../docs/getting_started/first_2d_game/04.creating_the_enemy.rst:20 msgid ":ref:`AnimatedSprite `" msgstr ":ref:`AnimatedSprite `" #: ../../docs/getting_started/first_2d_game/04.creating_the_enemy.rst:21 msgid ":ref:`CollisionShape2D `" msgstr ":ref:`CollisionShape2D `" #: ../../docs/getting_started/first_2d_game/04.creating_the_enemy.rst:22 #, fuzzy msgid ":ref:`VisibilityNotifier2D `" msgstr "" ":ref:`VisibilityNotifier2D ` (tên là " "``Visibility``)" #: ../../docs/getting_started/first_2d_game/04.creating_the_enemy.rst:24 msgid "" "Don't forget to set the children so they can't be selected, like you did " "with the Player scene." msgstr "" "Đừng quên đặt children để chúng không thể được chọn, giống như bạn đã làm " "với cảnh Player." #: ../../docs/getting_started/first_2d_game/04.creating_the_enemy.rst:27 #, fuzzy msgid "" "In the :ref:`RigidBody2D ` properties, set ``Gravity " "Scale`` to ``0``, so the mob will not fall downward. In addition, under the :" "ref:`CollisionObject2D ` section, click the " "``Mask`` property and uncheck the first box. This will ensure the mobs do " "not collide with each other." msgstr "" "Trong các thuộc tính: ref:`RigidBody2D `, đặt ``Gravity " "Scale`` thành ``0``, vì vậy mob sẽ không rơi xuống. Ngoài ra, trong phần " "``ChemistryBody2D``, nhấp vào thuộc tính ``Mask`` và bỏ chọn hộp đầu tiên. " "Điều này sẽ đảm bảo các mob không va chạm với nhau." #: ../../docs/getting_started/first_2d_game/04.creating_the_enemy.rst:34 #, fuzzy msgid "" "Set up the :ref:`AnimatedSprite ` like you did for the " "player. This time, we have 3 animations: ``fly``, ``swim``, and ``walk``. " "There are two images for each animation in the art folder." msgstr "" "Thiết lập: ref: `AnimatedSprite ` giống như bạn đã làm " "cho player. Lần này, chúng ta có 3 hình ảnh động: ``fly``, ``swim`` và " "``walk``. Đặt thuộc tính ``Playing`` trong Inspector thành \"On\" và điều " "chỉnh cài đặt \"Speed (FPS)\" như hiển thị bên dưới. Chúng tôi sẽ chọn một " "trong những hình ảnh động này một cách ngẫu nhiên để mob sẽ có một số loại." #: ../../docs/getting_started/first_2d_game/04.creating_the_enemy.rst:38 msgid "Adjust the \"Speed (FPS)\" to ``3`` for all animations." msgstr "" #: ../../docs/getting_started/first_2d_game/04.creating_the_enemy.rst:42 msgid "Set the ``Playing`` property in the Inspector to \"On\"." msgstr "" #: ../../docs/getting_started/first_2d_game/04.creating_the_enemy.rst:44 msgid "" "We'll select one of these animations randomly so that the mobs will have " "some variety." msgstr "" #: ../../docs/getting_started/first_2d_game/04.creating_the_enemy.rst:47 #, fuzzy msgid "" "Like the player images, these mob images need to be scaled down. Set the " "``AnimatedSprite``'s ``Scale`` property to ``(0.75, 0.75)``." msgstr "" "Giống như hình ảnh player, những hình ảnh mob này cần được thu nhỏ lại. Đặt " "thuộc tính ``Scale`` của ``AnimatedSprite`` thành `` (0,75, 0,75) ``." #: ../../docs/getting_started/first_2d_game/04.creating_the_enemy.rst:50 #, fuzzy msgid "" "As in the ``Player`` scene, add a ``CapsuleShape2D`` for the collision. To " "align the shape with the image, you'll need to set the ``Rotation Degrees`` " "property to ``90`` (under \"Transform\" in the Inspector)." msgstr "" "Như trong cảnh ``Player``, thêm ``CapsuleShape2D`` cho việc va chạm. Để căn " "chỉnh hình dạng với hình ảnh, bạn sẽ cần đặt thuộc tính ``Rotation Độ 'thành " "``90`` bên dưới ``Node2D``." #: ../../docs/getting_started/first_2d_game/04.creating_the_enemy.rst:54 #, fuzzy msgid "Save the scene." msgstr "Cảnh người chơi" #: ../../docs/getting_started/first_2d_game/04.creating_the_enemy.rst:57 msgid "Enemy script" msgstr "Kịch bản kẻ thù" #: ../../docs/getting_started/first_2d_game/04.creating_the_enemy.rst:59 #, fuzzy msgid "Add a script to the ``Mob`` like this:" msgstr "Thêm một tập lệnh vào `` Mob`` và thêm các biến thành viên sau:" #: ../../docs/getting_started/first_2d_game/04.creating_the_enemy.rst:102 #, fuzzy msgid "" "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:" msgstr "" "Bây giờ hãy xem phần còn lại của kịch bản. Trong ``_ready()``, chúng ta chọn " "ngẫu nhiên một trong ba loại hoạt hình:" #: ../../docs/getting_started/first_2d_game/04.creating_the_enemy.rst:140 msgid "" "First, we get the list of animation names from the AnimatedSprite's " "``frames`` property. This returns an Array containing all three animation " "names: ``[\"walk\", \"swim\", \"fly\"]``." msgstr "" #: ../../docs/getting_started/first_2d_game/04.creating_the_enemy.rst:144 msgid "" "We then need to pick a random number between ``0`` and ``2`` to select one " "of these names from the list (array indices start at ``0``). ``randi() % n`` " "selects a random integer between ``0`` and ``n-1``." msgstr "" #: ../../docs/getting_started/first_2d_game/04.creating_the_enemy.rst:148 #, fuzzy msgid "" "You must use ``randomize()`` if you want your sequence of \"random\" numbers " "to be different every time you run the scene. We're going to use " "``randomize()`` in our ``Main`` scene, so we won't need it here." msgstr "" "Bạn phải sử dụng ``Randomize()`` nếu bạn muốn chuỗi số \"ngẫu nhiên\" của " "mình khác nhau mỗi khi bạn chạy cảnh. Chúng ta sẽ sử dụng ``Randomize()`` " "trong cảnh ``Main`` của chúng ta, vì vậy chúng ta sẽ không cần nó ở đây. " "``randi ()% n`` là cách tiêu chuẩn để lấy một số nguyên ngẫu nhiên giữa " "``0`` và ``n-1``." #: ../../docs/getting_started/first_2d_game/04.creating_the_enemy.rst:152 #, fuzzy msgid "" "The last piece is to make the mobs delete themselves when they leave the " "screen. Connect the ``screen_exited()`` signal of the " "``VisibilityNotifier2D`` node and add this code:" msgstr "" "Phần cuối cùng là làm cho mob tự xóa khi họ rời khỏi màn hình. Kết nối tín " "hiệu ``screen_exited()`` của node ``Visibility`` và thêm mã này:" #: ../../docs/getting_started/first_2d_game/04.creating_the_enemy.rst:176 #, fuzzy msgid "This completes the `Mob` scene." msgstr "Điều này hoàn thành cảnh `Mob`." #: ../../docs/getting_started/first_2d_game/04.creating_the_enemy.rst:178 msgid "" "With the player and enemies ready, in the next part, we'll bring them " "together in a new scene. We'll make enemies spawn randomly around the game " "board and move forward, turning our project into a playable game." msgstr "" #: ../../docs/getting_started/first_2d_game/05.the_main_game_scene.rst:4 #, fuzzy msgid "The main game scene" msgstr "Script một scene" #: ../../docs/getting_started/first_2d_game/05.the_main_game_scene.rst:6 msgid "" "Now it's time to bring everything we did together into a playable game scene." msgstr "" #: ../../docs/getting_started/first_2d_game/05.the_main_game_scene.rst:8 #, fuzzy msgid "" "Create a new scene and add a :ref:`Node ` named ``Main``. Ensure " "you create a Node, **not** a Node2D. Click the \"Instance\" button and " "select your saved ``Player.tscn``." msgstr "" "Bây giờ là lúc kết nối tất cả lại với nhau. Tạo một cảnh mới và thêm một: " "ref: `Node ` có tên ``Main``. Nhấp vào nút \"Instance\" và chọn " "`` Player.tscn`` đã lưu của bạn." #: ../../docs/getting_started/first_2d_game/05.the_main_game_scene.rst:14 msgid "" "Now, add the following nodes as children of ``Main``, and name them as shown " "(values are in seconds):" msgstr "" "Bây giờ, thêm các node sau dưới dạng con của ``Main`` và đặt tên cho chúng " "như được hiển thị (các giá trị được tính bằng giây):" #: ../../docs/getting_started/first_2d_game/05.the_main_game_scene.rst:17 msgid "" ":ref:`Timer ` (named ``MobTimer``) - to control how often mobs " "spawn" msgstr "" ":ref:`Timer ` (được đặt tên là ``MobTimer``) - để kiểm soát tần " "suất mob sinh sản" #: ../../docs/getting_started/first_2d_game/05.the_main_game_scene.rst:19 msgid "" ":ref:`Timer ` (named ``ScoreTimer``) - to increment the score " "every second" msgstr "" ":ref: `Timer ` (được đặt tên là ``ScoreTimer``) - để tăng điểm " "mỗi giây" #: ../../docs/getting_started/first_2d_game/05.the_main_game_scene.rst:21 msgid "" ":ref:`Timer ` (named ``StartTimer``) - to give a delay before " "starting" msgstr "" ":ref: `Timer ` (được đặt tên là ``StartTimer``) - để trì hoãn " "trước khi bắt đầu" #: ../../docs/getting_started/first_2d_game/05.the_main_game_scene.rst:23 msgid "" ":ref:`Position2D ` (named ``StartPosition``) - to indicate " "the player's start position" msgstr "" ":ref: `Position2D ` (được đặt tên là ``StartPocation``) - " "để chỉ vị trí bắt đầu của người chơi" #: ../../docs/getting_started/first_2d_game/05.the_main_game_scene.rst:26 msgid "" "Set the ``Wait Time`` property of each of the ``Timer`` nodes as follows:" msgstr "Đặt thuộc tính ``Wait Time`` của mỗi nút ``Timer`` như sau:" #: ../../docs/getting_started/first_2d_game/05.the_main_game_scene.rst:28 msgid "``MobTimer``: ``0.5``" msgstr "``MobTimer``: ``0,5``" #: ../../docs/getting_started/first_2d_game/05.the_main_game_scene.rst:29 msgid "``ScoreTimer``: ``1``" msgstr "``ScoreTimer``: ``1``" #: ../../docs/getting_started/first_2d_game/05.the_main_game_scene.rst:30 msgid "``StartTimer``: ``2``" msgstr "``StartTimer``: ``2``" #: ../../docs/getting_started/first_2d_game/05.the_main_game_scene.rst:32 msgid "" "In addition, set the ``One Shot`` property of ``StartTimer`` to \"On\" and " "set ``Position`` of the ``StartPosition`` node to ``(240, 450)``." msgstr "" "Ngoài ra, đặt thuộc tính ``One Shot`` của ` `StartTimer`` thành \"On\" và " "đặt ` `Position`` của node ` `StartPocation`` thành` `(240, 450)` `." #: ../../docs/getting_started/first_2d_game/05.the_main_game_scene.rst:36 #, fuzzy msgid "Spawning mobs" msgstr "Mob sinh sản" #: ../../docs/getting_started/first_2d_game/05.the_main_game_scene.rst:38 msgid "" "The Main node will be spawning new mobs, and we want them to appear at a " "random location on the edge of the screen. Add a :ref:`Path2D " "` node named ``MobPath`` as a child of ``Main``. When you " "select ``Path2D``, you will see some new buttons at the top of the editor:" msgstr "" "Node Main sẽ sinh ra mob mới và chúng ta muốn chúng xuất hiện ở một vị trí " "ngẫu nhiên trên cạnh màn hình. Thêm một node: ref: `Path2D ` " "có tên `` MobPath`` như con của `` Main``. Khi bạn chọn ``Path2D``, bạn sẽ " "thấy một số nút mới ở đầu trình soạn thảo:" #: ../../docs/getting_started/first_2d_game/05.the_main_game_scene.rst:45 #, fuzzy msgid "" "Select the middle one (\"Add Point\") and draw the path by clicking to add " "the points at the corners shown. To have the points snap to the grid, make " "sure \"Use Grid Snap\" and \"Use Snap\" are both selected. These options can " "be found to the left of the \"Lock\" button, appearing as a magnet next to " "some dots and intersecting lines, respectively." msgstr "" "Chọn điểm giữa (\"Add Point\") và vẽ đường dẫn bằng cách nhấp để thêm các " "điểm ở các góc được hiển thị. Để có các điểm được gắn vào grid (lưới), hãy " "đảm bảo đã chọn \"Snap to Grid\". Tùy chọn này có thể được tìm thấy dưới nút " "\"Snapping options\" ở bên trái nút \"Lock\", xuất hiện dưới dạng một loạt " "ba dấu chấm dọc." #: ../../docs/getting_started/first_2d_game/05.the_main_game_scene.rst:53 msgid "" "Draw the path in *clockwise* order, or your mobs will spawn pointing " "*outwards* instead of *inwards*!" msgstr "" "Vẽ đường dẫn theo thứ tự *clockwise* (*theo chiều kim đồng hồ*) hoặc mob của " "bạn sẽ sinh ra chỉ *ra ngoài* thay vì *vào trong*!" #: ../../docs/getting_started/first_2d_game/05.the_main_game_scene.rst:58 msgid "" "After placing point ``4`` in the image, click the \"Close Curve\" button and " "your curve will be complete." msgstr "" "Sau khi đặt điểm ``4`` trong ảnh, nhấp vào nút \"Close Curve\" và đường cong " "của bạn sẽ hoàn tất." #: ../../docs/getting_started/first_2d_game/05.the_main_game_scene.rst:61 msgid "" "Now that the path is defined, add a :ref:`PathFollow2D ` " "node as a child of ``MobPath`` and name it ``MobSpawnLocation``. This node " "will automatically rotate and follow the path as it moves, so we can use it " "to select a random position and direction along the path." msgstr "" "Bây giờ, đường dẫn đã được xác định, hãy thêm một node: ref: `PathFollow2D " "` làm con của ``MobPath`` và đặt tên cho nó là " "``MobSpawnLocation``. Node này sẽ tự động xoay và đi theo đường dẫn khi nó " "di chuyển, vì vậy chúng ta có thể sử dụng nó để chọn một vị trí và hướng " "ngẫu nhiên dọc theo đường dẫn." #: ../../docs/getting_started/first_2d_game/05.the_main_game_scene.rst:66 #, fuzzy msgid "Your scene should look like this:" msgstr "Scene tree của bạn sẽ trông như thế này:" #: ../../docs/getting_started/first_2d_game/05.the_main_game_scene.rst:71 msgid "Main script" msgstr "Kịch bản cho Main scene" #: ../../docs/getting_started/first_2d_game/05.the_main_game_scene.rst:73 msgid "" "Add a script to ``Main``. At the top of the script, we use ``export " "(PackedScene)`` to allow us to choose the Mob scene we want to instance." msgstr "" "Thêm một tập lệnh vào ``Main``. Ở đầu tập lệnh, chúng tôi sử dụng ``export " "(PackedScene)`` để cho phép chúng ta chọn cảnh Mob mà chúng ta muốn." #: ../../docs/getting_started/first_2d_game/05.the_main_game_scene.rst:152 msgid "" "We also add a call to ``randomize()`` here so that the random number " "generator generates different random numbers each time the game is run:" msgstr "" #: ../../docs/getting_started/first_2d_game/05.the_main_game_scene.rst:192 msgid "" "Click the ``Main`` node and you will see the ``Mob Scene`` property in the " "Inspector under \"Script Variables\"." msgstr "" #: ../../docs/getting_started/first_2d_game/05.the_main_game_scene.rst:195 msgid "You can assign this property's value in two ways:" msgstr "" #: ../../docs/getting_started/first_2d_game/05.the_main_game_scene.rst:197 #, fuzzy msgid "" "Drag ``Mob.tscn`` from the \"FileSystem\" panel and drop it in the ``Mob`` " "property ." msgstr "" "Kéo ``Mob.tscn`` từ bảng \"FileSystem\" và thả nó vào thuộc tính ``Mob`` " "trong Biến Script của nút `` Main``." #: ../../docs/getting_started/first_2d_game/05.the_main_game_scene.rst:199 msgid "" "Click the down arrow next to \"[empty]\" and choose \"Load\". Select ``Mob." "tscn``." msgstr "" #: ../../docs/getting_started/first_2d_game/05.the_main_game_scene.rst:201 #, fuzzy msgid "" "Next, select the ``Player`` node in the Scene dock, and access the Node dock " "on the sidebar. Make sure to have the Signals tab selected in the Node dock." msgstr "" "Chọn Button node trong scene tree và sau đó chọn tab \"Node\". Tiếp theo, " "hãy chắc chắn rằng bạn đã chọn \"Signals\"." #: ../../docs/getting_started/first_2d_game/05.the_main_game_scene.rst:204 #, fuzzy msgid "" "You should see a list of the signals for the ``Player`` node. Find and " "double-click the ``hit`` signal in the list (or right-click it and select " "\"Connect...\"). This will open the signal connection dialog. We want to " "make a new function named ``game_over``, which will handle what needs to " "happen when a game ends. Type \"game_over\" in the \"Receiver Method\" box " "at the bottom of the signal connection dialog and click \"Connect\". Add the " "following code to the new function, as well as a ``new_game`` function that " "will set everything up for a new game:" msgstr "" "Tiếp theo, nhấp vào player và kết nối tín hiệu ``hit``. Chúng ta muốn tạo " "một hàm mới có tên ``game_over``, sẽ xử lý những gì cần xảy ra khi trò chơi " "kết thúc. Nhập \"game_over\" vào hộp \"Method In Node\" ở cuối cửa sổ " "\"Connecting Signal\". Thêm mã sau đây, cũng như hàm ``new_game`` để thiết " "lập mọi thứ cho trò chơi mới:" #: ../../docs/getting_started/first_2d_game/05.the_main_game_scene.rst:258 #, fuzzy msgid "" "Now connect the ``timeout()`` signal of each of the Timer nodes " "(``StartTimer``, ``ScoreTimer`` , and ``MobTimer``) to the main script. " "``StartTimer`` will start the other two timers. ``ScoreTimer`` will " "increment the score by 1." msgstr "" "Bây giờ kết nối tín hiệu ``timeout()`` của từng node Timer (``StartTimer``, " "``ScoreTimer`` và ``MobTimer``) với tập lệnh main. ``StartTimer`` sẽ bắt đầu " "hai bộ định thời khác. ``ScoreTimer`` sẽ tăng số điểm lên 1." #: ../../docs/getting_started/first_2d_game/05.the_main_game_scene.rst:308 msgid "" "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. When " "we spawn a mob, we'll pick a random value between ``150.0`` and ``250.0`` " "for how fast each mob will move (it would be boring if they were all moving " "at the same speed)." msgstr "" #: ../../docs/getting_started/first_2d_game/05.the_main_game_scene.rst:316 msgid "" "Note that a new instance must be added to the scene using ``add_child()``." msgstr "" #: ../../docs/getting_started/first_2d_game/05.the_main_game_scene.rst:401 msgid "" "Why ``PI``? In functions requiring angles, Godot uses *radians*, not " "degrees. Pi represents a half turn in radians, about ``3.1415`` (there is " "also ``TAU`` which is equal to ``2 * PI``). If you're more comfortable " "working with degrees, you'll need to use the ``deg2rad()`` and ``rad2deg()`` " "functions to convert between the two." msgstr "" #: ../../docs/getting_started/first_2d_game/05.the_main_game_scene.rst:409 #, fuzzy msgid "Testing the scene" msgstr "Script một scene" #: ../../docs/getting_started/first_2d_game/05.the_main_game_scene.rst:411 msgid "" "Let's test the scene to make sure everything is working. Add this " "``new_game`` call to ``_ready()``:" msgstr "" #: ../../docs/getting_started/first_2d_game/05.the_main_game_scene.rst:435 msgid "" "Let's also assign ``Main`` as our \"Main Scene\" - the one that runs " "automatically when the game launches. Press the \"Play\" button and select " "``Main.tscn`` when prompted." msgstr "" #: ../../docs/getting_started/first_2d_game/05.the_main_game_scene.rst:439 msgid "" "You should be able to move the player around, see mobs spawning, and see the " "player disappear when hit by a mob." msgstr "" #: ../../docs/getting_started/first_2d_game/05.the_main_game_scene.rst:442 msgid "" "When you're sure everything is working, remove the call to ``new_game()`` " "from ``_ready()``." msgstr "" #: ../../docs/getting_started/first_2d_game/05.the_main_game_scene.rst:445 msgid "" "What's our game lacking? Some user interface. In the next lesson, we'll add " "a title screen and display the player's score." msgstr "" #: ../../docs/getting_started/first_2d_game/06.heads_up_display.rst:4 msgid "Heads up display" msgstr "" #: ../../docs/getting_started/first_2d_game/06.heads_up_display.rst:6 msgid "" "The final piece our game needs is a User Interface (UI) to display things " "like score, a \"game over\" message, and a restart button." msgstr "" #: ../../docs/getting_started/first_2d_game/06.heads_up_display.rst:9 msgid "" "Create a new scene, and add a :ref:`CanvasLayer ` node " "named ``HUD``. \"HUD\" stands for \"heads-up display\", an informational " "display that appears as an overlay on top of the game view." msgstr "" #: ../../docs/getting_started/first_2d_game/06.heads_up_display.rst:13 msgid "" "The :ref:`CanvasLayer ` node lets us draw our UI elements " "on a layer above the rest of the game, so that the information it displays " "isn't covered up by any game elements like the player or mobs." msgstr "" #: ../../docs/getting_started/first_2d_game/06.heads_up_display.rst:17 msgid "The HUD needs to display the following information:" msgstr "" #: ../../docs/getting_started/first_2d_game/06.heads_up_display.rst:19 msgid "Score, changed by ``ScoreTimer``." msgstr "" #: ../../docs/getting_started/first_2d_game/06.heads_up_display.rst:20 msgid "A message, such as \"Game Over\" or \"Get Ready!\"" msgstr "" #: ../../docs/getting_started/first_2d_game/06.heads_up_display.rst:21 msgid "A \"Start\" button to begin the game." msgstr "" #: ../../docs/getting_started/first_2d_game/06.heads_up_display.rst:23 msgid "" "The basic node for UI elements is :ref:`Control `. To create " "our UI, we'll use two types of :ref:`Control ` nodes: :ref:" "`Label ` and :ref:`Button `." msgstr "" #: ../../docs/getting_started/first_2d_game/06.heads_up_display.rst:27 msgid "Create the following as children of the ``HUD`` node:" msgstr "" #: ../../docs/getting_started/first_2d_game/06.heads_up_display.rst:29 msgid ":ref:`Label ` named ``ScoreLabel``." msgstr "" #: ../../docs/getting_started/first_2d_game/06.heads_up_display.rst:30 msgid ":ref:`Label ` named ``Message``." msgstr "" #: ../../docs/getting_started/first_2d_game/06.heads_up_display.rst:31 msgid ":ref:`Button ` named ``StartButton``." msgstr "" #: ../../docs/getting_started/first_2d_game/06.heads_up_display.rst:32 msgid ":ref:`Timer ` named ``MessageTimer``." msgstr "" #: ../../docs/getting_started/first_2d_game/06.heads_up_display.rst:34 msgid "" "Click on the ``ScoreLabel`` and type a number into the ``Text`` field in the " "Inspector. The default font for ``Control`` nodes is small and doesn't scale " "well. There is a font file included in the game assets called \"Xolonium-" "Regular.ttf\". To use this font, do the following:" msgstr "" #: ../../docs/getting_started/first_2d_game/06.heads_up_display.rst:39 msgid "" "Under **Theme overrides > Fonts** click on the empty box and select \"New " "DynamicFont\"" msgstr "" #: ../../docs/getting_started/first_2d_game/06.heads_up_display.rst:43 msgid "" "Click on the \"DynamicFont\" you added, and under **Font > FontData**, " "choose \"Load\" and select the \"Xolonium-Regular.ttf\" file." msgstr "" #: ../../docs/getting_started/first_2d_game/06.heads_up_display.rst:48 msgid "Set the \"Size\" property under ``Settings``, ``64`` works well." msgstr "" #: ../../docs/getting_started/first_2d_game/06.heads_up_display.rst:52 msgid "" "Once you've done this on the ``ScoreLabel``, you can click the down arrow " "next to the Font property and choose \"Copy\", then \"Paste\" it in the same " "place on the other two Control nodes." msgstr "" #: ../../docs/getting_started/first_2d_game/06.heads_up_display.rst:56 msgid "" "**Anchors and Margins:** ``Control`` nodes have a position and size, but " "they also have anchors and margins. Anchors define the origin - the " "reference point for the edges of the node. Margins update automatically when " "you move or resize a control node. They represent the distance from the " "control node's edges to its anchor." msgstr "" #: ../../docs/getting_started/first_2d_game/06.heads_up_display.rst:62 msgid "" "Arrange the nodes as shown below. Click the \"Layout\" button to set a " "Control node's layout:" msgstr "" #: ../../docs/getting_started/first_2d_game/06.heads_up_display.rst:67 msgid "" "You can drag the nodes to place them manually, or for more precise " "placement, use the following settings:" msgstr "" #: ../../docs/getting_started/first_2d_game/06.heads_up_display.rst:71 msgid "ScoreLabel" msgstr "" #: ../../docs/getting_started/first_2d_game/06.heads_up_display.rst:73 msgid "*Layout* : \"Top Wide\"" msgstr "" #: ../../docs/getting_started/first_2d_game/06.heads_up_display.rst:74 msgid "*Text* : ``0``" msgstr "" #: ../../docs/getting_started/first_2d_game/06.heads_up_display.rst:75 #: ../../docs/getting_started/first_2d_game/06.heads_up_display.rst:82 msgid "*Align* : \"Center\"" msgstr "" #: ../../docs/getting_started/first_2d_game/06.heads_up_display.rst:78 msgid "Message" msgstr "Thông điệp" #: ../../docs/getting_started/first_2d_game/06.heads_up_display.rst:80 msgid "*Layout* : \"HCenter Wide\"" msgstr "" #: ../../docs/getting_started/first_2d_game/06.heads_up_display.rst:81 msgid "*Text* : ``Dodge the Creeps!``" msgstr "" #: ../../docs/getting_started/first_2d_game/06.heads_up_display.rst:83 msgid "*Autowrap* : \"On\"" msgstr "" #: ../../docs/getting_started/first_2d_game/06.heads_up_display.rst:86 msgid "StartButton" msgstr "" #: ../../docs/getting_started/first_2d_game/06.heads_up_display.rst:88 msgid "*Text* : ``Start``" msgstr "" #: ../../docs/getting_started/first_2d_game/06.heads_up_display.rst:89 msgid "*Layout* : \"Center Bottom\"" msgstr "" #: ../../docs/getting_started/first_2d_game/06.heads_up_display.rst:90 msgid "*Margin* :" msgstr "" #: ../../docs/getting_started/first_2d_game/06.heads_up_display.rst:92 msgid "Top: ``-200``" msgstr "" #: ../../docs/getting_started/first_2d_game/06.heads_up_display.rst:93 msgid "Bottom: ``-100``" msgstr "" #: ../../docs/getting_started/first_2d_game/06.heads_up_display.rst:95 msgid "" "On the ``MessageTimer``, set the ``Wait Time`` to ``2`` and set the ``One " "Shot`` property to \"On\"." msgstr "" #: ../../docs/getting_started/first_2d_game/06.heads_up_display.rst:98 msgid "Now add this script to ``HUD``:" msgstr "" #: ../../docs/getting_started/first_2d_game/06.heads_up_display.rst:158 msgid "" "The ``start_game`` signal tells the ``Main`` node that the button has been " "pressed." msgstr "" #: ../../docs/getting_started/first_2d_game/06.heads_up_display.rst:205 msgid "" "This function is called when we want to display a message temporarily, such " "as \"Get Ready\"." msgstr "" #: ../../docs/getting_started/first_2d_game/06.heads_up_display.rst:256 msgid "" "This function is called when the player loses. It will show \"Game Over\" " "for 2 seconds, then return to the title screen and, after a brief pause, " "show the \"Start\" button." msgstr "" #: ../../docs/getting_started/first_2d_game/06.heads_up_display.rst:260 msgid "" "When you need to pause for a brief time, an alternative to using a Timer " "node is to use the SceneTree's ``create_timer()`` function. This can be very " "useful to add delays such as in the above code, where we want to wait some " "time before showing the \"Start\" button." msgstr "" #: ../../docs/getting_started/first_2d_game/06.heads_up_display.rst:285 msgid "This function is called by ``Main`` whenever the score changes." msgstr "" #: ../../docs/getting_started/first_2d_game/06.heads_up_display.rst:287 msgid "" "Connect the ``timeout()`` signal of ``MessageTimer`` and the ``pressed()`` " "signal of ``StartButton`` and add the following code to the new functions:" msgstr "" #: ../../docs/getting_started/first_2d_game/06.heads_up_display.rst:333 msgid "Connecting HUD to Main" msgstr "" #: ../../docs/getting_started/first_2d_game/06.heads_up_display.rst:335 msgid "" "Now that we're done creating the ``HUD`` scene, go back to ``Main``. " "Instance the ``HUD`` scene in ``Main`` like you did the ``Player`` scene. " "The scene tree should look like this, so make sure you didn't miss anything:" msgstr "" #: ../../docs/getting_started/first_2d_game/06.heads_up_display.rst:341 msgid "" "Now we need to connect the ``HUD`` functionality to our ``Main`` script. " "This requires a few additions to the ``Main`` scene:" msgstr "" #: ../../docs/getting_started/first_2d_game/06.heads_up_display.rst:344 msgid "" "In the Node tab, connect the HUD's ``start_game`` signal to the " "``new_game()`` function of the Main node by typing \"new_game\" in the " "\"Receiver Method\" in the \"Connect a Signal\" window. Verify that the " "green connection icon now appears next to ``func new_game()`` in the script." msgstr "" #: ../../docs/getting_started/first_2d_game/06.heads_up_display.rst:349 msgid "" "In ``new_game()``, update the score display and show the \"Get Ready\" " "message:" msgstr "" #: ../../docs/getting_started/first_2d_game/06.heads_up_display.rst:368 msgid "In ``game_over()`` we need to call the corresponding ``HUD`` function:" msgstr "" #: ../../docs/getting_started/first_2d_game/06.heads_up_display.rst:383 msgid "" "Finally, add this to ``_on_ScoreTimer_timeout()`` to keep the display in " "sync with the changing score:" msgstr "" #: ../../docs/getting_started/first_2d_game/06.heads_up_display.rst:399 msgid "" "Now you're ready to play! Click the \"Play the Project\" button. You will be " "asked to select a main scene, so choose ``Main.tscn``." msgstr "" #: ../../docs/getting_started/first_2d_game/06.heads_up_display.rst:403 msgid "Removing old creeps" msgstr "" #: ../../docs/getting_started/first_2d_game/06.heads_up_display.rst:405 msgid "" "If you play until \"Game Over\" and then start a new game right away, the " "creeps from the previous game may still be on the screen. It would be better " "if they all disappeared at the start of a new game. We just need a way to " "tell *all* the mobs to remove themselves. We can do this with the \"group\" " "feature." msgstr "" #: ../../docs/getting_started/first_2d_game/06.heads_up_display.rst:410 msgid "" "In the ``Mob`` scene, select the root node and click the \"Node\" tab next " "to the Inspector (the same place where you find the node's signals). Next to " "\"Signals\", click \"Groups\" and you can type a new group name and click " "\"Add\"." msgstr "" #: ../../docs/getting_started/first_2d_game/06.heads_up_display.rst:416 msgid "" "Now all mobs will be in the \"mobs\" group. We can then add the following " "line to the ``new_game()`` function in ``Main``:" msgstr "" #: ../../docs/getting_started/first_2d_game/06.heads_up_display.rst:434 msgid "" "The ``call_group()`` function calls the named function on every node in a " "group - in this case we are telling every mob to delete itself." msgstr "" #: ../../docs/getting_started/first_2d_game/06.heads_up_display.rst:437 msgid "" "The game's mostly done at this point. In the next and last part, we'll " "polish it a bit by adding a background, looping music, and some keyboard " "shortcuts." msgstr "" #: ../../docs/getting_started/first_2d_game/07.finishing-up.rst:4 msgid "Finishing up" msgstr "" #: ../../docs/getting_started/first_2d_game/07.finishing-up.rst:6 msgid "" "We have now completed all the functionality for our game. Below are some " "remaining steps to add a bit more \"juice\" to improve the game experience." msgstr "" #: ../../docs/getting_started/first_2d_game/07.finishing-up.rst:9 msgid "Feel free to expand the gameplay with your own ideas." msgstr "" #: ../../docs/getting_started/first_2d_game/07.finishing-up.rst:12 #: ../../docs/tutorials/3d/environment_and_post_processing.rst:59 msgid "Background" msgstr "" #: ../../docs/getting_started/first_2d_game/07.finishing-up.rst:14 msgid "" "The default gray background is not very appealing, so let's change its " "color. One way to do this is to use a :ref:`ColorRect ` " "node. Make it the first node under ``Main`` so that it will be drawn behind " "the other nodes. ``ColorRect`` only has one property: ``Color``. Choose a " "color you like and select \"Layout\" -> \"Full Rect\" so that it covers the " "screen." msgstr "" #: ../../docs/getting_started/first_2d_game/07.finishing-up.rst:20 msgid "" "You could also add a background image, if you have one, by using a " "``TextureRect`` node instead." msgstr "" #: ../../docs/getting_started/first_2d_game/07.finishing-up.rst:24 msgid "Sound effects" msgstr "" #: ../../docs/getting_started/first_2d_game/07.finishing-up.rst:26 msgid "" "Sound and music can be the single most effective way to add appeal to the " "game experience. In your game assets folder, you have two sound files: " "\"House In a Forest Loop.ogg\" for background music, and \"gameover.wav\" " "for when the player loses." msgstr "" #: ../../docs/getting_started/first_2d_game/07.finishing-up.rst:31 msgid "" "Add two :ref:`AudioStreamPlayer ` nodes as children " "of ``Main``. Name one of them ``Music`` and the other ``DeathSound``. On " "each one, click on the ``Stream`` property, select \"Load\", and choose the " "corresponding audio file." msgstr "" #: ../../docs/getting_started/first_2d_game/07.finishing-up.rst:36 msgid "" "To play the music, add ``$Music.play()`` in the ``new_game()`` function and " "``$Music.stop()`` in the ``game_over()`` function." msgstr "" #: ../../docs/getting_started/first_2d_game/07.finishing-up.rst:39 msgid "Finally, add ``$DeathSound.play()`` in the ``game_over()`` function." msgstr "" #: ../../docs/getting_started/first_2d_game/07.finishing-up.rst:42 msgid "Keyboard shortcut" msgstr "" #: ../../docs/getting_started/first_2d_game/07.finishing-up.rst:44 msgid "" "Since the game is played with keyboard controls, it would be convenient if " "we could also start the game by pressing a key on the keyboard. We can do " "this with the \"Shortcut\" property of the ``Button`` node." msgstr "" #: ../../docs/getting_started/first_2d_game/07.finishing-up.rst:48 msgid "" "In a previous lesson, we created four input actions to move the character. " "We will create a similar input action to map to the start button." msgstr "" #: ../../docs/getting_started/first_2d_game/07.finishing-up.rst:51 msgid "" "Select \"Project\" -> \"Project Settings\" and then click on the \"Input " "Map\" tab. In the same way you created the movement input actions, create a " "new input action called ``start_game`` and add a key mapping for the :kbd:" "`Enter` key." msgstr "" #: ../../docs/getting_started/first_2d_game/07.finishing-up.rst:56 msgid "" "In the ``HUD`` scene, select the ``StartButton`` and find its *Shortcut* " "property in the Inspector. Select \"New Shortcut\" and click on the " "\"Shortcut\" item. A second *Shortcut* property will appear. Select \"New " "InputEventAction\" and click the new \"InputEventAction\". Finally, in the " "*Action* property, type the name ``start_game``." msgstr "" #: ../../docs/getting_started/first_2d_game/07.finishing-up.rst:64 msgid "" "Now when the start button appears, you can either click it or press :kbd:" "`Enter` to start the game." msgstr "" #: ../../docs/getting_started/first_2d_game/07.finishing-up.rst:67 msgid "And with that, you completed your first 2D game in Godot." msgstr "" #: ../../docs/getting_started/first_2d_game/07.finishing-up.rst:71 msgid "" "You got to make a player-controlled character, enemies that spawn randomly " "around the game board, count the score, implement a game over and replay, " "user interface, sounds, and more. Congratulations!" msgstr "" #: ../../docs/getting_started/first_2d_game/07.finishing-up.rst:75 msgid "" "There's still much to learn, but you can take a moment to appreciate what " "you achieved." msgstr "" #: ../../docs/getting_started/first_2d_game/07.finishing-up.rst:78 msgid "" "And when you're ready, you can move on to :ref:`doc_your_first_3d_game` to " "learn to create a complete 3D game from scratch, in Godot." msgstr "" #: ../../docs/getting_started/first_3d_game/index.rst:4 #, fuzzy msgid "Your first 3D game" msgstr "Trò chơi đầu tiên của bạn" #: ../../docs/getting_started/first_3d_game/index.rst:6 msgid "" "In this step-by-step tutorial series, you will create your first complete 3D " "game with Godot. By the end of the series, you will have a simple yet " "finished project of your own like the animated gif below." msgstr "" #: ../../docs/getting_started/first_3d_game/index.rst:12 msgid "" "The game we'll code here is similar to :ref:`doc_your_first_2d_game`, with a " "twist: you can now jump and your goal is to squash the creeps. This way, you " "will both **recognize patterns** you learned in the previous tutorial and " "**build upon them** with new code and features." msgstr "" #: ../../docs/getting_started/first_3d_game/index.rst:19 msgid "Work with 3D coordinates with a jumping mechanic." msgstr "" #: ../../docs/getting_started/first_3d_game/index.rst:20 msgid "" "Use kinematic bodies to move 3D characters and detect when and how they " "collide." msgstr "" #: ../../docs/getting_started/first_3d_game/index.rst:22 msgid "" "Use physics layers and a group to detect interactions with specific entities." msgstr "" #: ../../docs/getting_started/first_3d_game/index.rst:23 msgid "" "Code basic procedural gameplay by instancing monsters at regular time " "intervals." msgstr "" #: ../../docs/getting_started/first_3d_game/index.rst:25 msgid "Design a movement animation and change its speed at run-time." msgstr "" #: ../../docs/getting_started/first_3d_game/index.rst:26 msgid "Draw a user interface on a 3D game." msgstr "" #: ../../docs/getting_started/first_3d_game/index.rst:30 msgid "" "This tutorial is for beginners who followed the complete getting started " "series. We'll start slow with detailed instructions and shorten them as we " "do similar steps. If you're an experienced programmer, you can browse the " "complete demo's source code here: `Squash the Creep source code `__." msgstr "" #: ../../docs/getting_started/first_3d_game/index.rst:38 msgid "" "You can follow this series without having done the 2D one. However, if " "you're new to game development, we recommend you to start with 2D. 3D game " "code is always more complex and the 2D series will give you foundations to " "follow along more comfortably." msgstr "" #: ../../docs/getting_started/first_3d_game/index.rst:43 msgid "" "We prepared some game assets so we can jump straight to the code. You can " "download them here: `Squash the Creeps assets `__." msgstr "" #: ../../docs/getting_started/first_3d_game/index.rst:47 msgid "" "We will first work on a basic prototype for the player's movement. We will " "then add the monsters that we'll spawn randomly around the screen. After " "that, we'll implement the jump and squashing mechanic before refining the " "game with some nice animation. We'll wrap up with the score and the retry " "screen." msgstr "" #: ../../docs/getting_started/first_3d_game/01.game_setup.rst:4 #, fuzzy msgid "Setting up the game area" msgstr "Tổ chức dự án" #: ../../docs/getting_started/first_3d_game/01.game_setup.rst:6 msgid "" "In this first part, we're going to set up the game area. Let's get started " "by importing the start assets and setting up the game scene." msgstr "" #: ../../docs/getting_started/first_3d_game/01.game_setup.rst:9 msgid "" "We've prepared a Godot project with the 3D models and sounds we'll use for " "this tutorial, linked in the index page. If you haven't done so yet, you can " "download the archive here: `Squash the Creeps assets `__." msgstr "" #: ../../docs/getting_started/first_3d_game/01.game_setup.rst:14 msgid "" "Once you downloaded it, extract the .zip archive on your computer. Open the " "Godot project manager and click the *Import* button." msgstr "" #: ../../docs/getting_started/first_3d_game/01.game_setup.rst:19 msgid "" "In the import popup, enter the full path to the freshly created directory " "``squash_the_creeps_start/``. You can click the *Browse* button on the right " "to open a file browser and navigate to the ``project.godot`` file the folder " "contains." msgstr "" #: ../../docs/getting_started/first_3d_game/01.game_setup.rst:26 msgid "Click *Import & Edit* to open the project in the editor." msgstr "" #: ../../docs/getting_started/first_3d_game/01.game_setup.rst:30 msgid "" "The start project contains an icon and two folders: ``art/`` and ``fonts/``. " "There, you will find the art assets and music we'll use in the game." msgstr "" #: ../../docs/getting_started/first_3d_game/01.game_setup.rst:35 msgid "" "There are two 3D models, ``player.glb`` and ``mob.glb``, some materials that " "belong to these models, and a music track." msgstr "" #: ../../docs/getting_started/first_3d_game/01.game_setup.rst:39 #, fuzzy msgid "Setting up the playable area" msgstr "Di chuyển player" #: ../../docs/getting_started/first_3d_game/01.game_setup.rst:41 msgid "" "We're going to create our main scene with a plain *Node* as its root. In the " "*Scene* dock, click the *Add Node* button represented by a \"+\" icon in the " "top-left and double-click on *Node*. Name the node \"Main\". Alternatively, " "to add a node to the scene, you can press :kbd:`Ctrl + a` (or :kbd:`Cmd + a` " "on macOS)." msgstr "" #: ../../docs/getting_started/first_3d_game/01.game_setup.rst:48 #, fuzzy msgid "" "Save the scene as ``Main.tscn`` by pressing :kbd:`Ctrl + s` (:kbd:`Cmd + s` " "on macOS)." msgstr "" "Lưu lại cảnh. Nhấp vào Scene -> Save hoặc nhấn `` Ctrl + S`` trên Windows / " "Linux hoặc `` Command + S`` trên Mac." #: ../../docs/getting_started/first_3d_game/01.game_setup.rst:50 msgid "" "We'll start by adding a floor that'll prevent the characters from falling. " "To create static colliders like the floor, walls, or ceilings, you can use " "*StaticBody* nodes. They require *CollisionShape* child nodes to define the " "collision area. With the *Main* node selected, add a *StaticBody* node, then " "a *CollisionShape*. Rename the *StaticBody* as *Ground*." msgstr "" #: ../../docs/getting_started/first_3d_game/01.game_setup.rst:56 #: ../../docs/getting_started/first_3d_game/02.player_input.rst:86 #: ../../docs/getting_started/first_3d_game/03.player_movement_code.rst:371 #: ../../docs/getting_started/first_3d_game/04.mob_scene.rst:82 #: ../../docs/getting_started/first_3d_game/05.spawning_mobs.rst:60 #: ../../docs/getting_started/first_3d_game/06.jump_and_squash.rst:91 #: ../../docs/getting_started/first_3d_game/08.score_and_replay.rst:56 #: ../../docs/getting_started/first_3d_game/09.adding_animations.rst:55 #: ../../docs/community/asset_library/using_assetlib.rst:99 msgid "|image6|" msgstr "" #: ../../docs/getting_started/first_3d_game/01.game_setup.rst:153 #: ../../docs/getting_started/first_3d_game/02.player_input.rst:165 #: ../../docs/getting_started/first_3d_game/03.player_movement_code.rst:409 #: ../../docs/getting_started/first_3d_game/04.mob_scene.rst:328 #: ../../docs/getting_started/first_3d_game/05.spawning_mobs.rst:341 #: ../../docs/getting_started/first_3d_game/06.jump_and_squash.rst:351 #: ../../docs/getting_started/first_3d_game/08.score_and_replay.rst:458 #: ../../docs/getting_started/first_3d_game/09.adding_animations.rst:542 #: ../../docs/community/asset_library/using_assetlib.rst:191 #, fuzzy msgid "image6" msgstr "|hình1|" #: ../../docs/getting_started/first_3d_game/01.game_setup.rst:58 msgid "" "A warning sign next to the *CollisionShape* appears because we haven't " "defined its shape. If you click the icon, a popup appears to give you more " "information." msgstr "" #: ../../docs/getting_started/first_3d_game/01.game_setup.rst:61 #: ../../docs/getting_started/first_3d_game/02.player_input.rst:92 #: ../../docs/getting_started/first_3d_game/03.player_movement_code.rst:376 #: ../../docs/getting_started/first_3d_game/04.mob_scene.rst:94 #: ../../docs/getting_started/first_3d_game/05.spawning_mobs.rst:65 #: ../../docs/getting_started/first_3d_game/06.jump_and_squash.rst:191 #: ../../docs/getting_started/first_3d_game/08.score_and_replay.rst:68 #: ../../docs/getting_started/first_3d_game/09.adding_animations.rst:59 #: ../../docs/community/asset_library/using_assetlib.rst:123 msgid "|image7|" msgstr "| hình7 |" #: ../../docs/getting_started/first_3d_game/01.game_setup.rst:154 #: ../../docs/getting_started/first_3d_game/02.player_input.rst:166 #: ../../docs/getting_started/first_3d_game/03.player_movement_code.rst:410 #: ../../docs/getting_started/first_3d_game/04.mob_scene.rst:329 #: ../../docs/getting_started/first_3d_game/05.spawning_mobs.rst:342 #: ../../docs/getting_started/first_3d_game/06.jump_and_squash.rst:352 #: ../../docs/getting_started/first_3d_game/08.score_and_replay.rst:459 #: ../../docs/getting_started/first_3d_game/09.adding_animations.rst:543 #: ../../docs/community/asset_library/using_assetlib.rst:192 #, fuzzy msgid "image7" msgstr "| hình7 |" #: ../../docs/getting_started/first_3d_game/01.game_setup.rst:63 msgid "" "To create a shape, with the *CollisionShape* selected, head to the " "*Inspector* and click the *[empty]* field next to the *Shape* property. " "Create a new *Box Shape*." msgstr "" #: ../../docs/getting_started/first_3d_game/01.game_setup.rst:67 #: ../../docs/getting_started/first_3d_game/02.player_input.rst:102 #: ../../docs/getting_started/first_3d_game/03.player_movement_code.rst:382 #: ../../docs/getting_started/first_3d_game/04.mob_scene.rst:220 #: ../../docs/getting_started/first_3d_game/05.spawning_mobs.rst:71 #: ../../docs/getting_started/first_3d_game/06.jump_and_squash.rst:196 #: ../../docs/getting_started/first_3d_game/08.score_and_replay.rst:73 #: ../../docs/getting_started/first_3d_game/09.adding_animations.rst:64 #: ../../docs/community/asset_library/using_assetlib.rst:131 msgid "|image8|" msgstr "| hình ảnh 8 |" #: ../../docs/getting_started/first_3d_game/01.game_setup.rst:155 #: ../../docs/getting_started/first_3d_game/02.player_input.rst:167 #: ../../docs/getting_started/first_3d_game/03.player_movement_code.rst:411 #: ../../docs/getting_started/first_3d_game/04.mob_scene.rst:330 #: ../../docs/getting_started/first_3d_game/05.spawning_mobs.rst:343 #: ../../docs/getting_started/first_3d_game/06.jump_and_squash.rst:353 #: ../../docs/getting_started/first_3d_game/08.score_and_replay.rst:460 #: ../../docs/getting_started/first_3d_game/09.adding_animations.rst:544 #: ../../docs/community/asset_library/using_assetlib.rst:193 #, fuzzy msgid "image8" msgstr "| hình ảnh 8 |" #: ../../docs/getting_started/first_3d_game/01.game_setup.rst:69 msgid "" "The box shape is perfect for flat ground and walls. Its thickness makes it " "reliable to block even fast-moving objects." msgstr "" #: ../../docs/getting_started/first_3d_game/01.game_setup.rst:72 msgid "" "A box's wireframe appears in the viewport with three orange dots. You can " "click and drag these to edit the shape's extents interactively. We can also " "precisely set the size in the inspector. Click on the *BoxShape* to expand " "the resource. Set its *Extents* to ``30`` on the X axis, ``1`` for the Y " "axis, and ``30`` for the Z axis." msgstr "" #: ../../docs/getting_started/first_3d_game/01.game_setup.rst:78 #: ../../docs/getting_started/first_3d_game/02.player_input.rst:106 #: ../../docs/getting_started/first_3d_game/03.player_movement_code.rst:387 #: ../../docs/getting_started/first_3d_game/04.mob_scene.rst:225 #: ../../docs/getting_started/first_3d_game/05.spawning_mobs.rst:76 #: ../../docs/getting_started/first_3d_game/08.score_and_replay.rst:85 #: ../../docs/getting_started/first_3d_game/09.adding_animations.rst:69 #: ../../docs/community/asset_library/using_assetlib.rst:152 msgid "|image9|" msgstr "| hình ảnh9 |" #: ../../docs/getting_started/first_3d_game/01.game_setup.rst:156 #: ../../docs/getting_started/first_3d_game/02.player_input.rst:168 #: ../../docs/getting_started/first_3d_game/03.player_movement_code.rst:412 #: ../../docs/getting_started/first_3d_game/04.mob_scene.rst:331 #: ../../docs/getting_started/first_3d_game/05.spawning_mobs.rst:344 #: ../../docs/getting_started/first_3d_game/08.score_and_replay.rst:461 #: ../../docs/getting_started/first_3d_game/09.adding_animations.rst:545 #: ../../docs/community/asset_library/using_assetlib.rst:194 #, fuzzy msgid "image9" msgstr "| hình ảnh9 |" #: ../../docs/getting_started/first_3d_game/01.game_setup.rst:82 msgid "" "In 3D, translation and size units are in meters. The box's total size is " "twice its extents: ``60`` by ``60`` meters on the ground plane and ``2`` " "units tall. The ground plane is defined by the X and Z axes, while the Y " "axis represents the height." msgstr "" #: ../../docs/getting_started/first_3d_game/01.game_setup.rst:87 msgid "" "Collision shapes are invisible. We need to add a visual floor that goes " "along with it. Select the *Ground* node and add a *MeshInstance* as its " "child." msgstr "" #: ../../docs/getting_started/first_3d_game/01.game_setup.rst:90 #: ../../docs/getting_started/first_3d_game/02.player_input.rst:111 #: ../../docs/getting_started/first_3d_game/03.player_movement_code.rst:398 #: ../../docs/getting_started/first_3d_game/04.mob_scene.rst:229 #: ../../docs/getting_started/first_3d_game/05.spawning_mobs.rst:86 #: ../../docs/getting_started/first_3d_game/08.score_and_replay.rst:117 #: ../../docs/getting_started/first_3d_game/09.adding_animations.rst:86 #: ../../docs/community/asset_library/using_assetlib.rst:158 msgid "|image10|" msgstr "| hình10 |" #: ../../docs/getting_started/first_3d_game/01.game_setup.rst:157 #: ../../docs/getting_started/first_3d_game/02.player_input.rst:169 #: ../../docs/getting_started/first_3d_game/03.player_movement_code.rst:413 #: ../../docs/getting_started/first_3d_game/04.mob_scene.rst:332 #: ../../docs/getting_started/first_3d_game/05.spawning_mobs.rst:345 #: ../../docs/getting_started/first_3d_game/08.score_and_replay.rst:462 #: ../../docs/getting_started/first_3d_game/09.adding_animations.rst:546 #: ../../docs/community/asset_library/using_assetlib.rst:195 #, fuzzy msgid "image10" msgstr "| hình10 |" #: ../../docs/getting_started/first_3d_game/01.game_setup.rst:92 msgid "" "In the *Inspector*, click on the field next to *Mesh* and create a " "*CubeMesh* resource to create a visible cube." msgstr "" #: ../../docs/getting_started/first_3d_game/01.game_setup.rst:95 #: ../../docs/getting_started/first_3d_game/02.player_input.rst:116 #: ../../docs/getting_started/first_3d_game/05.spawning_mobs.rst:90 #: ../../docs/getting_started/first_3d_game/08.score_and_replay.rst:177 #: ../../docs/getting_started/first_3d_game/09.adding_animations.rst:90 #: ../../docs/community/asset_library/using_assetlib.rst:163 msgid "|image11|" msgstr "| hình11 |" #: ../../docs/getting_started/first_3d_game/01.game_setup.rst:158 #: ../../docs/getting_started/first_3d_game/02.player_input.rst:170 #: ../../docs/getting_started/first_3d_game/05.spawning_mobs.rst:346 #: ../../docs/getting_started/first_3d_game/08.score_and_replay.rst:463 #: ../../docs/getting_started/first_3d_game/09.adding_animations.rst:547 #: ../../docs/community/asset_library/using_assetlib.rst:196 #, fuzzy msgid "image11" msgstr "| hình11 |" #: ../../docs/getting_started/first_3d_game/01.game_setup.rst:97 msgid "" "Once again, it's too small by default. Click the cube icon to expand the " "resource and set its *Size* to ``60``, ``2``, and ``60``. As the cube " "resource works with a size rather than extents, we need to use these values " "so it matches our collision shape." msgstr "" #: ../../docs/getting_started/first_3d_game/01.game_setup.rst:102 #: ../../docs/getting_started/first_3d_game/02.player_input.rst:120 #: ../../docs/getting_started/first_3d_game/05.spawning_mobs.rst:102 #: ../../docs/getting_started/first_3d_game/08.score_and_replay.rst:201 #: ../../docs/getting_started/first_3d_game/09.adding_animations.rst:95 #: ../../docs/community/asset_library/using_assetlib.rst:171 msgid "|image12|" msgstr "| hình ảnh 12 |" #: ../../docs/getting_started/first_3d_game/01.game_setup.rst:159 #: ../../docs/getting_started/first_3d_game/02.player_input.rst:171 #: ../../docs/getting_started/first_3d_game/05.spawning_mobs.rst:347 #: ../../docs/getting_started/first_3d_game/08.score_and_replay.rst:464 #: ../../docs/getting_started/first_3d_game/09.adding_animations.rst:548 #: ../../docs/community/asset_library/using_assetlib.rst:197 #, fuzzy msgid "image12" msgstr "| hình ảnh 12 |" #: ../../docs/getting_started/first_3d_game/01.game_setup.rst:104 msgid "" "You should see a wide grey slab that covers the grid and blue and red axes " "in the viewport." msgstr "" #: ../../docs/getting_started/first_3d_game/01.game_setup.rst:107 msgid "" "We're going to move the ground down so we can see the floor grid. Select the " "*Ground* node, hold the :kbd:`Ctrl` key down to turn on grid snapping (:kbd:" "`Cmd` on macOS), and click and drag down on the Y axis. It's the green arrow " "in the move gizmo." msgstr "" #: ../../docs/getting_started/first_3d_game/01.game_setup.rst:111 #: ../../docs/getting_started/first_3d_game/02.player_input.rst:125 #: ../../docs/getting_started/first_3d_game/05.spawning_mobs.rst:107 #: ../../docs/getting_started/first_3d_game/08.score_and_replay.rst:205 #: ../../docs/getting_started/first_3d_game/09.adding_animations.rst:101 #: ../../docs/community/asset_library/using_assetlib.rst:178 msgid "|image13|" msgstr "| hình13 |" #: ../../docs/getting_started/first_3d_game/01.game_setup.rst:160 #: ../../docs/getting_started/first_3d_game/02.player_input.rst:172 #: ../../docs/getting_started/first_3d_game/05.spawning_mobs.rst:348 #: ../../docs/getting_started/first_3d_game/08.score_and_replay.rst:465 #: ../../docs/getting_started/first_3d_game/09.adding_animations.rst:549 #: ../../docs/community/asset_library/using_assetlib.rst:198 #, fuzzy msgid "image13" msgstr "| hình13 |" #: ../../docs/getting_started/first_3d_game/01.game_setup.rst:115 msgid "" "If you can't see the 3D object manipulator like on the image above, ensure " "the *Select Mode* is active in the toolbar above the view." msgstr "" #: ../../docs/getting_started/first_3d_game/01.game_setup.rst:118 #: ../../docs/getting_started/first_3d_game/02.player_input.rst:133 #: ../../docs/getting_started/first_3d_game/05.spawning_mobs.rst:116 #: ../../docs/getting_started/first_3d_game/08.score_and_replay.rst:210 #: ../../docs/getting_started/first_3d_game/09.adding_animations.rst:106 #: ../../docs/community/asset_library/using_assetlib.rst:125 msgid "|image14|" msgstr "| hình14 |" #: ../../docs/getting_started/first_3d_game/01.game_setup.rst:161 #: ../../docs/getting_started/first_3d_game/02.player_input.rst:173 #: ../../docs/getting_started/first_3d_game/05.spawning_mobs.rst:349 #: ../../docs/getting_started/first_3d_game/08.score_and_replay.rst:466 #: ../../docs/getting_started/first_3d_game/09.adding_animations.rst:550 #: ../../docs/community/asset_library/using_assetlib.rst:199 #, fuzzy msgid "image14" msgstr "| hình14 |" #: ../../docs/getting_started/first_3d_game/01.game_setup.rst:120 msgid "" "Move the ground down ``1`` meter. A label in the bottom-left corner of the " "viewport tells you how much you're translating the node." msgstr "" #: ../../docs/getting_started/first_3d_game/01.game_setup.rst:123 #: ../../docs/getting_started/first_3d_game/02.player_input.rst:139 #: ../../docs/getting_started/first_3d_game/05.spawning_mobs.rst:122 #: ../../docs/getting_started/first_3d_game/08.score_and_replay.rst:224 #: ../../docs/getting_started/first_3d_game/09.adding_animations.rst:123 #, fuzzy msgid "|image15|" msgstr "|hình1|" #: ../../docs/getting_started/first_3d_game/01.game_setup.rst:162 #: ../../docs/getting_started/first_3d_game/02.player_input.rst:174 #: ../../docs/getting_started/first_3d_game/05.spawning_mobs.rst:350 #: ../../docs/getting_started/first_3d_game/08.score_and_replay.rst:467 #: ../../docs/getting_started/first_3d_game/09.adding_animations.rst:551 #, fuzzy msgid "image15" msgstr "|hình1|" #: ../../docs/getting_started/first_3d_game/01.game_setup.rst:127 msgid "" "Moving the *Ground* node down moves both children along with it. Ensure you " "move the *Ground* node, **not** the *MeshInstance* or the *CollisionShape*." msgstr "" #: ../../docs/getting_started/first_3d_game/01.game_setup.rst:131 msgid "" "Let's add a directional light so our scene isn't all grey. Select the *Main* " "node and add a *DirectionalLight* as a child of it. We need to move it and " "rotate it. Move it up by clicking and dragging on the manipulator's green " "arrow and click and drag on the red arc to rotate it around the X axis, " "until the ground is lit." msgstr "" #: ../../docs/getting_started/first_3d_game/01.game_setup.rst:137 msgid "" "In the *Inspector*, turn on *Shadow -> Enabled* by clicking the checkbox." msgstr "" #: ../../docs/getting_started/first_3d_game/01.game_setup.rst:139 #: ../../docs/getting_started/first_3d_game/02.player_input.rst:144 #: ../../docs/getting_started/first_3d_game/05.spawning_mobs.rst:127 #: ../../docs/getting_started/first_3d_game/08.score_and_replay.rst:229 #: ../../docs/getting_started/first_3d_game/09.adding_animations.rst:134 #, fuzzy msgid "|image16|" msgstr "|hình1|" #: ../../docs/getting_started/first_3d_game/01.game_setup.rst:163 #: ../../docs/getting_started/first_3d_game/02.player_input.rst:175 #: ../../docs/getting_started/first_3d_game/05.spawning_mobs.rst:351 #: ../../docs/getting_started/first_3d_game/08.score_and_replay.rst:468 #: ../../docs/getting_started/first_3d_game/09.adding_animations.rst:552 #, fuzzy msgid "image16" msgstr "|hình1|" #: ../../docs/getting_started/first_3d_game/01.game_setup.rst:141 #, fuzzy msgid "At this point, your project should look like this." msgstr "Script cuối cùng sẽ trông như thế này:" #: ../../docs/getting_started/first_3d_game/01.game_setup.rst:143 #: ../../docs/getting_started/first_3d_game/02.player_input.rst:148 #: ../../docs/getting_started/first_3d_game/05.spawning_mobs.rst:135 #: ../../docs/getting_started/first_3d_game/08.score_and_replay.rst:234 #: ../../docs/getting_started/first_3d_game/09.adding_animations.rst:139 #, fuzzy msgid "|image17|" msgstr "|hình1|" #: ../../docs/getting_started/first_3d_game/01.game_setup.rst:164 #: ../../docs/getting_started/first_3d_game/02.player_input.rst:176 #: ../../docs/getting_started/first_3d_game/05.spawning_mobs.rst:352 #: ../../docs/getting_started/first_3d_game/08.score_and_replay.rst:469 #: ../../docs/getting_started/first_3d_game/09.adding_animations.rst:553 #, fuzzy msgid "image17" msgstr "|hình1|" #: ../../docs/getting_started/first_3d_game/01.game_setup.rst:145 msgid "" "That's our starting point. In the next part, we will work on the player " "scene and base movement." msgstr "" #: ../../docs/getting_started/first_3d_game/02.player_input.rst:4 msgid "Player scene and input actions" msgstr "" #: ../../docs/getting_started/first_3d_game/02.player_input.rst:6 msgid "" "In the next two lessons, we will design the player scene, register custom " "input actions, and code player movement. By the end, you'll have a playable " "character that moves in eight directions." msgstr "" #: ../../docs/getting_started/first_3d_game/02.player_input.rst:13 msgid "" "Create a new scene by going to the Scene menu in the top-left and clicking " "*New Scene*. Create a *KinematicBody* node as the root and name it *Player*." msgstr "" #: ../../docs/getting_started/first_3d_game/02.player_input.rst:18 msgid "" "Kinematic bodies are complementary to the area and rigid bodies used in the " "2D game tutorial. Like rigid bodies, they can move and collide with the " "environment, but instead of being controlled by the physics engine, you " "dictate their movement. You will see how we use the node's unique features " "when we code the jump and squash mechanics." msgstr "" #: ../../docs/getting_started/first_3d_game/02.player_input.rst:26 msgid "" "To learn more about the different physics node types, see the :ref:" "`doc_physics_introduction`." msgstr "" #: ../../docs/getting_started/first_3d_game/02.player_input.rst:29 msgid "" "For now, we're going to create a basic rig for our character's 3D model. " "This will allow us to rotate the model later via code while it plays an " "animation." msgstr "" #: ../../docs/getting_started/first_3d_game/02.player_input.rst:32 msgid "" "Add a *Spatial* node as a child of *Player* and name it *Pivot*. Then, in " "the FileSystem dock, expand the ``art/`` folder by double-clicking it and " "drag and drop ``player.glb`` onto the *Pivot* node." msgstr "" #: ../../docs/getting_started/first_3d_game/02.player_input.rst:38 msgid "" "This should instantiate the model as a child of *Pivot*. You can rename it " "to *Character*." msgstr "" #: ../../docs/getting_started/first_3d_game/02.player_input.rst:45 msgid "" "The ``.glb`` files contain 3D scene data based on the open-source GLTF 2.0 " "specification. They're a modern and powerful alternative to a proprietary " "format like FBX, which Godot also supports. To produce these files, we " "designed the model in `Blender 3D `__ and exported " "it to GLTF." msgstr "" #: ../../docs/getting_started/first_3d_game/02.player_input.rst:50 msgid "" "As with all kinds of physics nodes, we need a collision shape for our " "character to collide with the environment. Select the *Player* node again " "and add a *CollisionShape*. In the *Inspector*, assign a *SphereShape* to " "the *Shape* property. The sphere's wireframe appears below the character." msgstr "" #: ../../docs/getting_started/first_3d_game/02.player_input.rst:57 msgid "" "It will be the shape the physics engine uses to collide with the " "environment, so we want it to better fit the 3D model. Shrink it a bit by " "dragging the orange dot in the viewport. My sphere has a radius of about " "``0.8`` meters." msgstr "" #: ../../docs/getting_started/first_3d_game/02.player_input.rst:61 msgid "" "Then, move the shape up so its bottom roughly aligns with the grid's plane." msgstr "" #: ../../docs/getting_started/first_3d_game/02.player_input.rst:65 msgid "" "You can toggle the model's visibility by clicking the eye icon next to the " "*Character* or the *Pivot* nodes." msgstr "" #: ../../docs/getting_started/first_3d_game/02.player_input.rst:70 #, fuzzy msgid "Save the scene as ``Player.tscn``." msgstr "Cuối cùng, lưu scene với một tên như `` sayhello.tscn``." #: ../../docs/getting_started/first_3d_game/02.player_input.rst:72 msgid "" "With the nodes ready, we can almost get coding. But first, we need to define " "some input actions." msgstr "" #: ../../docs/getting_started/first_3d_game/02.player_input.rst:76 #, fuzzy msgid "Creating input actions" msgstr "Tạo nội dung" #: ../../docs/getting_started/first_3d_game/02.player_input.rst:78 msgid "" "To move the character, we will listen to the player's input, like pressing " "the arrow keys. In Godot, while we could write all the key bindings in code, " "there's a powerful system that allows you to assign a label to a set of keys " "and buttons. This simplifies our scripts and makes them more readable." msgstr "" #: ../../docs/getting_started/first_3d_game/02.player_input.rst:83 msgid "" "This system is the Input Map. To access its editor, head to the *Project* " "menu and select *Project Settings…*." msgstr "" #: ../../docs/getting_started/first_3d_game/02.player_input.rst:88 msgid "" "At the top, there are multiple tabs. Click on *Input Map*. This window " "allows you to add new actions at the top; they are your labels. In the " "bottom part, you can bind keys to these actions." msgstr "" #: ../../docs/getting_started/first_3d_game/02.player_input.rst:94 msgid "" "Godot projects come with some predefined actions designed for user interface " "design, which we could use here. But we're defining our own to support " "gamepads." msgstr "" #: ../../docs/getting_started/first_3d_game/02.player_input.rst:97 msgid "" "We're going to name our actions ``move_left``, ``move_right``, " "``move_forward``, ``move_back``, and ``jump``." msgstr "" #: ../../docs/getting_started/first_3d_game/02.player_input.rst:100 msgid "To add an action, write its name in the bar at the top and press Enter." msgstr "" #: ../../docs/getting_started/first_3d_game/02.player_input.rst:104 msgid "" "Create the five actions. Your window should have them all listed at the " "bottom." msgstr "" #: ../../docs/getting_started/first_3d_game/02.player_input.rst:108 msgid "" "To bind a key or button to an action, click the \"+\" button to its right. " "Do this for ``move_left`` and in the drop-down menu, click *Key*." msgstr "" #: ../../docs/getting_started/first_3d_game/02.player_input.rst:113 msgid "" "This option allows you to add a keyboard input. A popup appears and waits " "for you to press a key. Press the left arrow key and click *OK*." msgstr "" #: ../../docs/getting_started/first_3d_game/02.player_input.rst:118 msgid "Do the same for the A key." msgstr "" #: ../../docs/getting_started/first_3d_game/02.player_input.rst:122 msgid "" "Let's now add support for a gamepad's left joystick. Click the \"+\" button " "again but this time, select *Joy Axis*." msgstr "" #: ../../docs/getting_started/first_3d_game/02.player_input.rst:127 msgid "" "The popup gives you two drop-down menus. On the left, you can select a " "gamepad by index. *Device 0* corresponds to the first plugged gamepad, " "*Device 1* corresponds to the second, and so on. You can select the joystick " "and direction you want to bind to the input action on the right. Leave the " "default values and press the *Add* button." msgstr "" #: ../../docs/getting_started/first_3d_game/02.player_input.rst:135 msgid "" "Do the same for the other input actions. For example, bind the right arrow, " "D, and the left joystick's right axis to ``move_right``. After binding all " "keys, your interface should look like this." msgstr "" #: ../../docs/getting_started/first_3d_game/02.player_input.rst:141 msgid "" "We have the ``jump`` action left to set up. Bind the Space key and the " "gamepad's A button. To bind a gamepad's button, select the *Joy Button* " "option in the menu." msgstr "" #: ../../docs/getting_started/first_3d_game/02.player_input.rst:146 msgid "Leave the default values and click the *Add* button." msgstr "" #: ../../docs/getting_started/first_3d_game/02.player_input.rst:150 #, fuzzy msgid "Your jump input action should look like this." msgstr "Scene tree của bạn sẽ trông như thế này:" #: ../../docs/getting_started/first_3d_game/02.player_input.rst:152 #: ../../docs/getting_started/first_3d_game/05.spawning_mobs.rst:139 #: ../../docs/getting_started/first_3d_game/08.score_and_replay.rst:324 #: ../../docs/getting_started/first_3d_game/09.adding_animations.rst:145 #, fuzzy msgid "|image18|" msgstr "|hình1|" #: ../../docs/getting_started/first_3d_game/02.player_input.rst:177 #: ../../docs/getting_started/first_3d_game/05.spawning_mobs.rst:353 #: ../../docs/getting_started/first_3d_game/08.score_and_replay.rst:470 #: ../../docs/getting_started/first_3d_game/09.adding_animations.rst:554 #, fuzzy msgid "image18" msgstr "|hình1|" #: ../../docs/getting_started/first_3d_game/02.player_input.rst:154 msgid "" "That's all the actions we need for this game. You can use this menu to label " "any groups of keys and buttons in your projects." msgstr "" #: ../../docs/getting_started/first_3d_game/02.player_input.rst:157 msgid "In the next part, we'll code and test the player's movement." msgstr "" #: ../../docs/getting_started/first_3d_game/03.player_movement_code.rst:4 #, fuzzy msgid "Moving the player with code" msgstr "Di chuyển player" #: ../../docs/getting_started/first_3d_game/03.player_movement_code.rst:6 msgid "" "It's time to code! We're going to use the input actions we created in the " "last part to move the character." msgstr "" #: ../../docs/getting_started/first_3d_game/03.player_movement_code.rst:9 msgid "" "Right-click the *Player* node and select *Attach Script* to add a new script " "to it. In the popup, set the *Template* to *Empty* before pressing the " "*Create* button." msgstr "" #: ../../docs/getting_started/first_3d_game/03.player_movement_code.rst:15 msgid "" "Let's start with the class's properties. We're going to define a movement " "speed, a fall acceleration representing gravity, and a velocity we'll use to " "move the character." msgstr "" #: ../../docs/getting_started/first_3d_game/03.player_movement_code.rst:48 msgid "" "These are common properties for a moving body. The ``velocity`` is a 3D " "vector combining a speed with a direction. Here, we define it as a property " "because we want to update and reuse its value across frames." msgstr "" #: ../../docs/getting_started/first_3d_game/03.player_movement_code.rst:54 msgid "" "The values are quite different from 2D code because distances are in meters. " "While in 2D, a thousand units (pixels) may only correspond to half of your " "screen's width, in 3D, it's a kilometer." msgstr "" #: ../../docs/getting_started/first_3d_game/03.player_movement_code.rst:58 msgid "" "Let's code the movement now. We start by calculating the input direction " "vector using the global ``Input`` object, in ``_physics_process()``." msgstr "" #: ../../docs/getting_started/first_3d_game/03.player_movement_code.rst:108 msgid "" "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." msgstr "" #: ../../docs/getting_started/first_3d_game/03.player_movement_code.rst:115 msgid "" "To learn more about the difference between ``_process()`` and " "``_physics_process()``, see :ref:`doc_idle_and_physics_processing`." msgstr "" #: ../../docs/getting_started/first_3d_game/03.player_movement_code.rst:118 msgid "" "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 the vector's ``x`` and ``z`` components accordingly. These correspond " "to the ground plane's axes." msgstr "" #: ../../docs/getting_started/first_3d_game/03.player_movement_code.rst:123 msgid "" "These four conditions give us eight possibilities and eight possible " "directions." msgstr "" #: ../../docs/getting_started/first_3d_game/03.player_movement_code.rst:125 msgid "" "In case the player presses, say, both W and D simultaneously, the vector " "will have a length of about ``1.4``. But if they press a single key, it will " "have a length of ``1``. We want the vector's length to be consistent. To do " "so, we can call its ``normalize()`` method." msgstr "" #: ../../docs/getting_started/first_3d_game/03.player_movement_code.rst:153 msgid "" "Here, we only normalize the vector if the direction has a length greater " "than zero, which means the player is pressing a direction key." msgstr "" #: ../../docs/getting_started/first_3d_game/03.player_movement_code.rst:156 msgid "" "In this case, we also get the *Pivot* node and call its ``look_at()`` " "method. This method takes a position in space to look at in global " "coordinates and the up direction. In this case, we can use the ``Vector3." "UP`` constant." msgstr "" #: ../../docs/getting_started/first_3d_game/03.player_movement_code.rst:162 msgid "" "A node's local coordinates, like ``translation``, are relative to their " "parent. Global coordinates are relative to the world's main axes you can see " "in the viewport instead." msgstr "" #: ../../docs/getting_started/first_3d_game/03.player_movement_code.rst:166 msgid "" "In 3D, the property that contains a node's position is ``translation``. By " "adding the ``direction`` to it, we get a position to look at that's one " "meter away from the *Player*." msgstr "" #: ../../docs/getting_started/first_3d_game/03.player_movement_code.rst:170 msgid "" "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." msgstr "" #: ../../docs/getting_started/first_3d_game/03.player_movement_code.rst:205 msgid "" "For the vertical velocity, we subtract the fall acceleration multiplied by " "the delta time every frame. Notice the use of the ``-=`` operator, which is " "a shorthand for ``variable = variable - ...``." msgstr "" #: ../../docs/getting_started/first_3d_game/03.player_movement_code.rst:209 msgid "" "This line of code will cause our character to fall in every frame. This may " "seem strange if it's already on the floor. But we have to do this for the " "character to collide with the ground every frame." msgstr "" #: ../../docs/getting_started/first_3d_game/03.player_movement_code.rst:213 msgid "" "The physics engine can only detect interactions with walls, the floor, or " "other bodies during a given frame if movement and collisions happen. We will " "use this property later to code the jump." msgstr "" #: ../../docs/getting_started/first_3d_game/03.player_movement_code.rst:217 msgid "" "On the last line, we call ``KinematicBody.move_and_slide()``. It's a " "powerful method of the ``KinematicBody`` class that allows you to move a " "character smoothly. If it hits a wall midway through a motion, the engine " "will try to smooth it out for you." msgstr "" #: ../../docs/getting_started/first_3d_game/03.player_movement_code.rst:222 msgid "" "The function takes two parameters: our velocity and the up direction. It " "moves the character and returns a leftover velocity after applying " "collisions. When hitting the floor or a wall, the function will reduce or " "reset the speed in that direction from you. In our case, storing the " "function's returned value prevents the character from accumulating vertical " "momentum, which could otherwise get so big the character would move through " "the ground slab after a while." msgstr "" #: ../../docs/getting_started/first_3d_game/03.player_movement_code.rst:229 msgid "And that's all the code you need to move the character on the floor." msgstr "" #: ../../docs/getting_started/first_3d_game/03.player_movement_code.rst:231 msgid "Here is the complete ``Player.gd`` code for reference." msgstr "" #: ../../docs/getting_started/first_3d_game/03.player_movement_code.rst:322 msgid "Testing our player's movement" msgstr "" #: ../../docs/getting_started/first_3d_game/03.player_movement_code.rst:324 msgid "" "We're going to put our player in the *Main* scene to test it. To do so, we " "need to instantiate the player and then add a camera. Unlike in 2D, in 3D, " "you won't see anything if your viewport doesn't have a camera pointing at " "something." msgstr "" #: ../../docs/getting_started/first_3d_game/03.player_movement_code.rst:328 msgid "" "Save your *Player* scene and open the *Main* scene. You can click on the " "*Main* tab at the top of the editor to do so." msgstr "" #: ../../docs/getting_started/first_3d_game/03.player_movement_code.rst:333 msgid "" "If you closed the scene before, head to the *FileSystem* dock and double-" "click ``Main.tscn`` to re-open it." msgstr "" #: ../../docs/getting_started/first_3d_game/03.player_movement_code.rst:336 msgid "" "To instantiate the *Player*, right-click on the *Main* node and select " "*Instance Child Scene*." msgstr "" #: ../../docs/getting_started/first_3d_game/03.player_movement_code.rst:341 msgid "" "In the popup, double-click *Player.tscn*. The character should appear in the " "center of the viewport." msgstr "" #: ../../docs/getting_started/first_3d_game/03.player_movement_code.rst:345 #, fuzzy msgid "Adding a camera" msgstr "Thêm một script" #: ../../docs/getting_started/first_3d_game/03.player_movement_code.rst:347 msgid "" "Let's add the camera next. Like we did with our *Player*\\ 's *Pivot*, we're " "going to create a basic rig. Right-click on the *Main* node again and select " "*Add Child Node* this time. Create a new *Position3D*, name it " "*CameraPivot*, and add a *Camera* node as a child of it. Your scene tree " "should look like this." msgstr "" #: ../../docs/getting_started/first_3d_game/03.player_movement_code.rst:354 msgid "" "Notice the *Preview* checkbox that appears in the top-left when you have the " "*Camera* selected. You can click it to preview the in-game camera projection." msgstr "" #: ../../docs/getting_started/first_3d_game/03.player_movement_code.rst:359 msgid "" "We're going to use the *Pivot* to rotate the camera as if it was on a crane. " "Let's first split the 3D view to be able to freely navigate the scene and " "see what the camera sees." msgstr "" #: ../../docs/getting_started/first_3d_game/03.player_movement_code.rst:363 msgid "" "In the toolbar right above the viewport, click on *View*, then *2 " "Viewports*. You can also press :kbd:`Ctrl + 2` (:kbd:`Cmd + 2` on macOS)." msgstr "" #: ../../docs/getting_started/first_3d_game/03.player_movement_code.rst:368 msgid "" "On the bottom view, select the *Camera* and turn on camera preview by " "clicking the checkbox." msgstr "" #: ../../docs/getting_started/first_3d_game/03.player_movement_code.rst:373 msgid "" "In the top view, move the camera about ``19`` units on the Z axis (the blue " "one)." msgstr "" #: ../../docs/getting_started/first_3d_game/03.player_movement_code.rst:378 msgid "" "Here's where the magic happens. Select the *CameraPivot* and rotate it " "``45`` degrees around the X axis (using the red circle). You'll see the " "camera move as if it was attached to a crane." msgstr "" #: ../../docs/getting_started/first_3d_game/03.player_movement_code.rst:384 msgid "" "You can run the scene by pressing :kbd:`F6` and press the arrow keys to move " "the character." msgstr "" #: ../../docs/getting_started/first_3d_game/03.player_movement_code.rst:389 msgid "" "We can see some empty space around the character due to the perspective " "projection. In this game, we're going to use an orthographic projection " "instead to better frame the gameplay area and make it easier for the player " "to read distances." msgstr "" #: ../../docs/getting_started/first_3d_game/03.player_movement_code.rst:394 msgid "" "Select the *Camera* again and in the *Inspector*, set the *Projection* to " "*Orthogonal* and the *Size* to ``19``. The character should now look flatter " "and the ground should fill the background." msgstr "" #: ../../docs/getting_started/first_3d_game/03.player_movement_code.rst:400 msgid "" "With that, we have both player movement and the view in place. Next, we will " "work on the monsters." msgstr "" #: ../../docs/getting_started/first_3d_game/04.mob_scene.rst:4 #, fuzzy msgid "Designing the mob scene" msgstr "Script một scene" #: ../../docs/getting_started/first_3d_game/04.mob_scene.rst:6 msgid "" "In this part, you're going to code the monsters, which we'll call mobs. In " "the next lesson, we'll spawn them randomly around the playable area." msgstr "" #: ../../docs/getting_started/first_3d_game/04.mob_scene.rst:9 msgid "" "Let's design the monsters themselves in a new scene. The node structure is " "going to be similar to the *Player* scene." msgstr "" #: ../../docs/getting_started/first_3d_game/04.mob_scene.rst:12 msgid "" "Create a scene with, once again, a *KinematicBody* node as its root. Name it " "*Mob*. Add a *Spatial* node as a child of it, name it *Pivot*. And drag and " "drop the file ``mob.glb`` from the *FileSystem* dock onto the *Pivot* to add " "the monster's 3D model to the scene. You can rename the newly created *mob* " "node into *Character*." msgstr "" #: ../../docs/getting_started/first_3d_game/04.mob_scene.rst:20 msgid "" "We need a collision shape for our body to work. Right-click on the *Mob* " "node, the scene's root, and click *Add Child Node*." msgstr "" #: ../../docs/getting_started/first_3d_game/04.mob_scene.rst:25 #, fuzzy msgid "Add a *CollisionShape*." msgstr "Các khối va chạm thấy được" #: ../../docs/getting_started/first_3d_game/04.mob_scene.rst:29 msgid "In the *Inspector*, assign a *BoxShape* to the *Shape* property." msgstr "" #: ../../docs/getting_started/first_3d_game/04.mob_scene.rst:33 msgid "" "We should change its size to fit the 3D model better. You can do so " "interactively by clicking and dragging on the orange dots." msgstr "" #: ../../docs/getting_started/first_3d_game/04.mob_scene.rst:36 msgid "" "The box should touch the floor and be a little thinner than the model. " "Physics engines work in such a way that if the player's sphere touches even " "the box's corner, a collision will occur. If the box is a little too big " "compared to the 3D model, you may die at a distance from the monster, and " "the game will feel unfair to the players." msgstr "" #: ../../docs/getting_started/first_3d_game/04.mob_scene.rst:44 msgid "" "Notice that my box is taller than the monster. It is okay in this game " "because we're looking at the scene from above and using a fixed perspective. " "Collision shapes don't have to match the model exactly. It's the way the " "game feels when you test it that should dictate their form and size." msgstr "" #: ../../docs/getting_started/first_3d_game/04.mob_scene.rst:50 msgid "Removing monsters off-screen" msgstr "" #: ../../docs/getting_started/first_3d_game/04.mob_scene.rst:52 msgid "" "We're going to spawn monsters at regular time intervals in the game level. " "If we're not careful, their count could increase to infinity, and we don't " "want that. Each mob instance has both a memory and a processing cost, and we " "don't want to pay for it when the mob's outside the screen." msgstr "" #: ../../docs/getting_started/first_3d_game/04.mob_scene.rst:57 msgid "" "Once a monster leaves the screen, we don't need it anymore, so we can delete " "it. Godot has a node that detects when objects leave the screen, " "*VisibilityNotifier*, and we're going to use it to destroy our mobs." msgstr "" #: ../../docs/getting_started/first_3d_game/04.mob_scene.rst:63 msgid "" "When you keep instancing an object in games, there's a technique you can use " "to avoid the cost of creating and destroying instances all the time called " "pooling. It consists of pre-creating an array of objects and reusing them " "over and over." msgstr "" #: ../../docs/getting_started/first_3d_game/04.mob_scene.rst:68 msgid "" "When working with GDScript, you don't need to worry about this. The main " "reason to use pools is to avoid freezes with garbage-collected languages " "like C# or Lua. GDScript uses a different technique to manage memory, " "reference counting, which doesn't have that caveat. You can learn more about " "that here :ref:`doc_gdscript_basics_memory_management`." msgstr "" #: ../../docs/getting_started/first_3d_game/04.mob_scene.rst:74 msgid "" "Select the *Mob* node and add a *VisibilityNotifier* as a child of it. " "Another box, pink this time, appears. When this box completely leaves the " "screen, the node will emit a signal." msgstr "" #: ../../docs/getting_started/first_3d_game/04.mob_scene.rst:80 msgid "Resize it using the orange dots until it covers the entire 3D model." msgstr "" #: ../../docs/getting_started/first_3d_game/04.mob_scene.rst:85 msgid "Coding the mob's movement" msgstr "" #: ../../docs/getting_started/first_3d_game/04.mob_scene.rst:87 msgid "" "Let's implement the monster's motion. We're going to do this in two steps. " "First, we'll write a script on the *Mob* that defines a function to " "initialize the monster. We'll then code the randomized spawn mechanism in " "the *Main* scene and call the function from there." msgstr "" #: ../../docs/getting_started/first_3d_game/04.mob_scene.rst:92 msgid "Attach a script to the *Mob*." msgstr "" #: ../../docs/getting_started/first_3d_game/04.mob_scene.rst:96 msgid "" "Here's the movement code to start with. We define two properties, " "``min_speed`` and ``max_speed``, to define a random speed range. We then " "define and initialize the ``velocity``." msgstr "" #: ../../docs/getting_started/first_3d_game/04.mob_scene.rst:137 msgid "" "Similarly to the player, we move the mob every frame by calling " "``KinematicBody``\\ 's ``move_and_slide()`` method. This time, we don't " "update the ``velocity`` every frame: we want the monster to move at a " "constant speed and leave the screen, even if it were to hit an obstacle." msgstr "" #: ../../docs/getting_started/first_3d_game/04.mob_scene.rst:142 msgid "" "We need to define another function to calculate the start velocity. This " "function will turn the monster towards the player and randomize both its " "angle of motion and its velocity." msgstr "" #: ../../docs/getting_started/first_3d_game/04.mob_scene.rst:146 msgid "" "The function will take a ``start_position``, the mob's spawn position, and " "the ``player_position`` as its arguments." msgstr "" #: ../../docs/getting_started/first_3d_game/04.mob_scene.rst:149 msgid "" "We first position the mob at ``start_position``. Then, we turn it towards " "the player using the ``look_at()`` method and randomize the angle by " "rotating a random amount around the Y axis. Below, ``rand_range()`` outputs " "a random value between ``-PI / 4`` radians and ``PI / 4`` radians." msgstr "" #: ../../docs/getting_started/first_3d_game/04.mob_scene.rst:177 msgid "" "We then calculate a random speed using ``rand_range()`` once again and we " "use it to calculate the velocity." msgstr "" #: ../../docs/getting_started/first_3d_game/04.mob_scene.rst:180 msgid "" "We start by creating a 3D vector pointing forward, multiply it by our " "``random_speed``, and finally rotate it using the ``Vector3`` class's " "``rotated()`` method." msgstr "" #: ../../docs/getting_started/first_3d_game/04.mob_scene.rst:212 #, fuzzy msgid "Leaving the screen" msgstr "Script một scene" #: ../../docs/getting_started/first_3d_game/04.mob_scene.rst:214 msgid "" "We still have to destroy the mobs when they leave the screen. To do so, " "we'll connect our *VisibilityNotifier* node's ``screen_exited`` signal to " "the *Mob*." msgstr "" #: ../../docs/getting_started/first_3d_game/04.mob_scene.rst:217 msgid "" "Head back to the 3D viewport by clicking on the *3D* label at the top of the " "editor. You can also press :kbd:`Ctrl + F2` (:kbd:`Alt + 2` on macOS)." msgstr "" #: ../../docs/getting_started/first_3d_game/04.mob_scene.rst:222 msgid "" "Select the *VisibilityNotifier* node and on the right side of the interface, " "navigate to the *Node* dock. Double-click the *screen_exited()* signal." msgstr "" #: ../../docs/getting_started/first_3d_game/04.mob_scene.rst:227 msgid "Connect the signal to the *Mob*." msgstr "" #: ../../docs/getting_started/first_3d_game/04.mob_scene.rst:231 msgid "" "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()`` method. This will destroy the mob instance when the " "*VisibilityNotifier* \\'s box leaves the screen." msgstr "" #: ../../docs/getting_started/first_3d_game/04.mob_scene.rst:251 msgid "" "Our monster is ready to enter the game! In the next part, you will spawn " "monsters in the game level." msgstr "" #: ../../docs/getting_started/first_3d_game/04.mob_scene.rst:254 msgid "Here is the complete ``Mob.gd`` script for reference." msgstr "" #: ../../docs/getting_started/first_3d_game/05.spawning_mobs.rst:4 #, fuzzy msgid "Spawning monsters" msgstr "Mob sinh sản" #: ../../docs/getting_started/first_3d_game/05.spawning_mobs.rst:6 msgid "" "In this part, we're going to spawn monsters along a path randomly. By the " "end, you will have monsters roaming the game board." msgstr "" #: ../../docs/getting_started/first_3d_game/05.spawning_mobs.rst:11 msgid "" "Double-click on ``Main.tscn`` in the *FileSystem* dock to open the *Main* " "scene." msgstr "" #: ../../docs/getting_started/first_3d_game/05.spawning_mobs.rst:13 msgid "" "Before drawing the path, we're going to change the game resolution. Our game " "has a default window size of ``1024x600``. We're going to set it to " "``720x540``, a nice little box." msgstr "" #: ../../docs/getting_started/first_3d_game/05.spawning_mobs.rst:17 #, fuzzy msgid "Go to *Project -> Project Settings*." msgstr "" "Để truy cập hộp thoại đó, chọn Project -> Project Settings. Thử ngay bây giờ." #: ../../docs/getting_started/first_3d_game/05.spawning_mobs.rst:21 msgid "" "In the left menu, navigate down to *Display -> Window*. On the right, set " "the *Width* to ``720`` and the *Height* to ``540``." msgstr "" #: ../../docs/getting_started/first_3d_game/05.spawning_mobs.rst:27 #, fuzzy msgid "Creating the spawn path" msgstr "Tạo nội dung" #: ../../docs/getting_started/first_3d_game/05.spawning_mobs.rst:29 msgid "" "Like you did in the 2D game tutorial, you're going to design a path and use " "a *PathFollow* node to sample random locations on it." msgstr "" #: ../../docs/getting_started/first_3d_game/05.spawning_mobs.rst:32 msgid "" "In 3D though, it's a bit more complicated to draw the path. We want it to be " "around the game view so monsters appear right outside the screen. But if we " "draw a path, we won't see it from the camera preview." msgstr "" #: ../../docs/getting_started/first_3d_game/05.spawning_mobs.rst:36 msgid "" "To find the view's limits, we can use some placeholder meshes. Your viewport " "should still be split into two parts, with the camera preview at the bottom. " "If that isn't the case, press :kbd:`Ctrl + 2` (:kbd:`Cmd + 2` on macOS) to " "split the view into two. Select the *Camera* node and click the *Preview* " "checkbox in the bottom viewport." msgstr "" #: ../../docs/getting_started/first_3d_game/05.spawning_mobs.rst:45 msgid "Adding placeholder cylinders" msgstr "" #: ../../docs/getting_started/first_3d_game/05.spawning_mobs.rst:47 msgid "" "Let's add the placeholder meshes. Add a new *Spatial* node as a child of the " "*Main* node and name it *Cylinders*. We'll use it to group the cylinders. As " "a child of it, add a *MeshInstance* node." msgstr "" #: ../../docs/getting_started/first_3d_game/05.spawning_mobs.rst:53 msgid "In the *Inspector*, assign a *CylinderMesh* to the *Mesh* property." msgstr "" #: ../../docs/getting_started/first_3d_game/05.spawning_mobs.rst:57 msgid "" "Set the top viewport to the top orthogonal view using the menu in the " "viewport's top-left corner. Alternatively, you can press the keypad's 7 key." msgstr "" #: ../../docs/getting_started/first_3d_game/05.spawning_mobs.rst:62 msgid "" "The grid is a bit distracting for me. You can toggle it by going to the " "*View* menu in the toolbar and clicking *View Grid*." msgstr "" #: ../../docs/getting_started/first_3d_game/05.spawning_mobs.rst:67 msgid "" "You now want to move the cylinder along the ground plane, looking at the " "camera preview in the bottom viewport. I recommend using grid snap to do so. " "You can toggle it by clicking the magnet icon in the toolbar or pressing Y." msgstr "" #: ../../docs/getting_started/first_3d_game/05.spawning_mobs.rst:73 msgid "" "Place the cylinder so it's right outside the camera's view in the top-left " "corner." msgstr "" #: ../../docs/getting_started/first_3d_game/05.spawning_mobs.rst:78 msgid "" "We're going to create copies of the mesh and place them around the game " "area. Press :kbd:`Ctrl + D` (:kbd:`Cmd + D` on macOS) to duplicate the node. " "You can also right-click the node in the *Scene* dock and select " "*Duplicate*. Move the copy down along the blue Z axis until it's right " "outside the camera's preview." msgstr "" #: ../../docs/getting_started/first_3d_game/05.spawning_mobs.rst:83 msgid "" "Select both cylinders by pressing the :kbd:`Shift` key and clicking on the " "unselected one and duplicate them." msgstr "" #: ../../docs/getting_started/first_3d_game/05.spawning_mobs.rst:88 msgid "Move them to the right by dragging the red X axis." msgstr "" #: ../../docs/getting_started/first_3d_game/05.spawning_mobs.rst:92 msgid "" "They're a bit hard to see in white, aren't they? Let's make them stand out " "by giving them a new material." msgstr "" #: ../../docs/getting_started/first_3d_game/05.spawning_mobs.rst:95 msgid "" "In 3D, materials define a surface's visual properties like its color, how it " "reflects light, and more. We can use them to change the color of a mesh." msgstr "" #: ../../docs/getting_started/first_3d_game/05.spawning_mobs.rst:98 msgid "" "We can update all four cylinders at once. Select all the mesh instances in " "the *Scene* dock. To do so, you can click on the first one and Shift click " "on the last one." msgstr "" #: ../../docs/getting_started/first_3d_game/05.spawning_mobs.rst:104 msgid "" "In the *Inspector*, expand the *Material* section and assign a " "*SpatialMaterial* to slot *0*." msgstr "" #: ../../docs/getting_started/first_3d_game/05.spawning_mobs.rst:109 msgid "" "Click the sphere icon to open the material resource. You get a preview of " "the material and a long list of sections filled with properties. You can use " "these to create all sorts of surfaces, from metal to rock or water." msgstr "" #: ../../docs/getting_started/first_3d_game/05.spawning_mobs.rst:113 msgid "" "Expand the *Albedo* section and set the color to something that contrasts " "with the background, like a bright orange." msgstr "" #: ../../docs/getting_started/first_3d_game/05.spawning_mobs.rst:118 msgid "" "We can now use the cylinders as guides. Fold them in the *Scene* dock by " "clicking the grey arrow next to them. Moving forward, you can also toggle " "their visibility by clicking the eye icon next to *Cylinders*." msgstr "" #: ../../docs/getting_started/first_3d_game/05.spawning_mobs.rst:124 msgid "" "Add a *Path* node as a child of *Main*. In the toolbar, four icons appear. " "Click the *Add Point* tool, the icon with the green \"+\" sign." msgstr "" #: ../../docs/getting_started/first_3d_game/05.spawning_mobs.rst:129 msgid "You can hover any icon to see a tooltip describing the tool." msgstr "" #: ../../docs/getting_started/first_3d_game/05.spawning_mobs.rst:131 msgid "" "Click in the center of each cylinder to create a point. Then, click the " "*Close Curve* icon in the toolbar to close the path. If any point is a bit " "off, you can click and drag on it to reposition it." msgstr "" #: ../../docs/getting_started/first_3d_game/05.spawning_mobs.rst:137 #, fuzzy msgid "Your path should look like this." msgstr "Scene tree của bạn sẽ trông như thế này:" #: ../../docs/getting_started/first_3d_game/05.spawning_mobs.rst:141 msgid "" "To sample random positions on it, we need a *PathFollow* node. Add a " "*PathFollow* as a child of the *Path*. Rename the two nodes to *SpawnPath* " "and *SpawnLocation*, respectively. It's more descriptive of what we'll use " "them for." msgstr "" #: ../../docs/getting_started/first_3d_game/05.spawning_mobs.rst:145 #: ../../docs/getting_started/first_3d_game/08.score_and_replay.rst:329 #: ../../docs/getting_started/first_3d_game/09.adding_animations.rst:152 #, fuzzy msgid "|image19|" msgstr "|hình1|" #: ../../docs/getting_started/first_3d_game/05.spawning_mobs.rst:354 #: ../../docs/getting_started/first_3d_game/08.score_and_replay.rst:471 #: ../../docs/getting_started/first_3d_game/09.adding_animations.rst:555 #, fuzzy msgid "image19" msgstr "|hình1|" #: ../../docs/getting_started/first_3d_game/05.spawning_mobs.rst:147 msgid "With that, we're ready to code the spawn mechanism." msgstr "" #: ../../docs/getting_started/first_3d_game/05.spawning_mobs.rst:150 #, fuzzy msgid "Spawning monsters randomly" msgstr "Mob sinh sản" #: ../../docs/getting_started/first_3d_game/05.spawning_mobs.rst:152 #, fuzzy msgid "Right-click on the *Main* node and attach a new script to it." msgstr "" "Nhấp chuột phải vào node Panel, sau đó chọn \"Attach Script\" từ menu " "context:" #: ../../docs/getting_started/first_3d_game/05.spawning_mobs.rst:154 msgid "" "We first export a variable to the *Inspector* so that we can assign ``Mob." "tscn`` or any other monster to it." msgstr "" #: ../../docs/getting_started/first_3d_game/05.spawning_mobs.rst:157 msgid "" "Then, as we're going to spawn the monsters procedurally, we want to " "randomize numbers every time we play the game. If we don't do that, the " "monsters will always spawn following the same sequence." msgstr "" #: ../../docs/getting_started/first_3d_game/05.spawning_mobs.rst:190 msgid "" "We want to spawn mobs at regular time intervals. To do this, we need to go " "back to the scene and add a timer. Before that, though, we need to assign " "the ``Mob.tscn`` file to the ``mob_scene`` property." msgstr "" #: ../../docs/getting_started/first_3d_game/05.spawning_mobs.rst:194 msgid "" "Head back to the 3D screen and select the *Main* node. Drag ``Mob.tscn`` " "from the *FileSystem* dock to the *Mob Scene* slot in the *Inspector*." msgstr "" #: ../../docs/getting_started/first_3d_game/05.spawning_mobs.rst:197 #: ../../docs/getting_started/first_3d_game/08.score_and_replay.rst:336 #: ../../docs/getting_started/first_3d_game/09.adding_animations.rst:156 #, fuzzy msgid "|image20|" msgstr "|hình2|" #: ../../docs/getting_started/first_3d_game/05.spawning_mobs.rst:355 #: ../../docs/getting_started/first_3d_game/08.score_and_replay.rst:472 #: ../../docs/getting_started/first_3d_game/09.adding_animations.rst:556 #, fuzzy msgid "image20" msgstr "|hình2|" #: ../../docs/getting_started/first_3d_game/05.spawning_mobs.rst:199 msgid "Add a new *Timer* node as a child of *Main*. Name it *MobTimer*." msgstr "" #: ../../docs/getting_started/first_3d_game/05.spawning_mobs.rst:201 #: ../../docs/getting_started/first_3d_game/08.score_and_replay.rst:347 #: ../../docs/getting_started/first_3d_game/09.adding_animations.rst:160 #, fuzzy msgid "|image21|" msgstr "|hình2|" #: ../../docs/getting_started/first_3d_game/05.spawning_mobs.rst:356 #: ../../docs/getting_started/first_3d_game/08.score_and_replay.rst:473 #: ../../docs/getting_started/first_3d_game/09.adding_animations.rst:557 #, fuzzy msgid "image21" msgstr "|hình2|" #: ../../docs/getting_started/first_3d_game/05.spawning_mobs.rst:203 msgid "" "In the *Inspector*, set its *Wait Time* to ``0.5`` seconds and turn on " "*Autostart* so it automatically starts when we run the game." msgstr "" #: ../../docs/getting_started/first_3d_game/05.spawning_mobs.rst:206 #: ../../docs/getting_started/first_3d_game/08.score_and_replay.rst:356 #: ../../docs/getting_started/first_3d_game/09.adding_animations.rst:184 #, fuzzy msgid "|image22|" msgstr "|hình2|" #: ../../docs/getting_started/first_3d_game/05.spawning_mobs.rst:357 #: ../../docs/getting_started/first_3d_game/08.score_and_replay.rst:474 #: ../../docs/getting_started/first_3d_game/09.adding_animations.rst:558 #, fuzzy msgid "image22" msgstr "|hình2|" #: ../../docs/getting_started/first_3d_game/05.spawning_mobs.rst:208 msgid "" "Timers emit a ``timeout`` signal every time they reach the end of their " "*Wait Time*. By default, they restart automatically, emitting the signal in " "a cycle. We can connect to this signal from the *Main* node to spawn " "monsters every ``0.5`` seconds." msgstr "" #: ../../docs/getting_started/first_3d_game/05.spawning_mobs.rst:213 msgid "" "With the *MobTimer* still selected, head to the *Node* dock on the right and " "double-click the ``timeout`` signal." msgstr "" #: ../../docs/getting_started/first_3d_game/05.spawning_mobs.rst:216 #: ../../docs/getting_started/first_3d_game/08.score_and_replay.rst:362 #, fuzzy msgid "|image23|" msgstr "|hình2|" #: ../../docs/getting_started/first_3d_game/05.spawning_mobs.rst:358 #: ../../docs/getting_started/first_3d_game/08.score_and_replay.rst:475 #, fuzzy msgid "image23" msgstr "|hình2|" #: ../../docs/getting_started/first_3d_game/05.spawning_mobs.rst:218 msgid "Connect it to the *Main* node." msgstr "" #: ../../docs/getting_started/first_3d_game/05.spawning_mobs.rst:220 #, fuzzy msgid "|image24|" msgstr "|hình2|" #: ../../docs/getting_started/first_3d_game/05.spawning_mobs.rst:359 #, fuzzy msgid "image24" msgstr "|hình2|" #: ../../docs/getting_started/first_3d_game/05.spawning_mobs.rst:222 msgid "" "This will take you back to the script, with a new empty " "``_on_MobTimer_timeout()`` function." msgstr "" #: ../../docs/getting_started/first_3d_game/05.spawning_mobs.rst:225 msgid "Let's code the mob spawning logic. We're going to:" msgstr "" #: ../../docs/getting_started/first_3d_game/05.spawning_mobs.rst:227 #, fuzzy msgid "Instantiate the mob scene." msgstr "Cảnh người chơi" #: ../../docs/getting_started/first_3d_game/05.spawning_mobs.rst:228 msgid "Sample a random position on the spawn path." msgstr "" #: ../../docs/getting_started/first_3d_game/05.spawning_mobs.rst:229 msgid "Get the player's position." msgstr "" #: ../../docs/getting_started/first_3d_game/05.spawning_mobs.rst:230 msgid "Add the mob as a child of the *Main* node." msgstr "" #: ../../docs/getting_started/first_3d_game/05.spawning_mobs.rst:231 msgid "" "Call the mob's ``initialize()`` method, passing it the random position and " "the player's position." msgstr "" #: ../../docs/getting_started/first_3d_game/05.spawning_mobs.rst:272 msgid "" "Above, ``randf()`` produces a random value between ``0`` and ``1``, which is " "what the *PathFollow* node's ``unit_offset`` expects." msgstr "" #: ../../docs/getting_started/first_3d_game/05.spawning_mobs.rst:275 msgid "Here is the complete ``Main.gd`` script so far, for reference." msgstr "" #: ../../docs/getting_started/first_3d_game/05.spawning_mobs.rst:327 msgid "" "You can test the scene by pressing :kbd:`F6`. You should see the monsters " "spawn and move in a straight line." msgstr "" #: ../../docs/getting_started/first_3d_game/05.spawning_mobs.rst:330 #, fuzzy msgid "|image25|" msgstr "|hình2|" #: ../../docs/getting_started/first_3d_game/05.spawning_mobs.rst:360 #, fuzzy msgid "image25" msgstr "|hình2|" #: ../../docs/getting_started/first_3d_game/05.spawning_mobs.rst:332 msgid "" "For now, they bump and slide against one another when their paths cross. " "We'll address this in the next part." msgstr "" #: ../../docs/getting_started/first_3d_game/06.jump_and_squash.rst:4 msgid "Jumping and squashing monsters" msgstr "" #: ../../docs/getting_started/first_3d_game/06.jump_and_squash.rst:6 msgid "" "In this part, we'll add the ability to jump, to squash the monsters. In the " "next lesson, we'll make the player die when a monster hits them on the " "ground." msgstr "" #: ../../docs/getting_started/first_3d_game/06.jump_and_squash.rst:9 #, fuzzy msgid "" "First, we have to change a few settings related to physics interactions. " "Enter the world of :ref:`physics layers " "`." msgstr "Xem :ref:`doc_ways_to_contribute`." #: ../../docs/getting_started/first_3d_game/06.jump_and_squash.rst:14 #, fuzzy msgid "Controlling physics interactions" msgstr "Tạo nội dung" #: ../../docs/getting_started/first_3d_game/06.jump_and_squash.rst:16 msgid "" "Physics bodies have access to two complementary properties: layers and " "masks. Layers define on which physics layer(s) an object is." msgstr "" #: ../../docs/getting_started/first_3d_game/06.jump_and_squash.rst:19 msgid "" "Masks control the layers that a body will listen to and detect. This affects " "collision detection. When you want two bodies to interact, you need at least " "one to have a mask corresponding to the other." msgstr "" #: ../../docs/getting_started/first_3d_game/06.jump_and_squash.rst:23 msgid "If that's confusing, don't worry, we'll see three examples in a second." msgstr "" #: ../../docs/getting_started/first_3d_game/06.jump_and_squash.rst:25 msgid "" "The important point is that you can use layers and masks to filter physics " "interactions, control performance, and remove the need for extra conditions " "in your code." msgstr "" #: ../../docs/getting_started/first_3d_game/06.jump_and_squash.rst:29 msgid "" "By default, all physics bodies and areas are set to both layer and mask " "``0``. This means they all collide with each other." msgstr "" #: ../../docs/getting_started/first_3d_game/06.jump_and_squash.rst:32 msgid "" "Physics layers are represented by numbers, but we can give them names to " "keep track of what's what." msgstr "" #: ../../docs/getting_started/first_3d_game/06.jump_and_squash.rst:36 #, fuzzy msgid "Setting layer names" msgstr "Script một scene" #: ../../docs/getting_started/first_3d_game/06.jump_and_squash.rst:38 msgid "" "Let's give our physics layers a name. Go to *Project -> Project Settings*." msgstr "" #: ../../docs/getting_started/first_3d_game/06.jump_and_squash.rst:42 msgid "" "In the left menu, navigate down to *Layer Names -> 3D Physics*. You can see " "a list of layers with a field next to each of them on the right. You can set " "their names there. Name the first three layers *player*, *enemies*, and " "*world*, respectively." msgstr "" #: ../../docs/getting_started/first_3d_game/06.jump_and_squash.rst:49 msgid "Now, we can assign them to our physics nodes." msgstr "" #: ../../docs/getting_started/first_3d_game/06.jump_and_squash.rst:52 msgid "Assigning layers and masks" msgstr "" #: ../../docs/getting_started/first_3d_game/06.jump_and_squash.rst:54 msgid "" "In the *Main* scene, select the *Ground* node. In the *Inspector*, expand " "the *Collision* section. There, you can see the node's layers and masks as a " "grid of buttons." msgstr "" #: ../../docs/getting_started/first_3d_game/06.jump_and_squash.rst:60 msgid "" "The ground is part of the world, so we want it to be part of the third " "layer. Click the lit button to toggle off the first *Layer* and toggle on " "the third one. Then, toggle off the *Mask* by clicking on it." msgstr "" #: ../../docs/getting_started/first_3d_game/06.jump_and_squash.rst:66 msgid "" "As I mentioned above, the *Mask* property allows a node to listen to " "interaction with other physics objects, but we don't need it to have " "collisions. The *Ground* doesn't need to listen to anything; it's just there " "to prevent creatures from falling." msgstr "" #: ../../docs/getting_started/first_3d_game/06.jump_and_squash.rst:71 msgid "" "Note that you can click the \"...\" button on the right side of the " "properties to see a list of named checkboxes." msgstr "" #: ../../docs/getting_started/first_3d_game/06.jump_and_squash.rst:76 msgid "" "Next up are the *Player* and the *Mob*. Open ``Player.tscn`` by double-" "clicking the file in the *FileSystem* dock." msgstr "" #: ../../docs/getting_started/first_3d_game/06.jump_and_squash.rst:79 msgid "" "Select the *Player* node and set its *Collision -> Mask* to both \"enemies\" " "and \"world\". You can leave the default *Layer* property as the first layer " "is the \"player\" one." msgstr "" #: ../../docs/getting_started/first_3d_game/06.jump_and_squash.rst:85 msgid "" "Then, open the *Mob* scene by double-clicking on ``Mob.tscn`` and select the " "*Mob* node." msgstr "" #: ../../docs/getting_started/first_3d_game/06.jump_and_squash.rst:88 msgid "" "Set its *Collision -> Layer* to \"enemies\" and unset its *Collision -> " "Mask*, leaving the mask empty." msgstr "" #: ../../docs/getting_started/first_3d_game/06.jump_and_squash.rst:93 msgid "" "These settings mean the monsters will move through one another. If you want " "the monsters to collide with and slide against each other, turn on the " "\"enemies\" mask." msgstr "" #: ../../docs/getting_started/first_3d_game/06.jump_and_squash.rst:99 msgid "" "The mobs don't need to mask the \"world\" layer because they only move on " "the XZ plane. We don't apply any gravity to them by design." msgstr "" #: ../../docs/getting_started/first_3d_game/06.jump_and_squash.rst:103 msgid "Jumping" msgstr "" #: ../../docs/getting_started/first_3d_game/06.jump_and_squash.rst:105 msgid "" "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." msgstr "" #: ../../docs/getting_started/first_3d_game/06.jump_and_squash.rst:109 msgid "" "After the line that defines ``fall_acceleration``, at the top of the script, " "add the ``jump_impulse``." msgstr "" #: ../../docs/getting_started/first_3d_game/06.jump_and_squash.rst:128 msgid "" "Inside ``_physics_process()``, add the following code before the line where " "we called ``move_and_slide()``." msgstr "" #: ../../docs/getting_started/first_3d_game/06.jump_and_squash.rst:158 msgid "That's all you need to jump!" msgstr "" #: ../../docs/getting_started/first_3d_game/06.jump_and_squash.rst:160 msgid "" "The ``is_on_floor()`` method is a tool from the ``KinematicBody`` class. It " "returns ``true`` if the body collided with the floor in this frame. That's " "why we apply gravity to the *Player*: so we collide with the floor instead " "of floating over it like the monsters." msgstr "" #: ../../docs/getting_started/first_3d_game/06.jump_and_squash.rst:165 msgid "" "If the character is on the floor and the player presses \"jump\", we " "instantly give them a lot of vertical speed. In games, you really want " "controls to be responsive and giving instant speed boosts like these, while " "unrealistic, feel great." msgstr "" #: ../../docs/getting_started/first_3d_game/06.jump_and_squash.rst:170 msgid "" "Notice that the Y axis is positive upwards. That's unlike 2D, where the Y " "axis is positive downward." msgstr "" #: ../../docs/getting_started/first_3d_game/06.jump_and_squash.rst:174 #, fuzzy msgid "Squashing monsters" msgstr "Tạo nội dung" #: ../../docs/getting_started/first_3d_game/06.jump_and_squash.rst:176 msgid "" "Let's add the squash mechanic next. We're going to make the character bounce " "over monsters and kill them at the same time." msgstr "" #: ../../docs/getting_started/first_3d_game/06.jump_and_squash.rst:179 msgid "" "We need to detect collisions with a monster and to differentiate them from " "collisions with the floor. To do so, we can use Godot's :ref:`group " "` tagging feature." msgstr "" #: ../../docs/getting_started/first_3d_game/06.jump_and_squash.rst:183 msgid "" "Open the scene ``Mob.tscn`` again and select the *Mob* node. Go to the " "*Node* dock on the right to see a list of signals. The *Node* dock has two " "tabs: *Signals*, which you've already used, and *Groups*, which allows you " "to assign tags to nodes." msgstr "" #: ../../docs/getting_started/first_3d_game/06.jump_and_squash.rst:188 msgid "" "Click on it to reveal a field where you can write a tag name. Enter \"mob\" " "in the field and click the *Add* button." msgstr "" #: ../../docs/getting_started/first_3d_game/06.jump_and_squash.rst:193 msgid "" "An icon appears in the *Scene* dock to indicate the node is part of at least " "one group." msgstr "" #: ../../docs/getting_started/first_3d_game/06.jump_and_squash.rst:198 msgid "" "We can now use the group from the code to distinguish collisions with " "monsters from collisions with the floor." msgstr "" #: ../../docs/getting_started/first_3d_game/06.jump_and_squash.rst:202 msgid "Coding the squash mechanic" msgstr "" #: ../../docs/getting_started/first_3d_game/06.jump_and_squash.rst:204 msgid "Head back to the *Player* script to code the squash and bounce." msgstr "" #: ../../docs/getting_started/first_3d_game/06.jump_and_squash.rst:206 msgid "" "At the top of the script, we need another property, ``bounce_impulse``. When " "squashing an enemy, we don't necessarily want the character to go as high up " "as when jumping." msgstr "" #: ../../docs/getting_started/first_3d_game/06.jump_and_squash.rst:225 msgid "" "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." msgstr "" #: ../../docs/getting_started/first_3d_game/06.jump_and_squash.rst:230 msgid "" "In every iteration of the loop, we check if we landed on a mob. If so, we " "kill it and bounce." msgstr "" #: ../../docs/getting_started/first_3d_game/06.jump_and_squash.rst:233 msgid "" "With this code, if no collisions occurred on a given frame, the loop won't " "run." msgstr "" #: ../../docs/getting_started/first_3d_game/06.jump_and_squash.rst:276 msgid "That's a lot of new functions. Here's some more information about them." msgstr "" #: ../../docs/getting_started/first_3d_game/06.jump_and_squash.rst:278 msgid "" "The functions ``get_slide_count()`` and ``get_slide_collision()`` both come " "from the :ref:`KinematicBody` class and are related to " "``move_and_slide()``." msgstr "" #: ../../docs/getting_started/first_3d_game/06.jump_and_squash.rst:282 msgid "" "``get_slide_collision()`` returns a :ref:" "`KinematicCollision` object that holds information " "about where and how the collision occurred. For example, we use its " "``collider`` property to check if we collided with a \"mob\" by calling " "``is_in_group()`` on it: ``collision.collider.is_in_group(\"mob\")``." msgstr "" #: ../../docs/getting_started/first_3d_game/06.jump_and_squash.rst:290 msgid "" "The method ``is_in_group()`` is available on every :ref:`Node`." msgstr "" #: ../../docs/getting_started/first_3d_game/06.jump_and_squash.rst:292 msgid "" "To check that we are landing on the monster, we use the vector dot product: " "``Vector3.UP.dot(collision.normal) > 0.1``. The collision normal is a 3D " "vector that is perpendicular to the plane where the collision occurred. The " "dot product allows us to compare it to the up direction." msgstr "" #: ../../docs/getting_started/first_3d_game/06.jump_and_squash.rst:297 msgid "" "With dot products, when the result is greater than ``0``, the two vectors " "are at an angle of fewer than 90 degrees. A value higher than ``0.1`` tells " "us that we are roughly above the monster." msgstr "" #: ../../docs/getting_started/first_3d_game/06.jump_and_squash.rst:301 msgid "" "We are calling one undefined function, ``mob.squash()``. We have to add it " "to the Mob class." msgstr "" #: ../../docs/getting_started/first_3d_game/06.jump_and_squash.rst:304 msgid "" "Open the script ``Mob.gd`` by double-clicking on it in the *FileSystem* " "dock. At the top of the script, we want to define a new signal named " "``squashed``. And at the bottom, you can add the squash function, where we " "emit the signal and destroy the mob." msgstr "" #: ../../docs/getting_started/first_3d_game/06.jump_and_squash.rst:338 msgid "We will use the signal to add points to the score in the next lesson." msgstr "" #: ../../docs/getting_started/first_3d_game/06.jump_and_squash.rst:340 msgid "" "With that, you should be able to kill monsters by jumping on them. You can " "press :kbd:`F5` to try the game and set ``Main.tscn`` as your project's main " "scene." msgstr "" #: ../../docs/getting_started/first_3d_game/06.jump_and_squash.rst:343 msgid "However, the player won't die yet. We'll work on that in the next part." msgstr "" #: ../../docs/getting_started/first_3d_game/07.killing_player.rst:4 #, fuzzy msgid "Killing the player" msgstr "Di chuyển player" #: ../../docs/getting_started/first_3d_game/07.killing_player.rst:6 msgid "" "We can kill enemies by jumping on them, but the player still can't die. " "Let's fix this." msgstr "" #: ../../docs/getting_started/first_3d_game/07.killing_player.rst:9 msgid "" "We want to detect being hit by an enemy differently from squashing them. We " "want the player to die when they're moving on the floor, but not if they're " "in the air. We could use vector math to distinguish the two kinds of " "collisions. Instead, though, we will use an *Area* node, which works well " "for hitboxes." msgstr "" #: ../../docs/getting_started/first_3d_game/07.killing_player.rst:16 msgid "Hitbox with the Area node" msgstr "" #: ../../docs/getting_started/first_3d_game/07.killing_player.rst:18 msgid "" "Head back to the *Player* scene and add a new *Area* node. Name it " "*MobDetector*. Add a *CollisionShape* node as a child of it." msgstr "" #: ../../docs/getting_started/first_3d_game/07.killing_player.rst:23 msgid "In the *Inspector*, assign a cylinder shape to it." msgstr "" #: ../../docs/getting_started/first_3d_game/07.killing_player.rst:27 msgid "" "Here is a trick you can use to make the collisions only happen when the " "player is on the ground or close to it. You can reduce the cylinder's height " "and move it up to the top of the character. This way, when the player jumps, " "the shape will be too high up for the enemies to collide with it." msgstr "" #: ../../docs/getting_started/first_3d_game/07.killing_player.rst:35 msgid "" "You also want the cylinder to be wider than the sphere. This way, the player " "gets hit before colliding and being pushed on top of the monster's collision " "box." msgstr "" #: ../../docs/getting_started/first_3d_game/07.killing_player.rst:39 msgid "The wider the cylinder, the more easily the player will get killed." msgstr "" #: ../../docs/getting_started/first_3d_game/07.killing_player.rst:41 msgid "" "Next, select the *MobDetector* node again, and in the *Inspector*, turn off " "its *Monitorable* property. This makes it so other physics nodes cannot " "detect the area. The complementary *Monitoring* property allows it to detect " "collisions. Then, remove the *Collision -> Layer* and sets the mask to the " "\"enemies\" layer." msgstr "" #: ../../docs/getting_started/first_3d_game/07.killing_player.rst:49 msgid "" "When areas detect a collision, they emit signals. We're going to connect one " "to the *Player* node. In the *Node* tab, double-click the ``body_entered`` " "signal and connect it to the *Player*." msgstr "" #: ../../docs/getting_started/first_3d_game/07.killing_player.rst:55 msgid "" "The *MobDetector* will emit ``body_entered`` when a *KinematicBody* or a " "*RigidBody* node enters it. As it only masks the \"enemies\" physics layers, " "it will only detect the *Mob* nodes." msgstr "" #: ../../docs/getting_started/first_3d_game/07.killing_player.rst:59 msgid "" "Code-wise, we're going to do two things: emit a signal we'll later use to " "end the game and destroy the player. We can wrap these operations in a " "``die()`` function that helps us put a descriptive label on the code." msgstr "" #: ../../docs/getting_started/first_3d_game/07.killing_player.rst:102 msgid "" "Try the game again by pressing :kbd:`F5`. If everything is set up correctly, " "the character should die when an enemy runs into it." msgstr "" #: ../../docs/getting_started/first_3d_game/07.killing_player.rst:105 msgid "" "However, note that this depends entirely on the size and position of the " "*Player* and the *Mob*\\ 's collision shapes. You may need to move them and " "resize them to achieve a tight game feel." msgstr "" #: ../../docs/getting_started/first_3d_game/07.killing_player.rst:110 #, fuzzy msgid "Ending the game" msgstr "Di chuyển player" #: ../../docs/getting_started/first_3d_game/07.killing_player.rst:112 msgid "" "We can use the *Player*\\ 's ``hit`` signal to end the game. All we need to " "do is connect it to the *Main* node and stop the *MobTimer* in reaction." msgstr "" #: ../../docs/getting_started/first_3d_game/07.killing_player.rst:116 msgid "" "Open ``Main.tscn``, select the *Player* node, and in the *Node* dock, " "connect its ``hit`` signal to the *Main* node." msgstr "" #: ../../docs/getting_started/first_3d_game/07.killing_player.rst:121 msgid "Get and stop the timer in the ``_on_Player_hit()`` function." msgstr "" #: ../../docs/getting_started/first_3d_game/07.killing_player.rst:137 msgid "" "If you try the game now, the monsters will stop spawning when you die, and " "the remaining ones will leave the screen." msgstr "" #: ../../docs/getting_started/first_3d_game/07.killing_player.rst:140 msgid "" "You can pat yourself in the back: you prototyped a complete 3D game, even if " "it's still a bit rough." msgstr "" #: ../../docs/getting_started/first_3d_game/07.killing_player.rst:143 msgid "" "From there, we'll add a score, the option to retry the game, and you'll see " "how you can make the game feel much more alive with minimalistic animations." msgstr "" #: ../../docs/getting_started/first_3d_game/07.killing_player.rst:148 #, fuzzy msgid "Code checkpoint" msgstr "Tạo điểm dừng" #: ../../docs/getting_started/first_3d_game/07.killing_player.rst:150 msgid "" "Here are the complete scripts for the *Main*, *Mob*, and *Player* nodes, for " "reference. You can use them to compare and check your code." msgstr "" #: ../../docs/getting_started/first_3d_game/07.killing_player.rst:153 msgid "Starting with ``Main.gd``." msgstr "" #: ../../docs/getting_started/first_3d_game/07.killing_player.rst:222 msgid "Next is ``Mob.gd``." msgstr "" #: ../../docs/getting_started/first_3d_game/07.killing_player.rst:307 msgid "Finally, the longest script, ``Player.gd``." msgstr "" #: ../../docs/getting_started/first_3d_game/07.killing_player.rst:460 msgid "See you in the next lesson to add the score and the retry option." msgstr "" #: ../../docs/getting_started/first_3d_game/08.score_and_replay.rst:4 msgid "Score and replay" msgstr "" #: ../../docs/getting_started/first_3d_game/08.score_and_replay.rst:6 msgid "" "In this part, we'll add the score, music playback, and the ability to " "restart the game." msgstr "" #: ../../docs/getting_started/first_3d_game/08.score_and_replay.rst:9 msgid "" "We have to keep track of the current score in a variable and display it on " "screen using a minimal interface. We will use a text label to do that." msgstr "" #: ../../docs/getting_started/first_3d_game/08.score_and_replay.rst:12 msgid "" "In the main scene, add a new *Control* node as a child of *Main* and name it " "*UserInterface*. You will automatically be taken to the 2D screen, where you " "can edit your User Interface (UI)." msgstr "" #: ../../docs/getting_started/first_3d_game/08.score_and_replay.rst:16 msgid "Add a *Label* node and rename it to *ScoreLabel*." msgstr "" #: ../../docs/getting_started/first_3d_game/08.score_and_replay.rst:20 msgid "" "In the *Inspector*, set the *Label*'s *Text* to a placeholder like \"Score: " "0\"." msgstr "" #: ../../docs/getting_started/first_3d_game/08.score_and_replay.rst:24 msgid "" "Also, the text is white by default, like our game's background. We need to " "change its color to see it at runtime." msgstr "" #: ../../docs/getting_started/first_3d_game/08.score_and_replay.rst:27 msgid "" "Scroll down to *Custom Colors* and click the black box next to *Font Color* " "to tint the text." msgstr "" #: ../../docs/getting_started/first_3d_game/08.score_and_replay.rst:32 msgid "Pick a dark tone so it contrasts well with the 3D scene." msgstr "" #: ../../docs/getting_started/first_3d_game/08.score_and_replay.rst:36 msgid "" "Finally, click and drag on the text in the viewport to move it away from the " "top-left corner." msgstr "" #: ../../docs/getting_started/first_3d_game/08.score_and_replay.rst:41 msgid "" "The *UserInterface* node allows us to group our UI in a branch of the scene " "tree and use a theme resource that will propagate to all its children. We'll " "use it to set our game's font." msgstr "" #: ../../docs/getting_started/first_3d_game/08.score_and_replay.rst:46 #, fuzzy msgid "Creating a UI theme" msgstr "Tạo nội dung" #: ../../docs/getting_started/first_3d_game/08.score_and_replay.rst:48 msgid "" "Once again, select the *UserInterface* node. In the *Inspector*, create a " "new theme resource in *Theme -> Theme*." msgstr "" #: ../../docs/getting_started/first_3d_game/08.score_and_replay.rst:53 msgid "" "Click on it to open the theme editor In the bottom panel. It gives you a " "preview of how all the built-in UI widgets will look with your theme " "resource." msgstr "" #: ../../docs/getting_started/first_3d_game/08.score_and_replay.rst:58 msgid "By default, a theme only has one property, the *Default Font*." msgstr "" #: ../../docs/getting_started/first_3d_game/08.score_and_replay.rst:62 msgid "" "You can add more properties to the theme resource to design complex user " "interfaces, but that is beyond the scope of this series. To learn more about " "creating and editing themes, see :ref:`doc_gui_skinning`." msgstr "" #: ../../docs/getting_started/first_3d_game/08.score_and_replay.rst:66 msgid "Click the *Default Font* property and create a new *DynamicFont*." msgstr "" #: ../../docs/getting_started/first_3d_game/08.score_and_replay.rst:70 msgid "" "Expand the *DynamicFont* by clicking on it and expand its *Font* section. " "There, you will see an empty *Font Data* field." msgstr "" #: ../../docs/getting_started/first_3d_game/08.score_and_replay.rst:75 msgid "" "This one expects a font file like the ones you have on your computer. Two " "common font file formats are TrueType Font (TTF) and OpenType Font (OTF)." msgstr "" #: ../../docs/getting_started/first_3d_game/08.score_and_replay.rst:78 msgid "" "In the *FileSystem* dock, Expand the ``fonts`` directory and click and drag " "the ``Montserrat-Medium.ttf`` file we included in the project onto the *Font " "Data*. The text will reappear in the theme preview." msgstr "" #: ../../docs/getting_started/first_3d_game/08.score_and_replay.rst:82 msgid "" "The text is a bit small. Set the *Settings -> Size* to ``22`` pixels to " "increase the text's size." msgstr "" #: ../../docs/getting_started/first_3d_game/08.score_and_replay.rst:88 msgid "Keeping track of the score" msgstr "" #: ../../docs/getting_started/first_3d_game/08.score_and_replay.rst:90 msgid "" "Let's work on the score next. Attach a new script to the *ScoreLabel* and " "define the ``score`` variable." msgstr "" #: ../../docs/getting_started/first_3d_game/08.score_and_replay.rst:107 msgid "" "The score should increase by ``1`` every time we squash a monster. We can " "use their ``squashed`` signal to know when that happens. However, as we " "instantiate monsters from the code, we cannot do the connection in the " "editor." msgstr "" #: ../../docs/getting_started/first_3d_game/08.score_and_replay.rst:111 msgid "" "Instead, we have to make the connection from the code every time we spawn a " "monster." msgstr "" #: ../../docs/getting_started/first_3d_game/08.score_and_replay.rst:114 msgid "" "Open the script ``Main.gd``. If it's still open, you can click on its name " "in the script editor's left column." msgstr "" #: ../../docs/getting_started/first_3d_game/08.score_and_replay.rst:119 msgid "" "Alternatively, you can double-click the ``Main.gd`` file in the *FileSystem* " "dock." msgstr "" #: ../../docs/getting_started/first_3d_game/08.score_and_replay.rst:122 msgid "" "At the bottom of the ``_on_MobTimer_timeout()`` function, add the following " "line." msgstr "" #: ../../docs/getting_started/first_3d_game/08.score_and_replay.rst:142 msgid "" "This line means that when the mob emits the ``squashed`` signal, the " "*ScoreLabel* node will receive it and call the function " "``_on_Mob_squashed()``." msgstr "" #: ../../docs/getting_started/first_3d_game/08.score_and_replay.rst:145 msgid "" "Head back to the ``ScoreLabel.gd`` script to define the " "``_on_Mob_squashed()`` callback function." msgstr "" #: ../../docs/getting_started/first_3d_game/08.score_and_replay.rst:148 msgid "There, we increment the score and update the displayed text." msgstr "" #: ../../docs/getting_started/first_3d_game/08.score_and_replay.rst:165 msgid "" "The second line uses the value of the ``score`` variable to replace the " "placeholder ``%s``. When using this feature, Godot automatically converts " "values to text, which is convenient to output text in labels or using the " "``print()`` function." msgstr "" #: ../../docs/getting_started/first_3d_game/08.score_and_replay.rst:172 msgid "" "You can learn more about string formatting here: :ref:`doc_gdscript_printf`." msgstr "" #: ../../docs/getting_started/first_3d_game/08.score_and_replay.rst:174 msgid "" "You can now play the game and squash a few enemies to see the score increase." msgstr "" #: ../../docs/getting_started/first_3d_game/08.score_and_replay.rst:181 msgid "" "In a complex game, you may want to completely separate your user interface " "from the game world. In that case, you would not keep track of the score on " "the label. Instead, you may want to store it in a separate, dedicated " "object. But when prototyping or when your project is simple, it is fine to " "keep your code simple. Programming is always a balancing act." msgstr "" #: ../../docs/getting_started/first_3d_game/08.score_and_replay.rst:188 #, fuzzy msgid "Retrying the game" msgstr "Script một scene" #: ../../docs/getting_started/first_3d_game/08.score_and_replay.rst:190 msgid "" "We'll now add the ability to play again after dying. When the player dies, " "we'll display a message on the screen and wait for input." msgstr "" #: ../../docs/getting_started/first_3d_game/08.score_and_replay.rst:193 msgid "" "Head back to the *Main* scene, select the *UserInterface* node, add a " "*ColorRect* node as a child of it and name it *Retry*. This node fills a " "rectangle with a uniform color and will serve as an overlay to darken the " "screen." msgstr "" #: ../../docs/getting_started/first_3d_game/08.score_and_replay.rst:198 msgid "" "To make it span over the whole viewport, you can use the *Layout* menu in " "the toolbar." msgstr "" #: ../../docs/getting_started/first_3d_game/08.score_and_replay.rst:203 msgid "Open it and apply the *Full Rect* command." msgstr "" #: ../../docs/getting_started/first_3d_game/08.score_and_replay.rst:207 msgid "" "Nothing happens. Well, almost nothing: only the four green pins move to the " "corners of the selection box." msgstr "" #: ../../docs/getting_started/first_3d_game/08.score_and_replay.rst:212 msgid "" "This is because UI nodes (all the ones with a green icon) work with anchors " "and margins relative to their parent's bounding box. Here, the " "*UserInterface* node has a small size and the *Retry* one is limited by it." msgstr "" #: ../../docs/getting_started/first_3d_game/08.score_and_replay.rst:216 msgid "" "Select the *UserInterface* and apply *Layout -> Full Rect* to it as well. " "The *Retry* node should now span the whole viewport." msgstr "" #: ../../docs/getting_started/first_3d_game/08.score_and_replay.rst:219 msgid "" "Let's change its color so it darkens the game area. Select *Retry* and in " "the *Inspector*, set its *Color* to something both dark and transparent. To " "do so, in the color picker, drag the *A* slider to the left. It controls the " "color's alpha channel, that is to say, its opacity." msgstr "" #: ../../docs/getting_started/first_3d_game/08.score_and_replay.rst:226 msgid "" "Next, add a *Label* as a child of *Retry* and give it the *Text* \"Press " "Enter to retry.\"" msgstr "" #: ../../docs/getting_started/first_3d_game/08.score_and_replay.rst:231 msgid "" "To move it and anchor it in the center of the screen, apply *Layout -> " "Center* to it." msgstr "" #: ../../docs/getting_started/first_3d_game/08.score_and_replay.rst:237 #, fuzzy msgid "Coding the retry option" msgstr "Hàm chồng chéo (Overrideable functions)" #: ../../docs/getting_started/first_3d_game/08.score_and_replay.rst:239 msgid "" "We can now head to the code to show and hide the *Retry* node when the " "player dies and plays again." msgstr "" #: ../../docs/getting_started/first_3d_game/08.score_and_replay.rst:242 msgid "" "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." msgstr "" #: ../../docs/getting_started/first_3d_game/08.score_and_replay.rst:260 msgid "Then, when the player gets hit, we show the overlay." msgstr "" #: ../../docs/getting_started/first_3d_game/08.score_and_replay.rst:277 msgid "" "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." msgstr "" #: ../../docs/getting_started/first_3d_game/08.score_and_replay.rst:281 msgid "" "If the player pressed the predefined ``ui_accept`` input action and *Retry* " "is visible, we reload the current scene." msgstr "" #: ../../docs/getting_started/first_3d_game/08.score_and_replay.rst:303 msgid "" "The function ``get_tree()`` gives us access to the global :ref:`SceneTree " "` object, which allows us to reload and restart the current " "scene." msgstr "" #: ../../docs/getting_started/first_3d_game/08.score_and_replay.rst:308 #, fuzzy msgid "Adding music" msgstr "Thêm một script" #: ../../docs/getting_started/first_3d_game/08.score_and_replay.rst:310 msgid "" "To add music that plays continuously in the background, we're going to use " "another feature in Godot: :ref:`autoloads `." msgstr "" #: ../../docs/getting_started/first_3d_game/08.score_and_replay.rst:313 msgid "" "To play audio, all you need to do is add an *AudioStreamPlayer* node to your " "scene and attach an audio file to it. When you start the scene, it can play " "automatically. However, when you reload the scene, like we do to play again, " "the audio nodes are also reset, and the music starts back from the beginning." msgstr "" #: ../../docs/getting_started/first_3d_game/08.score_and_replay.rst:318 msgid "" "You can use the autoload feature to have Godot load a node or a scene " "automatically at the start of the game, outside the current scene. You can " "also use it to create globally accessible objects." msgstr "" #: ../../docs/getting_started/first_3d_game/08.score_and_replay.rst:322 msgid "" "Create a new scene by going to the *Scene* menu and clicking *New Scene*." msgstr "" #: ../../docs/getting_started/first_3d_game/08.score_and_replay.rst:326 msgid "" "Click the *Other Node* button to create an *AudioStreamPlayer* and rename it " "to *MusicPlayer*." msgstr "" #: ../../docs/getting_started/first_3d_game/08.score_and_replay.rst:331 msgid "" "We included a music soundtrack in the ``art/`` directory, ``House In a " "Forest Loop.ogg``. Click and drag it onto the *Stream* property in the " "*Inspector*. Also, turn on *Autoplay* so the music plays automatically at " "the start of the game." msgstr "" #: ../../docs/getting_started/first_3d_game/08.score_and_replay.rst:338 #, fuzzy msgid "Save the scene as ``MusicPlayer.tscn``." msgstr "Cuối cùng, lưu scene với một tên như `` sayhello.tscn``." #: ../../docs/getting_started/first_3d_game/08.score_and_replay.rst:340 msgid "" "We have to register it as an autoload. Head to the *Project -> Project " "Settings…* menu and click on the *Autoload* tab." msgstr "" #: ../../docs/getting_started/first_3d_game/08.score_and_replay.rst:343 msgid "" "In the *Path* field, you want to enter the path to your scene. Click the " "folder icon to open the file browser and double-click on ``MusicPlayer." "tscn``. Then, click the *Add* button on the right to register the node." msgstr "" #: ../../docs/getting_started/first_3d_game/08.score_and_replay.rst:349 msgid "" "If you run the game now, the music will play automatically. And even when " "you lose and retry, it keeps going." msgstr "" #: ../../docs/getting_started/first_3d_game/08.score_and_replay.rst:352 msgid "" "Before we wrap up this lesson, here's a quick look at how it works under the " "hood. When you run the game, your *Scene* dock changes to give you two tabs: " "*Remote* and *Local*." msgstr "" #: ../../docs/getting_started/first_3d_game/08.score_and_replay.rst:358 msgid "" "The *Remote* tab allows you to visualize the node tree of your running game. " "There, you will see the *Main* node and everything the scene contains and " "the instantiated mobs at the bottom." msgstr "" #: ../../docs/getting_started/first_3d_game/08.score_and_replay.rst:364 msgid "" "At the top are the autoloaded *MusicPlayer* and a *root* node, which is your " "game's viewport." msgstr "" #: ../../docs/getting_started/first_3d_game/08.score_and_replay.rst:367 msgid "" "And that does it for this lesson. In the next part, we'll add an animation " "to make the game both look and feel much nicer." msgstr "" #: ../../docs/getting_started/first_3d_game/08.score_and_replay.rst:370 msgid "Here is the complete ``Main.gd`` script for reference." msgstr "" #: ../../docs/getting_started/first_3d_game/09.adding_animations.rst:4 #, fuzzy msgid "Character animation" msgstr "Sprite động" #: ../../docs/getting_started/first_3d_game/09.adding_animations.rst:6 msgid "" "In this final lesson, we'll use Godot's built-in animation tools to make our " "characters float and flap. You'll learn to design animations in the editor " "and use code to make your game feel alive." msgstr "" #: ../../docs/getting_started/first_3d_game/09.adding_animations.rst:12 #, fuzzy msgid "We'll start with an introduction to using the animation editor." msgstr "Hướng dẫn Godot's editor" #: ../../docs/getting_started/first_3d_game/09.adding_animations.rst:15 #, fuzzy msgid "Using the animation editor" msgstr "Thư viện tài nguyên" #: ../../docs/getting_started/first_3d_game/09.adding_animations.rst:17 msgid "" "The engine comes with tools to author animations in the editor. You can then " "use the code to play and control them at runtime." msgstr "" #: ../../docs/getting_started/first_3d_game/09.adding_animations.rst:20 msgid "" "Open the player scene, select the player node, and add an animation player " "node." msgstr "" #: ../../docs/getting_started/first_3d_game/09.adding_animations.rst:22 msgid "The *Animation* dock appears in the bottom panel." msgstr "" #: ../../docs/getting_started/first_3d_game/09.adding_animations.rst:26 msgid "" "It features a toolbar and the animation drop-down menu at the top, a track " "editor in the middle that's currently empty, and filter, snap, and zoom " "options at the bottom." msgstr "" #: ../../docs/getting_started/first_3d_game/09.adding_animations.rst:30 msgid "Let's create an animation. Click on *Animation -> New*." msgstr "" #: ../../docs/getting_started/first_3d_game/09.adding_animations.rst:34 msgid "Name the animation \"float\"." msgstr "" #: ../../docs/getting_started/first_3d_game/09.adding_animations.rst:38 msgid "" "Once you created the animation, the timeline appears with numbers " "representing time in seconds." msgstr "" #: ../../docs/getting_started/first_3d_game/09.adding_animations.rst:43 msgid "" "We want the animation to start playback automatically at the start of the " "game. Also, it should loop." msgstr "" #: ../../docs/getting_started/first_3d_game/09.adding_animations.rst:46 msgid "" "To do so, you can click the button with an \"A+\" icon in the animation " "toolbar and the looping arrows, respectively." msgstr "" #: ../../docs/getting_started/first_3d_game/09.adding_animations.rst:51 msgid "" "You can also pin the animation editor by clicking the pin icon in the top-" "right. This prevents it from folding when you click on the viewport and " "deselect the nodes." msgstr "" #: ../../docs/getting_started/first_3d_game/09.adding_animations.rst:57 msgid "" "Set the animation duration to ``1.2`` seconds in the top-right of the dock." msgstr "" #: ../../docs/getting_started/first_3d_game/09.adding_animations.rst:61 msgid "" "You should see the gray ribbon widen a bit. It shows you the start and end " "of your animation and the vertical blue line is your time cursor." msgstr "" #: ../../docs/getting_started/first_3d_game/09.adding_animations.rst:66 msgid "" "You can click and drag the slider in the bottom-right to zoom in and out of " "the timeline." msgstr "" #: ../../docs/getting_started/first_3d_game/09.adding_animations.rst:72 #, fuzzy msgid "The float animation" msgstr "Bật hoạt hình thích hợp." #: ../../docs/getting_started/first_3d_game/09.adding_animations.rst:74 msgid "" "With the animation player node, you can animate most properties on as many " "nodes as you need. Notice the key icon next to properties in the " "*Inspector*. You can click any of them to create a keyframe, a time and " "value pair for the corresponding property. The keyframe gets inserted where " "your time cursor is in the timeline." msgstr "" #: ../../docs/getting_started/first_3d_game/09.adding_animations.rst:80 msgid "" "Let's insert our first keys. Here, we will animate both the translation and " "the rotation of the *Character* node." msgstr "" #: ../../docs/getting_started/first_3d_game/09.adding_animations.rst:83 msgid "" "Select the *Character* and click the key icon next to *Translation* in the " "*Inspector*. Do the same for *Rotation Degrees*." msgstr "" #: ../../docs/getting_started/first_3d_game/09.adding_animations.rst:88 msgid "" "Two tracks appear in the editor with a diamond icon representing each " "keyframe." msgstr "" #: ../../docs/getting_started/first_3d_game/09.adding_animations.rst:92 msgid "" "You can click and drag on the diamonds to move them in time. Move the " "translation key to ``0.2`` seconds and the rotation key to ``0.1`` seconds." msgstr "" #: ../../docs/getting_started/first_3d_game/09.adding_animations.rst:97 msgid "" "Move the time cursor to ``0.5`` seconds by clicking and dragging on the gray " "timeline. In the *Inspector*, set the *Translation*'s *Y* axis to about " "``0.65`` meters and the *Rotation Degrees*' *X* axis to ``8``." msgstr "" #: ../../docs/getting_started/first_3d_game/09.adding_animations.rst:103 msgid "" "Create a keyframe for both properties and shift the translation key to " "``0.7`` seconds by dragging it on the timeline." msgstr "" #: ../../docs/getting_started/first_3d_game/09.adding_animations.rst:110 msgid "" "A lecture on the principles of animation is beyond the scope of this " "tutorial. Just note that you don't want to time and space everything evenly. " "Instead, animators play with timing and spacing, two core animation " "principles. You want to offset and contrast in your character's motion to " "make them feel alive." msgstr "" #: ../../docs/getting_started/first_3d_game/09.adding_animations.rst:116 msgid "" "Move the time cursor to the end of the animation, at ``1.2`` seconds. Set " "the Y translation to about ``0.35`` and the X rotation to ``-9`` degrees. " "Once again, create a key for both properties." msgstr "" #: ../../docs/getting_started/first_3d_game/09.adding_animations.rst:120 msgid "" "You can preview the result by clicking the play button or pressing :kbd:" "`Shift + D`. Click the stop button or press :kbd:`S` to stop playback." msgstr "" #: ../../docs/getting_started/first_3d_game/09.adding_animations.rst:125 msgid "" "You can see that the engine interpolates between your keyframes to produce a " "continuous animation. At the moment, though, the motion feels very robotic. " "This is because the default interpolation is linear, causing constant " "transitions, unlike how living things move in the real world." msgstr "" #: ../../docs/getting_started/first_3d_game/09.adding_animations.rst:130 msgid "We can control the transition between keyframes using easing curves." msgstr "" #: ../../docs/getting_started/first_3d_game/09.adding_animations.rst:132 msgid "" "Click and drag around the first two keys in the timeline to box select them." msgstr "" #: ../../docs/getting_started/first_3d_game/09.adding_animations.rst:136 msgid "" "You can edit the properties of both keys simultaneously in the *Inspector*, " "where you can see an *Easing* property." msgstr "" #: ../../docs/getting_started/first_3d_game/09.adding_animations.rst:141 msgid "" "Click and drag on the curve, pulling it towards the left. This will make it " "ease-out, that is to say, transition fast initially and slow down as the " "time cursor reaches the next keyframe." msgstr "" #: ../../docs/getting_started/first_3d_game/09.adding_animations.rst:147 msgid "" "Play the animation again to see the difference. The first half should " "already feel a bit bouncier." msgstr "" #: ../../docs/getting_started/first_3d_game/09.adding_animations.rst:150 msgid "Apply an ease-out to the second keyframe in the rotation track." msgstr "" #: ../../docs/getting_started/first_3d_game/09.adding_animations.rst:154 msgid "" "Do the opposite for the second translation keyframe, dragging it to the " "right." msgstr "" #: ../../docs/getting_started/first_3d_game/09.adding_animations.rst:158 #, fuzzy msgid "Your animation should look something like this." msgstr "Scene tree của bạn sẽ trông như thế này:" #: ../../docs/getting_started/first_3d_game/09.adding_animations.rst:164 msgid "" "Animations update the properties of the animated nodes every frame, " "overriding initial values. If we directly animated the *Player* node, it " "would prevent us from moving it in code. This is where the *Pivot* node " "comes in handy: even though we animated the *Character*, we can still move " "and rotate the *Pivot* and layer changes on top of the animation in a script." msgstr "" #: ../../docs/getting_started/first_3d_game/09.adding_animations.rst:171 msgid "If you play the game, the player's creature will now float!" msgstr "" #: ../../docs/getting_started/first_3d_game/09.adding_animations.rst:173 msgid "" "If the creature is a little too close to the floor, you can move the *Pivot* " "up to offset it." msgstr "" #: ../../docs/getting_started/first_3d_game/09.adding_animations.rst:177 #, fuzzy msgid "Controlling the animation in code" msgstr "Tạo nội dung" #: ../../docs/getting_started/first_3d_game/09.adding_animations.rst:179 msgid "" "We can use code to control the animation playback based on the player's " "input. Let's change the animation speed when the character is moving." msgstr "" #: ../../docs/getting_started/first_3d_game/09.adding_animations.rst:182 msgid "Open the *Player*'s script by clicking the script icon next to it." msgstr "" #: ../../docs/getting_started/first_3d_game/09.adding_animations.rst:186 msgid "" "In ``_physics_process()``, after the line where we check the ``direction`` " "vector, add the following code." msgstr "" #: ../../docs/getting_started/first_3d_game/09.adding_animations.rst:216 msgid "" "This code makes it so when the player moves, we multiply the playback speed " "by ``4``. When they stop, we reset it to normal." msgstr "" #: ../../docs/getting_started/first_3d_game/09.adding_animations.rst:219 msgid "" "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()``." msgstr "" #: ../../docs/getting_started/first_3d_game/09.adding_animations.rst:240 #, fuzzy msgid "Animating the mobs" msgstr "Tạo nội dung" #: ../../docs/getting_started/first_3d_game/09.adding_animations.rst:242 msgid "" "Here's another nice trick with animations in Godot: as long as you use a " "similar node structure, you can copy them to different scenes." msgstr "" #: ../../docs/getting_started/first_3d_game/09.adding_animations.rst:245 msgid "" "For example, both the *Mob* and the *Player* scenes have a *Pivot* and a " "*Character* node, so we can reuse animations between them." msgstr "" #: ../../docs/getting_started/first_3d_game/09.adding_animations.rst:248 msgid "" "Open the *Mob* scene, select the animation player node and open the float " "animation. Next, click on *Animation -> Copy*. Then Open ``Player.tscn`` and " "open its animation player. Click *Animation -> Paste*. That's it; all " "monsters will now play the float animation." msgstr "" #: ../../docs/getting_started/first_3d_game/09.adding_animations.rst:253 msgid "" "We can change the playback speed based on the creature's ``random_speed``. " "Open the *Mob*'s script and at the end of the ``initialize()`` function, add " "the following line." msgstr "" #: ../../docs/getting_started/first_3d_game/09.adding_animations.rst:272 msgid "And with that, you finished coding your first complete 3D game." msgstr "" #: ../../docs/getting_started/first_3d_game/09.adding_animations.rst:274 #, fuzzy msgid "**Congratulations**!" msgstr "Hằng số" #: ../../docs/getting_started/first_3d_game/09.adding_animations.rst:276 msgid "" "In the next part, we'll quickly recap what you learned and give you some " "links to keep learning more. But for now, here are the complete ``Player." "gd`` and ``Mob.gd`` so you can check your code against them." msgstr "" #: ../../docs/getting_started/first_3d_game/09.adding_animations.rst:280 msgid "Here's the *Player* script." msgstr "" #: ../../docs/getting_started/first_3d_game/09.adding_animations.rst:447 msgid "And the *Mob*'s script." msgstr "" #: ../../docs/getting_started/first_3d_game/going_further.rst:4 #, fuzzy msgid "Going further" msgstr "Di chuyển player" #: ../../docs/getting_started/first_3d_game/going_further.rst:6 msgid "" "You can pat yourself on the back for having completed your first 3D game " "with Godot." msgstr "" #: ../../docs/getting_started/first_3d_game/going_further.rst:9 msgid "" "In this series, we went over a wide range of techniques and editor features. " "Hopefully, you’ve witnessed how intuitive Godot’s scene system can be and " "learned a few tricks you can apply in your projects." msgstr "" #: ../../docs/getting_started/first_3d_game/going_further.rst:13 msgid "" "But we just scratched the surface: Godot has a lot more in store for you to " "save time creating games. And you can learn all that by browsing the " "documentation." msgstr "" #: ../../docs/getting_started/first_3d_game/going_further.rst:16 msgid "" "Where should you begin? Below, you’ll find a few pages to start exploring " "and build upon what you’ve learned so far." msgstr "" #: ../../docs/getting_started/first_3d_game/going_further.rst:19 msgid "" "But before that, here’s a link to download a completed version of the " "project: ``_." msgstr "" #: ../../docs/getting_started/first_3d_game/going_further.rst:23 msgid "Exploring the manual" msgstr "" #: ../../docs/getting_started/first_3d_game/going_further.rst:25 msgid "" "The manual is your ally whenever you have a doubt or you’re curious about a " "feature. It does not contain tutorials about specific game genres or " "mechanics. Instead, it explains how Godot works in general. In it, you will " "find information about 2D, 3D, physics, rendering and performance, and much " "more." msgstr "" #: ../../docs/getting_started/first_3d_game/going_further.rst:30 msgid "Here are the sections we recommend you to explore next:" msgstr "" #: ../../docs/getting_started/first_3d_game/going_further.rst:32 msgid "" "Read the :ref:`Scripting section ` to learn " "essential programming features you’ll use in every project." msgstr "" #: ../../docs/getting_started/first_3d_game/going_further.rst:34 msgid "" "The :ref:`3D ` and :ref:`Physics ` sections will teach you more about 3D game creation in the engine." msgstr "" #: ../../docs/getting_started/first_3d_game/going_further.rst:36 msgid "" ":ref:`Inputs ` is another important one for any " "game project." msgstr "" #: ../../docs/getting_started/first_3d_game/going_further.rst:38 msgid "" "You can start with these or, if you prefer, look at the sidebar menu on the " "left and pick your options." msgstr "" #: ../../docs/getting_started/first_3d_game/going_further.rst:41 msgid "" "We hope you enjoyed this tutorial series, and we’re looking forward to " "seeing what you achieve using Godot." msgstr "" #: ../../docs/tutorials/2d/canvas_layers.rst:4 msgid "Canvas layers" msgstr "" #: ../../docs/tutorials/2d/canvas_layers.rst:7 msgid "Viewport and Canvas items" msgstr "" #: ../../docs/tutorials/2d/canvas_layers.rst:9 msgid "" ":ref:`CanvasItem ` is the base for all 2D nodes, be it " "regular 2D nodes, such as :ref:`Node2D `, or :ref:`Control " "`. Both inherit from :ref:`CanvasItem `. " "You can arrange canvas items in trees. Each item will inherit its parent's " "transform: when the parent moves, its children move too." msgstr "" #: ../../docs/tutorials/2d/canvas_layers.rst:15 msgid "" "CanvasItem nodes, and nodes inheriting from them, are direct or indirect " "children of a :ref:`Viewport `, that display them." msgstr "" #: ../../docs/tutorials/2d/canvas_layers.rst:18 msgid "" "A Viewport has the property :ref:`Viewport.canvas_transform " "`, allows to apply a custom :ref:" "`Transform2D ` transform to the CanvasItem hierarchy it " "contains. Nodes such as :ref:`Camera2D ` work by changing " "that transform." msgstr "" #: ../../docs/tutorials/2d/canvas_layers.rst:24 msgid "" "To achieve effects like scrolling, manipulating the canvas transform " "property is more efficient than moving the root canvas item and the entire " "scene with it." msgstr "" #: ../../docs/tutorials/2d/canvas_layers.rst:27 msgid "" "Usually though, we don't want *everything* in the game or app to be subject " "to the canvas transform. For example:" msgstr "" #: ../../docs/tutorials/2d/canvas_layers.rst:30 msgid "" "**Parallax Backgrounds**: Backgrounds that move slower than the rest of the " "stage." msgstr "" #: ../../docs/tutorials/2d/canvas_layers.rst:32 msgid "" "**UI**: Think of a user interface (UI) or head-up display (HUD) superimposed " "on our view of the game world. We want a life counter, score display and " "other elements to retain their screen positions even when our view of the " "game world changes." msgstr "" #: ../../docs/tutorials/2d/canvas_layers.rst:33 msgid "" "**Transitions**: We may want visual effects used for transitions (fades, " "blends) to remain at a fixed screen location." msgstr "" #: ../../docs/tutorials/2d/canvas_layers.rst:35 msgid "How can these problems be solved in a single scene tree?" msgstr "" #: ../../docs/tutorials/2d/canvas_layers.rst:38 msgid "CanvasLayers" msgstr "" #: ../../docs/tutorials/2d/canvas_layers.rst:40 msgid "" "The answer is :ref:`CanvasLayer `, which is a node that " "adds a separate 2D rendering layer for all its children and grand-children. " "Viewport children will draw by default at layer \"0\", while a CanvasLayer " "will draw at any numeric layer. Layers with a greater number will be drawn " "above those with a smaller number. CanvasLayers also have their own " "transform and do not depend on the transform of other layers. This allows " "the UI to be fixed in screen-space while our view on the game world changes." msgstr "" #: ../../docs/tutorials/2d/canvas_layers.rst:49 msgid "" "An example of this is creating a parallax background. This can be done with " "a CanvasLayer at layer \"-1\". The screen with the points, life counter and " "pause button can also be created at layer \"1\"." msgstr "" #: ../../docs/tutorials/2d/canvas_layers.rst:53 msgid "Here's a diagram of how it looks:" msgstr "" #: ../../docs/tutorials/2d/canvas_layers.rst:57 msgid "" "CanvasLayers are independent of tree order, and they only depend on their " "layer number, so they can be instantiated when needed." msgstr "" #: ../../docs/tutorials/2d/canvas_layers.rst:60 msgid "" "CanvasLayers aren't necessary to control the drawing order of nodes. The " "standard way to ensuring that a node is correctly drawn 'in front' or " "'behind' others is to manipulate the order of the nodes in the scene panel. " "Perhaps counterintuitively, the topmost nodes in the scene panel are drawn " "on *behind* lower ones in the viewport. 2d nodes also have a property for " "controlling their drawing order (see :ref:`Node2D.z_index " "`)." msgstr "" #: ../../docs/tutorials/2d/2d_transforms.rst:4 msgid "Viewport and canvas transforms" msgstr "" #: ../../docs/tutorials/2d/2d_transforms.rst:9 msgid "" "This is an overview of the 2D transforms going on for nodes from the moment " "they draw their content locally to the time they are drawn onto the screen. " "This overview discusses very low level details of the engine." msgstr "" #: ../../docs/tutorials/2d/2d_transforms.rst:14 msgid "Canvas transform" msgstr "" #: ../../docs/tutorials/2d/2d_transforms.rst:16 msgid "" "As mentioned in the previous tutorial, :ref:`doc_canvas_layers`, every " "CanvasItem node (remember that Node2D and Control based nodes use CanvasItem " "as their common root) will reside in a *Canvas Layer*. Every canvas layer " "has a transform (translation, rotation, scale, etc.) that can be accessed as " "a :ref:`Transform2D `." msgstr "" #: ../../docs/tutorials/2d/2d_transforms.rst:22 msgid "" "Also covered in the previous tutorial, nodes are drawn by default in Layer " "0, in the built-in canvas. To put nodes in a different layer, a :ref:" "`CanvasLayer ` node can be used." msgstr "" #: ../../docs/tutorials/2d/2d_transforms.rst:27 msgid "Global canvas transform" msgstr "" #: ../../docs/tutorials/2d/2d_transforms.rst:29 msgid "" "Viewports also have a Global Canvas transform (also a :ref:`Transform2D " "`). This is the master transform and affects all " "individual *Canvas Layer* transforms. Generally, this transform is not of " "much use, but is used in the CanvasItem Editor in Godot's editor." msgstr "" #: ../../docs/tutorials/2d/2d_transforms.rst:36 msgid "Stretch transform" msgstr "" #: ../../docs/tutorials/2d/2d_transforms.rst:38 msgid "" "Finally, viewports have a *Stretch Transform*, which is used when resizing " "or stretching the screen. This transform is used internally (as described " "in :ref:`doc_multiple_resolutions`), but can also be manually set on each " "viewport." msgstr "" #: ../../docs/tutorials/2d/2d_transforms.rst:43 msgid "" "Input events received in the :ref:`MainLoop._input_event() " "` callback are multiplied by this " "transform but lack the ones above. To convert InputEvent coordinates to " "local CanvasItem coordinates, the :ref:`CanvasItem.make_input_local() " "` function was added for " "convenience." msgstr "" #: ../../docs/tutorials/2d/2d_transforms.rst:50 msgid "Transform order" msgstr "" #: ../../docs/tutorials/2d/2d_transforms.rst:52 msgid "" "For a coordinate in CanvasItem local properties to become an actual screen " "coordinate, the following chain of transforms must be applied:" msgstr "" #: ../../docs/tutorials/2d/2d_transforms.rst:58 msgid "Transform functions" msgstr "" #: ../../docs/tutorials/2d/2d_transforms.rst:60 msgid "Obtaining each transform can be achieved with the following functions:" msgstr "" #: ../../docs/tutorials/2d/2d_transforms.rst:63 #: ../../docs/tutorials/io/data_paths.rst:57 #: ../../docs/tutorials/io/binary_serialization_api.rst:29 #: ../../docs/tutorials/io/binary_serialization_api.rst:102 #: ../../docs/tutorials/io/binary_serialization_api.rst:113 #: ../../docs/tutorials/io/binary_serialization_api.rst:122 #: ../../docs/tutorials/io/binary_serialization_api.rst:133 #: ../../docs/tutorials/io/binary_serialization_api.rst:142 #: ../../docs/tutorials/io/binary_serialization_api.rst:151 #: ../../docs/tutorials/io/binary_serialization_api.rst:164 #: ../../docs/tutorials/io/binary_serialization_api.rst:175 #: ../../docs/tutorials/io/binary_serialization_api.rst:190 #: ../../docs/tutorials/io/binary_serialization_api.rst:203 #: ../../docs/tutorials/io/binary_serialization_api.rst:222 #: ../../docs/tutorials/io/binary_serialization_api.rst:237 #: ../../docs/tutorials/io/binary_serialization_api.rst:252 #: ../../docs/tutorials/io/binary_serialization_api.rst:271 #: ../../docs/tutorials/io/binary_serialization_api.rst:296 #: ../../docs/tutorials/io/binary_serialization_api.rst:327 #: ../../docs/tutorials/io/binary_serialization_api.rst:342 #: ../../docs/tutorials/io/binary_serialization_api.rst:351 #: ../../docs/tutorials/io/binary_serialization_api.rst:362 #: ../../docs/tutorials/io/binary_serialization_api.rst:372 #: ../../docs/tutorials/io/binary_serialization_api.rst:391 #: ../../docs/tutorials/io/binary_serialization_api.rst:403 #: ../../docs/tutorials/io/binary_serialization_api.rst:415 #: ../../docs/tutorials/io/binary_serialization_api.rst:428 #: ../../docs/tutorials/io/binary_serialization_api.rst:439 #: ../../docs/tutorials/io/binary_serialization_api.rst:450 #: ../../docs/tutorials/io/binary_serialization_api.rst:458 #: ../../docs/tutorials/io/binary_serialization_api.rst:471 #: ../../docs/tutorials/io/binary_serialization_api.rst:484 #: ../../docs/tutorials/io/binary_serialization_api.rst:499 #: ../../docs/tutorials/plugins/editor/import_plugins.rst:246 #: ../../docs/tutorials/shaders/shader_reference/shading_language.rst:21 #: ../../docs/tutorials/shaders/shader_reference/shading_language.rst:569 #: ../../docs/tutorials/shaders/converting_glsl_to_godot_shaders.rst:98 #: ../../docs/tutorials/shaders/converting_glsl_to_godot_shaders.rst:171 #: ../../docs/tutorials/shaders/converting_glsl_to_godot_shaders.rst:236 msgid "Type" msgstr "Kiểu" #: ../../docs/tutorials/2d/2d_transforms.rst:63 msgid "Transform" msgstr "Biến đổi" #: ../../docs/tutorials/2d/2d_transforms.rst:65 msgid "CanvasItem" msgstr "" #: ../../docs/tutorials/2d/2d_transforms.rst:65 msgid "" ":ref:`CanvasItem.get_global_transform() " "`" msgstr "" #: ../../docs/tutorials/2d/2d_transforms.rst:67 msgid "CanvasLayer" msgstr "" #: ../../docs/tutorials/2d/2d_transforms.rst:67 msgid "" ":ref:`CanvasItem.get_canvas_transform() " "`" msgstr "" #: ../../docs/tutorials/2d/2d_transforms.rst:69 msgid "CanvasLayer+GlobalCanvas+Stretch" msgstr "" #: ../../docs/tutorials/2d/2d_transforms.rst:69 msgid "" ":ref:`CanvasItem.get_viewport_transform() " "`" msgstr "" #: ../../docs/tutorials/2d/2d_transforms.rst:72 msgid "" "Finally, then, to convert a CanvasItem local coordinates to screen " "coordinates, just multiply in the following order:" msgstr "" #: ../../docs/tutorials/2d/2d_transforms.rst:84 msgid "" "Keep in mind, however, that it is generally not desired to work with screen " "coordinates. The recommended approach is to simply work in Canvas " "coordinates (``CanvasItem.get_global_transform()``), to allow automatic " "screen resolution resizing to work properly." msgstr "" #: ../../docs/tutorials/2d/2d_transforms.rst:90 msgid "Feeding custom input events" msgstr "" #: ../../docs/tutorials/2d/2d_transforms.rst:92 msgid "" "It is often desired to feed custom input events to the scene tree. With the " "above knowledge, to correctly do this, it must be done the following way:" msgstr "" #: ../../docs/tutorials/2d/using_tilemaps.rst:4 #, fuzzy msgid "Using TileMaps" msgstr "Tạo nội dung" #: ../../docs/tutorials/2d/using_tilemaps.rst:9 msgid "" "A tilemap is a grid of tiles used to create a game's layout. There are " "several benefits to using :ref:`TileMap ` nodes to design " "your levels. First, they make it possible to draw the layout by \"painting\" " "the tiles onto a grid, which is much faster than placing individual :ref:" "`Sprite ` nodes one by one. Second, they allow for much larger " "levels because they are optimized for drawing large numbers of tiles. " "Finally, you can add collision, occlusion, and navigation shapes to tiles, " "adding additional functionality to the TileMap." msgstr "" #: ../../docs/tutorials/2d/using_tilemaps.rst:23 msgid "" "This demo will use the following tiles taken from Kenney's \"Abstract " "Platformer\" art pack. You can find the complete set `here `_ but for this demo we'll stick to this small " "set." msgstr "" #: ../../docs/tutorials/2d/using_tilemaps.rst:29 msgid "Create a new project and place the above image in the project folder." msgstr "" #: ../../docs/tutorials/2d/using_tilemaps.rst:31 msgid "" "When using a tileset, it's important that adjacent tiles match up. Godot's " "default is to import 2D images using an interpolated \"filter\" mode, which " "will result in ugly borders between the tiles. Select the image and click " "the Import tab. Turn off ``Filter`` and click \"Reimport\". See :ref:" "`doc_import_images` for details." msgstr "" #: ../../docs/tutorials/2d/using_tilemaps.rst:37 msgid "TileMap node" msgstr "" #: ../../docs/tutorials/2d/using_tilemaps.rst:39 msgid "" "Add a new :ref:`TileMap ` node to the scene. By default, a " "TileMap uses a square grid of tiles. You can also use a perspective-based " "\"Isometric\" mode or define your own custom tile shape." msgstr "" #: ../../docs/tutorials/2d/using_tilemaps.rst:45 msgid "" "Under the \"Cell\" section in the Inspector are many properties you can " "adjust to customize your tilemap's behavior:" msgstr "" #: ../../docs/tutorials/2d/using_tilemaps.rst:52 msgid "``Cell Size``" msgstr "" #: ../../docs/tutorials/2d/using_tilemaps.rst:51 msgid "" "This defines the size of the grid. This should match the pixel size of your " "tiles. The default value is ``(64, 64)``." msgstr "" #: ../../docs/tutorials/2d/using_tilemaps.rst:56 msgid "``YSort``" msgstr "" #: ../../docs/tutorials/2d/using_tilemaps.rst:55 msgid "" "This causes tiles to be drawn in order of their ``Y`` position, so that " "\"lower\" tiles are drawn on top of \"higher\" ones." msgstr "" #: ../../docs/tutorials/2d/using_tilemaps.rst:59 msgid "``Half Offset`` and ``Tile Origin``" msgstr "" #: ../../docs/tutorials/2d/using_tilemaps.rst:59 msgid "" "These properties affect the position of the tile relative to the grid " "position." msgstr "" #: ../../docs/tutorials/2d/using_tilemaps.rst:63 msgid "``Quadrant``" msgstr "" #: ../../docs/tutorials/2d/using_tilemaps.rst:62 msgid "" "Defines the chunk size used for batched drawing. This can negatively affect " "performance. Don't change it unless you know what you're doing." msgstr "" #: ../../docs/tutorials/2d/using_tilemaps.rst:66 msgid "``Custom Transform``" msgstr "" #: ../../docs/tutorials/2d/using_tilemaps.rst:66 msgid "Used to alter the tile's shape. Use this if you have non-square tiles." msgstr "" #: ../../docs/tutorials/2d/using_tilemaps.rst:68 msgid "All of these options can be left at their defaults for this demo." msgstr "" #: ../../docs/tutorials/2d/using_tilemaps.rst:71 #, fuzzy msgid "Creating a TileSet" msgstr "Tạo nội dung" #: ../../docs/tutorials/2d/using_tilemaps.rst:73 msgid "" "Once you've configured your tilemap, it's time to add a :ref:`TileSet " "`. A TileSet is a :ref:`Resource ` that " "contains the data about your tiles - their textures, collision shapes, and " "other properties. When the game runs, the TileMap combines the individual " "tiles into a single object." msgstr "" #: ../../docs/tutorials/2d/using_tilemaps.rst:79 msgid "" "To add a new TileSet, click on the \"Tile Set\" property and select \"New " "TileSet\"." msgstr "" #: ../../docs/tutorials/2d/using_tilemaps.rst:84 msgid "" "Click on the TileSet property, and the \"TileSet\" panel will open at the " "bottom of the editor window:" msgstr "" #: ../../docs/tutorials/2d/using_tilemaps.rst:89 msgid "" "First, you need to add the texture(s) that you'll use for the tiles. Click " "the \"Add Texture(s) to TileSet\" button and select the ``tilesheet.png`` " "image." msgstr "" #: ../../docs/tutorials/2d/using_tilemaps.rst:92 msgid "" "Next, click \"New Single Tile\" and drag in the image to select the tile you " "want. Click the \"Enable Snap\" button to make it easier to select the " "entire tile. A yellow rectangle appears around the selected tile." msgstr "" #: ../../docs/tutorials/2d/using_tilemaps.rst:98 msgid "" "Click on the TileMap in the scene tree, and you'll see that the newly " "created tile now appears on the right side. Click in the viewport and you " "can place tiles. Right-click to remove them." msgstr "" #: ../../docs/tutorials/2d/using_tilemaps.rst:104 msgid "" "It's easy to accidentally select and move the tilemap node. To avoid this, " "use the node's lock button:" msgstr "" #: ../../docs/tutorials/2d/using_tilemaps.rst:110 #: ../../docs/tutorials/assets_pipeline/escn_exporter/physics.rst:23 #: ../../docs/tutorials/physics/physics_introduction.rst:62 msgid "Collision shapes" msgstr "" #: ../../docs/tutorials/2d/using_tilemaps.rst:112 msgid "" "If you're making a map that needs collisions - walls, floor, or other " "obstacles, for example - then you'll need to add collision shapes to any " "tiles that you want to be considered \"solid\"." msgstr "" #: ../../docs/tutorials/2d/using_tilemaps.rst:116 msgid "" "Click \"TileSet\" at the bottom of the editor window to return to the " "tileset tool. Click the tile you previously defined (outlined in yellow). " "Select the \"Collision\" tab and click the \"Create a new rectangle\" " "button. Make sure you still have grid snap enabled, then click and drag in " "the tile. A square collision shape appears in light blue:" msgstr "" #: ../../docs/tutorials/2d/using_tilemaps.rst:124 msgid "" "You can add occlusion and navigation shapes to the tile in the same way." msgstr "" #: ../../docs/tutorials/2d/using_tilemaps.rst:127 msgid "Atlas tiles" msgstr "" #: ../../docs/tutorials/2d/using_tilemaps.rst:129 msgid "" "Rather than adding individual tiles one at a time, you can define a group of " "tiles all at once using an atlas. This also allows you to randomly generate " "tiles from the group." msgstr "" #: ../../docs/tutorials/2d/using_tilemaps.rst:133 msgid "Click \"New Atlas\" and drag to select the entire tile sheet." msgstr "" #: ../../docs/tutorials/2d/using_tilemaps.rst:137 msgid "" "If you haven't already, make sure to change the \"Step\" in the snap " "settings to `(64, 64)`, or your tiles may be chopped into smaller pieces. " "You can find this in the Inspector:" msgstr "" #: ../../docs/tutorials/2d/using_tilemaps.rst:143 msgid "" "Once you've defined the atlas you can add collision shapes to the individual " "tiles as before. You can also click \"Icon\" to select one of the tiles to " "represent the atlas." msgstr "" #: ../../docs/tutorials/2d/using_tilemaps.rst:147 msgid "" "Back in the TileMap, you can select the atlas tile and you'll see all of the " "tiles it contains:" msgstr "" #: ../../docs/tutorials/2d/using_tilemaps.rst:152 msgid "" "In addition to saving time when defining the tiles, this can help by " "grouping similar tiles together when you're working with a large number of " "tiles." msgstr "" #: ../../docs/tutorials/2d/using_tilemaps.rst:156 msgid "Random tile priorities" msgstr "" #: ../../docs/tutorials/2d/using_tilemaps.rst:158 msgid "" "When drawing with atlas tiles, enabling the \"Use priority\" option causes " "tiles to be selected at random. By default, each tile in the tileset has an " "equal likelihood of occurring. You can change the likelihood by setting " "different priorities for each tile. For example, a tile with priority 2 is " "twice as likely to be selected as a tile with priority 1, and a tile with " "priority 3 is 50% more likely to be selected than a tile with priority 2." msgstr "" #: ../../docs/tutorials/2d/using_tilemaps.rst:166 msgid "Autotiles" msgstr "" #: ../../docs/tutorials/2d/using_tilemaps.rst:168 msgid "" "Autotiles allow you to define a group of tiles, then add rules to control " "which tile gets used for drawing based on the content of adjacent cells." msgstr "" #: ../../docs/tutorials/2d/using_tilemaps.rst:171 msgid "" "Click \"New Autotile\" and drag to select the tiles you wish to use. You can " "add collisions, occlusion, navigation shapes, tile priorties, and select an " "icon tile in the same manner as for atlas tiles." msgstr "" #: ../../docs/tutorials/2d/using_tilemaps.rst:175 msgid "" "Tile selection is controlled by bitmasks. Bitmasks can be added by clicking " "\"Bitmask\", then clicking parts of the tiles to add or remove bits in the " "mask. Left-clicking an area of the tile adds a bit, right-click removes " "\"off\", and shift-left-click sets an \"ignore\" bit." msgstr "" #: ../../docs/tutorials/2d/using_tilemaps.rst:180 msgid "" "Whenever Godot updates a cell using an autotile, it first creates a pattern " "based on which adjacent cells are already set. Then, it searches the " "autotile for a single tile with a bitmask matching the created pattern. If " "no matching bitmask is found, the \"icon\" tile will be used instead. If " "more than one matching bitmask is found, one of them will be selected " "randomly, using the tile priorities." msgstr "" #: ../../docs/tutorials/2d/using_tilemaps.rst:187 msgid "" "The rules for matching a bitmask to a pattern depend on the tileset's " "autotile bitmask mode. This can be set in the \"Inspector\" tab, under the " "\"Selected Tile\" heading. Allowed values are \"2x2\", \"3x3 (minimal)\", " "and \"3x3\"." msgstr "" #: ../../docs/tutorials/2d/using_tilemaps.rst:191 msgid "" "All \"on\" and \"off\" bits must be satisfied for a bitmask to match, but " "\"ignore\" bits are ignored." msgstr "" #: ../../docs/tutorials/2d/using_tilemaps.rst:195 msgid "2x2" msgstr "" #: ../../docs/tutorials/2d/using_tilemaps.rst:197 msgid "In 2x2 mode, each bitmask contains four bits, one for each corner." msgstr "" #: ../../docs/tutorials/2d/using_tilemaps.rst:199 msgid "" "Where a bit is \"on\", all cells connected to that corner must be filled " "using the same autotile, in order for the bitmask to match. For example, if " "the top-left bit is set, the cell directly above, directly left, and " "diagonally above-left must be filled." msgstr "" #: ../../docs/tutorials/2d/using_tilemaps.rst:204 msgid "" "Where a bit is \"off\", at least one cell connected to that corner must not " "be set using the same autotile." msgstr "" #: ../../docs/tutorials/2d/using_tilemaps.rst:207 msgid "" "At least one bit must be set for the tile to be used, so a total of 15 tiles " "would be needed to provide exactly one tile for each arrangement that this " "mode can test for." msgstr "" #: ../../docs/tutorials/2d/using_tilemaps.rst:211 msgid "" "2x2 mode can only match cells that are part of a 2-by-2 block - cells with " "no neighbors and lines only one cell wide are not supported." msgstr "" #: ../../docs/tutorials/2d/using_tilemaps.rst:214 #: ../../docs/tutorials/2d/using_tilemaps.rst:246 msgid "**Template - Generic:**" msgstr "" #: ../../docs/tutorials/2d/using_tilemaps.rst:216 msgid "" "This template can be used for sideways or fully top-down perspectives. It's " "designed for a TileMap cell size of 64x64." msgstr "" #: ../../docs/tutorials/2d/using_tilemaps.rst:219 #: ../../docs/tutorials/2d/using_tilemaps.rst:252 #: ../../docs/tutorials/2d/using_tilemaps.rst:265 msgid "Key:" msgstr "" #: ../../docs/tutorials/2d/using_tilemaps.rst:221 #: ../../docs/tutorials/2d/using_tilemaps.rst:254 #: ../../docs/tutorials/2d/using_tilemaps.rst:267 msgid "Red: \"on\"" msgstr "" #: ../../docs/tutorials/2d/using_tilemaps.rst:222 #: ../../docs/tutorials/2d/using_tilemaps.rst:255 #: ../../docs/tutorials/2d/using_tilemaps.rst:268 msgid "White: \"off\"" msgstr "" #: ../../docs/tutorials/2d/using_tilemaps.rst:227 msgid "3x3 (minimal)" msgstr "" #: ../../docs/tutorials/2d/using_tilemaps.rst:229 msgid "" "In 3x3 (minimal) mode, each bitmask contains 9 bits (4 corners, 4 edges, 1 " "center). The 4 corner bits work the same as in 2x2 mode." msgstr "" #: ../../docs/tutorials/2d/using_tilemaps.rst:232 msgid "" "When an edge bit is \"on\", the cell which shares that edge must be filled. " "When an edge bit is \"off\", the cell which shares that edge must be empty." msgstr "" #: ../../docs/tutorials/2d/using_tilemaps.rst:235 msgid "" "The center bit should be \"on\" for any tile you wish to use. Note that in " "this mode, it makes no sense for a corner bit to be \"on\" when either edge " "bit adjacent to it is not \"on\"." msgstr "" #: ../../docs/tutorials/2d/using_tilemaps.rst:239 msgid "" "A total of 47 tiles would be needed to provide exactly one bitmask for each " "arrangement that this mode can test for." msgstr "" #: ../../docs/tutorials/2d/using_tilemaps.rst:244 msgid "Right-click an image and choose **Save image as…** to save it." msgstr "" #: ../../docs/tutorials/2d/using_tilemaps.rst:248 msgid "" "This template can be used for sideways or fully top-down perspectives. All " "templates below are designed for a TileMap cell size of 64x64, but you may " "have to use different subtile sizes for top-down templates as described " "below." msgstr "" #: ../../docs/tutorials/2d/using_tilemaps.rst:260 msgid "**Template - Generic 16 tiles:**" msgstr "" #: ../../docs/tutorials/2d/using_tilemaps.rst:262 msgid "" "This template can be used for tilesets that only have 16 tiles - for simpler " "art styles the missing tiles will not be noticeable." msgstr "" #: ../../docs/tutorials/2d/using_tilemaps.rst:269 msgid "Blue-checkered: \"ignore\"" msgstr "" #: ../../docs/tutorials/2d/using_tilemaps.rst:274 msgid "**Template - Top-down floor in 3/4 perspective:**" msgstr "" #: ../../docs/tutorials/2d/using_tilemaps.rst:276 msgid "Key (applies to the four templates below):" msgstr "" #: ../../docs/tutorials/2d/using_tilemaps.rst:278 msgid "Green: floor" msgstr "" #: ../../docs/tutorials/2d/using_tilemaps.rst:279 msgid "Cyan: wall" msgstr "" #: ../../docs/tutorials/2d/using_tilemaps.rst:280 msgid "Yellow: top of wall" msgstr "" #: ../../docs/tutorials/2d/using_tilemaps.rst:281 msgid "Grey: hidden due to overlap" msgstr "" #: ../../docs/tutorials/2d/using_tilemaps.rst:282 msgid "Transparent: air" msgstr "" #: ../../docs/tutorials/2d/using_tilemaps.rst:286 msgid "**Template - Top-down wall in 3/4 perspective:**" msgstr "" #: ../../docs/tutorials/2d/using_tilemaps.rst:290 msgid "**Template - Top-down wall in 3/4 perspective (thick walls):**" msgstr "" #: ../../docs/tutorials/2d/using_tilemaps.rst:292 msgid "" "When using this template, set the TileSet subtile size to ``Vector2(64, " "88)``." msgstr "" #: ../../docs/tutorials/2d/using_tilemaps.rst:296 msgid "**Template - Top-down wall in 3/4 perspective (tall walls):**" msgstr "" #: ../../docs/tutorials/2d/using_tilemaps.rst:298 msgid "" "When using this template, set the \"Snap Options\" Step to ``Vector2(64, " "184)`` and the \"Selected Tile\" Texture offset to height minus the cell " "size. This means the texture offset should be ``Vector2(0, -120)``:" msgstr "" #: ../../docs/tutorials/2d/using_tilemaps.rst:305 msgid "3x3" msgstr "" #: ../../docs/tutorials/2d/using_tilemaps.rst:307 msgid "" "In 3x3 mode, each bitmask contains 9 bits (4 corners, 4 edges, 1 center)" msgstr "" #: ../../docs/tutorials/2d/using_tilemaps.rst:309 msgid "" "Each bit checks a single adjacent cell. Corner bits only check diagonally " "adjacent cells. The center bit should be \"on\" for any tile you wish to use." msgstr "" #: ../../docs/tutorials/2d/using_tilemaps.rst:312 msgid "" "A total of 256 tiles would be needed to provide exactly one bitmask for each " "arrangement that this mode can test for." msgstr "" #: ../../docs/tutorials/2d/using_tilemaps.rst:317 #, fuzzy msgid "Disabling autotile" msgstr "Tạo nội dung" #: ../../docs/tutorials/2d/using_tilemaps.rst:319 msgid "" "When using an autotile, it is possible to turn off the autotile behaviour " "and select tiles manually, by clicking \"Disable Autotile\" at the top of " "the tile selection window." msgstr "" #: ../../docs/tutorials/2d/using_tilemaps.rst:324 msgid "Autotile binding" msgstr "" #: ../../docs/tutorials/2d/using_tilemaps.rst:326 msgid "" "By default, autotile only checks for adjacent cells filled using the same " "autotile. This behaviour can be overridden in order to have autotiles bind " "to each other, or even bind to empty cells. At present, this can only be " "done through scripting. You will need to add a script to your tileset, and " "define a function named \"_is_tile_bound(drawn_id, neighbor_id)\". This " "function will be called for each adjacent cell that does not contain the " "same autotile, and should return true if you want the drawn cell to \"bind\" " "to the neighbor cell. You can find the id of an autotile using " "\"find_tile_by_name(name)\", empty cells are given an id of -1." msgstr "" #: ../../docs/tutorials/2d/using_tilemaps.rst:336 msgid "" "Note that to use this in the editor, the script should start with a \"tool\" " "declaration, and you may need to close and reload the scene for these " "changes to take effect." msgstr "" #: ../../docs/tutorials/2d/using_tilemaps.rst:341 msgid "Tips and tricks" msgstr "" #: ../../docs/tutorials/2d/using_tilemaps.rst:343 msgid "" "If you're using a :ref:`Camera2D ` to scroll your level, you " "may notice lines appearing between your tiles. To fix this, open Project " "Settings and enable **Use Gpu Pixel Snap** in the **Rendering > 2d > " "Snapping** section." msgstr "" #: ../../docs/tutorials/2d/using_tilemaps.rst:347 msgid "" "You can flip and rotate tiles using the icons at the top right of the editor." msgstr "" #: ../../docs/tutorials/2d/using_tilemaps.rst:349 msgid "" "To draw straight lines, hold :kbd:`Shift` while clicking and dragging a tile." msgstr "" #: ../../docs/tutorials/2d/using_tilemaps.rst:351 msgid "" "Tools such as copy, paste, and bucket fill, can be found in the \"TileMap\" " "menu in the upper-right." msgstr "" #: ../../docs/tutorials/2d/particle_systems_2d.rst:4 msgid "Particle systems (2D)" msgstr "" #: ../../docs/tutorials/2d/particle_systems_2d.rst:7 msgid "Intro" msgstr "" #: ../../docs/tutorials/2d/particle_systems_2d.rst:9 msgid "" "A simple (but flexible enough for most uses) particle system is provided. " "Particle systems are used to simulate complex physical effects, such as " "sparks, fire, magic particles, smoke, mist, etc." msgstr "" #: ../../docs/tutorials/2d/particle_systems_2d.rst:13 msgid "" "The idea is that a \"particle\" is emitted at a fixed interval and with a " "fixed lifetime. During its lifetime, every particle will have the same base " "behavior. What makes each particle different from the rest and provides a " "more organic look is the \"randomness\" associated with each parameter. In " "essence, creating a particle system means setting base physics parameters " "and then adding randomness to them." msgstr "" #: ../../docs/tutorials/2d/particle_systems_2d.rst:21 #, fuzzy msgid "Particle nodes" msgstr "Tạo các node" #: ../../docs/tutorials/2d/particle_systems_2d.rst:23 msgid "" "Godot provides two different nodes for 2D particles, :ref:" "`class_Particles2D` and :ref:`class_CPUParticles2D`. Particles2D is more " "advanced and uses the GPU to process particle effects, but that limits it to " "higher end graphics API, and in our case to the GLES3 renderer. For projects " "using the GLES2 backend, CPUParticles2D is a CPU-driven option with near " "feature parity with Particles2D, but lesser performance. While Particles2D " "is configured via a :ref:`class_ParticlesMaterial` (and optionally with a " "custom shader), the matching options are provided via node properties in " "CPUParticles2D (with the exception of the trail settings). You can convert a " "Particles2D node into a CPUParticles2D node by clicking on the node in the " "inspector, and selecting \"Convert to CPUParticles2D\" in the \"Particles\" " "menu of the toolbar." msgstr "" #: ../../docs/tutorials/2d/particle_systems_2d.rst:36 msgid "" "The rest of this tutorial is going to use the Particles2D node. First, add a " "Particles2D node to your scene. After creating that node you will notice " "that only a white dot was created, and that there is a warning icon next to " "your Particles2D node in the scene dock. This is because the node needs a " "ParticlesMaterial to function." msgstr "" #: ../../docs/tutorials/2d/particle_systems_2d.rst:42 msgid "ParticlesMaterial" msgstr "" #: ../../docs/tutorials/2d/particle_systems_2d.rst:44 msgid "" "To add a process material to your particles node, go to ``Process Material`` " "in your inspector panel. Click on the box next to ``Material``, and from the " "dropdown menu select ``New ParticlesMaterial``." msgstr "" #: ../../docs/tutorials/2d/particle_systems_2d.rst:50 msgid "Your Particles2D node should now be emitting white points downward." msgstr "" #: ../../docs/tutorials/2d/particle_systems_2d.rst:56 msgid "Texture" msgstr "" #: ../../docs/tutorials/2d/particle_systems_2d.rst:58 msgid "" "A particle system uses a single texture (in the future this might be " "extended to animated textures via spritesheet). The texture is set via the " "relevant texture property:" msgstr "" #: ../../docs/tutorials/2d/particle_systems_2d.rst:65 msgid "Time parameters" msgstr "" #: ../../docs/tutorials/2d/particle_systems_2d.rst:68 msgid "Lifetime" msgstr "" #: ../../docs/tutorials/2d/particle_systems_2d.rst:70 msgid "" "The time in seconds that every particle will stay alive. When lifetime ends, " "a new particle is created to replace it." msgstr "" #: ../../docs/tutorials/2d/particle_systems_2d.rst:73 msgid "Lifetime: 0.5" msgstr "" #: ../../docs/tutorials/2d/particle_systems_2d.rst:77 msgid "Lifetime: 4.0" msgstr "" #: ../../docs/tutorials/2d/particle_systems_2d.rst:82 msgid "One Shot" msgstr "" #: ../../docs/tutorials/2d/particle_systems_2d.rst:84 msgid "" "When enabled, a Particles2D node will emit all of its particles once and " "then never again." msgstr "" #: ../../docs/tutorials/2d/particle_systems_2d.rst:88 msgid "Preprocess" msgstr "" #: ../../docs/tutorials/2d/particle_systems_2d.rst:90 msgid "" "Particle systems begin with zero particles emitted, then start emitting. " "This can be an inconvenience when loading a scene and systems like a torch, " "mist, etc. begin emitting the moment you enter. Preprocess is used to let " "the system process a given number of seconds before it is actually drawn the " "first time." msgstr "" #: ../../docs/tutorials/2d/particle_systems_2d.rst:97 msgid "Speed Scale" msgstr "" #: ../../docs/tutorials/2d/particle_systems_2d.rst:99 msgid "" "The speed scale has a default value of ``1`` and is used to adjust the speed " "of a particle system. Lowering the value will make the particles slower " "while increasing the value will make the particles much faster." msgstr "" #: ../../docs/tutorials/2d/particle_systems_2d.rst:104 msgid "Explosiveness" msgstr "" #: ../../docs/tutorials/2d/particle_systems_2d.rst:106 msgid "" "If lifetime is ``1`` and there are 10 particles, it means a particle will be " "emitted every 0.1 seconds. The explosiveness parameter changes this, and " "forces particles to be emitted all together. Ranges are:" msgstr "" #: ../../docs/tutorials/2d/particle_systems_2d.rst:110 msgid "0: Emit particles at regular intervals (default value)." msgstr "" #: ../../docs/tutorials/2d/particle_systems_2d.rst:111 msgid "1: Emit all particles simultaneously." msgstr "" #: ../../docs/tutorials/2d/particle_systems_2d.rst:113 msgid "" "Values in the middle are also allowed. This feature is useful for creating " "explosions or sudden bursts of particles:" msgstr "" #: ../../docs/tutorials/2d/particle_systems_2d.rst:119 msgid "Randomness" msgstr "" #: ../../docs/tutorials/2d/particle_systems_2d.rst:121 msgid "" "All physics parameters can be randomized. Random values range from ``0`` to " "``1``. The formula to randomize a parameter is:" msgstr "" #: ../../docs/tutorials/2d/particle_systems_2d.rst:129 msgid "Fixed FPS" msgstr "" #: ../../docs/tutorials/2d/particle_systems_2d.rst:131 msgid "" "This setting can be used to set the particle system to render at a fixed " "FPS. For instance, changing the value to ``2`` will make the particles " "render at 2 frames per second. Note this does not slow down the particle " "system itself." msgstr "" #: ../../docs/tutorials/2d/particle_systems_2d.rst:136 msgid "Fract Delta" msgstr "" #: ../../docs/tutorials/2d/particle_systems_2d.rst:138 msgid "This can be used to turn Fract Delta on or off." msgstr "" #: ../../docs/tutorials/2d/particle_systems_2d.rst:141 msgid "Drawing parameters" msgstr "" #: ../../docs/tutorials/2d/particle_systems_2d.rst:144 msgid "Visibility Rect" msgstr "" #: ../../docs/tutorials/2d/particle_systems_2d.rst:147 msgid "" "The visibility rectangle controls the visibility of the particles on screen. " "If this rectangle is outside of the viewport, the engine will not render the " "particles on screen." msgstr "" #: ../../docs/tutorials/2d/particle_systems_2d.rst:149 msgid "" "The rectangle's ``W`` and ``H`` properties respectively control its Width " "and its Height. The ``X`` and ``Y`` properties control the position of the " "upper-left corner of the rectangle, relative to the particle emitter." msgstr "" #: ../../docs/tutorials/2d/particle_systems_2d.rst:153 msgid "" "You can have Godot generate a Visibility Rect automatically using the " "toolbar above the 2d view. To do so, select the Particles2D node and Click " "``Particles > Generate Visibility Rect``. Godot will simulate the " "Particles2D node emitting particles for a few seconds and set the rectangle " "to fit the surface the particles take." msgstr "" #: ../../docs/tutorials/2d/particle_systems_2d.rst:155 msgid "" "You can control the emit duration with the ``Generation Time (sec)`` option. " "The maximum value is 25 seconds. If you need more time for your particles to " "move around, you can temporarily change the ``preprocess`` duration on the " "Particles2D node." msgstr "" #: ../../docs/tutorials/2d/particle_systems_2d.rst:158 msgid "Local Coords" msgstr "" #: ../../docs/tutorials/2d/particle_systems_2d.rst:160 msgid "" "By default this option is on, and it means that the space that particles are " "emitted to is relative to the node. If the node is moved, all particles are " "moved with it:" msgstr "" #: ../../docs/tutorials/2d/particle_systems_2d.rst:166 msgid "" "If disabled, particles will emit to global space, meaning that if the node " "is moved, already emitted particles are not affected:" msgstr "" #: ../../docs/tutorials/2d/particle_systems_2d.rst:172 msgid "Draw Order" msgstr "" #: ../../docs/tutorials/2d/particle_systems_2d.rst:174 msgid "" "This controls the order in which individual particles are drawn. ``Index`` " "means particles are drawn according to their emission order (default). " "``Lifetime`` means they are drawn in order of remaining lifetime." msgstr "" #: ../../docs/tutorials/2d/particle_systems_2d.rst:179 msgid "ParticlesMaterial settings" msgstr "" #: ../../docs/tutorials/2d/particle_systems_2d.rst:182 #, fuzzy msgid "Direction" msgstr "Giới Thiệu" #: ../../docs/tutorials/2d/particle_systems_2d.rst:184 msgid "" "This is the base direction at which particles emit. The default is " "``Vector3(1, 0, 0)`` which makes particles emit to the right. However, with " "the default gravity settings, particles will go straight down." msgstr "" #: ../../docs/tutorials/2d/particle_systems_2d.rst:190 msgid "" "For this property to be noticeable, you need an *initial velocity* greater " "than 0. Here, we set the initial velocity to 40. You'll notice that " "particles emit toward the right, then go down because of gravity." msgstr "" #: ../../docs/tutorials/2d/particle_systems_2d.rst:197 msgid "Spread" msgstr "" #: ../../docs/tutorials/2d/particle_systems_2d.rst:199 msgid "" "This parameter is the angle in degrees which will be randomly added in " "either direction to the base ``Direction``. A spread of ``180`` will emit in " "all directions (+/- 180). For spread to do anything the \"Initial Velocity\" " "parameter must be greater than 0." msgstr "" #: ../../docs/tutorials/2d/particle_systems_2d.rst:207 msgid "Flatness" msgstr "" #: ../../docs/tutorials/2d/particle_systems_2d.rst:209 msgid "This property is only useful for 3D particles." msgstr "" #: ../../docs/tutorials/2d/particle_systems_2d.rst:212 msgid "Gravity" msgstr "" #: ../../docs/tutorials/2d/particle_systems_2d.rst:214 msgid "The gravity applied to every particle." msgstr "" #: ../../docs/tutorials/2d/particle_systems_2d.rst:219 msgid "Initial Velocity" msgstr "" #: ../../docs/tutorials/2d/particle_systems_2d.rst:221 msgid "" "Initial velocity is the speed at which particles will be emitted (in pixels/" "sec). Speed might later be modified by gravity or other accelerations (as " "described further below)." msgstr "" #: ../../docs/tutorials/2d/particle_systems_2d.rst:228 msgid "Angular Velocity" msgstr "" #: ../../docs/tutorials/2d/particle_systems_2d.rst:230 msgid "Angular velocity is the initial angular velocity applied to particles." msgstr "" #: ../../docs/tutorials/2d/particle_systems_2d.rst:233 msgid "Spin Velocity" msgstr "" #: ../../docs/tutorials/2d/particle_systems_2d.rst:235 msgid "" "Spin velocity is the speed at which particles turn around their center (in " "degrees/sec)." msgstr "" #: ../../docs/tutorials/2d/particle_systems_2d.rst:241 msgid "Orbit Velocity" msgstr "" #: ../../docs/tutorials/2d/particle_systems_2d.rst:243 msgid "Orbit velocity is used to make particles turn around their center." msgstr "" #: ../../docs/tutorials/2d/particle_systems_2d.rst:248 msgid "Linear Acceleration" msgstr "" #: ../../docs/tutorials/2d/particle_systems_2d.rst:250 msgid "The linear acceleration applied to each particle." msgstr "" #: ../../docs/tutorials/2d/particle_systems_2d.rst:253 msgid "Radial Acceleration" msgstr "" #: ../../docs/tutorials/2d/particle_systems_2d.rst:255 msgid "" "If this acceleration is positive, particles are accelerated away from the " "center. If negative, they are absorbed towards it." msgstr "" #: ../../docs/tutorials/2d/particle_systems_2d.rst:261 msgid "Tangential Acceleration" msgstr "" #: ../../docs/tutorials/2d/particle_systems_2d.rst:263 msgid "" "This acceleration will use the tangent vector to the center. Combining with " "radial acceleration can do nice effects." msgstr "" #: ../../docs/tutorials/2d/particle_systems_2d.rst:269 msgid "Damping" msgstr "" #: ../../docs/tutorials/2d/particle_systems_2d.rst:271 msgid "" "Damping applies friction to the particles, forcing them to stop. It is " "especially useful for sparks or explosions, which usually begin with a high " "linear velocity and then stop as they fade." msgstr "" #: ../../docs/tutorials/2d/particle_systems_2d.rst:278 msgid "Angle" msgstr "" #: ../../docs/tutorials/2d/particle_systems_2d.rst:280 msgid "" "Determines the initial angle of the particle (in degrees). This parameter is " "mostly useful randomized." msgstr "" #: ../../docs/tutorials/2d/particle_systems_2d.rst:286 #: ../../docs/tutorials/3d/using_multi_mesh_instance.rst:87 #: ../../docs/tutorials/assets_pipeline/importing_images.rst:220 msgid "Scale" msgstr "Tỷ lệ" #: ../../docs/tutorials/2d/particle_systems_2d.rst:288 msgid "Determines the initial scale of the particles." msgstr "" #: ../../docs/tutorials/2d/particle_systems_2d.rst:293 msgid "Color" msgstr "Màu" #: ../../docs/tutorials/2d/particle_systems_2d.rst:295 msgid "Used to change the color of the particles being emitted." msgstr "" #: ../../docs/tutorials/2d/particle_systems_2d.rst:298 msgid "Hue variation" msgstr "" #: ../../docs/tutorials/2d/particle_systems_2d.rst:300 msgid "" "The ``Variation`` value sets the initial hue variation applied to each " "particle. The ``Variation Random`` value controls the hue variation " "randomness ratio." msgstr "" #: ../../docs/tutorials/2d/particle_systems_2d.rst:305 msgid "Emission Shapes" msgstr "" #: ../../docs/tutorials/2d/particle_systems_2d.rst:307 msgid "" "ParticlesMaterials allow you to set an Emission Mask, which dictates the " "area and direction in which particles are emitted. These can be generated " "from textures in your project." msgstr "" #: ../../docs/tutorials/2d/particle_systems_2d.rst:311 msgid "" "Ensure that a ParticlesMaterial is set, and the Particles2D node is " "selected. A \"Particles\" menu should appear in the Toolbar:" msgstr "" #: ../../docs/tutorials/2d/particle_systems_2d.rst:316 msgid "Open it and select \"Load Emission Mask\":" msgstr "" #: ../../docs/tutorials/2d/particle_systems_2d.rst:320 msgid "Then select which texture you want to use as your mask:" msgstr "" #: ../../docs/tutorials/2d/particle_systems_2d.rst:324 msgid "A dialog box with several settings will appear." msgstr "" #: ../../docs/tutorials/2d/particle_systems_2d.rst:327 msgid "Emission Mask" msgstr "" #: ../../docs/tutorials/2d/particle_systems_2d.rst:329 msgid "Three types of emission masks can be generated from a texture:" msgstr "" #: ../../docs/tutorials/2d/particle_systems_2d.rst:331 msgid "" "Solid Pixels: Particles will spawn from any area of the texture, excluding " "transparent areas." msgstr "" #: ../../docs/tutorials/2d/particle_systems_2d.rst:336 msgid "" "Border Pixels: Particles will spawn from the outer edges of the texture." msgstr "" #: ../../docs/tutorials/2d/particle_systems_2d.rst:340 msgid "" "Directed Border Pixels: Similar to Border Pixels, but adds extra information " "to the mask to give particles the ability to emit away from the borders. " "Note that an ``Initial Velocity`` will need to be set in order to utilize " "this." msgstr "" #: ../../docs/tutorials/2d/particle_systems_2d.rst:348 msgid "Emission Colors" msgstr "" #: ../../docs/tutorials/2d/particle_systems_2d.rst:350 msgid "" "``Capture from Pixel`` will cause the particles to inherit the color of the " "mask at their spawn points." msgstr "" #: ../../docs/tutorials/2d/particle_systems_2d.rst:352 msgid "" "Once you click \"OK\", the mask will be generated and set to the " "ParticlesMaterial, under the ``Emission Shape`` section:" msgstr "" #: ../../docs/tutorials/2d/particle_systems_2d.rst:356 msgid "" "All of the values within this section have been automatically generated by " "the \"Load Emission Mask\" menu, so they should generally be left alone." msgstr "" #: ../../docs/tutorials/2d/particle_systems_2d.rst:359 msgid "" "An image should not be added to ``Point Texture`` or ``Color Texture`` " "directly. The \"Load Emission Mask\" menu should always be used instead." msgstr "" #: ../../docs/tutorials/2d/2d_movement.rst:4 msgid "2D movement overview" msgstr "" #: ../../docs/tutorials/2d/2d_movement.rst:9 msgid "" "Every beginner has been there: \"How do I move my character?\" Depending on " "the style of game you're making, you may have special requirements, but in " "general the movement in most 2D games is based on a small number of designs." msgstr "" #: ../../docs/tutorials/2d/2d_movement.rst:13 msgid "" "We'll use :ref:`KinematicBody2D ` for these examples, " "but the principles will apply to other node types (Area2D, RigidBody2D) as " "well." msgstr "" #: ../../docs/tutorials/2d/2d_movement.rst:19 #: ../../docs/tutorials/2d/2d_lights_and_shadows.rst:22 #: ../../docs/tutorials/animation/2d_skeletons.rst:30 #: ../../docs/tutorials/platform/customizing_html5_shell.rst:44 #: ../../docs/tutorials/shaders/your_first_shader/your_first_2d_shader.rst:23 #: ../../docs/development/compiling/introduction_to_the_buildsystem.rst:40 msgid "Setup" msgstr "" #: ../../docs/tutorials/2d/2d_movement.rst:21 msgid "" "Each example below uses the same scene setup. Start with a " "``KinematicBody2D`` with two children: ``Sprite`` and ``CollisionShape2D``. " "You can use the Godot icon (\"icon.png\") for the Sprite's texture or use " "any other 2D image you have." msgstr "" #: ../../docs/tutorials/2d/2d_movement.rst:25 msgid "" "Open ``Project -> Project Settings`` and select the \"Input Map\" tab. Add " "the following input actions (see :ref:`InputEvent ` for " "details):" msgstr "" #: ../../docs/tutorials/2d/2d_movement.rst:31 msgid "8-way movement" msgstr "" #: ../../docs/tutorials/2d/2d_movement.rst:33 msgid "" "In this scenario, you want the user to press the four directional keys (up/" "left/down/right or W/A/S/D) and move in the selected direction. The name \"8-" "way movement\" comes from the fact that the player can move diagonally by " "pressing two keys at the same time." msgstr "" #: ../../docs/tutorials/2d/2d_movement.rst:39 msgid "Add a script to the kinematic body and add the following code:" msgstr "" #: ../../docs/tutorials/2d/2d_movement.rst:103 msgid "" "In the ``get_input()`` function, we check for the four key events and sum " "them up to get the velocity vector. This has the benefit of making two " "opposite keys cancel each other out, but will also result in diagonal " "movement being faster due to the two directions being added together." msgstr "" #: ../../docs/tutorials/2d/2d_movement.rst:108 msgid "" "We can prevent that if we *normalize* the velocity, which means we set its " "*length* to ``1``, and multiply by the desired speed." msgstr "" #: ../../docs/tutorials/2d/2d_movement.rst:111 msgid "" "If you've never used vector math before, or need a refresher, you can see an " "explanation of vector usage in Godot at :ref:`doc_vector_math`." msgstr "" #: ../../docs/tutorials/2d/2d_movement.rst:116 msgid "" "If the code above does nothing when you press the keys, double-check that " "you've set up input actions correctly as described in the :ref:" "`doc_2d_movement_setup` part of this tutorial." msgstr "" #: ../../docs/tutorials/2d/2d_movement.rst:121 msgid "Rotation + movement" msgstr "" #: ../../docs/tutorials/2d/2d_movement.rst:123 msgid "" "This type of movement is sometimes called \"Asteroids-style\" because it " "resembles how that classic arcade game worked. Pressing left/right rotates " "the character, while up/down moves it forward or backward in whatever " "direction it's facing." msgstr "" #: ../../docs/tutorials/2d/2d_movement.rst:198 msgid "" "Here we've added two new variables to track our rotation direction and " "speed. Again, pressing both keys at once will cancel out and result in no " "rotation. The rotation is applied directly to the body's ``rotation`` " "property." msgstr "" #: ../../docs/tutorials/2d/2d_movement.rst:202 msgid "" "To set the velocity, we use the ``Vector2.rotated()`` method, so that it " "points in the same direction as the body. ``rotated()`` is a useful vector " "function that you can use in many circumstances where you would otherwise " "need to apply trigonometric functions." msgstr "" #: ../../docs/tutorials/2d/2d_movement.rst:208 msgid "Rotation + movement (mouse)" msgstr "" #: ../../docs/tutorials/2d/2d_movement.rst:210 msgid "" "This style of movement is a variation of the previous one. This time, the " "direction is set by the mouse position instead of the keyboard. The " "character will always \"look at\" the mouse pointer. The forward/back inputs " "remain the same, however." msgstr "" #: ../../docs/tutorials/2d/2d_movement.rst:269 msgid "" "Here we're using the :ref:`Node2D ` ``look_at()`` method to " "point the player towards a given position. Without this function, you could " "get the same effect by setting the angle like this:" msgstr "" #: ../../docs/tutorials/2d/2d_movement.rst:284 msgid "Click-and-move" msgstr "" #: ../../docs/tutorials/2d/2d_movement.rst:286 msgid "" "This last example uses only the mouse to control the character. Clicking on " "the screen will cause the player to move to the target location." msgstr "" #: ../../docs/tutorials/2d/2d_movement.rst:343 msgid "" "Note the ``distance_to()`` check we make prior to movement. Without this " "test, the body would \"jitter\" upon reaching the target position, as it " "moves slightly past the position and tries to move back, only to move too " "far and repeat." msgstr "" #: ../../docs/tutorials/2d/2d_movement.rst:348 msgid "" "Uncommenting the ``look_at()`` line will also turn the body to point in its " "direction of motion if you prefer." msgstr "" #: ../../docs/tutorials/2d/2d_movement.rst:351 msgid "" "This technique can also be used as the basis of a \"following\" character. " "The ``target`` position can be that of any object you want to move to." msgstr "" #: ../../docs/tutorials/2d/2d_movement.rst:357 msgid "" "You may find these code samples useful as starting points for your own " "projects. Feel free to use them and experiment with them to see what you can " "make." msgstr "" #: ../../docs/tutorials/2d/2d_movement.rst:360 msgid "" "You can download this sample project here: :download:`2D_movement_demo.zip " "`" msgstr "" #: ../../docs/tutorials/2d/2d_lights_and_shadows.rst:4 msgid "2D lights and shadows" msgstr "" #: ../../docs/tutorials/2d/2d_lights_and_shadows.rst:9 msgid "" "This tutorial explains how the 2D lighting works in the `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." msgstr "" #: ../../docs/tutorials/2d/2d_lights_and_shadows.rst:16 msgid "" "All the resources for this tutorial can be found in the `official demo " "repository `_ 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\"." msgstr "" #: ../../docs/tutorials/2d/2d_lights_and_shadows.rst:24 msgid "" "For this demo we use four textures: two for the lights, one for the shadow " "casters, and one for the background. I've included links to them all here if " "you want to download them separately from the demo." msgstr "" #: ../../docs/tutorials/2d/2d_lights_and_shadows.rst:28 msgid "" "The first is the background image (`background.png `_) used in the demo. You do not " "necessarily need a background, but we use one for the demo." msgstr "" #: ../../docs/tutorials/2d/2d_lights_and_shadows.rst:31 msgid "" "The second is a plain black image (`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." msgstr "" #: ../../docs/tutorials/2d/2d_lights_and_shadows.rst:35 msgid "" "Next is the light itself (`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." msgstr "" #: ../../docs/tutorials/2d/2d_lights_and_shadows.rst:40 msgid "" "Lastly, we have the spotlight image (`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." msgstr "" #: ../../docs/tutorials/2d/2d_lights_and_shadows.rst:52 msgid "The demo uses four different nodes:" msgstr "" #: ../../docs/tutorials/2d/2d_lights_and_shadows.rst:49 msgid ":ref:`CanvasModulate `" msgstr "" #: ../../docs/tutorials/2d/2d_lights_and_shadows.rst:50 msgid ":ref:`Sprite `" msgstr "" #: ../../docs/tutorials/2d/2d_lights_and_shadows.rst:51 msgid ":ref:`Light2D `" msgstr "" #: ../../docs/tutorials/2d/2d_lights_and_shadows.rst:52 msgid ":ref:`LightOccluder2D `" msgstr "" #: ../../docs/tutorials/2d/2d_lights_and_shadows.rst:54 msgid "" ":ref:`CanvasModulate` is used to darken the scene." msgstr "" #: ../../docs/tutorials/2d/2d_lights_and_shadows.rst:56 msgid "" ":ref:`Sprites ` are used to display the textures for the light " "blobs, the background, and for the shadow casters." msgstr "" #: ../../docs/tutorials/2d/2d_lights_and_shadows.rst:59 msgid "" ":ref:`Light2Ds ` are used to light the scene. The way a light " "typically works is by adding a selected texture over the rest of the scene " "to simulate lighting. But it can be used in other ways, for example masking " "out parts of the scene." msgstr "" #: ../../docs/tutorials/2d/2d_lights_and_shadows.rst:63 msgid "" ":ref:`LightOccluder2Ds ` are used to tell the shader " "which parts of the scene cast shadows. The shadows appear only on areas " "covered by the :ref:`Light2D ` and their direction is based " "on the center of the :ref:`Light `." msgstr "" #: ../../docs/tutorials/2d/2d_lights_and_shadows.rst:68 #: ../../docs/tutorials/3d/introduction_to_3d.rst:223 #: ../../docs/tutorials/assets_pipeline/escn_exporter/lights.rst:2 #: ../../docs/tutorials/performance/batching.rst:151 msgid "Lights" msgstr "Ánh sáng" #: ../../docs/tutorials/2d/2d_lights_and_shadows.rst:70 msgid "" ":ref:`Lights ` cover the entire extent of their respective " "Texture. They use additive blending to add the color of their texture to the " "scene." msgstr "" #: ../../docs/tutorials/2d/2d_lights_and_shadows.rst:75 msgid "" ":ref:`Lights ` have four ``Modes``: ``Add``, ``Sub``, " "``Mix``, and ``Mask``." msgstr "" #: ../../docs/tutorials/2d/2d_lights_and_shadows.rst:77 msgid "" "``Add`` adds the color of the light texture to the scene. It brightens the " "area under the light." msgstr "" #: ../../docs/tutorials/2d/2d_lights_and_shadows.rst:79 msgid "" "``Sub`` subtracts the color of the light from the scene. It darkens the area " "under the light." msgstr "" #: ../../docs/tutorials/2d/2d_lights_and_shadows.rst:81 msgid "" "``Mix`` mixes the color of the light with the underlying scene. The " "resulting brightness is halfway between the color of the light and the color " "underneath." msgstr "" #: ../../docs/tutorials/2d/2d_lights_and_shadows.rst:84 msgid "" "``Mask`` is used to mask out areas that are covered by the light. Masked out " "areas are hidden or revealed based on the color of the light." msgstr "" #: ../../docs/tutorials/2d/2d_lights_and_shadows.rst:87 msgid "" "For the demo the lights have two components, the :ref:`Light " "` itself (which is the effect of the light), and a :ref:" "`Sprite ` blob which is an image showing the location of the " "light source. A child :ref:`Sprite ` is not necessary to make " "a :ref:`Light ` work." msgstr "" #: ../../docs/tutorials/2d/2d_lights_and_shadows.rst:95 msgid "Shadows" msgstr "" #: ../../docs/tutorials/2d/2d_lights_and_shadows.rst:97 msgid "" "Shadows are made by intersecting a :ref:`Light ` with a :ref:" "`LightOccluder2D `." msgstr "" #: ../../docs/tutorials/2d/2d_lights_and_shadows.rst:99 msgid "" "By default shadows are turned off. To turn them on click on the :ref:`Light " "` and under the Shadows section check ``Enabled``." msgstr "" #: ../../docs/tutorials/2d/2d_lights_and_shadows.rst:102 msgid "" "In the demo we are using a :ref:`Sprite ` with a Texture on it " "to make the \"Shadow Casters\", but in reality all you need is a couple of :" "ref:`LightOccluder2Ds `. By itself the :ref:" "`LightOccluder2D ` looks like a dark spot and in this " "demo the :ref:`Sprite ` is just a black square." msgstr "" #: ../../docs/tutorials/2d/2d_lights_and_shadows.rst:110 msgid "" "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." msgstr "" #: ../../docs/tutorials/2d/2d_lights_and_shadows.rst:113 msgid "" "First add a :ref:`Sprite ` and set its texture to the " "`background image `_. For your game this " "can be any background you choose. For this style of shadow it is most likely " "to be a floor texture." msgstr "" #: ../../docs/tutorials/2d/2d_lights_and_shadows.rst:118 msgid "" "Next create three :ref:`Light2D's ` and set their textures to " "the `light image `_. 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." msgstr "" #: ../../docs/tutorials/2d/2d_lights_and_shadows.rst:124 msgid "" "Next add a child :ref:`Sprite ` to each of the :ref:`Light " "` nodes, and set the :ref:`Sprite's ` texture " "to the `blob image `_. Each of these should stay " "centered on the :ref:`Light ` node. The blob is the image of " "the light itself while the :ref:`Light ` shows the effect " "that the light has on the scene. The :ref:`LightOccluder2D's " "` will treat the position of the light as the center " "of the :ref:`Light ` node, which is why we want the blob to " "be centered on its parent :ref:`Light `." msgstr "" #: ../../docs/tutorials/2d/2d_lights_and_shadows.rst:133 msgid "" "The animations in the demo will not be covered here. See :ref:" "`doc_introduction_animation` for information on creating animations." msgstr "" #: ../../docs/tutorials/2d/2d_lights_and_shadows.rst:136 msgid "" "Right now the scene should look too bright. This is because all three lights " "are adding color to the scene. This is why the demo uses a :ref:" "`CanvasModulate ` in the scene. The :ref:" "`CanvasModulate ` multiples the entire viewport by a " "specific color." msgstr "" #: ../../docs/tutorials/2d/2d_lights_and_shadows.rst:140 msgid "" "Add a :ref:`CanvasModulate ` to the scene and set its " "color to ``rgb(70, 70, 70)``. This will make the scene sufficiently dark to " "see the effects of the lights distinctly." msgstr "" #: ../../docs/tutorials/2d/2d_lights_and_shadows.rst:145 msgid "Now we add the shadow casters." msgstr "" #: ../../docs/tutorials/2d/2d_lights_and_shadows.rst:147 msgid "" "The demo uses a :ref:`Node ` named \"casters\" to organize the " "shadow casters. Add a :ref:`Node2D ` to the scene. It will be " "used to group all the shadow casters together. This way we can show and hide " "them all at the same time." msgstr "" #: ../../docs/tutorials/2d/2d_lights_and_shadows.rst:151 msgid "" "Each shadow caster is made of a :ref:`Sprite `, with a :ref:" "`LightOccluder2D ` child. For the demo the :ref:" "`Sprite ` has a texture set to the `caster image `_ and nothing else. The child :ref:" "`LightOccluder2D ` is where all the magic happens. In " "a game the :ref:`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." msgstr "" #: ../../docs/tutorials/2d/2d_lights_and_shadows.rst:159 msgid "" ":ref:`LightOccluder2Ds ` tell the game what shape the " "occluder has. They hold an :ref:`OccluderPolygon2D " "`, which is a container for a polygon and some " "other information. For this demo, since our wall is a square, we set " "``Polygon`` to a square. The other default settings are fine." msgstr "" #: ../../docs/tutorials/2d/2d_lights_and_shadows.rst:164 msgid "" "The first setting, ``Closed`` can be either ``on`` or ``off``. A closed " "polygon occludes light coming from all directions. An open polygon only " "occludes light from one direction." msgstr "" #: ../../docs/tutorials/2d/2d_lights_and_shadows.rst:167 msgid "" "``Cull Mode`` lets you select which direction gets culled. The default is " "``Disabled``, meaning the occluder will cast a shadow no matter which side " "the light is on. The other two settings ``Clockwise`` and ``Counter-" "Clockwise`` refer to the winding order of the vertices of the polygon. The " "winding order is used to determine which side of the line is inside the " "polygon. Only outward facing lines cast shadows." msgstr "" #: ../../docs/tutorials/2d/2d_lights_and_shadows.rst:172 msgid "" "To illustrate the difference, here is an image of a :ref:`LightOccluder2D " "` with ``Closed`` set to ``off`` in the " "corresponding :ref:`OccluderPolygon2D `, so that " "the lines of the polygon can be seen:" msgstr "" #: ../../docs/tutorials/2d/2d_lights_and_shadows.rst:178 msgid "``Cull Mode`` is set to ``Disabled``. All three lines cast shadows." msgstr "" #: ../../docs/tutorials/2d/2d_lights_and_shadows.rst:182 msgid "" "``Cull Mode`` is set to ``Clockwise``. Only the top and right lines cast " "shadows." msgstr "" #: ../../docs/tutorials/2d/2d_lights_and_shadows.rst:186 msgid "" "``Cull Mode`` is set to ``Counter-Clockwise``. Only the bottom line casts a " "shadow. If ``Closed`` was set to ``on`` there would be an additional " "vertical line on the left which would cast a shadow as well." msgstr "" #: ../../docs/tutorials/2d/2d_lights_and_shadows.rst:190 msgid "" "When you have added the :ref:`LightOccluder2Ds ` the " "shadows still won't appear. You need to go back into the :ref:`Light2Ds " "` and under the Shadow section set ``Enable`` to ``on``. This " "turns on shadows with hard edges like in the image below." msgstr "" #: ../../docs/tutorials/2d/2d_lights_and_shadows.rst:196 msgid "" "To give the shadows that nice, soft edge look we set the variables " "``filter``, ``filter smooth``, and ``gradient length``. Godot supports " "`Percentage Closer Filtering `_ (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. The demo uses PCF7." msgstr "" #: ../../docs/tutorials/2d/2d_lights_and_shadows.rst:205 msgid "" "This is a shadow rendered with the demo's settings. ``gradient length`` is " "set to ``1.3``, ``filter smooth`` is set to ``11.1``, and ``filter`` is set " "to ``PCF7``." msgstr "" #: ../../docs/tutorials/2d/2d_lights_and_shadows.rst:210 msgid "" "``filter`` is set to ``PCF13``. Notice how the shadow becomes wider, this is " "because the distance between samples is based on the variable ``filter " "smooth``." msgstr "" #: ../../docs/tutorials/2d/2d_lights_and_shadows.rst:213 msgid "" "In order to make use of filtering you need to set the ``filter smooth`` " "variable. This dictates how far apart the samples are. If you want the soft " "area to extend quite far, you can increase the size of ``filter smooth``. " "However, with few samples and a large filter smooth, you can see lines " "forming between the samples." msgstr "" #: ../../docs/tutorials/2d/2d_lights_and_shadows.rst:220 msgid "``filter smooth`` is set to ``30``." msgstr "" #: ../../docs/tutorials/2d/2d_lights_and_shadows.rst:222 msgid "" "The different :ref:`Light ` nodes in the demo use different " "values for filter smooth. Play around with it and see what you like." msgstr "" #: ../../docs/tutorials/2d/2d_lights_and_shadows.rst:227 msgid "``filter smooth`` is set to ``0``." msgstr "" #: ../../docs/tutorials/2d/2d_lights_and_shadows.rst:229 msgid "" "Lastly, there is the variable ``gradient length``. For some smooth shadows " "it is preferable not to have the shadow start immediately on the object, as " "this produces a hard edge. The gradient length variable creates a smooth " "gradient to begin the shadow to reduce the effect of the hard edge." msgstr "" #: ../../docs/tutorials/2d/2d_lights_and_shadows.rst:235 msgid "``gradient length`` is set to ``0``." msgstr "" #: ../../docs/tutorials/2d/2d_lights_and_shadows.rst:239 msgid "``gradient length`` is set to ``10``." msgstr "" #: ../../docs/tutorials/2d/2d_lights_and_shadows.rst:241 msgid "" "You will need to play around with the options a bit to find settings that " "suit your project. There is no right solution for everyone, which is why " "Godot provides so much flexibility. Just keep in mind that the higher " "``filter`` set the more expensive the shadows will be." msgstr "" #: ../../docs/tutorials/2d/2d_meshes.rst:4 msgid "2D meshes" msgstr "" #: ../../docs/tutorials/2d/2d_meshes.rst:9 msgid "" "In 3D, meshes are used to display the world. In 2D, they are rare as images " "are used more often. Godot's 2D engine is a pure two-dimensional engine, so " "it can't really display 3D meshes directly (although it can be done via " "``Viewport`` and ``ViewportTexture``)." msgstr "" #: ../../docs/tutorials/2d/2d_meshes.rst:13 msgid "" "If you are interested in displaying 3D meshes on a 2D viewport, see the :ref:" "`doc_viewport_as_texture` tutorial." msgstr "" #: ../../docs/tutorials/2d/2d_meshes.rst:15 msgid "" "2D meshes are meshes that contain two-dimensional geometry (Z can be omitted " "or ignored) instead of 3D. You can experiment creating them yourself using " "``SurfaceTool`` from code and displaying them in a ``MeshInstance2D`` node." msgstr "" #: ../../docs/tutorials/2d/2d_meshes.rst:18 msgid "" "Currently, the only way to generate a 2D mesh within the editor is by either " "importing an OBJ file as a mesh, or converting it from a Sprite." msgstr "" #: ../../docs/tutorials/2d/2d_meshes.rst:21 msgid "Optimizing pixels drawn" msgstr "" #: ../../docs/tutorials/2d/2d_meshes.rst:23 msgid "" "This workflow is useful for optimizing 2D drawing in some situations. When " "drawing large images with transparency, Godot will draw the whole quad to " "the screen. The large transparent areas will still be drawn." msgstr "" #: ../../docs/tutorials/2d/2d_meshes.rst:25 msgid "" "This can affect performance, especially on mobile devices, when drawing very " "large images (generally screen sized), or layering multiple images on top of " "each other with large transparent areas (for example, when using " "``ParallaxBackground``)." msgstr "" #: ../../docs/tutorials/2d/2d_meshes.rst:28 msgid "" "Converting to a mesh will ensure that only the opaque parts will be drawn " "and the rest will be ignored." msgstr "" #: ../../docs/tutorials/2d/2d_meshes.rst:31 msgid "Converting Sprites to 2D meshes" msgstr "" #: ../../docs/tutorials/2d/2d_meshes.rst:33 msgid "" "You can take advantage of this optimization by converting a ``Sprite`` to a " "``MeshInstance2D``. Start with an image that contains large amounts of " "transparency on the edges, like this tree:" msgstr "" #: ../../docs/tutorials/2d/2d_meshes.rst:38 msgid "Put it in a ``Sprite`` and select \"Convert to 2D Mesh\" from the menu:" msgstr "" #: ../../docs/tutorials/2d/2d_meshes.rst:42 msgid "" "A dialog will appear, showing a preview of how the 2D mesh will be created:" msgstr "" #: ../../docs/tutorials/2d/2d_meshes.rst:46 msgid "" "The default values are good enough for many cases, but you can change growth " "and simplification according to your needs:" msgstr "" #: ../../docs/tutorials/2d/2d_meshes.rst:50 msgid "" "Finally, push the ``Convert 2D Mesh`` button and your Sprite will be " "replaced:" msgstr "" #: ../../docs/tutorials/2d/custom_drawing_in_2d.rst:4 msgid "Custom drawing in 2D" msgstr "" #: ../../docs/tutorials/2d/custom_drawing_in_2d.rst:9 msgid "" "Godot has nodes to draw sprites, polygons, particles, and all sorts of " "stuff. For most cases, this is enough; but not always. Before crying in " "fear, angst, and rage because a node to draw that specific *something* does " "not exist... it would be good to know that it is possible to easily make any " "2D node (be it :ref:`Control ` or :ref:`Node2D " "` based) draw custom commands. It is *really* easy to do it, " "too." msgstr "" #: ../../docs/tutorials/2d/custom_drawing_in_2d.rst:16 msgid "" "Custom drawing in a 2D node is *really* useful. Here are some use cases:" msgstr "" #: ../../docs/tutorials/2d/custom_drawing_in_2d.rst:18 msgid "" "Drawing shapes or logic that existing nodes can't do, such as an image with " "trails or a special animated polygon." msgstr "" #: ../../docs/tutorials/2d/custom_drawing_in_2d.rst:20 msgid "" "Visualizations that are not that compatible with nodes, such as a tetris " "board. (The tetris example uses a custom draw function to draw the blocks.)" msgstr "" #: ../../docs/tutorials/2d/custom_drawing_in_2d.rst:23 msgid "" "Drawing a large number of simple objects. Custom drawing avoids the overhead " "of using a large number of nodes, possibly lowering memory usage and " "improving performance." msgstr "" #: ../../docs/tutorials/2d/custom_drawing_in_2d.rst:26 msgid "" "Making a custom UI control. There are plenty of controls available, but when " "you have unusual needs, you will likely need a custom control." msgstr "" #: ../../docs/tutorials/2d/custom_drawing_in_2d.rst:31 #: ../../docs/tutorials/math/beziers_and_curves.rst:233 #: ../../docs/tutorials/ui/custom_gui_controls.rst:17 msgid "Drawing" msgstr "" #: ../../docs/tutorials/2d/custom_drawing_in_2d.rst:33 msgid "" "Add a script to any :ref:`CanvasItem ` derived node, like :" "ref:`Control ` or :ref:`Node2D `. Then override " "the ``_draw()`` function." msgstr "" #: ../../docs/tutorials/2d/custom_drawing_in_2d.rst:53 msgid "" "Draw commands are described in the :ref:`CanvasItem ` " "class reference. There are plenty of them." msgstr "" #: ../../docs/tutorials/2d/custom_drawing_in_2d.rst:57 msgid "Updating" msgstr "" #: ../../docs/tutorials/2d/custom_drawing_in_2d.rst:59 msgid "" "The ``_draw()`` function is only called once, and then the draw commands are " "cached and remembered, so further calls are unnecessary." msgstr "" #: ../../docs/tutorials/2d/custom_drawing_in_2d.rst:62 msgid "" "If re-drawing is required because a state or something else changed, call :" "ref:`CanvasItem.update() ` in that same node " "and a new ``_draw()`` call will happen." msgstr "" #: ../../docs/tutorials/2d/custom_drawing_in_2d.rst:66 msgid "" "Here is a little more complex example, a texture variable that will be " "redrawn if modified:" msgstr "" #: ../../docs/tutorials/2d/custom_drawing_in_2d.rst:110 msgid "" "In some cases, it may be desired to draw every frame. For this, just call " "``update()`` from the ``_process()`` callback, like this:" msgstr "" #: ../../docs/tutorials/2d/custom_drawing_in_2d.rst:142 msgid "An example: drawing circular arcs" msgstr "" #: ../../docs/tutorials/2d/custom_drawing_in_2d.rst:144 msgid "" "We will now use the custom drawing functionality of the Godot Engine to draw " "something that Godot doesn't provide functions for. As an example, Godot " "provides a ``draw_circle()`` function that draws a whole circle. However, " "what about drawing a portion of a circle? You will have to code a function " "to perform this and draw it yourself." msgstr "" #: ../../docs/tutorials/2d/custom_drawing_in_2d.rst:150 msgid "Arc function" msgstr "" #: ../../docs/tutorials/2d/custom_drawing_in_2d.rst:152 msgid "" "An arc is defined by its support circle parameters, that is, the center " "position and the radius. The arc itself is then defined by the angle it " "starts from and the angle at which it stops. These are the 4 arguments that " "we have to provide to our drawing function. We'll also provide the color " "value, so we can draw the arc in different colors if we wish." msgstr "" #: ../../docs/tutorials/2d/custom_drawing_in_2d.rst:157 msgid "" "Basically, drawing a shape on the screen requires it to be decomposed into a " "certain number of points linked from one to the next. As you can imagine, " "the more points your shape is made of, the smoother it will appear, but the " "heavier it will also be in terms of processing cost. In general, if your " "shape is huge (or in 3D, close to the camera), it will require more points " "to be drawn without it being angular-looking. On the contrary, if your shape " "is small (or in 3D, far from the camera), you may decrease its number of " "points to save processing costs; this is known as *Level of Detail (LOD)*. " "In our example, we will simply use a fixed number of points, no matter the " "radius." msgstr "" #: ../../docs/tutorials/2d/custom_drawing_in_2d.rst:197 msgid "" "Remember the number of points our shape has to be decomposed into? We fixed " "this number in the ``nb_points`` variable to a value of ``32``. Then, we " "initialize an empty ``PoolVector2Array``, which is simply an array of " "``Vector2``\\ s." msgstr "" #: ../../docs/tutorials/2d/custom_drawing_in_2d.rst:201 msgid "" "The next step consists of computing the actual positions of these 32 points " "that compose an arc. This is done in the first for-loop: we iterate over the " "number of points for which we want to compute the positions, plus one to " "include the last point. We first determine the angle of each point, between " "the starting and ending angles." msgstr "" #: ../../docs/tutorials/2d/custom_drawing_in_2d.rst:206 msgid "" "The reason why each angle is decreased by 90° is that we will compute 2D " "positions out of each angle using trigonometry (you know, cosine and sine " "stuff...). However, to be simple, ``cos()`` and ``sin()`` use radians, not " "degrees. The angle of 0° (0 radian) starts at 3 o'clock, although we want to " "start counting at 12 o'clock. So we decrease each angle by 90° in order to " "start counting from 12 o'clock." msgstr "" #: ../../docs/tutorials/2d/custom_drawing_in_2d.rst:212 msgid "" "The actual position of a point located on a circle at angle ``angle`` (in " "radians) is given by ``Vector2(cos(angle), sin(angle))``. Since ``cos()`` " "and ``sin()`` return values between -1 and 1, the position is located on a " "circle of radius 1. To have this position on our support circle, which has a " "radius of ``radius``, we simply need to multiply the position by ``radius``. " "Finally, we need to position our support circle at the ``center`` position, " "which is performed by adding it to our ``Vector2`` value. Finally, we insert " "the point in the ``PoolVector2Array`` which was previously defined." msgstr "" #: ../../docs/tutorials/2d/custom_drawing_in_2d.rst:220 msgid "" "Now, we need to actually draw our points. As you can imagine, we will not " "simply draw our 32 points: we need to draw everything that is between each " "of them. We could have computed every point ourselves using the previous " "method, and drew it one by one. But this is too complicated and inefficient " "(except if explicitly needed), so we simply draw lines between each pair of " "points. Unless the radius of our support circle is big, the length of each " "line between a pair of points will never be long enough to see them. If that " "were to happen, we would simply need to increase the number of points." msgstr "" #: ../../docs/tutorials/2d/custom_drawing_in_2d.rst:230 msgid "Draw the arc on the screen" msgstr "" #: ../../docs/tutorials/2d/custom_drawing_in_2d.rst:232 msgid "" "We now have a function that draws stuff on the screen; it is time to call it " "inside the ``_draw()`` function:" msgstr "" #: ../../docs/tutorials/2d/custom_drawing_in_2d.rst:259 #: ../../docs/tutorials/scripting/visual_script/custom_visualscript_nodes.rst:100 msgid "Result:" msgstr "" #: ../../docs/tutorials/2d/custom_drawing_in_2d.rst:264 msgid "Arc polygon function" msgstr "" #: ../../docs/tutorials/2d/custom_drawing_in_2d.rst:266 msgid "" "We can take this a step further and not only write a function that draws the " "plain portion of the disc defined by the arc, but also its shape. The method " "is exactly the same as before, except that we draw a polygon instead of " "lines:" msgstr "" #: ../../docs/tutorials/2d/custom_drawing_in_2d.rst:306 msgid "Dynamic custom drawing" msgstr "" #: ../../docs/tutorials/2d/custom_drawing_in_2d.rst:308 msgid "" "All right, we are now able to draw custom stuff on the screen. However, it " "is static; let's make this shape turn around the center. The solution to do " "this is simply to change the angle_from and angle_to values over time. For " "our example, we will simply increment them by 50. This increment value has " "to remain constant or else the rotation speed will change accordingly." msgstr "" #: ../../docs/tutorials/2d/custom_drawing_in_2d.rst:314 msgid "" "First, we have to make both angle_from and angle_to variables global at the " "top of our script. Also note that you can store them in other nodes and " "access them using ``get_node()``." msgstr "" #: ../../docs/tutorials/2d/custom_drawing_in_2d.rst:336 msgid "We make these values change in the _process(delta) function." msgstr "" #: ../../docs/tutorials/2d/custom_drawing_in_2d.rst:338 msgid "" "We also increment our angle_from and angle_to values here. However, we must " "not forget to ``wrap()`` the resulting values between 0 and 360°! That is, " "if the angle is 361°, then it is actually 1°. If you don't wrap these " "values, the script will work correctly, but the angle values will grow " "bigger and bigger over time until they reach the maximum integer value Godot " "can manage (``2^31 - 1``). When this happens, Godot may crash or produce " "unexpected behavior." msgstr "" #: ../../docs/tutorials/2d/custom_drawing_in_2d.rst:345 msgid "" "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." msgstr "" #: ../../docs/tutorials/2d/custom_drawing_in_2d.rst:378 msgid "" "Also, don't forget to modify the ``_draw()`` function to make use of these " "variables:" msgstr "" #: ../../docs/tutorials/2d/custom_drawing_in_2d.rst:402 msgid "" "Let's run! It works, but the arc is rotating insanely fast! What's wrong?" msgstr "" #: ../../docs/tutorials/2d/custom_drawing_in_2d.rst:405 msgid "" "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 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." msgstr "" #: ../../docs/tutorials/2d/custom_drawing_in_2d.rst:413 msgid "" "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 smaller value, which directly depends on the rendering " "speed." msgstr "" #: ../../docs/tutorials/2d/custom_drawing_in_2d.rst:447 msgid "Let's run again! This time, the rotation displays fine!" msgstr "" #: ../../docs/tutorials/2d/custom_drawing_in_2d.rst:450 #: ../../docs/tutorials/3d/procedural_geometry/index.rst:75 #: ../../docs/development/compiling/introduction_to_the_buildsystem.rst:130 msgid "Tools" msgstr "Công cụ" #: ../../docs/tutorials/2d/custom_drawing_in_2d.rst:452 msgid "" "Drawing your own nodes might also be desired while running them in the " "editor to use as a preview or visualization of some feature or behavior." msgstr "" #: ../../docs/tutorials/2d/custom_drawing_in_2d.rst:456 msgid "" "Remember to use the \"tool\" keyword at the top of the script (check the :" "ref:`doc_gdscript` reference if you forgot what this does)." msgstr "" #: ../../docs/tutorials/2d/2d_sprite_animation.rst:4 msgid "2D Sprite animation" msgstr "" #: ../../docs/tutorials/2d/2d_sprite_animation.rst:9 msgid "" "In this tutorial, you'll learn how to create 2D animated characters with the " "AnimatedSprite class and the AnimationPlayer. Typically, when you create or " "download an animated character, it will come in one of two ways: as " "individual images or as a single sprite sheet containing all the animation's " "frames. Both can be animated in Godot with the AnimatedSprite class." msgstr "" #: ../../docs/tutorials/2d/2d_sprite_animation.rst:14 msgid "" "First, we'll use :ref:`AnimatedSprite ` to animate a " "collection of individual images. Then we will animate a sprite sheet using " "this class. Finally, we will learn another way to animate a sprite sheet " "with :ref:`AnimationPlayer ` and the *Animation* " "property of :ref:`Sprite `." msgstr "" #: ../../docs/tutorials/2d/2d_sprite_animation.rst:19 msgid "" "Art for the following examples by https://opengameart.org/users/ansimuz and " "by https://opengameart.org/users/tgfcoder" msgstr "" #: ../../docs/tutorials/2d/2d_sprite_animation.rst:23 msgid "Individual images with AnimatedSprite" msgstr "" #: ../../docs/tutorials/2d/2d_sprite_animation.rst:25 msgid "" "In this scenario, you have a collection of images, each containing one of " "your character's animation frames. For this example, we'll use the following " "animation:" msgstr "" #: ../../docs/tutorials/2d/2d_sprite_animation.rst:31 msgid "" "You can download the images here: :download:`run_animation.zip `" msgstr "" #: ../../docs/tutorials/2d/2d_sprite_animation.rst:34 msgid "" "Unzip the images and place them in your project folder. Set up your scene " "tree with the following nodes:" msgstr "" #: ../../docs/tutorials/2d/2d_sprite_animation.rst:39 #: ../../docs/tutorials/2d/2d_sprite_animation.rst:169 msgid "" "The root node could also be :ref:`Area2D ` or :ref:" "`RigidBody2D `. The animation will still be made in the " "same way. Once the animation is completed, you can assign a shape to the " "CollisionShape2D. See :ref:`Physics Introduction ` " "for more information." msgstr "" #: ../../docs/tutorials/2d/2d_sprite_animation.rst:46 msgid "" "Now select the ``AnimatedSprite`` and in its *SpriteFrames* property, select " "\"New SpriteFrames\"." msgstr "" #: ../../docs/tutorials/2d/2d_sprite_animation.rst:51 msgid "" "Click on the new SpriteFrames resource and you'll see a new panel appear at " "the bottom of the editor window:" msgstr "" #: ../../docs/tutorials/2d/2d_sprite_animation.rst:56 msgid "" "From the FileSystem dock on the left side, drag the 8 individual images into " "the center part of the SpriteFrames panel. On the left side, change the name " "of the animation from \"default\" to \"run\"." msgstr "" #: ../../docs/tutorials/2d/2d_sprite_animation.rst:62 msgid "" "Back in the Inspector, check the box for the *Playing* property. You should " "now see the animation playing in the viewport. However, it is a bit slow. To " "fix this, change the *Speed (FPS)* setting in the SpriteFrames panel to 10." msgstr "" #: ../../docs/tutorials/2d/2d_sprite_animation.rst:66 msgid "" "You can add additional animations by clicking the \"New Animation\" button " "and adding additional images." msgstr "" #: ../../docs/tutorials/2d/2d_sprite_animation.rst:70 #, fuzzy msgid "Controlling the animation" msgstr "Tạo nội dung" #: ../../docs/tutorials/2d/2d_sprite_animation.rst:72 msgid "" "Once the animation is complete, you can control the animation via code using " "the ``play()`` and ``stop()`` methods. Here is a brief example to play the " "animation while the right arrow key is held, and stop it when the key is " "released." msgstr "" #: ../../docs/tutorials/2d/2d_sprite_animation.rst:116 msgid "Sprite sheet with AnimatedSprite" msgstr "" #: ../../docs/tutorials/2d/2d_sprite_animation.rst:118 msgid "" "You can also easily animate from a sprite sheet with the class " "``AnimatedSprite``. We will use this public domain sprite sheet:" msgstr "" #: ../../docs/tutorials/2d/2d_sprite_animation.rst:122 msgid "" "Right-click the image and choose \"Save Image As\" to download it, and then " "copy the image into your project folder." msgstr "" #: ../../docs/tutorials/2d/2d_sprite_animation.rst:124 msgid "" "Set up your scene tree the same way you did previously when using individual " "images. Select the ``AnimatedSprite`` and in its *SpriteFrames* property, " "select \"New SpriteFrames\"." msgstr "" #: ../../docs/tutorials/2d/2d_sprite_animation.rst:127 msgid "" "Click on the new SpriteFrames resource. This time, when the bottom panel " "appears, select \"Add frames from a Sprite Sheet\"." msgstr "" #: ../../docs/tutorials/2d/2d_sprite_animation.rst:131 msgid "You will be prompted to open a file. Select your sprite sheet." msgstr "" #: ../../docs/tutorials/2d/2d_sprite_animation.rst:133 msgid "" "A new window will open, showing your sprite sheet. The first thing you will " "need to do is to change the number of vertical and horizontal images in your " "sprite sheet. In this sprite sheet, we have four images horizontally and two " "images vertically." msgstr "" #: ../../docs/tutorials/2d/2d_sprite_animation.rst:137 msgid "" "Next, select the frames from the sprite sheet that you want to include in " "your animation. We will select the top four, then click \"Add 4 frames\" to " "create the animation." msgstr "" #: ../../docs/tutorials/2d/2d_sprite_animation.rst:141 msgid "" "You will now see your animation under the list of animations in the bottom " "panel. Double click on default to change the name of the animation to jump." msgstr "" #: ../../docs/tutorials/2d/2d_sprite_animation.rst:145 msgid "" "Finally, check Playing on the AnimatedSprite in the inspector to see your " "frog jump!" msgstr "" #: ../../docs/tutorials/2d/2d_sprite_animation.rst:151 msgid "Sprite sheet with AnimationPlayer" msgstr "" #: ../../docs/tutorials/2d/2d_sprite_animation.rst:153 msgid "" "Another way that you can animate when using a sprite sheet is to use a " "standard :ref:`Sprite ` node to display the texture, and then " "animating the change from texture to texture with :ref:`AnimationPlayer " "`." msgstr "" #: ../../docs/tutorials/2d/2d_sprite_animation.rst:157 msgid "Consider this sprite sheet, which contains 6 frames of animation:" msgstr "" #: ../../docs/tutorials/2d/2d_sprite_animation.rst:161 msgid "" "Right-click the image and choose \"Save Image As\" to download, then copy " "the image into your project folder." msgstr "" #: ../../docs/tutorials/2d/2d_sprite_animation.rst:164 msgid "" "Our goal is to display these images one after another in a loop. Start by " "setting up your scene tree:" msgstr "" #: ../../docs/tutorials/2d/2d_sprite_animation.rst:176 msgid "" "Drag the spritesheet into the Sprite's *Texture* property, and you'll see " "the whole sheet displayed on the screen. To slice it up into individual " "frames, expand the *Animation* section in the Inspector and set the " "*Hframes* to ``6``. *Hframes* and *Vframes* are the number of horizontal and " "vertical frames in your sprite sheet." msgstr "" #: ../../docs/tutorials/2d/2d_sprite_animation.rst:184 msgid "" "Now try changing the value of the *Frame* property. You'll see that it " "ranges from ``0`` to ``5`` and the image displayed by the Sprite changes " "accordingly. This is the property we'll be animating." msgstr "" #: ../../docs/tutorials/2d/2d_sprite_animation.rst:188 msgid "" "Select the ``AnimationPlayer`` and click the \"Animation\" button followed " "by \"New\". Name the new animation \"walk\". Set the animation length to " "``0.6`` and click the \"Loop\" button so that our animation will repeat." msgstr "" #: ../../docs/tutorials/2d/2d_sprite_animation.rst:194 msgid "" "Now select the ``Sprite`` node and click the key icon to add a new track." msgstr "" #: ../../docs/tutorials/2d/2d_sprite_animation.rst:198 msgid "" "Continue adding frames at each point in the timeline (``0.1`` seconds by " "default), until you have all the frames from 0 to 5. You'll see the frames " "actually appearing in the animation track:" msgstr "" #: ../../docs/tutorials/2d/2d_sprite_animation.rst:204 msgid "Press \"Play\" on the animation to see how it looks." msgstr "" #: ../../docs/tutorials/2d/2d_sprite_animation.rst:209 #, fuzzy msgid "Controlling an AnimationPlayer animation" msgstr "Tạo nội dung" #: ../../docs/tutorials/2d/2d_sprite_animation.rst:211 msgid "" "Like with AnimatedSprite, you can control the animation via code using the " "``play()`` and ``stop()`` methods. Again, here is an example to play the " "animation while the right arrow key is held, and stop it when the key is " "released." msgstr "" #: ../../docs/tutorials/2d/2d_sprite_animation.rst:253 msgid "" "If updating both an animation and a separate property at once (for example, " "a platformer may update the sprite's ``h_flip``/``v_flip`` properties when a " "character turns while starting a 'turning' animation), it's important to " "keep in mind that ``play()`` isn't applied instantly. Instead, it's applied " "the next time the :ref:`AnimationPlayer ` is " "processed. This may end up being on the next frame, causing a 'glitch' " "frame, where the property change was applied but the animation was not. If " "this turns out to be a problem, after calling ``play()``, you can call " "``advance(0)`` to update the animation immediately." msgstr "" #: ../../docs/tutorials/2d/2d_sprite_animation.rst:266 msgid "" "These examples illustrate the two classes you can use in Godot for 2D " "animation. ``AnimationPlayer`` is a bit more complex than " "``AnimatedSprite``, but it provides additional functionality, since you can " "also animate other properties like position or scale. The class " "``AnimationPlayer`` can also be used with an ``AnimatedSprite``. Experiment " "to see what works best for your needs." msgstr "" #: ../../docs/tutorials/3d/introduction_to_3d.rst:4 msgid "Introduction to 3D" msgstr "" #: ../../docs/tutorials/3d/introduction_to_3d.rst:6 msgid "" "Creating a 3D game can be challenging. That extra Z coordinate makes many of " "the common techniques that helped to make 2D games simple no longer work. To " "aid in this transition, it is worth mentioning that Godot uses similar APIs " "for 2D and 3D. Most nodes are the same and are present in both 2D and 3D " "versions. In fact, it is worth checking the 3D platformer tutorial, or the " "3D kinematic character tutorials, which are almost identical to their 2D " "counterparts." msgstr "" #: ../../docs/tutorials/3d/introduction_to_3d.rst:14 msgid "" "In 3D, math is a little more complex than in 2D, so also checking the :ref:" "`doc_vector_math` entry in the wiki (which was especially created for game " "developers, not mathematicians or engineers) will help pave the way for you " "to develop 3D games efficiently." msgstr "" #: ../../docs/tutorials/3d/introduction_to_3d.rst:20 msgid "Spatial node" msgstr "" #: ../../docs/tutorials/3d/introduction_to_3d.rst:22 msgid "" ":ref:`Node2D ` is the base node for 2D. :ref:`Control " "` is the base node for everything GUI. Following this " "reasoning, the 3D engine uses the :ref:`Spatial ` node for " "everything 3D." msgstr "" #: ../../docs/tutorials/3d/introduction_to_3d.rst:29 msgid "" "Spatial nodes have a local transform, which is relative to the parent node " "(as long as the parent node is also of **or inherits from** the type " "Spatial). This transform can be accessed as a 4×3 :ref:`Transform " "`, or as 3 :ref:`Vector3 ` members " "representing location, Euler rotation (X, Y and Z angles) and scale." msgstr "" #: ../../docs/tutorials/3d/introduction_to_3d.rst:39 msgid "3D content" msgstr "" #: ../../docs/tutorials/3d/introduction_to_3d.rst:41 msgid "" "Unlike 2D, where loading image content and drawing is straightforward, 3D is " "a little more difficult. The content needs to be created with special 3D " "tools (usually referred to as DCCs) and exported to an exchange file format " "in order to be imported in Godot (3D formats are not as standardized as " "images)." msgstr "" #: ../../docs/tutorials/3d/introduction_to_3d.rst:48 msgid "DCC-created models" msgstr "" #: ../../docs/tutorials/3d/introduction_to_3d.rst:53 msgid "" "There are two pipelines to import 3D models in Godot. The first and most " "common one is by :ref:`doc_importing_3d_scenes`, which allows you to import " "entire scenes (just as they look in the DCC), including animation, skeletal " "rigs, blend shapes, etc." msgstr "" #: ../../docs/tutorials/3d/introduction_to_3d.rst:58 msgid "" "The second pipeline is by importing simple .OBJ files as mesh resources, " "which can be then put inside a :ref:`MeshInstance ` node " "for display." msgstr "" #: ../../docs/tutorials/3d/introduction_to_3d.rst:63 msgid "Generated geometry" msgstr "" #: ../../docs/tutorials/3d/introduction_to_3d.rst:65 msgid "" "It is possible to create custom geometry by using the :ref:`ArrayMesh " "` resource directly. Simply create your arrays and use the :" "ref:`ArrayMesh.add_surface_from_arrays() " "` function. A helper class " "is also available, :ref:`SurfaceTool `, which provides a " "more straightforward API and helpers for indexing, generating normals, " "tangents, etc." msgstr "" #: ../../docs/tutorials/3d/introduction_to_3d.rst:72 msgid "" "In any case, this method is meant for generating static geometry (models " "that will not be updated often), as creating vertex arrays and submitting " "them to the 3D API has a significant performance cost." msgstr "" #: ../../docs/tutorials/3d/introduction_to_3d.rst:77 msgid "Immediate geometry" msgstr "" #: ../../docs/tutorials/3d/introduction_to_3d.rst:79 msgid "" "If, instead, there is a requirement to generate simple geometry that will be " "updated often, Godot provides a special node, :ref:`ImmediateGeometry " "`, which provides an OpenGL 1.x style immediate-" "mode API to create points, lines, triangles, etc." msgstr "" #: ../../docs/tutorials/3d/introduction_to_3d.rst:86 msgid "2D in 3D" msgstr "" #: ../../docs/tutorials/3d/introduction_to_3d.rst:88 msgid "" "While Godot packs a powerful 2D engine, many types of games use 2D in a 3D " "environment. By using a fixed camera (either orthogonal or perspective) that " "does not rotate, nodes such as :ref:`Sprite3D ` and :ref:" "`AnimatedSprite3D ` can be used to create 2D games " "that take advantage of mixing with 3D backgrounds, more realistic parallax, " "lighting/shadow effects, etc." msgstr "" #: ../../docs/tutorials/3d/introduction_to_3d.rst:96 msgid "" "The disadvantage is, of course, that added complexity and reduced " "performance in comparison to plain 2D, as well as the lack of reference of " "working in pixels." msgstr "" #: ../../docs/tutorials/3d/introduction_to_3d.rst:101 #: ../../docs/tutorials/3d/environment_and_post_processing.rst:10 msgid "Environment" msgstr "Môi trường" #: ../../docs/tutorials/3d/introduction_to_3d.rst:103 msgid "" "Besides editing a scene, it is often common to edit the environment. Godot " "provides a :ref:`WorldEnvironment ` node that allows " "changing the background color, mode (as in, put a skybox), and applying " "several types of built-in post-processing effects. Environments can also be " "overridden in the Camera." msgstr "" #: ../../docs/tutorials/3d/introduction_to_3d.rst:110 msgid "3D viewport" msgstr "" #: ../../docs/tutorials/3d/introduction_to_3d.rst:112 msgid "" "Editing 3D scenes is done in the 3D tab. This tab can be selected manually, " "but it will be automatically enabled when a Spatial node is selected." msgstr "" #: ../../docs/tutorials/3d/introduction_to_3d.rst:118 msgid "" "Default 3D scene navigation controls are similar to Blender (aiming to have " "some sort of consistency in the free software pipeline..), but options are " "included to customize mouse buttons and behavior to be similar to other " "tools in the Editor Settings:" msgstr "" #: ../../docs/tutorials/3d/introduction_to_3d.rst:126 msgid "Coordinate system" msgstr "" #: ../../docs/tutorials/3d/introduction_to_3d.rst:128 msgid "" "Godot uses the `metric `__ " "system for everything in 3D, with 1 unit being equal to 1 meter. Physics and " "other areas are tuned for this scale. Therefore, attempting to use a " "different scale is usually a bad idea (unless you know what you are doing)." msgstr "" #: ../../docs/tutorials/3d/introduction_to_3d.rst:133 msgid "" "When working with 3D assets, it's always best to work in the correct scale " "(set your DCC to metric). Godot allows scaling post-import and, while this " "works in most cases, in rare situations it may introduce floating-point " "precision issues (and thus, glitches or artifacts) in delicate areas such as " "rendering or physics. Make sure your artists always work in the right scale!" msgstr "" #: ../../docs/tutorials/3d/introduction_to_3d.rst:140 msgid "" "The Y coordinate is used for \"up\", though for most objects that need " "alignment (like lights, cameras, capsule collider, vehicle, etc.), the Z " "axis is used as a \"pointing towards\" direction. This convention roughly " "means that:" msgstr "" #: ../../docs/tutorials/3d/introduction_to_3d.rst:145 msgid "**X** is sides" msgstr "" #: ../../docs/tutorials/3d/introduction_to_3d.rst:146 msgid "**Y** is up/down" msgstr "" #: ../../docs/tutorials/3d/introduction_to_3d.rst:147 msgid "**Z** is front/back" msgstr "" #: ../../docs/tutorials/3d/introduction_to_3d.rst:150 msgid "Space and manipulation gizmos" msgstr "" #: ../../docs/tutorials/3d/introduction_to_3d.rst:152 msgid "" "Moving objects in the 3D view is done through the manipulator gizmos. Each " "axis is represented by a color: Red, Green, Blue represent X, Y, Z " "respectively. This convention applies to the grid and other gizmos too (and " "also to the shader language, ordering of components for Vector3, Color, " "etc.)." msgstr "" #: ../../docs/tutorials/3d/introduction_to_3d.rst:160 msgid "Some useful keybindings:" msgstr "" #: ../../docs/tutorials/3d/introduction_to_3d.rst:162 msgid "" "To snap placement or rotation, press :kbd:`Ctrl` while moving, scaling or " "rotating." msgstr "" #: ../../docs/tutorials/3d/introduction_to_3d.rst:164 msgid "To center the view on the selected object, press :kbd:`F`." msgstr "" #: ../../docs/tutorials/3d/introduction_to_3d.rst:167 msgid "View menu" msgstr "" #: ../../docs/tutorials/3d/introduction_to_3d.rst:169 msgid "" "The view options are controlled by the \"View\" menu in the viewport's " "toolbar." msgstr "" #: ../../docs/tutorials/3d/introduction_to_3d.rst:173 msgid "You can hide the gizmos in the 3D view of the editor through this menu:" msgstr "" #: ../../docs/tutorials/3d/introduction_to_3d.rst:177 msgid "" "To hide a specific type of gizmos, you can toggle them off in the \"View\" " "menu." msgstr "" #: ../../docs/tutorials/3d/introduction_to_3d.rst:182 #: ../../docs/tutorials/3d/environment_and_post_processing.rst:40 msgid "Default environment" msgstr "" #: ../../docs/tutorials/3d/introduction_to_3d.rst:184 msgid "" "When created from the Project Manager, the 3D environment has a default sky." msgstr "" #: ../../docs/tutorials/3d/introduction_to_3d.rst:188 msgid "" "Given how physically based rendering works, it is advised to always try to " "work with a default environment in order to provide indirect and reflected " "light to your objects." msgstr "" #: ../../docs/tutorials/3d/introduction_to_3d.rst:193 msgid "Cameras" msgstr "" #: ../../docs/tutorials/3d/introduction_to_3d.rst:195 msgid "" "No matter how many objects are placed in the 3D space, nothing will be " "displayed unless a :ref:`Camera ` is also added to the scene. " "Cameras can work in either orthogonal or perspective projections:" msgstr "" #: ../../docs/tutorials/3d/introduction_to_3d.rst:202 msgid "" "Cameras are associated with (and only display to) a parent or grandparent " "viewport. Since the root of the scene tree is a viewport, cameras will " "display on it by default, but if sub-viewports (either as render target or " "picture-in-picture) are desired, they need their own children cameras to " "display." msgstr "" #: ../../docs/tutorials/3d/introduction_to_3d.rst:210 msgid "" "When dealing with multiple cameras, the following rules are enforced for " "each viewport:" msgstr "" #: ../../docs/tutorials/3d/introduction_to_3d.rst:213 msgid "" "If no cameras are present in the scene tree, the first one that enters it " "will become the active camera. Further cameras entering the scene will be " "ignored (unless they are set as *current*)." msgstr "" #: ../../docs/tutorials/3d/introduction_to_3d.rst:216 msgid "" "If a camera has the \"*current*\" property set, it will be used regardless " "of any other camera in the scene. If the property is set, it will become " "active, replacing the previous camera." msgstr "" #: ../../docs/tutorials/3d/introduction_to_3d.rst:219 msgid "" "If an active camera leaves the scene tree, the first camera in tree-order " "will take its place." msgstr "" #: ../../docs/tutorials/3d/introduction_to_3d.rst:225 msgid "" "Godot has a limit of up to 8 lights per mesh. Aside from that, there is no " "limitation on the number of lights, nor of types of lights, in Godot. As " "many as desired can be added, as long as performance allows, and no more " "than 8 lights shine on a single mesh." msgstr "" #: ../../docs/tutorials/3d/using_transforms.rst:4 msgid "Using 3D transforms" msgstr "" #: ../../docs/tutorials/3d/using_transforms.rst:9 msgid "" "If you have never made 3D games before, working with rotations in three " "dimensions can be confusing at first. Coming from 2D, the natural way of " "thinking is along the lines of *\"Oh, it's just like rotating in 2D, except " "now rotations happen in X, Y and Z\"*." msgstr "" #: ../../docs/tutorials/3d/using_transforms.rst:12 msgid "" "At first this seems easy and for simple games, this way of thinking may even " "be enough. Unfortunately, it's often incorrect." msgstr "" #: ../../docs/tutorials/3d/using_transforms.rst:14 msgid "" "Angles in three dimensions are most commonly referred to as \"Euler Angles\"." msgstr "" #: ../../docs/tutorials/3d/using_transforms.rst:18 msgid "" "Euler angles were introduced by mathematician Leonhard Euler in the early " "1700s." msgstr "" #: ../../docs/tutorials/3d/using_transforms.rst:22 msgid "" "This way of representing 3D rotations was groundbreaking at the time, but it " "has several shortcomings when used in game development (which is to be " "expected from a guy with a funny hat). The idea of this document is to " "explain why, as well as outlining best practices for dealing with transforms " "when programming 3D games." msgstr "" #: ../../docs/tutorials/3d/using_transforms.rst:28 msgid "Problems of Euler angles" msgstr "" #: ../../docs/tutorials/3d/using_transforms.rst:30 msgid "" "While it may seem intuitive that each axis has a rotation, the truth is that " "it's just not practical." msgstr "" #: ../../docs/tutorials/3d/using_transforms.rst:33 msgid "Axis order" msgstr "" #: ../../docs/tutorials/3d/using_transforms.rst:35 msgid "" "The main reason for this is that there isn't a *unique* way to construct an " "orientation from the angles. There isn't a standard mathematical function " "that takes all the angles together and produces an actual 3D rotation. The " "only way an orientation can be produced from angles is to rotate the object " "angle by angle, in an *arbitrary order*." msgstr "" #: ../../docs/tutorials/3d/using_transforms.rst:39 msgid "" "This could be done by first rotating in *X*, then *Y* and then in *Z*. " "Alternatively, you could first rotate in *Y*, then in *Z* and finally in " "*X*. Anything works, but depending on the order, the final orientation of " "the object will *not necessarily be the same*. Indeed, this means that there " "are several ways to construct an orientation from 3 different angles, " "depending on *the order of the rotations*." msgstr "" #: ../../docs/tutorials/3d/using_transforms.rst:43 msgid "" "Following is a visualization of rotation axes (in X, Y, Z order) in a gimbal " "(from Wikipedia). As you can see, the orientation of each axis depends on " "the rotation of the previous one:" msgstr "" #: ../../docs/tutorials/3d/using_transforms.rst:47 msgid "" "You may be wondering how this affects you. Let's look at a practical example:" msgstr "" #: ../../docs/tutorials/3d/using_transforms.rst:49 msgid "" "Imagine you are working on a first-person controller (e.g. an FPS game). " "Moving the mouse left and right controls your view angle parallel to the " "ground, while moving it up and down moves the player's view up and down." msgstr "" #: ../../docs/tutorials/3d/using_transforms.rst:51 msgid "" "In this case to achieve the desired effect, rotation must be applied first " "in the *Y* axis (\"up\" in this case, since Godot uses a \"Y-Up\" " "orientation), followed by rotation in the *X* axis." msgstr "" #: ../../docs/tutorials/3d/using_transforms.rst:55 msgid "" "If we were to apply rotation in the *X* axis first, and then in *Y*, the " "effect would be undesired:" msgstr "" #: ../../docs/tutorials/3d/using_transforms.rst:59 msgid "" "Depending on the type of game or effect desired, the order in which you want " "axis rotations to be applied may differ. Therefore, applying rotations in X, " "Y, and Z is not enough: you also need a *rotation order*." msgstr "" #: ../../docs/tutorials/3d/using_transforms.rst:62 #: ../../docs/tutorials/math/interpolation.rst:4 msgid "Interpolation" msgstr "" #: ../../docs/tutorials/3d/using_transforms.rst:64 msgid "" "Another problem with using Euler angles is interpolation. Imagine you want " "to transition between two different camera or enemy positions (including " "rotations). One logical way to approach this is to interpolate the angles " "from one position to the next. One would expect it to look like this:" msgstr "" #: ../../docs/tutorials/3d/using_transforms.rst:68 msgid "But this does not always have the expected effect when using angles:" msgstr "" #: ../../docs/tutorials/3d/using_transforms.rst:72 msgid "The camera actually rotated the opposite direction!" msgstr "" #: ../../docs/tutorials/3d/using_transforms.rst:74 msgid "There are a few reasons this may happen:" msgstr "" #: ../../docs/tutorials/3d/using_transforms.rst:76 msgid "" "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)." msgstr "" #: ../../docs/tutorials/3d/using_transforms.rst:77 msgid "" "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 `_ for a detailed explanation of this problem." msgstr "" #: ../../docs/tutorials/3d/using_transforms.rst:80 msgid "Say no to Euler angles" msgstr "" #: ../../docs/tutorials/3d/using_transforms.rst:82 msgid "" "The result of all this is that you should **not use** the ``rotation`` " "property of :ref:`class_Spatial` nodes in Godot for games. It's there to be " "used mainly in the editor, for coherence with the 2D engine, and for simple " "rotations (generally just one axis, or even two in limited cases). As much " "as you may be tempted, don't use it." msgstr "" #: ../../docs/tutorials/3d/using_transforms.rst:84 msgid "Instead, there is a better way to solve your rotation problems." msgstr "" #: ../../docs/tutorials/3d/using_transforms.rst:87 msgid "Introducing transforms" msgstr "" #: ../../docs/tutorials/3d/using_transforms.rst:89 msgid "" "Godot uses the :ref:`class_Transform` datatype for orientations. Each :ref:" "`class_Spatial` node contains a ``transform`` property which is relative to " "the parent's transform, if the parent is a Spatial-derived type." msgstr "" #: ../../docs/tutorials/3d/using_transforms.rst:91 msgid "" "It is also possible to access the world coordinate transform via the " "``global_transform`` property." msgstr "" #: ../../docs/tutorials/3d/using_transforms.rst:93 msgid "" "A transform has a :ref:`class_Basis` (transform.basis sub-property), which " "consists of three :ref:`class_Vector3` vectors. These are accessed via the " "``transform.basis`` property and can be accessed directly by ``transform." "basis.x``, ``transform.basis.y``, and ``transform.basis.z``. Each vector " "points in the direction its axis has been rotated, so they effectively " "describe the node's total rotation. The scale (as long as it's uniform) can " "also be inferred from the length of the axes. A *basis* can also be " "interpreted as a 3x3 matrix and used as ``transform.basis[x][y]``." msgstr "" #: ../../docs/tutorials/3d/using_transforms.rst:95 msgid "A default basis (unmodified) is akin to:" msgstr "" #: ../../docs/tutorials/3d/using_transforms.rst:123 msgid "This is also an analog of a 3x3 identity matrix." msgstr "" #: ../../docs/tutorials/3d/using_transforms.rst:125 msgid "" "Following the OpenGL convention, ``X`` is the *Right* axis, ``Y`` is the " "*Up* axis and ``Z`` is the *Forward* axis." msgstr "" #: ../../docs/tutorials/3d/using_transforms.rst:127 msgid "" "Together with the *basis*, a transform also has an *origin*. This is a " "*Vector3* specifying how far away from the actual origin ``(0, 0, 0)`` this " "transform is. Combining the *basis* with the *origin*, a *transform* " "efficiently represents a unique translation, rotation, and scale in space." msgstr "" #: ../../docs/tutorials/3d/using_transforms.rst:132 msgid "" "One way to visualize a transform is to look at an object's 3D gizmo while in " "\"local space\" mode." msgstr "" #: ../../docs/tutorials/3d/using_transforms.rst:136 msgid "" "The gizmo's arrows show the ``X``, ``Y``, and ``Z`` axes (in red, green, and " "blue respectively) of the basis, while the gizmo's center is at the object's " "origin." msgstr "" #: ../../docs/tutorials/3d/using_transforms.rst:140 msgid "" "For more information on the mathematics of vectors and transforms, please " "read the :ref:`doc_vector_math` tutorials." msgstr "" #: ../../docs/tutorials/3d/using_transforms.rst:143 msgid "Manipulating transforms" msgstr "" #: ../../docs/tutorials/3d/using_transforms.rst:145 msgid "" "Of course, transforms are not as straightforward to manipulate as angles and " "have problems of their own." msgstr "" #: ../../docs/tutorials/3d/using_transforms.rst:147 msgid "" "It is possible to rotate a transform, either by multiplying its basis by " "another (this is called accumulation), or by using the rotation methods." msgstr "" #: ../../docs/tutorials/3d/using_transforms.rst:164 msgid "A method in Spatial simplifies this:" msgstr "" #: ../../docs/tutorials/3d/using_transforms.rst:181 msgid "This rotates the node relative to the parent node." msgstr "" #: ../../docs/tutorials/3d/using_transforms.rst:183 msgid "" "To rotate relative to object space (the node's own transform), use the " "following:" msgstr "" #: ../../docs/tutorials/3d/using_transforms.rst:197 msgid "Precision errors" msgstr "" #: ../../docs/tutorials/3d/using_transforms.rst:199 msgid "" "Doing successive operations on transforms will result in a loss of precision " "due to floating-point error. This means the scale of each axis may no longer " "be exactly ``1.0``, and they may not be exactly ``90`` degrees from each " "other." msgstr "" #: ../../docs/tutorials/3d/using_transforms.rst:201 msgid "" "If a transform is rotated every frame, it will eventually start deforming " "over time. This is unavoidable." msgstr "" #: ../../docs/tutorials/3d/using_transforms.rst:203 msgid "" "There are two different ways to handle this. The first is to " "*orthonormalize* the transform after some time (maybe once per frame if you " "modify it every frame):" msgstr "" #: ../../docs/tutorials/3d/using_transforms.rst:214 msgid "" "This will make all axes have ``1.0`` length again and be ``90`` degrees from " "each other. However, any scale applied to the transform will be lost." msgstr "" #: ../../docs/tutorials/3d/using_transforms.rst:216 msgid "" "It is recommended you not scale nodes that are going to be manipulated; " "scale their children nodes instead (such as MeshInstance). If you absolutely " "must scale the node, then re-apply it at the end:" msgstr "" #: ../../docs/tutorials/3d/using_transforms.rst:230 msgid "Obtaining information" msgstr "" #: ../../docs/tutorials/3d/using_transforms.rst:232 msgid "" "You might be thinking at this point: **\"Ok, but how do I get angles from a " "transform?\"**. The answer again is: you don't. You must do your best to " "stop thinking in angles." msgstr "" #: ../../docs/tutorials/3d/using_transforms.rst:234 msgid "" "Imagine you need to shoot a bullet in the direction your player is facing. " "Just use the forward axis (commonly ``Z`` or ``-Z``)." msgstr "" #: ../../docs/tutorials/3d/using_transforms.rst:247 msgid "" "Is the enemy looking at the player? Use the dot product for this (see the :" "ref:`doc_vector_math` tutorial for an explanation of the dot product):" msgstr "" #: ../../docs/tutorials/3d/using_transforms.rst:266 msgid "Strafe left:" msgstr "" #: ../../docs/tutorials/3d/using_transforms.rst:283 msgid "Jump:" msgstr "" #: ../../docs/tutorials/3d/using_transforms.rst:302 msgid "All common behaviors and logic can be done with just vectors." msgstr "" #: ../../docs/tutorials/3d/using_transforms.rst:305 msgid "Setting information" msgstr "" #: ../../docs/tutorials/3d/using_transforms.rst:307 msgid "" "There are, of course, cases where you want to set information to a " "transform. Imagine a first person controller or orbiting camera. Those are " "definitely done using angles, because you *do want* the transforms to happen " "in a specific order." msgstr "" #: ../../docs/tutorials/3d/using_transforms.rst:309 msgid "" "For such cases, keep the angles and rotations *outside* the transform and " "set them every frame. Don't try to retrieve and re-use them because the " "transform is not meant to be used this way." msgstr "" #: ../../docs/tutorials/3d/using_transforms.rst:311 msgid "Example of looking around, FPS style:" msgstr "" #: ../../docs/tutorials/3d/using_transforms.rst:353 msgid "" "As you can see, in such cases it's even simpler to keep the rotation " "outside, then use the transform as the *final* orientation." msgstr "" #: ../../docs/tutorials/3d/using_transforms.rst:356 msgid "Interpolating with quaternions" msgstr "" #: ../../docs/tutorials/3d/using_transforms.rst:358 msgid "" "Interpolating between two transforms can efficiently be done with " "quaternions. More information about how quaternions work can be found in " "other places around the Internet. For practical use, it's enough to " "understand that pretty much their main use is doing a closest path " "interpolation. As in, if you have two rotations, a quaternion will smoothly " "allow interpolation between them using the closest axis." msgstr "" #: ../../docs/tutorials/3d/using_transforms.rst:360 msgid "Converting a rotation to quaternion is straightforward." msgstr "" #: ../../docs/tutorials/3d/using_transforms.rst:383 msgid "" "The :ref:`class_Quat` type reference has more information on the datatype " "(it can also do transform accumulation, transform points, etc., though this " "is used less often). If you interpolate or apply operations to quaternions " "many times, keep in mind they need to be eventually normalized. Otherwise, " "they will also suffer from numerical precision errors." msgstr "" #: ../../docs/tutorials/3d/using_transforms.rst:389 msgid "" "Quaternions are useful when doing camera/path/etc. interpolations, as the " "result will always be correct and smooth." msgstr "" #: ../../docs/tutorials/3d/using_transforms.rst:392 msgid "Transforms are your friend" msgstr "" #: ../../docs/tutorials/3d/using_transforms.rst:394 msgid "" "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." msgstr "" #: ../../docs/tutorials/3d/using_transforms.rst:396 msgid "" "Don't hesitate to ask for help on this topic in any of Godot's `online " "communities `_ and, once you become " "confident enough, please help others!" msgstr "" #: ../../docs/tutorials/3d/3d_rendering_limitations.rst:4 msgid "3D rendering limitations" msgstr "" #: ../../docs/tutorials/3d/3d_rendering_limitations.rst:9 msgid "" "Due to their focus on performance, real-time rendering engines have many " "limitations. Godot's renderer is no exception. To work effectively with " "those limitations, you need to understand them." msgstr "" #: ../../docs/tutorials/3d/3d_rendering_limitations.rst:14 msgid "Texture size limits" msgstr "" #: ../../docs/tutorials/3d/3d_rendering_limitations.rst:16 msgid "" "On desktops and laptops, textures larger than 8192×8192 may not be supported " "on older devices. You can check your target GPU's limitations on `GPUinfo." "org `__." msgstr "" #: ../../docs/tutorials/3d/3d_rendering_limitations.rst:20 msgid "" "Mobile GPUs are typically limited to 4096×4096 textures. Also, some mobile " "GPUs don't support repeating non-power-of-two-sized textures. Therefore, if " "you want your texture to display correctly on all platforms, you should " "avoid using textures larger than 4096×4096 and use a power of two size if " "the texture needs to repeat." msgstr "" #: ../../docs/tutorials/3d/3d_rendering_limitations.rst:27 msgid "Color banding" msgstr "" #: ../../docs/tutorials/3d/3d_rendering_limitations.rst:29 msgid "" "When using the GLES3 or Vulkan renderers, Godot's 3D engine renders " "internally in HDR. However, the rendering output will be tonemapped to a low " "dynamic range so it can be displayed on the screen. This can result in " "visible banding, especially when using untextured materials. This can also " "be seen in 2D projects when using smooth gradient textures." msgstr "" #: ../../docs/tutorials/3d/3d_rendering_limitations.rst:35 msgid "There are two main ways to alleviate banding:" msgstr "" #: ../../docs/tutorials/3d/3d_rendering_limitations.rst:37 msgid "" "Enable **Use Debanding** in the Project Settings. This applies a fullscreen " "debanding shader as a post-processing effect and is very cheap. Fullscreen " "debanding is only supported when using the GLES3 or Vulkan renderers. It " "also requires HDR to be enabled in the Project Settings (which is the " "default)." msgstr "" #: ../../docs/tutorials/3d/3d_rendering_limitations.rst:41 msgid "" "Alternatively, bake some noise into your textures. This is mainly effective " "in 2D, e.g. for vignetting effects. In 3D, you can also use a `custom " "debanding shader `__ to be applied on your *materials*. This technique works even if " "your project is rendered in LDR, which means it will work when using the " "GLES2 renderer." msgstr "" #: ../../docs/tutorials/3d/3d_rendering_limitations.rst:49 msgid "" "See `Banding in Games: A Noisy Rant `__ for more details about banding and ways to combat it." msgstr "" #: ../../docs/tutorials/3d/3d_rendering_limitations.rst:53 msgid "Depth buffer precision" msgstr "" #: ../../docs/tutorials/3d/3d_rendering_limitations.rst:55 msgid "" "To sort objects in 3D space, rendering engines rely on a *depth buffer* " "(also called *Z-buffer*). This buffer has a finite precision: 24-bit on " "desktop platforms, sometimes 16-bit on mobile platforms (for performance " "reasons). If two different objects end up on the same buffer value, then Z-" "fighting will occur. This will materialize as textures flickering back and " "forth as the camera moves or rotates." msgstr "" #: ../../docs/tutorials/3d/3d_rendering_limitations.rst:62 msgid "" "To make the depth buffer more precise over the rendered area, you should " "*increase* the Camera node's **Near** property. However, be careful: if you " "set it too high, players will be able to see through nearby geometry. You " "should also *decrease* the Camera node's **Far** property to the lowest " "permissible value for your use case, though keep in mind it won't impact " "precision as much as the **Near** property." msgstr "" #: ../../docs/tutorials/3d/3d_rendering_limitations.rst:69 msgid "" "If you only need high precision when the player can see far away, you could " "change it dynamically based on the game conditions. For instance, if the " "player enters an airplane, the **Near** property can be temporarily " "increased to avoid Z-fighting in the distance. It can then be decreased once " "the player leaves the airplane." msgstr "" #: ../../docs/tutorials/3d/3d_rendering_limitations.rst:75 msgid "" "Depending on the scene and viewing conditions, you may also be able to move " "the Z-fighting objects further apart without the difference being visible to " "the player." msgstr "" #: ../../docs/tutorials/3d/3d_rendering_limitations.rst:80 msgid "Transparency sorting" msgstr "" #: ../../docs/tutorials/3d/3d_rendering_limitations.rst:82 msgid "" "In Godot, transparent materials are drawn after opaque materials. " "Transparent objects are sorted back to front before being drawn based on the " "Node3D's position, not the vertex position in world space. Due to this, " "overlapping objects may often be sorted out of order. To fix improperly " "sorted objects, tweak the material's :ref:`Render Priority " "` property. This will force " "specific materials to appear in front or behind of other transparent " "materials. Even then, this may not always be sufficient." msgstr "" #: ../../docs/tutorials/3d/3d_rendering_limitations.rst:90 msgid "" "Some rendering engines feature *order-independent transparency* techniques " "to alleviate this, but this is costly on the GPU. Godot currently doesn't " "provide this feature. There are still several ways to avoid this problem:" msgstr "" #: ../../docs/tutorials/3d/3d_rendering_limitations.rst:94 msgid "" "Only make materials transparent if you actually need it. If a material only " "has a small transparent part, consider splitting it into a separate " "material. This will allow the opaque part to cast shadows and may also " "improve performance." msgstr "" #: ../../docs/tutorials/3d/3d_rendering_limitations.rst:99 msgid "" "If you want a material to fade with distance, use the SpatialMaterial " "distance fade mode **Pixel Dither** or **Object Dither** instead of " "**PixelAlpha**. This will make the material opaque. This way, it can also " "cast shadows." msgstr "" #: ../../docs/tutorials/3d/3d_rendering_limitations.rst:105 #, fuzzy msgid "Multi-sample antialiasing" msgstr "Nhiều instance" #: ../../docs/tutorials/3d/3d_rendering_limitations.rst:107 msgid "" "Multi-sample antialiasing (MSAA) takes multiple *coverage* samples at the " "edges of polygons when rendering objects. It does not increase the number of " "*color* samples used to render a scene. Here's what this means in practice:" msgstr "" #: ../../docs/tutorials/3d/3d_rendering_limitations.rst:111 msgid "" "Edges of meshes will be smoothed out nicely (as well as supersampling would)." msgstr "" #: ../../docs/tutorials/3d/3d_rendering_limitations.rst:112 msgid "" "Transparent materials that use *alpha testing* (1-bit transparency) won't be " "smoothed out." msgstr "" #: ../../docs/tutorials/3d/3d_rendering_limitations.rst:113 msgid "" "Specular aliasing (\"sparkles\" that appear on reflective surfaces) won't be " "reduced." msgstr "" #: ../../docs/tutorials/3d/3d_rendering_limitations.rst:115 msgid "" "There are several ways to work around this limitation depending on your " "performance budget:" msgstr "" #: ../../docs/tutorials/3d/3d_rendering_limitations.rst:117 msgid "" "To make specular aliasing less noticeable, open the Project Settings and " "enable **Rendering > Quality > Screen Space Filters > Screen Space Roughness " "Limiter**. This filter has a moderate cost on performance. It should be " "enabled only if you actually need it." msgstr "" #: ../../docs/tutorials/3d/3d_rendering_limitations.rst:122 msgid "" "Enable FXAA in addition to (or instead of) MSAA. Since FXAA is a screen-" "space antialiasing method, it will smooth out anything. As a downside, it " "will also make the scene appear blurrier, especially at resolutions below " "1440p." msgstr "" #: ../../docs/tutorials/3d/3d_rendering_limitations.rst:126 msgid "" "Render the scene at a higher resolution, then display it in a " "ViewportTexture that matches the window size. Make sure to enable **Filter** " "on the ViewportTexture flags. This technique is called *supersampling* and " "is very slow. Its use is generally only recommended for offline rendering." msgstr "" #: ../../docs/tutorials/3d/spatial_material.rst:4 msgid "Spatial Material" msgstr "" #: ../../docs/tutorials/3d/spatial_material.rst:9 msgid "" "``SpatialMaterial`` is a default 3D material that aims to provide most of " "the features artists look for in a material, without the need for writing " "shader code. However, it can be converted to shader code if additional " "functionality is needed." msgstr "" #: ../../docs/tutorials/3d/spatial_material.rst:13 msgid "This tutorial explains most parameters present in ``SpatialMaterial``." msgstr "" #: ../../docs/tutorials/3d/spatial_material.rst:15 msgid "" "There are three ways to add a ``SpatialMaterial`` to an object. It can be " "added in the *Material* property of the mesh. It can be added in the " "*Material* property of the node using the mesh (such as a MeshInstance " "node), or in the *Material Override* property of the node using the mesh." msgstr "" #: ../../docs/tutorials/3d/spatial_material.rst:22 msgid "" "If you add a material to the mesh itself, every time that mesh is used it " "will have that material. If you add a material to the node using the mesh, " "the material will only be used by that node, it will also override the " "material property of the mesh. If a material is added in the *Material " "Override* property of the node, it will only be used by that node. It will " "also override the regular material property of the node and the material " "property of the mesh." msgstr "" #: ../../docs/tutorials/3d/spatial_material.rst:30 #: ../../docs/tutorials/assets_pipeline/importing_images.rst:135 msgid "Flags" msgstr "" #: ../../docs/tutorials/3d/spatial_material.rst:32 msgid "" "Spatial materials have many flags determining the general usage of a " "material." msgstr "" #: ../../docs/tutorials/3d/spatial_material.rst:37 msgid "Transparent" msgstr "" #: ../../docs/tutorials/3d/spatial_material.rst:39 msgid "" "In Godot, materials are not transparent unless specifically configured to " "be. The main reason behind this is that transparent materials are rendered " "using a different technique (sorted from back to front and rendered in " "order)." msgstr "" #: ../../docs/tutorials/3d/spatial_material.rst:43 msgid "" "This technique is less efficient (many state changes happen) and makes the " "materials unusable with many mid- and post-processing effects (such as SSAO, " "SSR, etc.) that require perfectly opaque geometry." msgstr "" #: ../../docs/tutorials/3d/spatial_material.rst:47 msgid "" "For this reason, materials in Godot are assumed opaque unless specified " "otherwise. The main settings that enable transparency are:" msgstr "" #: ../../docs/tutorials/3d/spatial_material.rst:50 msgid "Transparent flag (this one)" msgstr "" #: ../../docs/tutorials/3d/spatial_material.rst:51 msgid "Blend mode set to other than \"Mix\"" msgstr "" #: ../../docs/tutorials/3d/spatial_material.rst:52 msgid "Enabling distance or proximity fade" msgstr "" #: ../../docs/tutorials/3d/spatial_material.rst:55 msgid "Use Shadow to Opacity" msgstr "" #: ../../docs/tutorials/3d/spatial_material.rst:57 #: ../../docs/tutorials/shaders/shader_reference/spatial_shader.rst:75 msgid "" "Lighting modifies the alpha so shadowed areas are opaque and non-shadowed " "areas are transparent. Useful for overlaying shadows onto a camera feed in " "AR." msgstr "" #: ../../docs/tutorials/3d/spatial_material.rst:61 msgid "Unshaded" msgstr "" #: ../../docs/tutorials/3d/spatial_material.rst:63 msgid "" "In most cases it is common for materials to be affected by lighting (shaded)." msgstr "" #: ../../docs/tutorials/3d/spatial_material.rst:65 msgid "" "However, in some cases you might want to show just the albedo (color) and " "ignore the rest. Toggling this flag on will remove all shading and display " "pure, unlit color." msgstr "" #: ../../docs/tutorials/3d/spatial_material.rst:72 msgid "Vertex Lighting" msgstr "" #: ../../docs/tutorials/3d/spatial_material.rst:74 msgid "" "Godot has a more or less uniform cost per pixel thanks to depth pre-pass. " "All lighting calculations are made by running the lighting shader on every " "pixel." msgstr "" #: ../../docs/tutorials/3d/spatial_material.rst:77 msgid "" "As these calculations are costly, performance can be brought down " "considerably in some corner cases such as drawing several layers of " "transparency (which is common in particle systems). Switching to per-vertex " "lighting may help in these cases." msgstr "" #: ../../docs/tutorials/3d/spatial_material.rst:82 msgid "" "Additionally, on low-end or mobile devices, switching to vertex lighting can " "considerably increase rendering performance." msgstr "" #: ../../docs/tutorials/3d/spatial_material.rst:87 msgid "" "Keep in mind that when vertex lighting is enabled, only directional lighting " "can produce shadows (for performance reasons)." msgstr "" #: ../../docs/tutorials/3d/spatial_material.rst:91 msgid "No Depth Test" msgstr "" #: ../../docs/tutorials/3d/spatial_material.rst:93 msgid "" "In order for close objects to appear over far away objects, depth testing is " "performed. Disabling it has the result of objects appearing over (or under) " "everything else." msgstr "" #: ../../docs/tutorials/3d/spatial_material.rst:97 msgid "" "Disabling this makes the most sense for drawing indicators in world space, " "and works very well with the *Render Priority* property of Material (see the " "bottom of this page)." msgstr "" #: ../../docs/tutorials/3d/spatial_material.rst:104 msgid "Use Point Size" msgstr "" #: ../../docs/tutorials/3d/spatial_material.rst:106 msgid "" "This option is only effective when the geometry rendered is made of points " "(generally it's made of triangles when imported from 3D DCCs). If so, then " "those points can be resized (see below)." msgstr "" #: ../../docs/tutorials/3d/spatial_material.rst:111 msgid "World Triplanar" msgstr "" #: ../../docs/tutorials/3d/spatial_material.rst:113 msgid "" "When using triplanar mapping (see below, in the UV1 and UV2 settings), " "triplanar is computed in object local space. This option makes triplanar " "work in world space." msgstr "" #: ../../docs/tutorials/3d/spatial_material.rst:118 msgid "Fixed Size" msgstr "" #: ../../docs/tutorials/3d/spatial_material.rst:120 msgid "" "This causes the object to be rendered at the same size no matter the " "distance. This is useful mostly for indicators (no depth test and high " "render priority) and some types of billboards." msgstr "" #: ../../docs/tutorials/3d/spatial_material.rst:125 msgid "Do Not Receive Shadows" msgstr "" #: ../../docs/tutorials/3d/spatial_material.rst:127 msgid "" "Makes the object not receive any kind of shadow that would otherwise be cast " "onto it." msgstr "" #: ../../docs/tutorials/3d/spatial_material.rst:131 msgid "Disable Ambient Light" msgstr "" #: ../../docs/tutorials/3d/spatial_material.rst:133 msgid "" "Makes the object not receive any kind of ambient lighting that would " "otherwise light it." msgstr "" #: ../../docs/tutorials/3d/spatial_material.rst:137 msgid "Ensure Correct Normals" msgstr "" #: ../../docs/tutorials/3d/spatial_material.rst:139 msgid "Fixes normals when non-uniform scaling is used." msgstr "" #: ../../docs/tutorials/3d/spatial_material.rst:142 msgid "Vertex Color" msgstr "" #: ../../docs/tutorials/3d/spatial_material.rst:144 msgid "" "This setting allows choosing what is done by default to vertex colors that " "come from your 3D modelling application. By default, they are ignored." msgstr "" #: ../../docs/tutorials/3d/spatial_material.rst:150 msgid "Use as Albedo" msgstr "" #: ../../docs/tutorials/3d/spatial_material.rst:152 msgid "Choosing this option means vertex color is used as albedo color." msgstr "" #: ../../docs/tutorials/3d/spatial_material.rst:155 msgid "Is sRGB" msgstr "" #: ../../docs/tutorials/3d/spatial_material.rst:157 msgid "" "Most 3D DCCs will likely export vertex colors as sRGB, so toggling this " "option on will help them look correct." msgstr "" #: ../../docs/tutorials/3d/spatial_material.rst:161 #: ../../docs/tutorials/platform/ios/plugins_for_ios.rst:123 #: ../../docs/tutorials/platform/ios/plugins_for_ios.rst:163 #: ../../docs/tutorials/platform/ios/plugins_for_ios.rst:216 #: ../../docs/tutorials/platform/ios/plugins_for_ios.rst:233 #: ../../docs/tutorials/platform/ios/plugins_for_ios.rst:306 #: ../../docs/tutorials/platform/ios/plugins_for_ios.rst:350 #: ../../docs/tutorials/platform/ios/plugins_for_ios.rst:495 msgid "Parameters" msgstr "" #: ../../docs/tutorials/3d/spatial_material.rst:163 msgid "" "``SpatialMaterial`` also has several configurable parameters to tweak many " "aspects of the rendering:" msgstr "" #: ../../docs/tutorials/3d/spatial_material.rst:169 msgid "Diffuse Mode" msgstr "" #: ../../docs/tutorials/3d/spatial_material.rst:171 msgid "" "Specifies the algorithm used by diffuse scattering of light when hitting the " "object. The default is *Burley*. Other modes are also available:" msgstr "" #: ../../docs/tutorials/3d/spatial_material.rst:174 msgid "" "**Burley:** Default mode, the original Disney Principled PBS diffuse " "algorithm." msgstr "" #: ../../docs/tutorials/3d/spatial_material.rst:175 msgid "**Lambert:** Is not affected by roughness." msgstr "" #: ../../docs/tutorials/3d/spatial_material.rst:176 msgid "" "**Lambert Wrap:** Extends Lambert to cover more than 90 degrees when " "roughness increases. Works great for hair and simulating cheap subsurface " "scattering. This implementation is energy conserving." msgstr "" #: ../../docs/tutorials/3d/spatial_material.rst:179 msgid "" "**Oren Nayar:** This implementation aims to take microsurfacing into account " "(via roughness). Works well for clay-like materials and some types of cloth." msgstr "" #: ../../docs/tutorials/3d/spatial_material.rst:181 msgid "" "**Toon:** Provides a hard cut for lighting, with smoothing affected by " "roughness. It is recommended you disable sky contribution from your " "environment's ambient light settings or disable ambient light in the spatial " "material to achieve a better effect." msgstr "" #: ../../docs/tutorials/3d/spatial_material.rst:189 msgid "Specular Mode" msgstr "" #: ../../docs/tutorials/3d/spatial_material.rst:191 msgid "" "Specifies how the specular blob will be rendered. The specular blob " "represents the shape of a light source reflected in the object." msgstr "" #: ../../docs/tutorials/3d/spatial_material.rst:194 msgid "**ShlickGGX:** The most common blob used by PBR 3D engines nowadays." msgstr "" #: ../../docs/tutorials/3d/spatial_material.rst:195 msgid "" "**Blinn:** Common in previous-generation engines. Not worth using nowadays, " "but left here for the sake of compatibility." msgstr "" #: ../../docs/tutorials/3d/spatial_material.rst:197 msgid "**Phong:** Same as above." msgstr "" #: ../../docs/tutorials/3d/spatial_material.rst:198 msgid "" "**Toon:** Creates a toon blob, which changes size depending on roughness." msgstr "" #: ../../docs/tutorials/3d/spatial_material.rst:199 msgid "**Disabled:** Sometimes the blob gets in the way. Begone!" msgstr "" #: ../../docs/tutorials/3d/spatial_material.rst:204 msgid "Blend Mode" msgstr "" #: ../../docs/tutorials/3d/spatial_material.rst:206 msgid "" "Controls the blend mode for the material. Keep in mind that any mode other " "than *Mix* forces the object to go through the transparent pipeline." msgstr "" #: ../../docs/tutorials/3d/spatial_material.rst:209 msgid "" "**Mix:** Default blend mode, alpha controls how much the object is visible." msgstr "" #: ../../docs/tutorials/3d/spatial_material.rst:210 msgid "" "**Add:** Object is blended additively, nice for flares or some fire-like " "effects." msgstr "" #: ../../docs/tutorials/3d/spatial_material.rst:212 msgid "**Sub:** Object is subtracted." msgstr "" #: ../../docs/tutorials/3d/spatial_material.rst:213 msgid "**Mul:** Object is multiplied." msgstr "" #: ../../docs/tutorials/3d/spatial_material.rst:218 msgid "Cull Mode" msgstr "" #: ../../docs/tutorials/3d/spatial_material.rst:220 msgid "" "Determines which side of the object is not drawn when backfaces are rendered:" msgstr "" #: ../../docs/tutorials/3d/spatial_material.rst:222 msgid "**Back:** The back of the object is culled when not visible (default)." msgstr "" #: ../../docs/tutorials/3d/spatial_material.rst:223 msgid "**Front:** The front of the object is culled when not visible." msgstr "" #: ../../docs/tutorials/3d/spatial_material.rst:224 msgid "" "**Disabled:** Used for objects that are double-sided (no culling is " "performed)." msgstr "" #: ../../docs/tutorials/3d/spatial_material.rst:228 #: ../../docs/tutorials/assets_pipeline/importing_scenes.rst:60 msgid "" "By default, Blender has backface culling disabled on materials and will " "export materials to match how they render in Blender. This means that " "materials in Godot will have their cull mode set to **Disabled**. This can " "decrease performance since backfaces will be rendered, even when they are " "being culled by other faces. To resolve this, enable **Backface Culling** in " "Blender's Materials tab, then export the scene to glTF again." msgstr "" #: ../../docs/tutorials/3d/spatial_material.rst:236 msgid "Depth Draw Mode" msgstr "" #: ../../docs/tutorials/3d/spatial_material.rst:238 msgid "Specifies when depth rendering must take place." msgstr "" #: ../../docs/tutorials/3d/spatial_material.rst:240 msgid "**Opaque Only (default):** Depth is only drawn for opaque objects." msgstr "" #: ../../docs/tutorials/3d/spatial_material.rst:241 msgid "" "**Always:** Depth draw is drawn for both opaque and transparent objects." msgstr "" #: ../../docs/tutorials/3d/spatial_material.rst:242 msgid "" "**Never:** No depth draw takes place (do not confuse this with the No Depth " "Test option above)." msgstr "" #: ../../docs/tutorials/3d/spatial_material.rst:244 msgid "" "**Depth Pre-Pass:** For transparent objects, an opaque pass is made first " "with the opaque parts, then transparency is drawn above. Use this option " "with transparent grass or tree foliage." msgstr "" #: ../../docs/tutorials/3d/spatial_material.rst:251 msgid "Line Width" msgstr "" #: ../../docs/tutorials/3d/spatial_material.rst:253 msgid "" "When drawing lines, specify the width of the lines being drawn. This option " "is not available on most modern hardware." msgstr "" #: ../../docs/tutorials/3d/spatial_material.rst:257 msgid "Point Size" msgstr "" #: ../../docs/tutorials/3d/spatial_material.rst:259 msgid "When drawing points, specify the point size in pixels." msgstr "" #: ../../docs/tutorials/3d/spatial_material.rst:262 msgid "Billboard Mode" msgstr "" #: ../../docs/tutorials/3d/spatial_material.rst:264 msgid "" "Enables billboard mode for drawing materials. This controls how the object " "faces the camera:" msgstr "" #: ../../docs/tutorials/3d/spatial_material.rst:267 msgid "**Disabled:** Billboard mode is disabled." msgstr "" #: ../../docs/tutorials/3d/spatial_material.rst:268 msgid "" "**Enabled:** Billboard mode is enabled, the object's -Z axis will always " "face the camera." msgstr "" #: ../../docs/tutorials/3d/spatial_material.rst:270 msgid "" "**Y-Billboard:** The object's X axis will always be aligned with the camera." msgstr "" #: ../../docs/tutorials/3d/spatial_material.rst:271 msgid "" "**Particles:** Most suited for particle systems, because it allows " "specifying animation options." msgstr "" #: ../../docs/tutorials/3d/spatial_material.rst:276 msgid "The above options are only enabled for Particle Billboard." msgstr "" #: ../../docs/tutorials/3d/spatial_material.rst:279 msgid "Billboard Keep Scale" msgstr "" #: ../../docs/tutorials/3d/spatial_material.rst:281 msgid "Enables scaling a mesh in billboard mode." msgstr "" #: ../../docs/tutorials/3d/spatial_material.rst:284 msgid "Grow" msgstr "" #: ../../docs/tutorials/3d/spatial_material.rst:286 msgid "Grows the object vertices in the direction pointed by their normals:" msgstr "" #: ../../docs/tutorials/3d/spatial_material.rst:290 msgid "" "This is commonly used to create cheap outlines. Add a second material pass, " "make it black and unshaded, reverse culling (Cull Front), and add some grow:" msgstr "" #: ../../docs/tutorials/3d/spatial_material.rst:297 msgid "Use Alpha Scissor" msgstr "" #: ../../docs/tutorials/3d/spatial_material.rst:299 msgid "" "When transparency other than ``0`` or ``1`` is not needed, it's possible to " "set a threshold to prevent the object from rendering semi-transparent pixels." msgstr "" #: ../../docs/tutorials/3d/spatial_material.rst:304 msgid "" "This renders the object via the opaque pipeline, which is faster and allows " "it to use mid- and post-process effects such as SSAO, SSR, etc." msgstr "" #: ../../docs/tutorials/3d/spatial_material.rst:308 msgid "Material colors, maps and channels" msgstr "" #: ../../docs/tutorials/3d/spatial_material.rst:310 msgid "" "Besides the parameters, what defines materials themselves are the colors, " "textures, and channels. Godot supports an extensive list of them. They are " "described in detail below:" msgstr "" #: ../../docs/tutorials/3d/spatial_material.rst:315 msgid "Albedo" msgstr "" #: ../../docs/tutorials/3d/spatial_material.rst:317 msgid "" "*Albedo* is the base color for the material, on which all the other settings " "operate. When set to *Unshaded*, this is the only color that is visible. In " "previous versions of Godot, this channel was named *Diffuse*. The change of " "name mainly happened because, in PBR (Physically Based Rendering), this " "color affects many more calculations than just the diffuse lighting path." msgstr "" #: ../../docs/tutorials/3d/spatial_material.rst:323 msgid "Albedo color and texture can be used together as they are multiplied." msgstr "" #: ../../docs/tutorials/3d/spatial_material.rst:325 msgid "" "*Alpha channel* in albedo color and texture is also used for the object " "transparency. If you use a color or texture with *alpha channel*, make sure " "to either enable transparency or *alpha scissoring* for it to work." msgstr "" #: ../../docs/tutorials/3d/spatial_material.rst:330 msgid "Metallic" msgstr "" #: ../../docs/tutorials/3d/spatial_material.rst:332 msgid "" "Godot uses a metallic model over competing models due to its simplicity. " "This parameter defines how reflective the material is. The more reflective, " "the less diffuse/ambient light affects the material and the more light is " "reflected. This model is called \"energy-conserving\"." msgstr "" #: ../../docs/tutorials/3d/spatial_material.rst:337 msgid "" "The *Specular* parameter is a general amount for the reflectivity (unlike " "*Metallic*, this is not energy-conserving, so leave it at ``0.5`` and don't " "touch it unless you need to)." msgstr "" #: ../../docs/tutorials/3d/spatial_material.rst:341 msgid "" "The minimum internal reflectivity is ``0.04``, so it's impossible to make a " "material completely unreflective, just like in real life." msgstr "" #: ../../docs/tutorials/3d/spatial_material.rst:347 msgid "Roughness" msgstr "" #: ../../docs/tutorials/3d/spatial_material.rst:349 msgid "" "*Roughness* affects the way reflection happens. A value of ``0`` makes it a " "perfect mirror while a value of ``1`` completely blurs the reflection " "(simulating natural microsurfacing). Most common types of materials can be " "achieved with the right combination of *Metallic* and *Roughness*." msgstr "" #: ../../docs/tutorials/3d/spatial_material.rst:357 msgid "Emission" msgstr "" #: ../../docs/tutorials/3d/spatial_material.rst:359 msgid "" "*Emission* specifies how much light is emitted by the material (keep in mind " "this does not include light surrounding geometry unless :ref:`doc_gi_probes` " "are used). This value is added to the resulting final image and is not " "affected by other lighting in the scene." msgstr "" #: ../../docs/tutorials/3d/spatial_material.rst:367 msgid "Normal map" msgstr "" #: ../../docs/tutorials/3d/spatial_material.rst:369 msgid "" "Normal mapping allows you to set a texture that represents finer shape " "detail. This does not modify geometry, only the incident angle for light. In " "Godot, only the red and green channels of normal maps are used for better " "compression and wider compatibility." msgstr "" #: ../../docs/tutorials/3d/spatial_material.rst:378 #: ../../docs/tutorials/assets_pipeline/importing_images.rst:125 msgid "" "Godot requires the normal map to use the X+, Y+ and Z+ coordinates, this is " "known as OpenGL style. If you've imported a material made to be used with " "another engine it may be DirectX style, in which case the normal map needs " "to be converted so its Y axis is flipped." msgstr "" #: ../../docs/tutorials/3d/spatial_material.rst:383 #: ../../docs/tutorials/assets_pipeline/importing_images.rst:130 msgid "" "More information about normal maps (including a coordinate order table for " "popular engines) can be found `here `__." msgstr "" #: ../../docs/tutorials/3d/spatial_material.rst:388 msgid "Rim" msgstr "" #: ../../docs/tutorials/3d/spatial_material.rst:390 msgid "" "Some fabrics have small micro-fur that causes light to scatter around it. " "Godot emulates this with the *Rim* parameter. Unlike other rim lighting " "implementations, which just use the emission channel, this one actually " "takes light into account (no light means no rim). This makes the effect " "considerably more believable." msgstr "" #: ../../docs/tutorials/3d/spatial_material.rst:397 msgid "" "Rim size depends on roughness, and there is a special parameter to specify " "how it must be colored. If *Tint* is ``0``, the color of the light is used " "for the rim. If *Tint* is ``1``, then the albedo of the material is used. " "Using intermediate values generally works best." msgstr "" #: ../../docs/tutorials/3d/spatial_material.rst:403 #: ../../docs/tutorials/rendering/gles2_gles3_differences.rst:64 msgid "Clearcoat" msgstr "" #: ../../docs/tutorials/3d/spatial_material.rst:405 #: ../../docs/tutorials/3d/spatial_material.rst:414 #: ../../docs/tutorials/3d/spatial_material.rst:436 #: ../../docs/tutorials/3d/spatial_material.rst:449 #: ../../docs/tutorials/3d/spatial_material.rst:469 #: ../../docs/tutorials/3d/environment_and_post_processing.rst:140 #: ../../docs/tutorials/3d/environment_and_post_processing.rst:154 #: ../../docs/tutorials/3d/environment_and_post_processing.rst:196 #: ../../docs/tutorials/3d/environment_and_post_processing.rst:222 msgid "*This feature is only available when using the GLES3 backend.*" msgstr "" #: ../../docs/tutorials/3d/spatial_material.rst:407 msgid "" "The *Clearcoat* parameter is used to add a secondary pass of transparent " "coat to the material. This is common in car paint and toys. In practice, " "it's a smaller specular blob added on top of the existing material." msgstr "" #: ../../docs/tutorials/3d/spatial_material.rst:412 #: ../../docs/tutorials/rendering/gles2_gles3_differences.rst:63 msgid "Anisotropy" msgstr "" #: ../../docs/tutorials/3d/spatial_material.rst:416 msgid "" "This changes the shape of the specular blob and aligns it to tangent space. " "Anisotropy is commonly used with hair, or to make materials such as brushed " "aluminum more realistic. It works especially well when combined with " "flowmaps." msgstr "" #: ../../docs/tutorials/3d/spatial_material.rst:423 msgid "Ambient Occlusion" msgstr "" #: ../../docs/tutorials/3d/spatial_material.rst:425 msgid "" "It is possible to specify a baked ambient occlusion map. This map affects " "how much ambient light reaches each surface of the object (it does not " "affect direct light by default). While it is possible to use Screen-Space " "Ambient Occlusion (SSAO) to generate ambient occlusion, nothing beats the " "quality of a well-baked AO map. It is recommended to bake ambient occlusion " "whenever possible." msgstr "" #: ../../docs/tutorials/3d/spatial_material.rst:434 msgid "Depth" msgstr "Chiều sâu" #: ../../docs/tutorials/3d/spatial_material.rst:438 msgid "" "Setting a depth map on a material produces a ray-marched search to emulate " "the proper displacement of cavities along the view direction. This is not " "real added geometry, but an illusion of depth. It may not work for complex " "objects, but it produces a realistic depth effect for textures. For best " "results, *Depth* should be used together with normal mapping." msgstr "" #: ../../docs/tutorials/3d/spatial_material.rst:447 msgid "Subsurface Scattering" msgstr "" #: ../../docs/tutorials/3d/spatial_material.rst:451 msgid "" "This effect emulates light that penetrates an object's surface, is " "scattered, and then comes out. It is useful to create realistic skin, " "marble, colored liquids, etc." msgstr "" #: ../../docs/tutorials/3d/spatial_material.rst:458 msgid "Transmission" msgstr "" #: ../../docs/tutorials/3d/spatial_material.rst:460 msgid "" "This controls how much light from the lit side (visible to light) is " "transferred to the dark side (opposite from the light). This works well for " "thin objects such as plant leaves, grass, human ears, etc." msgstr "" #: ../../docs/tutorials/3d/spatial_material.rst:467 #: ../../docs/tutorials/rendering/gles2_gles3_differences.rst:61 msgid "Refraction" msgstr "" #: ../../docs/tutorials/3d/spatial_material.rst:471 msgid "" "When refraction is enabled, it supersedes alpha blending, and Godot attempts " "to fetch information from behind the object being rendered instead. This " "allows distorting the transparency in a way similar to refraction in real " "life." msgstr "" #: ../../docs/tutorials/3d/spatial_material.rst:478 msgid "Detail" msgstr "" #: ../../docs/tutorials/3d/spatial_material.rst:480 msgid "" "Godot allows using secondary albedo and normal maps to generate a detail " "texture, which can be blended in many ways. By combining this with secondary " "UV or triplanar modes, many interesting textures can be achieved." msgstr "" #: ../../docs/tutorials/3d/spatial_material.rst:486 msgid "There are several settings that control how detail is used." msgstr "" #: ../../docs/tutorials/3d/spatial_material.rst:488 msgid "" "Mask: The detail mask is a black and white image used to control where the " "blending takes place on a texture. White is for the detail textures, Black " "is for the regular material textures, different shades of gray are for " "partial blending of the material textures and detail textures." msgstr "" #: ../../docs/tutorials/3d/spatial_material.rst:493 msgid "" "Blend Mode: These four modes control how the textures are blended together." msgstr "" #: ../../docs/tutorials/3d/spatial_material.rst:495 msgid "" "Mix: Combines pixel values of both textures. At black, only show the " "material texture, at white, only show the detail texture. Values of gray " "create a smooth blend between the two." msgstr "" #: ../../docs/tutorials/3d/spatial_material.rst:499 msgid "" "Add: Adds pixel values of one Texture with the other. Unlike mix mode both " "textures are completely mixed at white parts of a mask and not at gray " "parts. The original texture is mostly unchanged at black" msgstr "" #: ../../docs/tutorials/3d/spatial_material.rst:503 msgid "" "Sub: Subtracts pixel values of one texture with the other. The second " "texture is completely subtracted at white parts of a mask with only a little " "subtraction in black parts, gray parts being different levels of subtraction " "based on the exact texture." msgstr "" #: ../../docs/tutorials/3d/spatial_material.rst:508 msgid "" "Mul: Multiplies the RGB channel numbers for each pixel from the top texture " "with the values for the corresponding pixel from the bottom texture." msgstr "" #: ../../docs/tutorials/3d/spatial_material.rst:511 msgid "" "Albedo: This is where you put an albedo texture you want to blend. If " "nothing is in this slot it will be interpreted as white by default." msgstr "" #: ../../docs/tutorials/3d/spatial_material.rst:514 msgid "" "Normal: This is where you put a normal texture you want to blend. If nothing " "is in this slot it will be interpreted as a flat normal map. This can still " "be used even if the material does not have normal map enabled." msgstr "" #: ../../docs/tutorials/3d/spatial_material.rst:519 msgid "UV1 and UV2" msgstr "" #: ../../docs/tutorials/3d/spatial_material.rst:521 msgid "" "Godot supports two UV channels per material. Secondary UV is often useful " "for ambient occlusion or emission (baked light). UVs can be scaled and " "offset, which is useful when using repeating textures." msgstr "" #: ../../docs/tutorials/3d/spatial_material.rst:526 msgid "Triplanar Mapping" msgstr "" #: ../../docs/tutorials/3d/spatial_material.rst:528 msgid "" "Triplanar mapping is supported for both UV1 and UV2. This is an alternative " "way to obtain texture coordinates, sometimes called \"Autotexture\". " "Textures are sampled in X, Y and Z and blended by the normal. Triplanar " "mapping can be performed in either world space or object space." msgstr "" #: ../../docs/tutorials/3d/spatial_material.rst:533 msgid "" "In the image below, you can see how all primitives share the same material " "with world triplanar, so the brick texture continues smoothly between them." msgstr "" #: ../../docs/tutorials/3d/spatial_material.rst:539 msgid "Proximity and distance fade" msgstr "" #: ../../docs/tutorials/3d/spatial_material.rst:541 msgid "" "Godot allows materials to fade by proximity to each other as well as " "depending on the distance from the viewer. Proximity fade is useful for " "effects such as soft particles or a mass of water with a smooth blending to " "the shores. Distance fade is useful for light shafts or indicators that are " "only present after a given distance." msgstr "" #: ../../docs/tutorials/3d/spatial_material.rst:547 msgid "" "Keep in mind enabling these enables alpha blending, so abusing them for an " "entire scene is usually not a good idea." msgstr "" #: ../../docs/tutorials/3d/spatial_material.rst:553 msgid "Render priority" msgstr "" #: ../../docs/tutorials/3d/spatial_material.rst:555 msgid "" "The rendering order of objects can be changed, although this is mostly " "useful for transparent objects (or opaque objects that perform depth draw " "but no color draw, such as cracks on the floor)." msgstr "" #: ../../docs/tutorials/3d/lights_and_shadows.rst:4 msgid "3D lights and shadows" msgstr "" #: ../../docs/tutorials/3d/lights_and_shadows.rst:9 msgid "" "Light sources emit light that mixes with the materials and produces a " "visible result. Light can come from several types of sources in a scene:" msgstr "" #: ../../docs/tutorials/3d/lights_and_shadows.rst:12 msgid "" "From the Material itself in the form of the emission color (though it does " "not affect nearby objects unless baked)." msgstr "" #: ../../docs/tutorials/3d/lights_and_shadows.rst:14 msgid "Light Nodes: Directional, Omni and Spot." msgstr "" #: ../../docs/tutorials/3d/lights_and_shadows.rst:15 msgid "Ambient Light in the :ref:`Environment `." msgstr "" #: ../../docs/tutorials/3d/lights_and_shadows.rst:17 msgid "Baked Light (read :ref:`doc_baked_lightmaps`)." msgstr "" #: ../../docs/tutorials/3d/lights_and_shadows.rst:19 msgid "" "The emission color is a material property. You can read more about it in " "the :ref:`doc_spatial_material` tutorial." msgstr "" #: ../../docs/tutorials/3d/lights_and_shadows.rst:23 msgid "Light nodes" msgstr "" #: ../../docs/tutorials/3d/lights_and_shadows.rst:25 msgid "" "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:" msgstr "" #: ../../docs/tutorials/3d/lights_and_shadows.rst:31 msgid "Each one has a specific function:" msgstr "" #: ../../docs/tutorials/3d/lights_and_shadows.rst:33 msgid "**Color**: Base color for emitted light." msgstr "" #: ../../docs/tutorials/3d/lights_and_shadows.rst:34 msgid "" "**Energy**: Energy multiplier. This is useful for saturating lights or " "working with :ref:`doc_high_dynamic_range`." msgstr "" #: ../../docs/tutorials/3d/lights_and_shadows.rst:35 msgid "" "**Indirect Energy**: Secondary multiplier used with indirect light (light " "bounces). This works in baked light or GIProbe." msgstr "" #: ../../docs/tutorials/3d/lights_and_shadows.rst:36 msgid "" "**Negative**: Light becomes subtractive instead of additive. It's sometimes " "useful to manually compensate some dark corners." msgstr "" #: ../../docs/tutorials/3d/lights_and_shadows.rst:37 msgid "" "**Specular**: Affects the intensity of the specular blob in objects affected " "by this light. At zero, this light becomes a pure diffuse light." msgstr "" #: ../../docs/tutorials/3d/lights_and_shadows.rst:38 msgid "" "**Bake Mode**: Sets the bake mode for the light. For more information see :" "ref:`doc_baked_lightmaps`" msgstr "" #: ../../docs/tutorials/3d/lights_and_shadows.rst:39 msgid "" "**Cull Mask**: Objects that are in the selected layers below will be " "affected by this light. Note that objects disabled via this cull mask will " "still cast shadows. If you don't want disabled objects to cast shadows, " "adjust the ``cast_shadow`` property on the GeometryInstance to the desired " "value." msgstr "" #: ../../docs/tutorials/3d/lights_and_shadows.rst:45 msgid "Shadow mapping" msgstr "" #: ../../docs/tutorials/3d/lights_and_shadows.rst:47 msgid "" "Lights can optionally cast shadows. This gives them greater realism (light " "does not reach occluded areas), but it can incur a bigger performance cost. " "There is a list of generic shadow parameters, each also has a specific " "function:" msgstr "" #: ../../docs/tutorials/3d/lights_and_shadows.rst:51 msgid "**Enabled**: Check to enable shadow mapping in this light." msgstr "" #: ../../docs/tutorials/3d/lights_and_shadows.rst:52 msgid "" "**Color**: Areas occluded are multiplied by this color. It is black by " "default, but it can be changed to tint shadows." msgstr "" #: ../../docs/tutorials/3d/lights_and_shadows.rst:53 msgid "" "**Bias**: When this parameter is too small, self shadowing occurs. When too " "large, shadows separate from the casters. Tweak to what works best for you." msgstr "" #: ../../docs/tutorials/3d/lights_and_shadows.rst:54 msgid "" "**Contact**: Performs a short screen-space raycast to reduce the gap " "generated by the bias. Contact shadows are only available when using the " "GLES3 backend." msgstr "" #: ../../docs/tutorials/3d/lights_and_shadows.rst:55 msgid "" "**Reverse Cull Face**: Some scenes work better when shadow mapping is " "rendered with face-culling inverted." msgstr "" #: ../../docs/tutorials/3d/lights_and_shadows.rst:57 msgid "" "Below is an image of what tweaking bias looks like. Default values work for " "most cases, but in general it depends on the size and complexity of geometry." msgstr "" #: ../../docs/tutorials/3d/lights_and_shadows.rst:62 msgid "" "Finally, if gaps can't be solved, the **Contact** option can help (at a " "performance cost):" msgstr "" #: ../../docs/tutorials/3d/lights_and_shadows.rst:66 msgid "" "Any sort of bias issues can always be fixed by increasing the shadow map " "resolution, although that may lead to decreased performance." msgstr "" #: ../../docs/tutorials/3d/lights_and_shadows.rst:71 msgid "" "If shadow biasing is a problem in your scene, the following settings are a " "good starting point:" msgstr "" #: ../../docs/tutorials/3d/lights_and_shadows.rst:73 msgid "" "Enable **Reverse Cull Face**. This reduces shadow peter-panning " "significantly and prevents lights from exhibiting shadow acne at grazing " "angles. The main downside is that it may cause lighting to leak in some " "corners. The other downside is that materials that have their cull mode set " "to **Disabled** or MeshInstances with Cast Shadow set to **Double-Sided** " "may exhibit shadow acne." msgstr "" #: ../../docs/tutorials/3d/lights_and_shadows.rst:79 msgid "" "Set **Bias** to ``-0.01``. The bias should be a negative value when " "**Reverse Cull Face** is enabled, but it should be a positive value when " "it's disabled." msgstr "" #: ../../docs/tutorials/3d/lights_and_shadows.rst:81 msgid "" "For DirectionalLight, set the directional shadow **Normal Bias** to ``0.0`` " "and **Bias Split Scale** to ``0.0``. Depending on your scene, you may also " "want to further decrease **Bias** to a value between ``-0.05`` and ``-0.1``." msgstr "" #: ../../docs/tutorials/3d/lights_and_shadows.rst:85 msgid "" "Following the above tips should make it possible to avoid gaps in shadows " "without resorting to contact shadows (which have many issues of their own). " "If shadow acne is still visible after performing the above tweaks, try " "subdividing your meshes further in your 3D modeling software." msgstr "" #: ../../docs/tutorials/3d/lights_and_shadows.rst:91 msgid "Directional light" msgstr "" #: ../../docs/tutorials/3d/lights_and_shadows.rst:93 msgid "" "This is the most common type of light and represents a light source very far " "away (such as the sun). It is also the cheapest light to compute and should " "be used whenever possible (although it's not the cheapest shadow-map to " "compute, but more on that later)." msgstr "" #: ../../docs/tutorials/3d/lights_and_shadows.rst:97 msgid "" "Directional light models an infinite number of parallel light rays covering " "the whole scene. The directional light node is represented by a big arrow " "which indicates the direction of the light rays. However, the position of " "the node does not affect the lighting at all and can be anywhere." msgstr "" #: ../../docs/tutorials/3d/lights_and_shadows.rst:104 msgid "" "Every face whose front-side is hit by the light rays is lit, while the " "others stay dark. Most light types have specific parameters, but directional " "lights are pretty simple in nature, so they don't." msgstr "" #: ../../docs/tutorials/3d/lights_and_shadows.rst:108 msgid "Directional shadow mapping" msgstr "" #: ../../docs/tutorials/3d/lights_and_shadows.rst:110 msgid "" "To compute shadow maps, the scene is rendered (only depth) from an " "orthogonal point of view that covers the whole scene (or up to the max " "distance). There is, however, a problem with this approach because objects " "closer to the camera receive blocky shadows." msgstr "" #: ../../docs/tutorials/3d/lights_and_shadows.rst:116 msgid "" "To fix this, a technique named \"Parallel Split Shadow Maps\" (or PSSM) is " "used. This splits the view frustum in 2 or 4 areas. Each area gets its own " "shadow map. This allows small areas close to the viewer to have the same " "shadow resolution as a huge, far-away area." msgstr "" #: ../../docs/tutorials/3d/lights_and_shadows.rst:121 msgid "With this, shadows become more detailed:" msgstr "" #: ../../docs/tutorials/3d/lights_and_shadows.rst:125 msgid "To control PSSM, a number of parameters are exposed:" msgstr "" #: ../../docs/tutorials/3d/lights_and_shadows.rst:129 msgid "" "Each split distance is controlled relative to the camera far (or shadow " "**Max Distance** if greater than zero), so *0.0* is the eye position and " "*1.0* is where the shadow ends at a distance. Splits are in-between. Default " "values generally work well, but tweaking the first split a bit is common to " "give more detail to close objects (like a character in a third person game)." msgstr "" #: ../../docs/tutorials/3d/lights_and_shadows.rst:135 msgid "" "Always make sure to set a shadow *Max Distance* according to what the scene " "needs. A lower maximum distance will result in better-looking shadows." msgstr "" #: ../../docs/tutorials/3d/lights_and_shadows.rst:138 msgid "" "Sometimes, the transition between a split and the next can look bad. To fix " "this, the **\"Blend Splits\"** option can be turned on, which sacrifices " "detail in exchange for smoother transitions:" msgstr "" #: ../../docs/tutorials/3d/lights_and_shadows.rst:144 msgid "" "The **\"Normal Bias\"** parameter can be used to fix special cases of self " "shadowing when objects are perpendicular to the light. The only downside is " "that it makes the shadow a bit thinner." msgstr "" #: ../../docs/tutorials/3d/lights_and_shadows.rst:150 msgid "" "The **\"Bias Split Scale\"** parameter can control extra bias for the splits " "that are far away. If self shadowing occurs only on the splits far away, " "this value can fix them." msgstr "" #: ../../docs/tutorials/3d/lights_and_shadows.rst:153 msgid "Finally, the **\"Depth Range\"** has two settings:" msgstr "" #: ../../docs/tutorials/3d/lights_and_shadows.rst:155 msgid "" "**Stable**: Keeps the shadow stable while the camera moves, and the blocks " "that appear in the outline when close to the shadow edges remain in-place. " "This is the default and generally desired, but it reduces the effective " "shadow resolution." msgstr "" #: ../../docs/tutorials/3d/lights_and_shadows.rst:156 msgid "" "**Optimized**: Tries to achieve the maximum resolution available at any " "given time. This may result in a \"moving saw\" effect on shadow edges, but " "at the same time the shadow looks more detailed (so this effect may be " "subtle enough to be forgiven)." msgstr "" #: ../../docs/tutorials/3d/lights_and_shadows.rst:158 msgid "Just experiment which setting works better for your scene." msgstr "" #: ../../docs/tutorials/3d/lights_and_shadows.rst:160 msgid "" "Shadowmap size for directional lights can be changed in Project Settings -> " "Rendering -> Quality:" msgstr "" #: ../../docs/tutorials/3d/lights_and_shadows.rst:164 msgid "" "Increasing it can solve bias problems, but decrease performance. Shadow " "mapping is an art of tweaking." msgstr "" #: ../../docs/tutorials/3d/lights_and_shadows.rst:167 msgid "Omni light" msgstr "" #: ../../docs/tutorials/3d/lights_and_shadows.rst:169 msgid "" "Omni light is a point source that emits light spherically in all directions " "up to a given radius." msgstr "" #: ../../docs/tutorials/3d/lights_and_shadows.rst:174 msgid "" "In real life, light attenuation is an inverse function, which means omni " "lights don't have a radius. This is a problem because it means computing " "several omni lights would become demanding." msgstr "" #: ../../docs/tutorials/3d/lights_and_shadows.rst:177 msgid "" "To solve this, a *Range* is introduced together with an attenuation function." msgstr "" #: ../../docs/tutorials/3d/lights_and_shadows.rst:181 msgid "" "These two parameters allow tweaking how this works visually in order to find " "aesthetically pleasing results." msgstr "" #: ../../docs/tutorials/3d/lights_and_shadows.rst:187 msgid "Omni shadow mapping" msgstr "" #: ../../docs/tutorials/3d/lights_and_shadows.rst:189 msgid "" "Omni light shadow mapping is relatively straightforward. The main issue that " "needs to be considered is the algorithm used to render it." msgstr "" #: ../../docs/tutorials/3d/lights_and_shadows.rst:192 msgid "" "Omni Shadows can be rendered as either **\"Dual Paraboloid\" or \"Cube " "Mapped\"**. The former renders quickly, but can cause deformations, while " "the later is more correct, but costlier." msgstr "" #: ../../docs/tutorials/3d/lights_and_shadows.rst:198 msgid "" "If the objects being rendered are mostly irregular, Dual Paraboloid is " "usually enough. In any case, as these shadows are cached in a shadow atlas " "(more on that at the end), it may not make a difference in performance for " "most scenes." msgstr "" #: ../../docs/tutorials/3d/lights_and_shadows.rst:203 msgid "Spot light" msgstr "" #: ../../docs/tutorials/3d/lights_and_shadows.rst:205 msgid "" "Spot lights are similar to omni lights, except they emit light only into a " "cone (or \"cutoff\"). They are useful to simulate flashlights, car lights, " "reflectors, spots, etc. This type of light is also attenuated towards the " "opposite direction it points to." msgstr "" #: ../../docs/tutorials/3d/lights_and_shadows.rst:212 msgid "" "Spot lights share the same **Range** and **Attenuation** as **OmniLight**, " "and add two extra parameters:" msgstr "" #: ../../docs/tutorials/3d/lights_and_shadows.rst:214 msgid "**Angle**: The aperture angle of the light" msgstr "" #: ../../docs/tutorials/3d/lights_and_shadows.rst:215 msgid "" "**Angle Attenuation**: The cone attenuation, which helps soften the cone " "borders." msgstr "" #: ../../docs/tutorials/3d/lights_and_shadows.rst:218 msgid "Spot shadow mapping" msgstr "" #: ../../docs/tutorials/3d/lights_and_shadows.rst:220 msgid "" "Spots don't need any parameters for shadow mapping. Keep in mind that, at " "more than 89 degrees of aperture, shadows stop functioning for spots, and " "you should consider using an Omni light instead." msgstr "" #: ../../docs/tutorials/3d/lights_and_shadows.rst:224 msgid "Shadow atlas" msgstr "" #: ../../docs/tutorials/3d/lights_and_shadows.rst:226 msgid "" "Unlike Directional lights, which have their own shadow texture, Omni and " "Spot lights are assigned to slots of a shadow atlas. This atlas can be " "configured in Project Settings -> Rendering -> Quality -> Shadow Atlas." msgstr "" #: ../../docs/tutorials/3d/lights_and_shadows.rst:231 msgid "" "The resolution applies to the whole Shadow Atlas. This atlas is divided into " "four quadrants:" msgstr "" #: ../../docs/tutorials/3d/lights_and_shadows.rst:235 msgid "" "Each quadrant can be subdivided to allocate any number of shadow maps; the " "following is the default subdivision:" msgstr "" #: ../../docs/tutorials/3d/lights_and_shadows.rst:239 msgid "" "The allocation logic is simple. The biggest shadow map size (when no " "subdivision is used) represents a light the size of the screen (or bigger). " "Subdivisions (smaller maps) represent shadows for lights that are further " "away from view and proportionally smaller." msgstr "" #: ../../docs/tutorials/3d/lights_and_shadows.rst:244 msgid "Every frame, the following procedure is performed for all lights:" msgstr "" #: ../../docs/tutorials/3d/lights_and_shadows.rst:246 msgid "" "Check if the light is on a slot of the right size. If not, re-render it and " "move it to a larger/smaller slot." msgstr "" #: ../../docs/tutorials/3d/lights_and_shadows.rst:247 msgid "" "Check if any object affecting the shadow map has changed. If it did, re-" "render the light." msgstr "" #: ../../docs/tutorials/3d/lights_and_shadows.rst:248 msgid "" "If neither of the above has happened, nothing is done, and the shadow is " "left untouched." msgstr "" #: ../../docs/tutorials/3d/lights_and_shadows.rst:250 msgid "" "If the slots in a quadrant are full, lights are pushed back to smaller " "slots, depending on size and distance." msgstr "" #: ../../docs/tutorials/3d/lights_and_shadows.rst:252 msgid "" "This allocation strategy works for most games, but you may want to use a " "separate one in some cases (for example, a top-down game where all lights " "are around the same size and quadrants may all have the same subdivision)." msgstr "" #: ../../docs/tutorials/3d/lights_and_shadows.rst:256 msgid "Shadow filter quality" msgstr "" #: ../../docs/tutorials/3d/lights_and_shadows.rst:258 msgid "" "The filter quality of shadows can be tweaked. This can be found in Project " "Settings -> Rendering -> Quality -> Shadows. Godot supports no filter, PCF5 " "and PCF13." msgstr "" #: ../../docs/tutorials/3d/lights_and_shadows.rst:264 msgid "It affects the blockyness of the shadow outline:" msgstr "" #: ../../docs/tutorials/3d/reflection_probes.rst:4 msgid "Reflection probes" msgstr "" #: ../../docs/tutorials/3d/reflection_probes.rst:9 msgid "" "As stated in the :ref:`doc_spatial_material`, objects can show reflected or " "diffuse light. Reflection probes are used as a source of reflected and " "ambient light for objects inside their area of influence." msgstr "" #: ../../docs/tutorials/3d/reflection_probes.rst:12 msgid "" "A probe of this type captures the surroundings (as a sort of 360 degrees " "image), and stores versions of it with increasing levels of *blur*. This is " "used to simulate roughness in materials, as well as ambient lighting." msgstr "" #: ../../docs/tutorials/3d/reflection_probes.rst:15 msgid "" "While these probes are an efficient way of storing reflections, they have a " "few shortcomings:" msgstr "" #: ../../docs/tutorials/3d/reflection_probes.rst:17 msgid "" "They are efficient to render, but expensive to compute. This leads to a " "default behavior where they only capture on scene load." msgstr "" #: ../../docs/tutorials/3d/reflection_probes.rst:18 msgid "" "They work best for rectangular shaped rooms or places, otherwise the " "reflections shown are not as faithful (especially when roughness is 0)." msgstr "" #: ../../docs/tutorials/3d/reflection_probes.rst:21 #: ../../docs/tutorials/3d/gi_probes.rst:36 #: ../../docs/tutorials/3d/baked_lightmaps.rst:48 #: ../../docs/tutorials/shaders/your_first_shader/your_first_3d_shader.rst:62 msgid "Setting up" msgstr "" #: ../../docs/tutorials/3d/reflection_probes.rst:23 msgid "" "Create a ReflectionProbe node and wrap it around the area where you want to " "have reflections:" msgstr "" #: ../../docs/tutorials/3d/reflection_probes.rst:27 msgid "" "This should result in immediate local reflections. If you are using a Sky " "texture, reflections are by default blended with it." msgstr "" #: ../../docs/tutorials/3d/reflection_probes.rst:30 msgid "" "By default, on interiors, reflections may appear not to have much " "consistence. In this scenario, make sure to tick the *\"Box Correct\"* " "property." msgstr "" #: ../../docs/tutorials/3d/reflection_probes.rst:36 msgid "" "This setting changes the reflection from an infinite skybox to reflecting a " "box the size of the probe:" msgstr "" #: ../../docs/tutorials/3d/reflection_probes.rst:41 msgid "" "Adjusting the box walls may help improve the reflection a bit, but it will " "always look best in box shaped rooms." msgstr "" #: ../../docs/tutorials/3d/reflection_probes.rst:44 msgid "" "The probe captures the surrounding from the center of the gizmo. If, for " "some reason, the room shape or contents occlude the center, it can be " "displaced to an empty place by moving the handles in the center:" msgstr "" #: ../../docs/tutorials/3d/reflection_probes.rst:50 msgid "" "By default, shadow mapping is disabled when rendering probes (only in the " "rendered image inside the probe, not the actual scene). This is a simple way " "to save on performance and memory. If you want shadows in the probe, they " "can be toggled on/off with the *Enable Shadow* setting:" msgstr "" #: ../../docs/tutorials/3d/reflection_probes.rst:57 msgid "" "Finally, keep in mind that you may not want the Reflection Probe to render " "some objects. A typical scenario is an enemy inside the room which will move " "around. To keep objects from being rendered in the reflections, use the " "*Cull Mask* setting:" msgstr "" #: ../../docs/tutorials/3d/reflection_probes.rst:65 #: ../../docs/tutorials/3d/gi_probes.rst:95 msgid "Interior vs exterior" msgstr "" #: ../../docs/tutorials/3d/reflection_probes.rst:67 msgid "" "If you are using reflection probes in an interior setting, it is recommended " "that the **Interior** property be enabled. This stops the probe from " "rendering the sky and also allows custom ambient lighting settings." msgstr "" #: ../../docs/tutorials/3d/reflection_probes.rst:73 msgid "" "When probes are set to **Interior**, custom constant ambient lighting can be " "specified per probe. Just choose a color and an energy." msgstr "" #: ../../docs/tutorials/3d/reflection_probes.rst:76 msgid "" "Optionally, you can blend this ambient light with the probe diffuse capture " "by tweaking the **Ambient Contribution** property (0.0 means pure ambient " "color, while 1.0 means pure diffuse capture)." msgstr "" #: ../../docs/tutorials/3d/reflection_probes.rst:81 msgid "Blending" msgstr "" #: ../../docs/tutorials/3d/reflection_probes.rst:83 msgid "" "Multiple reflection probes can be used, and Godot will blend them where they " "overlap using a smart algorithm:" msgstr "" #: ../../docs/tutorials/3d/reflection_probes.rst:87 msgid "" "As you can see, this blending is never perfect (after all, these are box " "reflections, not real reflections), but these artifacts are only visible " "when using perfectly mirrored reflections. Normally, scenes have normal " "mapping and varying levels of roughness, which can hide this." msgstr "" #: ../../docs/tutorials/3d/reflection_probes.rst:93 msgid "" "Alternatively, Reflection Probes work well blended together with Screen " "Space Reflections to solve these problems. Combining them makes local " "reflections appear more faithful, while probes are only used as a fallback " "when no screen-space information is found:" msgstr "" #: ../../docs/tutorials/3d/reflection_probes.rst:99 msgid "" "Finally, blending interior and exterior probes is the recommended approach " "when making levels that combine both interiors and exteriors. Near the door, " "a probe can be marked as *exterior* (so it will get sky reflections) while " "on the inside, it can be interior." msgstr "" #: ../../docs/tutorials/3d/reflection_probes.rst:104 msgid "Reflection atlas" msgstr "" #: ../../docs/tutorials/3d/reflection_probes.rst:106 msgid "" "In the current renderer implementation, all probes are the same size and are " "fit into a Reflection Atlas. The size and amount of probes can be customized " "in Project Settings -> Quality -> Reflections" msgstr "" #: ../../docs/tutorials/3d/reflection_probes.rst:110 msgid "" "The default setting of Atlas Subdiv: 8 will allow up to 16 reflection probes " "in a scene. This value needs to be increased if you need more reflection " "probes." msgstr "" #: ../../docs/tutorials/3d/gi_probes.rst:4 msgid "Using GIProbe" msgstr "" #: ../../docs/tutorials/3d/gi_probes.rst:9 msgid "" "This feature is only available when using the GLES3 backend. :ref:" "`doc_baked_lightmaps` can be used as an alternative when using the GLES2 " "renderer." msgstr "" #: ../../docs/tutorials/3d/gi_probes.rst:13 msgid "" "Just like with :ref:`doc_reflection_probes`, and as stated in the :ref:" "`doc_spatial_material`, objects can show reflected or diffuse light. GI " "Probes are similar to Reflection Probes, but they use a different and more " "complex technique to produce indirect light and reflections." msgstr "" #: ../../docs/tutorials/3d/gi_probes.rst:18 msgid "" "The strength of GI Probes is real-time, high quality, indirect light. While " "the scene needs a quick pre-bake for the static objects that will be used, " "lights can be added, changed or removed, and this will be updated in real-" "time. Dynamic objects that move within one of these probes will also receive " "indirect lighting from the scene automatically." msgstr "" #: ../../docs/tutorials/3d/gi_probes.rst:24 msgid "" "Just like with ``ReflectionProbe``, ``GIProbe`` can be blended (in a bit " "more limited way), so it is possible to provide full real-time lighting for " "a stage without having to resort to lightmaps." msgstr "" #: ../../docs/tutorials/3d/gi_probes.rst:28 #, fuzzy msgid "The main downsides of ``GIProbe`` are:" msgstr "Lý do chính là:" #: ../../docs/tutorials/3d/gi_probes.rst:30 msgid "" "A small amount of light leaking can occur if the level is not carefully " "designed. This must be artist-tweaked." msgstr "" #: ../../docs/tutorials/3d/gi_probes.rst:31 msgid "" "Performance requirements are higher than for lightmaps, so it may not run " "properly in low-end integrated GPUs (may need to reduce resolution)." msgstr "" #: ../../docs/tutorials/3d/gi_probes.rst:32 msgid "" "Reflections are voxelized, so they don't look as sharp as with " "``ReflectionProbe``. However, in exchange they are volumetric, so any room " "size or shape works for them. Mixing them with Screen Space Reflection also " "works well." msgstr "" #: ../../docs/tutorials/3d/gi_probes.rst:33 msgid "" "They consume considerably more video memory than Reflection Probes, so they " "must be used with care in the right subdivision sizes." msgstr "" #: ../../docs/tutorials/3d/gi_probes.rst:38 msgid "" "Just like a ``ReflectionProbe``, simply set up the ``GIProbe`` by wrapping " "it around the geometry that will be affected." msgstr "" #: ../../docs/tutorials/3d/gi_probes.rst:43 msgid "" "Afterwards, make sure to enable the **Use In Baked Light** property on the " "geometry instances in the inspector. This is required for ``GIProbe`` to " "recognize objects, otherwise they will be ignored:" msgstr "" #: ../../docs/tutorials/3d/gi_probes.rst:49 msgid "" "Once the geometry is set up, push the Bake button that appears on the 3D " "editor toolbar to begin the pre-baking process:" msgstr "" #: ../../docs/tutorials/3d/gi_probes.rst:56 msgid "" "Meshes should have sufficiently thick walls to avoid light leaks (avoid one-" "sided walls). For interior levels, enclose your level geometry in a " "sufficiently large box and bridge the loops to close the mesh." msgstr "" #: ../../docs/tutorials/3d/gi_probes.rst:61 msgid "Adding lights" msgstr "" #: ../../docs/tutorials/3d/gi_probes.rst:63 msgid "" "Unless there are materials with emission, ``GIProbe`` does nothing by " "default. Lights need to be added to the scene to have an effect." msgstr "" #: ../../docs/tutorials/3d/gi_probes.rst:66 msgid "" "The effect of indirect light can be viewed quickly (it is recommended you " "turn off all ambient/sky lighting to tweak this, though, as shown below):" msgstr "" #: ../../docs/tutorials/3d/gi_probes.rst:71 msgid "" "In some situations, though, indirect light may be too weak. Lights have an " "indirect multiplier to tweak this:" msgstr "" #: ../../docs/tutorials/3d/gi_probes.rst:76 msgid "" "And, as ``GIProbe`` lighting updates in real-time, this effect is immediate:" msgstr "" #: ../../docs/tutorials/3d/gi_probes.rst:81 msgid "Reflections" msgstr "" #: ../../docs/tutorials/3d/gi_probes.rst:83 msgid "" "For very metallic materials with low roughness, it's possible to appreciate " "voxel reflections. Keep in mind that these have far less detail than " "Reflection Probes or Screen Space Reflections, but fully reflect " "volumetrically." msgstr "" #: ../../docs/tutorials/3d/gi_probes.rst:89 msgid "" "``GIProbe``\\ s can be easily mixed with Reflection Probes and Screen Space " "Reflections, as a full 3-stage fallback-chain. This allows to have precise " "reflections where needed:" msgstr "" #: ../../docs/tutorials/3d/gi_probes.rst:97 msgid "" "GI Probes normally allow mixing with lighting from the sky. This can be " "disabled when turning on the *Interior* setting." msgstr "" #: ../../docs/tutorials/3d/gi_probes.rst:102 msgid "" "The difference becomes clear in the image below, where light from the sky " "goes from spreading inside to being ignored." msgstr "" #: ../../docs/tutorials/3d/gi_probes.rst:107 msgid "" "As complex buildings may mix interiors with exteriors, combining GIProbes " "for both parts works well." msgstr "" #: ../../docs/tutorials/3d/gi_probes.rst:111 msgid "Tweaking" msgstr "" #: ../../docs/tutorials/3d/gi_probes.rst:113 msgid "GI Probes support a few parameters for tweaking:" msgstr "" #: ../../docs/tutorials/3d/gi_probes.rst:117 msgid "" "**Subdiv** Subdivision used for the probe. The default (128) is generally " "good for small- to medium-sized areas. Bigger subdivisions use more memory." msgstr "" #: ../../docs/tutorials/3d/gi_probes.rst:118 msgid "**Extents** Size of the probe. Can be tweaked from the gizmo." msgstr "" #: ../../docs/tutorials/3d/gi_probes.rst:119 msgid "" "**Dynamic Range** Maximum light energy the probe can absorb. Higher values " "allow brighter light, but with less color detail." msgstr "" #: ../../docs/tutorials/3d/gi_probes.rst:120 msgid "" "**Energy** Multiplier for all the probe. Can be used to make the indirect " "light brighter (although it's better to tweak this from the light itself)." msgstr "" #: ../../docs/tutorials/3d/gi_probes.rst:121 msgid "**Propagation** How much light propagates through the probe internally." msgstr "" #: ../../docs/tutorials/3d/gi_probes.rst:122 msgid "" "**Bias** Value used to avoid self-occlusion when doing voxel cone tracing, " "should generally be above 1.0 (1==voxel size)." msgstr "" #: ../../docs/tutorials/3d/gi_probes.rst:123 msgid "" "**Normal Bias** Alternative type of bias useful for some scenes. Experiment " "with this one if regular bias does not work." msgstr "" #: ../../docs/tutorials/3d/gi_probes.rst:124 msgid "**Interior** Allows mixing with lighting from the sky." msgstr "" #: ../../docs/tutorials/3d/gi_probes.rst:125 msgid "**Compress** Currently broken. Do not use." msgstr "" #: ../../docs/tutorials/3d/gi_probes.rst:126 msgid "" "**Data** Contains the light baked data after baking. If you are saving the " "data it should be saved as a .res file." msgstr "" #: ../../docs/tutorials/3d/gi_probes.rst:129 msgid "Quality" msgstr "Chất lượng" #: ../../docs/tutorials/3d/gi_probes.rst:131 msgid "" "``GIProbe``\\ s are quite demanding. It is possible to use lower quality " "voxel cone tracing in exchange for more performance." msgstr "" #: ../../docs/tutorials/3d/baked_lightmaps.rst:4 msgid "Baked lightmaps" msgstr "" #: ../../docs/tutorials/3d/baked_lightmaps.rst:9 msgid "" "Baked lightmaps are an alternative workflow for adding indirect (or fully " "baked) lighting to a scene. Unlike the :ref:`doc_gi_probes` approach, baked " "lightmaps work fine on low-end PCs and mobile devices, as they consume " "almost no resources at run-time. Also unlike GIProbe, baked lightmaps can " "optionally be used to store direct lighting, which provides even further " "performance gains." msgstr "" #: ../../docs/tutorials/3d/baked_lightmaps.rst:15 msgid "" "Unlike GIProbes, Baked Lightmaps are completely static. Once baked, they " "can't be modified at all. They also don't provide the scene with " "reflections, so using :ref:`doc_reflection_probes` together with it on " "interiors (or using a Sky on exteriors) is a requirement to get good quality." msgstr "" #: ../../docs/tutorials/3d/baked_lightmaps.rst:20 msgid "" "As they are baked, they have fewer problems than ``GIProbe`` regarding light " "bleeding, and indirect light will often look better. The downside is that " "baking lightmaps takes much longer than baking a GIProbe. While baking a " "GIProbe can be done in a matter of seconds, baking lightmaps will take " "several minutes if not more. This can slow down iteration speed " "significantly, so it is recommended to bake lightmaps only when you actually " "need to see changes in lighting." msgstr "" #: ../../docs/tutorials/3d/baked_lightmaps.rst:27 msgid "" "Baking lightmaps will also reserve baked materials' UV2 slot, which means " "you can no longer use it for other purposes in materials (either in the " "built-in :ref:`doc_spatial_material` or in custom shaders)." msgstr "" #: ../../docs/tutorials/3d/baked_lightmaps.rst:31 msgid "" "In the end, deciding which indirect lighting approach is better depends on " "your use case. In general, GIProbe is easier to set up and works better with " "dynamic objects. For mobile or low-end compatibility, though, baked " "lightmaps are your only choice." msgstr "" #: ../../docs/tutorials/3d/baked_lightmaps.rst:37 msgid "Visual comparison" msgstr "" #: ../../docs/tutorials/3d/baked_lightmaps.rst:39 msgid "" "Here are some comparisons of how BakedLightmap vs. GIProbe look. Notice that " "lightmaps are more accurate, but also suffer from the fact that lighting is " "on an unwrapped texture, so transitions and resolution may not be that good. " "GIProbe looks less accurate (as it's an approximation), but smoother overall." msgstr "" #: ../../docs/tutorials/3d/baked_lightmaps.rst:50 msgid "" "First of all, before the lightmapper can do anything, the objects to be " "baked need an UV2 layer and a texture size. An UV2 layer is a set of " "secondary texture coordinates that ensures any face in the object has its " "own place in the UV map. Faces must not share pixels in the texture." msgstr "" #: ../../docs/tutorials/3d/baked_lightmaps.rst:55 msgid "" "There are a few ways to ensure your object has a unique UV2 layer and " "texture size:" msgstr "" #: ../../docs/tutorials/3d/baked_lightmaps.rst:58 msgid "Unwrap on scene import" msgstr "" #: ../../docs/tutorials/3d/baked_lightmaps.rst:60 msgid "" "This is probably the best approach overall. The only downside is that, on " "large models, unwrapping can take a while on import. Nonetheless, Godot will " "cache the UV2 across reimports, so it will only be regenerated when needed." msgstr "" #: ../../docs/tutorials/3d/baked_lightmaps.rst:64 msgid "" "Select the imported scene in the filesystem dock, then go to the **Import** " "dock. There, the following option can be modified:" msgstr "" #: ../../docs/tutorials/3d/baked_lightmaps.rst:69 msgid "" "The **Light Baking** mode needs to be set to **Gen Lightmaps**. A texel size " "in world units must also be provided, as this will determine the final size " "of the lightmap texture (and, in consequence, the UV padding in the map)." msgstr "" #: ../../docs/tutorials/3d/baked_lightmaps.rst:73 msgid "" "The effect of setting this option is that all meshes within the scene will " "have their UV2 maps properly generated." msgstr "" #: ../../docs/tutorials/3d/baked_lightmaps.rst:78 msgid "" "When reusing a mesh within a scene, keep in mind that UVs will be generated " "for the first instance found. If the mesh is re-used with different scales " "(and the scales are wildly different, more than half or twice), this will " "result in inefficient lightmaps. Don't reuse a source mesh at significantly " "different scales if you are planning to use lightmapping." msgstr "" #: ../../docs/tutorials/3d/baked_lightmaps.rst:84 msgid "" "Also, the ``*.unwrap_cache`` files should *not* be ignored in version " "control as these files guarantee that UV2 reimports are consistent across " "platforms and engine versions." msgstr "" #: ../../docs/tutorials/3d/baked_lightmaps.rst:89 msgid "Unwrap from within Godot" msgstr "" #: ../../docs/tutorials/3d/baked_lightmaps.rst:91 msgid "" "Godot has an option to unwrap meshes and visualize the UV channels. It can " "be found in the Mesh menu:" msgstr "" #: ../../docs/tutorials/3d/baked_lightmaps.rst:96 msgid "" "This will generate a second set of UV2 coordinates which can be used for " "baking, and it will also set the texture size automatically." msgstr "" #: ../../docs/tutorials/3d/baked_lightmaps.rst:100 msgid "Unwrap from your 3D DCC" msgstr "" #: ../../docs/tutorials/3d/baked_lightmaps.rst:102 msgid "" "The last option is to do it from your favorite 3D app. This approach is " "generally not recommended, but it's explained first so that you know it " "exists. The main advantage is that, on complex objects that you may want to " "re-import a lot, the texture generation process can be quite costly within " "Godot, so having it unwrapped before import can be faster." msgstr "" #: ../../docs/tutorials/3d/baked_lightmaps.rst:108 msgid "Simply do an unwrap on the second UV2 layer." msgstr "" #: ../../docs/tutorials/3d/baked_lightmaps.rst:112 msgid "" "Then import the 3D scene normally. Remember you will need to set the texture " "size on the mesh after import." msgstr "" #: ../../docs/tutorials/3d/baked_lightmaps.rst:117 msgid "" "If you use external meshes on import, the size will be kept. Be wary that " "most unwrappers in 3D DCCs are not quality oriented, as they are meant to " "work quickly. You will mostly need to use seams or other techniques to " "create better unwrapping." msgstr "" #: ../../docs/tutorials/3d/baked_lightmaps.rst:123 msgid "Checking UV2" msgstr "" #: ../../docs/tutorials/3d/baked_lightmaps.rst:125 msgid "" "In the mesh menu mentioned before, the UV2 texture coordinates can be " "visualized. Make sure, if something is failing, to check that the meshes " "have these UV2 coordinates:" msgstr "" #: ../../docs/tutorials/3d/baked_lightmaps.rst:131 msgid "Setting up the scene" msgstr "" #: ../../docs/tutorials/3d/baked_lightmaps.rst:133 msgid "" "Before anything is done, a **BakedLightmap** node needs to be added to a " "scene. This will enable light baking on all nodes (and sub-nodes) in that " "scene, even on instanced scenes." msgstr "" #: ../../docs/tutorials/3d/baked_lightmaps.rst:139 msgid "" "A sub-scene can be instanced several times, as this is supported by the " "baker, and each will be assigned a lightmap of its own (just make sure to " "respect the rule about scaling mentioned before):" msgstr "" #: ../../docs/tutorials/3d/baked_lightmaps.rst:144 msgid "Configure bounds" msgstr "" #: ../../docs/tutorials/3d/baked_lightmaps.rst:146 msgid "" "Lightmap needs an approximate volume of the area affected because it uses it " "to transfer light to dynamic objects inside it (more on that later). Just " "cover the scene with the volume as you do with ``GIProbe``:" msgstr "" #: ../../docs/tutorials/3d/baked_lightmaps.rst:153 msgid "Setting up meshes" msgstr "" #: ../../docs/tutorials/3d/baked_lightmaps.rst:155 msgid "" "For a **MeshInstance** node to take part in the baking process, it needs to " "have the **Use in Baked Light** property enabled." msgstr "" #: ../../docs/tutorials/3d/baked_lightmaps.rst:160 msgid "" "When auto-generating lightmaps on scene import, this is enabled " "automatically." msgstr "" #: ../../docs/tutorials/3d/baked_lightmaps.rst:163 msgid "Setting up lights" msgstr "" #: ../../docs/tutorials/3d/baked_lightmaps.rst:165 msgid "" "Lights are baked with indirect light by default. This means that " "shadowmapping and lighting are still dynamic and affect moving objects, but " "light bounces from that light will be baked." msgstr "" #: ../../docs/tutorials/3d/baked_lightmaps.rst:169 msgid "" "Lights can be disabled (no bake) or be fully baked (direct and indirect). " "This can be controlled from the **Bake Mode** menu in lights:" msgstr "" #: ../../docs/tutorials/3d/baked_lightmaps.rst:174 #, fuzzy msgid "The modes are:" msgstr "Lý do chính là:" #: ../../docs/tutorials/3d/baked_lightmaps.rst:177 msgid "Disabled" msgstr "" #: ../../docs/tutorials/3d/baked_lightmaps.rst:179 msgid "" "The light is ignored when baking lightmaps. Keep in mind hiding a light will " "have no effect for baking, so this must be used instead of hiding the Light " "node." msgstr "" #: ../../docs/tutorials/3d/baked_lightmaps.rst:182 msgid "" "This is the mode to use for dynamic lighting effects such as explosions and " "weapon effects." msgstr "" #: ../../docs/tutorials/3d/baked_lightmaps.rst:185 msgid "Indirect" msgstr "" #: ../../docs/tutorials/3d/baked_lightmaps.rst:187 msgid "" "This is the default mode, and is a compromise between performance and real-" "time friendliness. Only indirect lighting will be baked. Direct light and " "shadows are still real-time, as they would be without BakedLightmap." msgstr "" #: ../../docs/tutorials/3d/baked_lightmaps.rst:191 msgid "" "This mode allows performing *subtle* changes to a light's color, energy and " "position while still looking fairly correct. For example, you can use this " "to create flickering static torches that have their indirect light baked." msgstr "" #: ../../docs/tutorials/3d/baked_lightmaps.rst:196 msgid "All" msgstr "" #: ../../docs/tutorials/3d/baked_lightmaps.rst:198 msgid "" "Both indirect and direct lighting will be baked. Since static surfaces can " "skip lighting and shadow computations entirely, this mode provides the best " "performance along with smooth shadows that never fade based on distance. The " "real-time light will not affect baked surfaces anymore, but it will still " "affect dynamic objects. When using the **All** bake mode on a light, dynamic " "objects will not cast real-time shadows onto baked surfaces, so you need to " "use a different approach such as blob shadows instead. Blob shadows can be " "implemented with a Sprite3D + RayCast setup, or a negative SpotLight " "pointing down with its bake mode set to **Disabled**." msgstr "" #: ../../docs/tutorials/3d/baked_lightmaps.rst:208 msgid "" "The light will not be adjustable at all during gameplay. Moving the light " "and changing its color or energy will not have any effect on static surfaces." msgstr "" #: ../../docs/tutorials/3d/baked_lightmaps.rst:211 msgid "" "Since bake modes can be adjusted on a per-light basis, it is possible to " "create hybrid baked light setups. One popular option is to use a real-time " "DirectionalLight with its bake mode set to **Indirect**, and use the **All** " "bake mode for OmniLights and SpotLights. This provides good performance " "while still allowing dynamic objects to cast real-time shadows in outdoor " "areas." msgstr "" #: ../../docs/tutorials/3d/baked_lightmaps.rst:217 msgid "" "After selecting the **All** bake mode on a light, you can optionally specify " "a **Size** greater than 0 for the light in the inspector. This size is used " "to provide softer shadows depending on the distance between the shadow " "caster and the object receiving the shadow. This mimics real life shadow " "appearance:" msgstr "" #: ../../docs/tutorials/3d/baked_lightmaps.rst:225 msgid "" "The light's **Size** property is ignored for real-time shadows; it will only " "affect baked shadows. When the **Size** property is changed, lightmaps must " "be baked again to make changes visible." msgstr "" #: ../../docs/tutorials/3d/baked_lightmaps.rst:230 msgid "Baking" msgstr "" #: ../../docs/tutorials/3d/baked_lightmaps.rst:232 msgid "" "To begin the bake process, just push the **Bake Lightmaps** button on top " "when selecting the BakedLightmap node:" msgstr "" #: ../../docs/tutorials/3d/baked_lightmaps.rst:237 msgid "" "This can take from seconds to minutes (or hours) depending on scene size, " "bake method and quality selected." msgstr "" #: ../../docs/tutorials/3d/baked_lightmaps.rst:241 msgid "Balancing bake times with quality" msgstr "" #: ../../docs/tutorials/3d/baked_lightmaps.rst:243 msgid "" "Since high-quality bakes can take very long (up to several hours for large " "complex scenes), it is recommended to use lower quality settings at first. " "Then, once you are confident with your scene's lighting setup, raise the " "quality settings and perform a \"final\" bake before exporting your project." msgstr "" #: ../../docs/tutorials/3d/baked_lightmaps.rst:250 msgid "" "By default, the lightmap baker will use all the system's logical CPU cores " "to speed up baking. This can reduce system responsiveness. To preserve " "system responsiveness while lightmaps are baking, you can reduce the number " "of CPU threads used to bake lightmaps. Keeping 1 or 2 CPU threads free will " "help improve system responsiveness, which is useful when multi-tasking while " "lightmaps are baking at the cost of slowing down lightmap baking slightly." msgstr "" #: ../../docs/tutorials/3d/baked_lightmaps.rst:257 msgid "" "To do so, open **Editor > Editor Settings** and adjust **Editors > 3d > " "Lightmap Baking Number Of Cpu Threads**. The default value (``0``) uses all " "of the system's logical CPU cores. Positive values will specify a number of " "threads to use, while negative values will subtract from the total number of " "logical CPU cores in the system. For example, on a system with 8 logical CPU " "cores, adjusting the setting to ``-1`` will use 7 CPU threads for lightmap " "baking." msgstr "" #: ../../docs/tutorials/3d/baked_lightmaps.rst:266 msgid "Configuring bake" msgstr "" #: ../../docs/tutorials/3d/baked_lightmaps.rst:268 msgid "Several more options are present for baking:" msgstr "" #: ../../docs/tutorials/3d/baked_lightmaps.rst:270 msgid "" "**Bake Extents**: The size of the area affected. This can be edited in the " "3D editor viewport using the handles. Any object that can have lightmaps " "baked and is *touching* the bake extents will have lightmaps baked for it, " "but dynamic object capture will only work within the extents." msgstr "" #: ../../docs/tutorials/3d/baked_lightmaps.rst:276 msgid "Tweaks" msgstr "" #: ../../docs/tutorials/3d/baked_lightmaps.rst:278 msgid "" "**Quality:** Three bake quality modes are provided: Low, Medium, High, and " "Ultra. Higher quality takes more time, but result in a better-looking " "lightmap with less noise. The difference is especially noticeable with " "emissive materials or areas that get little to no direct lighting." msgstr "" #: ../../docs/tutorials/3d/baked_lightmaps.rst:282 msgid "" "**Bounces:** The number of bounces to use for indirect lighting. The default " "value (3) is a good compromise between bake times and quality. Higher values " "will make light bounce around more times before it stops, which makes " "indirect lighting look smoother (but also brighter). During the initial " "lighting iteration work, it is recommended to decrease the number of bounces " "to 1 to speed up baking. Remember that your scene will be darker when " "decreasing the number of bounces." msgstr "" #: ../../docs/tutorials/3d/baked_lightmaps.rst:288 msgid "" "**Use Denoiser:** If enabled, uses OpenImageDenoise to make the lightmap " "significantly less noisy. This increases bake times and can occasionally " "introduce artifacts, but the result is often worth it." msgstr "" #: ../../docs/tutorials/3d/baked_lightmaps.rst:291 msgid "" "**Use Hdr:** If disabled, lightmaps are smaller on disk, but they won't be " "able to capture any light over white (1.0). This will result in visible " "clipping if you have bright lights in your scene. When HDR is disabled, " "banding may also be visible in the lightmap." msgstr "" #: ../../docs/tutorials/3d/baked_lightmaps.rst:295 msgid "" "**Use Color:** If disabled, lightmaps are smaller on disk, but the lightmap " "won't be able to store colored lighting. When baking indirect light only, " "the difference may be barely visible since indirect light is generally not " "highly saturated. However, when baking both direct and indirect lighting " "using the **All** bake mode on a light, this will turn colored lighting into " "grayscale lighting. This can be disabled together with HDR to get the " "smallest possible lightmap file at a given resolution." msgstr "" #: ../../docs/tutorials/3d/baked_lightmaps.rst:302 msgid "" "**Bias:** The offset value to use for shadows in 3D units. You generally " "don't need to change this value, except if you run into issues with light " "bleeding or dark spots in your lightmap after baking. This setting does not " "affect real-time shadows casted on baked surfaces." msgstr "" #: ../../docs/tutorials/3d/baked_lightmaps.rst:306 msgid "" "**Default Texels Per Unit:** For meshes that do not specify their own " "lightmap texel density, this will be used as the value. Higher values result " "in *lower-resolution* lightmaps, which result in faster bake times and lower " "file sizes at the cost of blurrier indirect lighting and shadows." msgstr "" #: ../../docs/tutorials/3d/baked_lightmaps.rst:312 msgid "Atlas" msgstr "" #: ../../docs/tutorials/3d/baked_lightmaps.rst:314 msgid "" "**Generate:** If enabled, a texture atlas will be generated for the " "lightmap. This results in more efficient rendering, but is only compatible " "with the GLES3 rendering backend. Disable this setting if your project is " "allowed to fall back to GLES2. (This is not the case by default and must be " "enabled in the Project Settings.) *This setting is ignored when the project " "is configured to use GLES2 by default.*" msgstr "" #: ../../docs/tutorials/3d/baked_lightmaps.rst:320 msgid "" "**Max Size:** The maximum size of the atlas in pixels. Higher values result " "in a more efficient atlas, but are less compatible with old/low-end " "hardware. If in doubt, leave this setting on its default value (4096)." msgstr "" #: ../../docs/tutorials/3d/baked_lightmaps.rst:325 #: ../../docs/tutorials/audio/audio_buses.rst:114 #: ../../docs/tutorials/rendering/viewports.rst:133 msgid "Capture" msgstr "Chụp" #: ../../docs/tutorials/3d/baked_lightmaps.rst:327 msgid "" "**Enabled:** This enables probe capture so that dynamic objects can " "*receive* indirect lighting. Regardless of this setting's value, dynamic " "objects will not be able to *contribute* indirect lighting to the scene. " "This is a limitation of lightmaps." msgstr "" #: ../../docs/tutorials/3d/baked_lightmaps.rst:330 msgid "" "**Cell Size:** The distance between lightmap probes in 3D units. Higher " "values result in more sparse probe placement, which decreases bake times and " "file size at the cost of lower lighting accuracy for dynamic objects." msgstr "" #: ../../docs/tutorials/3d/baked_lightmaps.rst:333 msgid "" "**Quality:** The lightmap probe generation quality. Higher values result in " "more accurate lighting, but take longer to bake. This setting does not " "affect the *density* of the lightmap probes, only their quality." msgstr "" #: ../../docs/tutorials/3d/baked_lightmaps.rst:336 msgid "" "**Propagation:** Similar to :ref:`GIProbe `'s Propagation " "property. Higher values result in brighter and more diffuse indirect " "lighting for dynamic objects. Adjust this value depending on your scene to " "make dynamic objects better fit with static baked lighting." msgstr "" #: ../../docs/tutorials/3d/baked_lightmaps.rst:342 #: ../../docs/tutorials/scripting/gdscript/gdscript_basics.rst:571 #: ../../docs/tutorials/scripting/visual_script/nodes_purposes.rst:228 msgid "Data" msgstr "Dữ liệu" #: ../../docs/tutorials/3d/baked_lightmaps.rst:344 msgid "" "**Light Data**: Contains the light baked data after baking. Textures are " "saved to disk, but this also contains the capture data for dynamic objects, " "which can be heavy. If you are using a scene in ``.tscn`` format, you should " "save this resource to an external binary ``.lmbake`` file to avoid bloating " "the ``.tscn`` scene with binary data encoded in Base64." msgstr "" #: ../../docs/tutorials/3d/baked_lightmaps.rst:350 msgid "" "The Light Data resource can be edited to adjust two additional properties:" msgstr "" #: ../../docs/tutorials/3d/baked_lightmaps.rst:352 msgid "" "**Energy:** Adjusts the lightmap's brightness. Higher values result in " "brighter lightmaps. This can be adjusted at run-time for short-lived dynamic " "effects such as thunderstorms. However, keep in mind that it will affect " "*all* baked lights." msgstr "" #: ../../docs/tutorials/3d/baked_lightmaps.rst:355 msgid "" "**Interior:** If enabled, dynamic objects will not make use of environment " "lighting and will use light probes for ambient lighting exclusively. If " "disabled, both environment lighting and light probes are used to light up " "dynamic objects." msgstr "" #: ../../docs/tutorials/3d/baked_lightmaps.rst:361 msgid "" "The generated EXR file can be viewed and even edited using an image editor " "to perform post-processing if needed. However, keep in mind that changes to " "the EXR file will be lost when baking lightmaps again." msgstr "" #: ../../docs/tutorials/3d/baked_lightmaps.rst:366 msgid "Dynamic objects" msgstr "" #: ../../docs/tutorials/3d/baked_lightmaps.rst:368 msgid "" "In other engines or lightmapper implementations, you are generally required " "to manually place small objects called \"lightprobes\" all around the level " "to generate *capture* data. This is then used to transfer the light to " "dynamic objects that move around the scene." msgstr "" #: ../../docs/tutorials/3d/baked_lightmaps.rst:373 msgid "" "However, this implementation of lightmapping uses a different method. The " "process is automatic, so you don't have to do anything. Just move your " "objects around, and they will be lit accordingly. Of course, you have to " "make sure you set up your scene bounds accordingly or it won't work." msgstr "" #: ../../docs/tutorials/3d/environment_and_post_processing.rst:4 msgid "Environment and post-processing" msgstr "" #: ../../docs/tutorials/3d/environment_and_post_processing.rst:6 msgid "" "Godot 3 provides a redesigned Environment resource, as well as a new post-" "processing system with many available effects right out of the box." msgstr "" #: ../../docs/tutorials/3d/environment_and_post_processing.rst:12 msgid "" "The Environment resource stores all the information required for controlling " "rendering environment. This includes sky, ambient lighting, tone mapping, " "effects, and adjustments. By itself it does nothing, but it becomes enabled " "once used in one of the following locations in order of priority:" msgstr "" #: ../../docs/tutorials/3d/environment_and_post_processing.rst:18 msgid "Camera node" msgstr "" #: ../../docs/tutorials/3d/environment_and_post_processing.rst:20 msgid "" "An Environment can be set to a camera. It will have priority over any other " "setting." msgstr "" #: ../../docs/tutorials/3d/environment_and_post_processing.rst:24 msgid "" "This is mostly useful when wanting to override an existing environment, but " "in general it's a better idea to use the option below." msgstr "" #: ../../docs/tutorials/3d/environment_and_post_processing.rst:28 msgid "WorldEnvironment node" msgstr "" #: ../../docs/tutorials/3d/environment_and_post_processing.rst:30 msgid "" "The WorldEnvironment node can be added to any scene, but only one can exist " "per active scene tree. Adding more than one will result in a warning." msgstr "" #: ../../docs/tutorials/3d/environment_and_post_processing.rst:35 msgid "" "Any Environment added has higher priority than the default Environment " "(explained below). This means it can be overridden on a per-scene basis, " "which makes it quite useful." msgstr "" #: ../../docs/tutorials/3d/environment_and_post_processing.rst:42 msgid "" "A default environment can be set, which acts as a fallback when no " "Environment was set to a Camera or WorldEnvironment. Just head to Project " "Settings -> Rendering -> Environment:" msgstr "" #: ../../docs/tutorials/3d/environment_and_post_processing.rst:48 msgid "" "New projects created from the Project Manager come with a default " "environment (``default_env.tres``). If one needs to be created, save it to " "disk before referencing it here." msgstr "" #: ../../docs/tutorials/3d/environment_and_post_processing.rst:53 msgid "Environment options" msgstr "" #: ../../docs/tutorials/3d/environment_and_post_processing.rst:55 msgid "" "Following is a detailed description of all environment options and how they " "are intended to be used." msgstr "" #: ../../docs/tutorials/3d/environment_and_post_processing.rst:61 msgid "" "The Background section contains settings on how to fill the background " "(parts of the screen where objects were not drawn). In Godot 3.0, the " "background not only serves the purpose of displaying an image or color, it " "can also change how objects are affected by ambient and reflected light." msgstr "" #: ../../docs/tutorials/3d/environment_and_post_processing.rst:68 msgid "There are many ways to set the background:" msgstr "" #: ../../docs/tutorials/3d/environment_and_post_processing.rst:70 msgid "" "**Clear Color** uses the default clear color defined by the project. The " "background will be a constant color." msgstr "" #: ../../docs/tutorials/3d/environment_and_post_processing.rst:71 msgid "**Custom Color** is like Clear Color, but with a custom color value." msgstr "" #: ../../docs/tutorials/3d/environment_and_post_processing.rst:72 msgid "" "**Sky** lets you define a panorama sky (a 360 degree sphere texture) or a " "procedural sky (a simple sky featuring a gradient and an optional sun). " "Objects will reflect it and absorb ambient light from it." msgstr "" #: ../../docs/tutorials/3d/environment_and_post_processing.rst:73 msgid "" "**Color+Sky** lets you define a sky (as above), but uses a constant color " "value for drawing the background. The sky will only be used for reflection " "and ambient light." msgstr "" #: ../../docs/tutorials/3d/environment_and_post_processing.rst:76 msgid "Ambient Light" msgstr "" #: ../../docs/tutorials/3d/environment_and_post_processing.rst:78 msgid "" "Ambient (as defined here) is a type of light that affects every piece of " "geometry with the same intensity. It is global and independent of lights " "that might be added to the scene." msgstr "" #: ../../docs/tutorials/3d/environment_and_post_processing.rst:82 msgid "" "There are two types of ambient light: the *Ambient Color* (which is a " "constant color multiplied by the material albedo) and then one obtained from " "the *Sky* (as described before, but a sky needs to be set as background for " "this to be enabled)." msgstr "" #: ../../docs/tutorials/3d/environment_and_post_processing.rst:89 msgid "" "When a *Sky* is set as background, it's possible to blend between ambient " "color and sky using the **Sky Contribution** setting (this value is 1.0 by " "default for convenience, so only the sky affects objects)." msgstr "" #: ../../docs/tutorials/3d/environment_and_post_processing.rst:93 msgid "Here is a comparison of how different ambient light affects a scene:" msgstr "" #: ../../docs/tutorials/3d/environment_and_post_processing.rst:97 msgid "" "Finally, there is an **Energy** setting, which is a multiplier. It's useful " "when working with HDR." msgstr "" #: ../../docs/tutorials/3d/environment_and_post_processing.rst:100 msgid "" "In general, ambient light should only be used for simple scenes, large " "exteriors, or for performance reasons (ambient light is cheap), as it does " "not provide the best lighting quality. It's better to generate ambient light " "from ReflectionProbe or GIProbe, which will more faithfully simulate how " "indirect light propagates. Below is a comparison, in terms of quality, " "between using a flat ambient color and a GIProbe:" msgstr "" #: ../../docs/tutorials/3d/environment_and_post_processing.rst:109 msgid "" "Using one of the methods described above, objects get constant ambient " "lighting replaced by ambient light from the probes." msgstr "" #: ../../docs/tutorials/3d/environment_and_post_processing.rst:113 #: ../../docs/tutorials/rendering/gles2_gles3_differences.rst:87 msgid "Fog" msgstr "" #: ../../docs/tutorials/3d/environment_and_post_processing.rst:115 msgid "" "Fog, as in real life, makes distant objects fade away into an uniform color. " "The physical effect is actually pretty complex, but Godot provides a good " "approximation. There are two kinds of fog in Godot:" msgstr "" #: ../../docs/tutorials/3d/environment_and_post_processing.rst:119 msgid "" "**Depth Fog:** This one is applied based on the distance from the camera." msgstr "" #: ../../docs/tutorials/3d/environment_and_post_processing.rst:120 msgid "" "**Height Fog:** This one is applied to any objects below (or above) a " "certain height, regardless of the distance from the camera." msgstr "" #: ../../docs/tutorials/3d/environment_and_post_processing.rst:124 msgid "" "Both of these fog types can have their curve tweaked, making their " "transition more or less sharp." msgstr "" #: ../../docs/tutorials/3d/environment_and_post_processing.rst:126 msgid "Two properties can be tweaked to make the fog effect more interesting:" msgstr "" #: ../../docs/tutorials/3d/environment_and_post_processing.rst:128 msgid "" "The first is **Sun Amount**, which makes use of the Sun Color property of " "the fog. When looking towards a directional light (usually a sun), the color " "of the fog will be changed, simulating the sunlight passing through the fog." msgstr "" #: ../../docs/tutorials/3d/environment_and_post_processing.rst:132 msgid "" "The second is **Transmit Enabled** which simulates more realistic light " "transmittance. In practice, it makes light stand out more across the fog." msgstr "" #: ../../docs/tutorials/3d/environment_and_post_processing.rst:138 msgid "Tonemap" msgstr "" #: ../../docs/tutorials/3d/environment_and_post_processing.rst:142 msgid "" "Selects the tone-mapping curve that will be applied to the scene, from a " "short list of standard curves used in the film and game industry. Tone " "mapping can make light and dark areas more homogeneous, even though the " "result is not that strong. Tone mapping options are:" msgstr "" #: ../../docs/tutorials/3d/environment_and_post_processing.rst:147 msgid "" "**Mode:** Tone mapping mode, which can be Linear, Reindhart, Filmic, or Aces." msgstr "" #: ../../docs/tutorials/3d/environment_and_post_processing.rst:148 msgid "" "**Exposure:** Tone mapping exposure which simulates amount of light received " "over time." msgstr "" #: ../../docs/tutorials/3d/environment_and_post_processing.rst:149 msgid "" "**White:** Tone mapping white, which simulates where in the scale white is " "located (by default 1.0)." msgstr "" #: ../../docs/tutorials/3d/environment_and_post_processing.rst:152 msgid "Auto Exposure (HDR)" msgstr "" #: ../../docs/tutorials/3d/environment_and_post_processing.rst:156 msgid "" "Even though, in most cases, lighting and texturing are heavily artist " "controlled, Godot supports a simple high dynamic range implementation with " "the auto exposure mechanism. This is generally used for the sake of realism " "when combining interior areas with low light and outdoors. Auto exposure " "simulates the camera (or eye) in an effort to adapt between light and dark " "locations and their different amounts of light." msgstr "" #: ../../docs/tutorials/3d/environment_and_post_processing.rst:165 msgid "" "The simplest way to use auto exposure is to make sure outdoor lights (or " "other strong lights) have energy beyond 1.0. This is done by tweaking their " "**Energy** multiplier (on the Light itself). To make it consistent, the " "**Sky** usually needs to use the energy multiplier too, to match with the " "directional light. Normally, values between 3.0 and 6.0 are enough to " "simulate indoor-outdoor conditions." msgstr "" #: ../../docs/tutorials/3d/environment_and_post_processing.rst:171 msgid "" "By combining Auto Exposure with *Glow* post processing (more on that below), " "pixels that go over the tonemap **White** will bleed to the glow buffer, " "creating the typical bloom effect in photography." msgstr "" #: ../../docs/tutorials/3d/environment_and_post_processing.rst:177 msgid "" "The user-controllable values in the Auto Exposure section come with sensible " "defaults, but you can still tweak them:" msgstr "" #: ../../docs/tutorials/3d/environment_and_post_processing.rst:182 msgid "" "**Scale:** Value to scale the lighting. Brighter values produce brighter " "images, smaller ones produce darker ones." msgstr "" #: ../../docs/tutorials/3d/environment_and_post_processing.rst:183 msgid "" "**Min Luma:** Minimum luminance that auto exposure will aim to adjust for. " "Luminance is the average of the light in all the pixels of the screen." msgstr "" #: ../../docs/tutorials/3d/environment_and_post_processing.rst:184 msgid "" "**Max Luma:** Maximum luminance that auto exposure will aim to adjust for." msgstr "" #: ../../docs/tutorials/3d/environment_and_post_processing.rst:185 msgid "" "**Speed:** Speed at which luminance corrects itself. The higher the value, " "the faster correction happens." msgstr "" #: ../../docs/tutorials/3d/environment_and_post_processing.rst:188 msgid "Mid- and post-processing effects" msgstr "" #: ../../docs/tutorials/3d/environment_and_post_processing.rst:190 msgid "" "A large amount of widely-used mid- and post-processing effects are supported " "in the Environment." msgstr "" #: ../../docs/tutorials/3d/environment_and_post_processing.rst:194 msgid "Screen-Space Reflections (SSR)" msgstr "" #: ../../docs/tutorials/3d/environment_and_post_processing.rst:198 msgid "" "While Godot supports three sources of reflection data (Sky, ReflectionProbe, " "and GIProbe), they may not provide enough detail for all situations. " "Scenarios where Screen Space Reflections make the most sense are when " "objects are in contact with each other (object over floor, over a table, " "floating on water, etc)." msgstr "" #: ../../docs/tutorials/3d/environment_and_post_processing.rst:205 msgid "" "The other advantage (even if only enabled to a minimum), is that it works in " "real-time (while the other types of reflections are pre-computed). This can " "be used to make characters, cars, etc. reflect on surrounding surfaces when " "moving around." msgstr "" #: ../../docs/tutorials/3d/environment_and_post_processing.rst:209 msgid "" "A few user-controlled parameters are available to better tweak the technique:" msgstr "" #: ../../docs/tutorials/3d/environment_and_post_processing.rst:211 msgid "" "**Max Steps** determines the length of the reflection. The bigger this " "number, the more costly it is to compute." msgstr "" #: ../../docs/tutorials/3d/environment_and_post_processing.rst:212 msgid "" "**Fade In** allows adjusting the fade-in curve, which is useful to make the " "contact area softer." msgstr "" #: ../../docs/tutorials/3d/environment_and_post_processing.rst:213 msgid "" "**Fade Out** allows adjusting the fade-out curve, so the step limit fades " "out softly." msgstr "" #: ../../docs/tutorials/3d/environment_and_post_processing.rst:214 msgid "" "**Depth Tolerance** can be used for screen-space-ray hit tolerance to gaps. " "The bigger the value, the more gaps will be ignored." msgstr "" #: ../../docs/tutorials/3d/environment_and_post_processing.rst:215 msgid "" "**Roughness** will apply a screen-space blur to approximate roughness in " "objects with this material characteristic." msgstr "" #: ../../docs/tutorials/3d/environment_and_post_processing.rst:217 msgid "" "Keep in mind that screen-space-reflections only work for reflecting opaque " "geometry. Transparent objects can't be reflected." msgstr "" #: ../../docs/tutorials/3d/environment_and_post_processing.rst:220 msgid "Screen-Space Ambient Occlusion (SSAO)" msgstr "" #: ../../docs/tutorials/3d/environment_and_post_processing.rst:224 msgid "" "As mentioned in the **Ambient** section, areas where light from light nodes " "does not reach (either because it's outside the radius or shadowed) are lit " "with ambient light. Godot can simulate this using GIProbe, ReflectionProbe, " "the Sky, or a constant ambient color. The problem, however, is that all the " "methods proposed previously act more on a larger scale (large regions) than " "at the smaller geometry level." msgstr "" #: ../../docs/tutorials/3d/environment_and_post_processing.rst:231 msgid "" "Constant ambient color and Sky are the same everywhere, while GI and " "Reflection probes have more local detail, but not enough to simulate " "situations where light is not able to fill inside hollow or concave features." msgstr "" #: ../../docs/tutorials/3d/environment_and_post_processing.rst:235 msgid "" "This can be simulated with Screen Space Ambient Occlusion. As you can see in " "the image below, its purpose is to make sure concave areas are darker, " "simulating a narrower path for the light to enter:" msgstr "" #: ../../docs/tutorials/3d/environment_and_post_processing.rst:241 msgid "" "It is a common mistake to enable this effect, turn on a light, and not be " "able to appreciate it. This is because SSAO only acts on *ambient* light, " "not direct light." msgstr "" #: ../../docs/tutorials/3d/environment_and_post_processing.rst:244 msgid "" "This is why, in the image above, the effect is less noticeable under the " "direct light (on the left). If you want to force SSAO to work with direct " "light too, use the **Light Affect** parameter (even though this is not " "correct, some artists like how it looks)." msgstr "" #: ../../docs/tutorials/3d/environment_and_post_processing.rst:248 msgid "" "SSAO looks best when combined with a real source of indirect light, like " "GIProbe:" msgstr "" #: ../../docs/tutorials/3d/environment_and_post_processing.rst:252 msgid "Tweaking SSAO is possible with several parameters:" msgstr "" #: ../../docs/tutorials/3d/environment_and_post_processing.rst:256 msgid "" "**Radius/Intensity:** To control the radius or intensity of the occlusion, " "these two parameters are available. Radius is in world (Metric) units." msgstr "" #: ../../docs/tutorials/3d/environment_and_post_processing.rst:257 msgid "" "**Radius2/Intensity2:** A Secondary radius/intensity can be used. Combining " "a large and a small radius AO generally works well." msgstr "" #: ../../docs/tutorials/3d/environment_and_post_processing.rst:258 msgid "" "**Bias:** This can be tweaked to solve self occlusion, though the default " "generally works well enough." msgstr "" #: ../../docs/tutorials/3d/environment_and_post_processing.rst:259 msgid "" "**Light Affect:** SSAO only affects ambient light, but increasing this " "slider can make it also affect direct light. Some artists prefer this effect." msgstr "" #: ../../docs/tutorials/3d/environment_and_post_processing.rst:260 msgid "" "**Ao Channel Affect:** If a value of zero is used, only the material's AO " "texture will be used for ambient occlusion; SSAO will not be applied. Values " "greater than 0 multiply the AO texture by the SSAO effect to varying " "degrees. This does not affect materials without an AO texture." msgstr "" #: ../../docs/tutorials/3d/environment_and_post_processing.rst:261 msgid "" "**Quality:** Depending on quality, SSAO will take more samples over a sphere " "for every pixel. High quality only works well on modern GPUs." msgstr "" #: ../../docs/tutorials/3d/environment_and_post_processing.rst:262 msgid "" "**Blur:** Type of blur kernel used. The 1x1 kernel is a simple blur that " "preserves local detail better, but is not as efficient (generally works " "better with the high quality setting above), while 3x3 will soften the image " "better (with a bit of dithering-like effect), but does not preserve local " "detail as well." msgstr "" #: ../../docs/tutorials/3d/environment_and_post_processing.rst:263 msgid "" "**Edge Sharpness**: This can be used to preserve the sharpness of edges " "(avoids areas without AO on creases)." msgstr "" #: ../../docs/tutorials/3d/environment_and_post_processing.rst:266 msgid "Depth of Field / Far Blur" msgstr "" #: ../../docs/tutorials/3d/environment_and_post_processing.rst:268 msgid "" "This effect simulates focal distance on high end cameras. It blurs objects " "behind a given range. It has an initial **Distance** with a **Transition** " "region (in world units):" msgstr "" #: ../../docs/tutorials/3d/environment_and_post_processing.rst:274 #: ../../docs/tutorials/3d/environment_and_post_processing.rst:286 msgid "" "The **Amount** parameter controls the amount of blur. For larger blurs, " "tweaking the **Quality** may be needed in order to avoid artifacts." msgstr "" #: ../../docs/tutorials/3d/environment_and_post_processing.rst:278 msgid "Depth of Field / Near Blur" msgstr "" #: ../../docs/tutorials/3d/environment_and_post_processing.rst:280 msgid "" "This effect simulates focal distance on high end cameras. It blurs objects " "close to the camera (acts in the opposite direction as far blur). It has an " "initial **Distance** with a **Transition** region (in world units):" msgstr "" #: ../../docs/tutorials/3d/environment_and_post_processing.rst:289 msgid "" "It is common to use both blurs together to focus the viewer's attention on a " "given object:" msgstr "" #: ../../docs/tutorials/3d/environment_and_post_processing.rst:295 msgid "Glow" msgstr "" #: ../../docs/tutorials/3d/environment_and_post_processing.rst:297 msgid "" "In photography and film, when light amount exceeds the maximum supported by " "the media (be it analog or digital), it generally bleeds outwards to darker " "regions of the image. This is simulated in Godot with the **Glow** effect." msgstr "" #: ../../docs/tutorials/3d/environment_and_post_processing.rst:303 msgid "" "By default, even if the effect is enabled, it will be weak or invisible. One " "of two conditions need to happen for it to actually show:" msgstr "" #: ../../docs/tutorials/3d/environment_and_post_processing.rst:306 msgid "" "The light in a pixel surpasses the **HDR Threshold** (where 0 is all light " "surpasses it, and 1.0 is light over the tonemapper **White** value). " "Normally, this value is expected to be at 1.0, but it can be lowered to " "allow more light to bleed. There is also an extra parameter, **HDR Scale**, " "that allows scaling (making brighter or darker) the light surpassing the " "threshold." msgstr "" #: ../../docs/tutorials/3d/environment_and_post_processing.rst:310 msgid "" "The Bloom effect has a value set greater than 0. As it increases, it sends " "the whole screen to the glow processor at higher amounts." msgstr "" #: ../../docs/tutorials/3d/environment_and_post_processing.rst:314 msgid "Both will cause the light to start bleeding out of the brighter areas." msgstr "" #: ../../docs/tutorials/3d/environment_and_post_processing.rst:316 msgid "Once glow is visible, it can be controlled with a few extra parameters:" msgstr "" #: ../../docs/tutorials/3d/environment_and_post_processing.rst:318 msgid "" "**Intensity** is an overall scale for the effect, it can be made stronger or " "weaker (0.0 removes it)." msgstr "" #: ../../docs/tutorials/3d/environment_and_post_processing.rst:319 msgid "" "**Strength** is how strong the gaussian filter kernel is processed. Greater " "values make the filter saturate and expand outwards. In general, changing " "this is not needed, as the size can be more efficiently adjusted with the " "**Levels**." msgstr "" #: ../../docs/tutorials/3d/environment_and_post_processing.rst:321 msgid "The **Blend Mode** of the effect can also be changed:" msgstr "" #: ../../docs/tutorials/3d/environment_and_post_processing.rst:323 msgid "" "**Additive** is the strongest one, as it only adds the glow effect over the " "image with no blending involved. In general, it's too strong to be used, but " "can look good with low intensity Bloom (produces a dream-like effect)." msgstr "" #: ../../docs/tutorials/3d/environment_and_post_processing.rst:324 msgid "" "**Screen** ensures glow never brightens more than itself and it works great " "as an all around." msgstr "" #: ../../docs/tutorials/3d/environment_and_post_processing.rst:325 msgid "" "**Softlight** is the default and weakest one, producing only a subtle color " "disturbance around the objects. This mode works best on dark scenes." msgstr "" #: ../../docs/tutorials/3d/environment_and_post_processing.rst:326 msgid "" "**Replace** can be used to blur the whole screen or debug the effect. It " "only shows the glow effect without the image below." msgstr "" #: ../../docs/tutorials/3d/environment_and_post_processing.rst:328 msgid "" "To change the glow effect size and shape, Godot provides **Levels**. Smaller " "levels are strong glows that appear around objects, while large levels are " "hazy glows covering the whole screen:" msgstr "" #: ../../docs/tutorials/3d/environment_and_post_processing.rst:334 msgid "" "The real strength of this system, though, is to combine levels to create " "more interesting glow patterns:" msgstr "" #: ../../docs/tutorials/3d/environment_and_post_processing.rst:339 msgid "" "Finally, as the highest layers are created by stretching small blurred " "images, it is possible that some blockiness may be visible. Enabling " "**Bicubic Upscaling** gets rids of it, at a minimal performance cost. *Note " "that this is effective only when using the GLES3 backend.*" msgstr "" #: ../../docs/tutorials/3d/environment_and_post_processing.rst:347 msgid "Adjustments" msgstr "" #: ../../docs/tutorials/3d/environment_and_post_processing.rst:349 msgid "" "At the end of processing, Godot offers the possibility to do some standard " "image adjustments." msgstr "" #: ../../docs/tutorials/3d/environment_and_post_processing.rst:354 msgid "" "The first one is being able to change the typical Brightness, Contrast, and " "Saturation:" msgstr "" #: ../../docs/tutorials/3d/environment_and_post_processing.rst:359 msgid "" "The second is by supplying a color correction gradient. A regular black to " "white gradient like the following one will produce no effect:" msgstr "" #: ../../docs/tutorials/3d/environment_and_post_processing.rst:364 msgid "" "But creating custom ones will allow to map each channel to a different color:" msgstr "" #: ../../docs/tutorials/3d/high_dynamic_range.rst:4 msgid "High dynamic range lighting" msgstr "" #: ../../docs/tutorials/3d/high_dynamic_range.rst:9 msgid "" "Normally, an artist does all the 3D modelling, then all the texturing, looks " "at their awesome looking model in the 3D DCC and says \"looks fantastic, " "ready for integration!\" then goes into the game, lighting is setup and the " "game runs." msgstr "" #: ../../docs/tutorials/3d/high_dynamic_range.rst:14 msgid "" "So at what point does all this \"HDR\" business come into play? To " "understand the answer, we need to look at how displays behave." msgstr "" #: ../../docs/tutorials/3d/high_dynamic_range.rst:17 msgid "" "Your display outputs linear light ratios from some maximum to some minimum " "intensity. Modern game engines perform complex math on linear light values " "in their respective scenes. So what's the problem?" msgstr "" #: ../../docs/tutorials/3d/high_dynamic_range.rst:21 msgid "" "The display has a limited range of intensity, depending on the display type. " "The game engine renders to an unlimited range of intensity values, however. " "While \"maximum intensity\" means something to an sRGB display, it has no " "bearing in the game engine; there is only a potentially infinitely wide " "range of intensity values generated per frame of rendering." msgstr "" #: ../../docs/tutorials/3d/high_dynamic_range.rst:27 msgid "" "This means that some transformation of the scene light intensity, also known " "as *scene-referred* light ratios, need to be transformed and mapped to fit " "within the particular output range of the chosen display. This can be most " "easily understood if we consider virtually photographing our game engine " "scene through a virtual camera. Here, our virtual camera would apply a " "particular camera rendering transform to the scene data, and the output " "would be ready for display on a particular display type." msgstr "" #: ../../docs/tutorials/3d/high_dynamic_range.rst:37 msgid "" "Godot does not support high dynamic range *output* yet. It can only perform " "lighting in HDR and tonemap the result to a low dynamic range image." msgstr "" #: ../../docs/tutorials/3d/high_dynamic_range.rst:40 msgid "" "For advanced users, it is still possible to get a non-tonemapped image of " "the viewport with full HDR data, which can then be saved to an OpenEXR file." msgstr "" #: ../../docs/tutorials/3d/high_dynamic_range.rst:44 msgid "Computer displays" msgstr "" #: ../../docs/tutorials/3d/high_dynamic_range.rst:46 msgid "" "Almost all displays require a nonlinear encoding for the code values sent to " "them. The display in turn, using its unique transfer characteristic, " "\"decodes\" the code value into linear light ratios of output, and projects " "the ratios out of the uniquely colored lights at each reddish, greenish, and " "blueish emission site." msgstr "" #: ../../docs/tutorials/3d/high_dynamic_range.rst:52 msgid "" "For a majority of computer displays, the specifications of the display are " "outlined in accordance with IEC 61966-2-1, also known as the 1996 sRGB " "specification. This specification outlines how an sRGB display is to behave, " "including the color of the lights in the LED pixels as well as the transfer " "characteristics of the input (OETF) and output (EOTF)." msgstr "" #: ../../docs/tutorials/3d/high_dynamic_range.rst:58 msgid "" "Not all displays use the same OETF and EOTF as a computer display. For " "example, television broadcast displays use the BT.1886 EOTF. However, Godot " "currently only supports sRGB displays." msgstr "" #: ../../docs/tutorials/3d/high_dynamic_range.rst:62 msgid "" "The sRGB standard is based around the nonlinear relationship between the " "current to light output of common desktop computing CRT displays." msgstr "" #: ../../docs/tutorials/3d/high_dynamic_range.rst:67 msgid "" "The mathematics of a scene-referred model require that we multiply the scene " "by different values to adjust the intensities and exposure to different " "light ranges. The transfer function of the display can't appropriately " "render the wider dynamic range of the game engine's scene output using the " "simple transfer function of the display. A more complex approach to encoding " "is required." msgstr "" #: ../../docs/tutorials/3d/high_dynamic_range.rst:75 msgid "Scene linear & asset pipelines" msgstr "" #: ../../docs/tutorials/3d/high_dynamic_range.rst:77 msgid "" "Working in scene-linear sRGB is not as simple as just pressing a switch. " "First, imported image assets must be converted to linear light ratios on " "import. Even when linearized, those assets may not be perfectly well-suited " "for use as textures, depending on how they were generated." msgstr "" #: ../../docs/tutorials/3d/high_dynamic_range.rst:82 msgid "There are two ways to do this:" msgstr "" #: ../../docs/tutorials/3d/high_dynamic_range.rst:85 msgid "sRGB transfer function to display linear ratios on image import" msgstr "" #: ../../docs/tutorials/3d/high_dynamic_range.rst:87 msgid "" "This is the easiest method of using sRGB assets, but it's not the most " "ideal. One issue with this is loss of quality. Using 8 bits per channel to " "represent linear light ratios is not sufficient to quantize the values " "correctly. These textures may also be compressed later, which can exacerbate " "the problem." msgstr "" #: ../../docs/tutorials/3d/high_dynamic_range.rst:93 msgid "Hardware sRGB transfer function to display linear conversion" msgstr "" #: ../../docs/tutorials/3d/high_dynamic_range.rst:95 msgid "" "The GPU will do the conversion after reading the texel using floating-point. " "This works fine on PC and consoles, but most mobile devices don't support " "it, or they don't support it on compressed texture formats (iOS for example)." msgstr "" #: ../../docs/tutorials/3d/high_dynamic_range.rst:100 msgid "Scene linear to display-referred nonlinear" msgstr "" #: ../../docs/tutorials/3d/high_dynamic_range.rst:102 msgid "" "After all the rendering is done, the scene linear render requires " "transforming to a suitable output such as an sRGB display. To do this, " "enable sRGB conversion in the current :ref:`Environment ` " "(more on that below)." msgstr "" #: ../../docs/tutorials/3d/high_dynamic_range.rst:106 msgid "" "Keep in mind that the **sRGB -> Display Linear** and **Display Linear -> " "sRGB** conversions must always be **both** enabled. Failing to enable one of " "them will result in horrible visuals suitable only for avant-garde " "experimental indie games." msgstr "" #: ../../docs/tutorials/3d/high_dynamic_range.rst:112 msgid "Parameters of HDR" msgstr "" #: ../../docs/tutorials/3d/high_dynamic_range.rst:114 msgid "" "HDR settings can be found in the :ref:`Environment ` " "resource. Most of the time, these are found inside a :ref:`WorldEnvironment " "` node or set in a Camera node. For more " "information, see :ref:`doc_environment_and_post_processing`." msgstr "" #: ../../docs/tutorials/3d/using_gridmaps.rst:4 #, fuzzy msgid "Using GridMaps" msgstr "Sử dụng Dính lưới" #: ../../docs/tutorials/3d/using_gridmaps.rst:9 msgid "" ":ref:`Gridmaps ` are a tool for creating 3D game levels, " "similar to the way :ref:`TileMap ` works in 2D. You " "start with a predefined collection of 3D meshes (a :ref:`class_MeshLibrary`) " "that can be placed on a grid, as if you were building a level with an " "unlimited amount of Lego blocks." msgstr "" #: ../../docs/tutorials/3d/using_gridmaps.rst:15 msgid "" "Collisions and navigation can also be added to the meshes, just like you " "would do with the tiles of a tilemap." msgstr "" #: ../../docs/tutorials/3d/using_gridmaps.rst:19 msgid "Example project" msgstr "" #: ../../docs/tutorials/3d/using_gridmaps.rst:21 msgid "" "To learn how GridMaps work, start by downloading the sample project: :" "download:`gridmap_demo.zip `." msgstr "" #: ../../docs/tutorials/3d/using_gridmaps.rst:24 msgid "" "Unzip this project and add it to the Project Manager using the \"Import\" " "button." msgstr "" #: ../../docs/tutorials/3d/using_gridmaps.rst:28 msgid "Creating a MeshLibrary" msgstr "" #: ../../docs/tutorials/3d/using_gridmaps.rst:30 msgid "" "To begin, you need a :ref:`class_MeshLibrary`, which is a collection of " "individual meshes that can be used in the gridmap. Open the " "\"MeshLibrary_Source.tscn\" scene to see an example of how to set up the " "mesh library." msgstr "" #: ../../docs/tutorials/3d/using_gridmaps.rst:36 msgid "" "As you can see, this scene has a :ref:`class_Spatial` node as its root, and " "a number of :ref:`class_MeshInstance` node children." msgstr "" #: ../../docs/tutorials/3d/using_gridmaps.rst:39 msgid "" "If you don't need any physics in your scene, then you're done. However, in " "most cases you'll want to assign collision bodies to the meshes." msgstr "" #: ../../docs/tutorials/3d/using_gridmaps.rst:43 msgid "Collisions" msgstr "" #: ../../docs/tutorials/3d/using_gridmaps.rst:45 msgid "" "You can manually assign a :ref:`class_StaticBody` and :ref:" "`class_CollisionShape` to each mesh. Alternatively, you can use the \"Mesh\" " "menu to automatically create the collision body based on the mesh data." msgstr "" #: ../../docs/tutorials/3d/using_gridmaps.rst:51 msgid "" "Note that a \"Convex\" collision body will work better for simple meshes. " "For more complex shapes, select \"Create Trimesh Static Body\". Once each " "mesh has a physics body and collision shape assigned, your mesh library is " "ready to be used." msgstr "" #: ../../docs/tutorials/3d/using_gridmaps.rst:60 #: ../../docs/tutorials/assets_pipeline/importing_scenes.rst:194 #: ../../docs/tutorials/assets_pipeline/escn_exporter/material.rst:2 msgid "Materials" msgstr "" #: ../../docs/tutorials/3d/using_gridmaps.rst:62 msgid "" "Only the materials from within the meshes are used when generating the mesh " "library. Materials set on the node will be ignored." msgstr "" #: ../../docs/tutorials/3d/using_gridmaps.rst:66 msgid "Exporting the MeshLibrary" msgstr "" #: ../../docs/tutorials/3d/using_gridmaps.rst:68 msgid "" "To export the library, click on Scene -> Convert To.. -> MeshLibrary.., and " "save it as a resource." msgstr "" #: ../../docs/tutorials/3d/using_gridmaps.rst:73 msgid "" "You can find an already exported MeshLibrary in the project named " "\"MeshLibrary.tres\"." msgstr "" #: ../../docs/tutorials/3d/using_gridmaps.rst:76 msgid "Using GridMap" msgstr "" #: ../../docs/tutorials/3d/using_gridmaps.rst:78 msgid "" "Create a new scene and add a GridMap node. Add the mesh library by dragging " "the resource file from the FileSystem dock and dropping it in the \"Theme\" " "property in the Inspector." msgstr "" #: ../../docs/tutorials/3d/using_gridmaps.rst:84 msgid "" "The \"Cell/Size\" property should be set to the size of your meshes. You can " "leave it at the default value for the demo. Set the \"Center Y\" property to " "\"Off\"." msgstr "" #: ../../docs/tutorials/3d/using_gridmaps.rst:87 msgid "" "Now you can start designing the level by choosing a tile from the palette " "and placing it with Left-Click in the editor window. To remove a tile, hold :" "kbd:`Shift` and use Right-click." msgstr "" #: ../../docs/tutorials/3d/using_gridmaps.rst:91 msgid "" "Click on the \"GridMap\" menu to see options and shortcuts. For example, " "pressing :kbd:`S` rotates a tile around the y-axis." msgstr "" #: ../../docs/tutorials/3d/using_gridmaps.rst:96 msgid "" "Holding :kbd:`Shift` and dragging with the left mouse button will draw a " "selection box. You can duplicate or clear the selected area using the " "respective menu options." msgstr "" #: ../../docs/tutorials/3d/using_gridmaps.rst:102 msgid "" "In the menu, you can also change the axis you're drawing on, as well as " "shift the drawing plane higher or lower on its axis." msgstr "" #: ../../docs/tutorials/3d/using_gridmaps.rst:108 msgid "Using GridMap in code" msgstr "" #: ../../docs/tutorials/3d/using_gridmaps.rst:110 msgid "" "See :ref:`class_GridMap` for details on the node's methods and member " "variables." msgstr "" #: ../../docs/tutorials/3d/using_multi_mesh_instance.rst:4 msgid "Using MultiMeshInstance" msgstr "" #: ../../docs/tutorials/3d/using_multi_mesh_instance.rst:9 msgid "" "In a normal scenario, you would use a :ref:`MeshInstance " "` node to display a 3D mesh like a human model for the " "main character, but in some cases, you would like to create multiple " "instances of the same mesh in a scene. You *could* duplicate the same node " "multiple times and adjust the transforms manually. This may be a tedious " "process and the result may look mechanical. Also, this method is not " "conducive to rapid iterations. :ref:`MultiMeshInstance " "` is one of the possible solutions to this problem." msgstr "" #: ../../docs/tutorials/3d/using_multi_mesh_instance.rst:18 msgid "" "MultiMeshInstance, as the name suggests, creates multiple copies of a " "MeshInstance over a surface of a specific mesh. An example would be having a " "tree mesh populate a landscape mesh with trees of random scales and " "orientations." msgstr "" #: ../../docs/tutorials/3d/using_multi_mesh_instance.rst:23 msgid "Setting up the nodes" msgstr "" #: ../../docs/tutorials/3d/using_multi_mesh_instance.rst:25 msgid "" "The basic setup requires three nodes: the MultiMeshInstance node and two " "MeshInstance nodes." msgstr "" #: ../../docs/tutorials/3d/using_multi_mesh_instance.rst:28 msgid "" "One node is used as the target, the mesh that you want to place multiple " "meshes on. In the tree example, this would be the landscape." msgstr "" #: ../../docs/tutorials/3d/using_multi_mesh_instance.rst:31 msgid "" "The other node is used as the source, the mesh that you want to have " "duplicated. In the tree case, this would be the tree itself." msgstr "" #: ../../docs/tutorials/3d/using_multi_mesh_instance.rst:34 msgid "" "In our example, we would use a :ref:`Spatial ` node as the " "root node of the scene. Your scene tree would look like this:" msgstr "" #: ../../docs/tutorials/3d/using_multi_mesh_instance.rst:39 msgid "For simplicity's sake, this tutorial uses built-in primitives." msgstr "" #: ../../docs/tutorials/3d/using_multi_mesh_instance.rst:41 msgid "" "Now you have everything ready. Select the MultiMeshInstance node and look at " "the toolbar, you should see an extra button called ``MultiMesh`` next to " "``View``. Click it and select *Populate surface* in the dropdown menu. A new " "window titled *Populate MultiMesh* will pop up." msgstr "" #: ../../docs/tutorials/3d/using_multi_mesh_instance.rst:51 msgid "MultiMesh settings" msgstr "" #: ../../docs/tutorials/3d/using_multi_mesh_instance.rst:53 msgid "Below are descriptions of the options." msgstr "" #: ../../docs/tutorials/3d/using_multi_mesh_instance.rst:56 msgid "Target Surface" msgstr "" #: ../../docs/tutorials/3d/using_multi_mesh_instance.rst:58 msgid "" "The mesh used as the target surface on which to place copies of your source " "mesh." msgstr "" #: ../../docs/tutorials/3d/using_multi_mesh_instance.rst:62 msgid "Source Mesh" msgstr "" #: ../../docs/tutorials/3d/using_multi_mesh_instance.rst:64 msgid "The mesh you want duplicated on the target surface." msgstr "" #: ../../docs/tutorials/3d/using_multi_mesh_instance.rst:67 msgid "Mesh Up Axis" msgstr "" #: ../../docs/tutorials/3d/using_multi_mesh_instance.rst:69 msgid "The axis used as the up axis of the source mesh." msgstr "" #: ../../docs/tutorials/3d/using_multi_mesh_instance.rst:72 msgid "Random Rotation" msgstr "" #: ../../docs/tutorials/3d/using_multi_mesh_instance.rst:74 msgid "Randomizing the rotation around the up axis of the source mesh." msgstr "" #: ../../docs/tutorials/3d/using_multi_mesh_instance.rst:77 msgid "Random Tilt" msgstr "" #: ../../docs/tutorials/3d/using_multi_mesh_instance.rst:79 msgid "Randomizing the overall rotation of the source mesh." msgstr "" #: ../../docs/tutorials/3d/using_multi_mesh_instance.rst:82 msgid "Random Scale" msgstr "" #: ../../docs/tutorials/3d/using_multi_mesh_instance.rst:84 msgid "Randomizing the scale of the source mesh." msgstr "" #: ../../docs/tutorials/3d/using_multi_mesh_instance.rst:89 msgid "" "The scale of the source mesh that will be placed over the target surface." msgstr "" #: ../../docs/tutorials/3d/using_multi_mesh_instance.rst:92 msgid "Amount" msgstr "" #: ../../docs/tutorials/3d/using_multi_mesh_instance.rst:94 msgid "The amount of mesh instances placed over the target surface." msgstr "" #: ../../docs/tutorials/3d/using_multi_mesh_instance.rst:96 msgid "" "Select the target surface. In the tree case, this should be the landscape " "node. The source mesh should be the tree node. Adjust the other parameters " "according to your preference. Press ``Populate`` and multiple copies of the " "source mesh will be placed over the target mesh. If you are satisfied with " "the result, you can delete the mesh instance used as the source mesh." msgstr "" #: ../../docs/tutorials/3d/using_multi_mesh_instance.rst:102 msgid "The end result should look like this:" msgstr "" #: ../../docs/tutorials/3d/using_multi_mesh_instance.rst:106 msgid "" "To change the result, repeat the previous steps with different parameters." msgstr "" #: ../../docs/tutorials/3d/csg_tools.rst:4 msgid "Prototyping levels with CSG" msgstr "" #: ../../docs/tutorials/3d/csg_tools.rst:6 msgid "" "CSG stands for **Constructive Solid Geometry**, and is a tool to combine " "basic shapes or custom meshes to create more complex shapes. In 3D modelling " "software, CSG is mostly known as \"Boolean Operators\"." msgstr "" #: ../../docs/tutorials/3d/csg_tools.rst:10 msgid "" "Level prototyping is one of the main uses of CSG in Godot. This technique " "allows users to create simple versions of most common shapes by combining " "primitives. Interior environments can be created by using inverted " "primitives." msgstr "" #: ../../docs/tutorials/3d/csg_tools.rst:14 msgid "" "The CSG nodes in Godot are mainly intended for prototyping. There is no " "built-in support for UV mapping or editing 3D polygons (though extruded 2D " "polygons can be used with the CSGPolygon node)." msgstr "" #: ../../docs/tutorials/3d/csg_tools.rst:18 msgid "" "If you're looking for an easy to use level design tool for a project, you " "may want to use `Qodot `__ instead. " "It lets you design levels using `TrenchBroom `__ and import them in Godot." msgstr "" #: ../../docs/tutorials/3d/csg_tools.rst:27 #, fuzzy msgid "Introduction to CSG nodes" msgstr "Hướng dẫn Godot's editor" #: ../../docs/tutorials/3d/csg_tools.rst:29 msgid "" "Like other features of Godot, CSG is supported in the form of nodes. These " "are the CSG nodes:" msgstr "" #: ../../docs/tutorials/3d/csg_tools.rst:32 msgid ":ref:`CSGBox `" msgstr "" #: ../../docs/tutorials/3d/csg_tools.rst:33 msgid ":ref:`CSGCylinder ` (also supports cone)" msgstr "" #: ../../docs/tutorials/3d/csg_tools.rst:34 msgid ":ref:`CSGSphere `" msgstr "" #: ../../docs/tutorials/3d/csg_tools.rst:35 msgid ":ref:`CSGTorus `" msgstr "" #: ../../docs/tutorials/3d/csg_tools.rst:36 msgid ":ref:`CSGPolygon `" msgstr "" #: ../../docs/tutorials/3d/csg_tools.rst:37 msgid ":ref:`CSGMesh `" msgstr "" #: ../../docs/tutorials/3d/csg_tools.rst:38 msgid ":ref:`CSGCombiner `" msgstr "" #: ../../docs/tutorials/3d/csg_tools.rst:45 msgid "CSG tools features" msgstr "" #: ../../docs/tutorials/3d/csg_tools.rst:47 msgid "Every CSG node supports 3 kinds of boolean operations:" msgstr "" #: ../../docs/tutorials/3d/csg_tools.rst:49 msgid "" "**Union:** Geometry of both primitives is merged, intersecting geometry is " "removed." msgstr "" #: ../../docs/tutorials/3d/csg_tools.rst:51 msgid "" "**Intersection:** Only intersecting geometry remains, the rest is removed." msgstr "" #: ../../docs/tutorials/3d/csg_tools.rst:52 msgid "" "**Subtraction:** The second shape is subtracted from the first, leaving a " "dent with its shape." msgstr "" #: ../../docs/tutorials/3d/csg_tools.rst:60 msgid "CSGPolygon" msgstr "" #: ../../docs/tutorials/3d/csg_tools.rst:62 msgid "" "The :ref:`CSGPolygon ` node extrude along a Polygon drawn " "in 2D (in X, Y coordinates) in the following ways:" msgstr "" #: ../../docs/tutorials/3d/csg_tools.rst:65 msgid "**Depth:** Extruded back a given amount." msgstr "" #: ../../docs/tutorials/3d/csg_tools.rst:66 msgid "**Spin:** Extruded while spinning around its origin." msgstr "" #: ../../docs/tutorials/3d/csg_tools.rst:67 msgid "" "**Path:** Extruded along a Path node. This operation is commonly called " "lofting." msgstr "" #: ../../docs/tutorials/3d/csg_tools.rst:74 msgid "" "The **Path** mode must be provided with a :ref:`Path ` node to " "work. In the Path node, draw the path and the polygon in CSGPolygon will " "extrude along the given path." msgstr "" #: ../../docs/tutorials/3d/csg_tools.rst:80 msgid "Custom meshes" msgstr "" #: ../../docs/tutorials/3d/csg_tools.rst:82 msgid "" "Any mesh can be used for :ref:`CSGMesh `; the mesh can be " "modelled in other software and imported into Godot. Multiple materials are " "supported. There are some restrictions for geometry:" msgstr "" #: ../../docs/tutorials/3d/csg_tools.rst:86 msgid "it must be closed," msgstr "" #: ../../docs/tutorials/3d/csg_tools.rst:87 msgid "it must not self-intersect," msgstr "" #: ../../docs/tutorials/3d/csg_tools.rst:88 msgid "it must not contain internal faces," msgstr "" #: ../../docs/tutorials/3d/csg_tools.rst:89 msgid "every edge must connect to only two other faces." msgstr "" #: ../../docs/tutorials/3d/csg_tools.rst:94 msgid "CSGCombiner" msgstr "" #: ../../docs/tutorials/3d/csg_tools.rst:96 msgid "" "The :ref:`CSGCombiner ` node is an empty shape used for " "organization. It will only combine children nodes." msgstr "" #: ../../docs/tutorials/3d/csg_tools.rst:100 msgid "Processing order" msgstr "" #: ../../docs/tutorials/3d/csg_tools.rst:102 msgid "" "Every CSG node will first process its children nodes and their operations: " "union, intersection or subtraction, in tree order, and apply them to itself " "one after the other." msgstr "" #: ../../docs/tutorials/3d/csg_tools.rst:106 msgid "" "In the interest of performance, make sure CSG geometry remains relatively " "simple, as complex meshes can take a while to process. If adding objects " "together (such as table and room objects), create them as separate CSG " "trees. Forcing too many objects in a single tree will eventually start " "affecting performance. Only use binary operations where you actually need " "them." msgstr "" #: ../../docs/tutorials/3d/csg_tools.rst:114 msgid "Prototyping a level" msgstr "" #: ../../docs/tutorials/3d/csg_tools.rst:116 msgid "We will prototype a room to practice the use of CSG tools." msgstr "" #: ../../docs/tutorials/3d/csg_tools.rst:118 msgid "" "Working in **Orthogonal** projection gives a better view when combining the " "CSG shapes." msgstr "" #: ../../docs/tutorials/3d/csg_tools.rst:121 msgid "Our level will contain these objects:" msgstr "" #: ../../docs/tutorials/3d/csg_tools.rst:123 msgid "a room," msgstr "" #: ../../docs/tutorials/3d/csg_tools.rst:124 msgid "a bed," msgstr "" #: ../../docs/tutorials/3d/csg_tools.rst:125 msgid "a lamp," msgstr "" #: ../../docs/tutorials/3d/csg_tools.rst:126 msgid "a desk," msgstr "" #: ../../docs/tutorials/3d/csg_tools.rst:127 msgid "a bookshelf." msgstr "" #: ../../docs/tutorials/3d/csg_tools.rst:129 msgid "Create a scene with a Spatial node as root node." msgstr "" #: ../../docs/tutorials/3d/csg_tools.rst:131 msgid "" "The default lighting of the environment doesn't provide clear shading at " "some angles. Change the display mode using **Display Overdraw** in the 3D " "viewport menu, or add a DirectionalLight node to help you see clearly." msgstr "" #: ../../docs/tutorials/3d/csg_tools.rst:138 msgid "" "Create a CSGBox and name it ``room``, enable **Invert Faces** and change the " "dimensions of your room." msgstr "" #: ../../docs/tutorials/3d/csg_tools.rst:145 msgid "Next, create a CSGCombiner and name it ``desk``." msgstr "" #: ../../docs/tutorials/3d/csg_tools.rst:147 msgid "A desk has one surface and 4 legs:" msgstr "" #: ../../docs/tutorials/3d/csg_tools.rst:149 msgid "" "Create 1 CSGBox children node in **Union** mode for the surface and adjust " "the dimensions." msgstr "" #: ../../docs/tutorials/3d/csg_tools.rst:151 msgid "" "Create 4 CSGBox children nodes in **Union** mode for the legs and adjust the " "dimensions." msgstr "" #: ../../docs/tutorials/3d/csg_tools.rst:154 msgid "Adjust their placement to resemble a desk." msgstr "" #: ../../docs/tutorials/3d/csg_tools.rst:158 msgid "" "CSG nodes inside a CSGCombiner will only process their operation within the " "combiner. Therefore, CSGCombiners are used to organize CSG nodes." msgstr "" #: ../../docs/tutorials/3d/csg_tools.rst:162 msgid "Create a CSGCombiner and name it ``bed``." msgstr "" #: ../../docs/tutorials/3d/csg_tools.rst:164 msgid "" "Our bed consists of 3 parts: the bed, the mattress and a pillow. Create a " "CSGBox and adjust its dimension for the bed. Create another CSGBox and " "adjust its dimension for the mattress." msgstr "" #: ../../docs/tutorials/3d/csg_tools.rst:170 msgid "" "We will create another CSGCombiner named ``pillow`` as the child of " "``bed``. The scene tree should look like this:" msgstr "" #: ../../docs/tutorials/3d/csg_tools.rst:175 msgid "" "We will combine 3 CSGSphere nodes in **Union** mode to form a pillow. Scale " "the Y axis of the spheres and enable **Smooth Faces**." msgstr "" #: ../../docs/tutorials/3d/csg_tools.rst:180 msgid "" "Select the ``pillow`` node and switch the mode to **Subtraction**; the " "combined spheres will cut a hole into the mattress." msgstr "" #: ../../docs/tutorials/3d/csg_tools.rst:185 msgid "" "Try to re-parent the ``pillow`` node to the root ``Spatial`` node; the hole " "will disappear." msgstr "" #: ../../docs/tutorials/3d/csg_tools.rst:188 msgid "" "This is to illustrate the effect of CSG processing order. Since the root " "node is not a CSG node, the CSGCombiner nodes are the end of the operations; " "this shows the use of CSGCombiner to organize the CSG scene." msgstr "" #: ../../docs/tutorials/3d/csg_tools.rst:193 msgid "" "Undo the re-parent after observing the effect. The bed you've built should " "look like this:" msgstr "" #: ../../docs/tutorials/3d/csg_tools.rst:198 msgid "Create a CSGCombiner and name it ``lamp``." msgstr "" #: ../../docs/tutorials/3d/csg_tools.rst:200 msgid "" "A lamp consists of 3 parts: the stand, the pole and the lampshade. Create a " "CSGCylinder, enable the **Cone** option and make it the stand. Create " "another CSGCylinder and adjust the dimensions to use it as a pole." msgstr "" #: ../../docs/tutorials/3d/csg_tools.rst:206 msgid "" "We will use a CSGPolygon for the lampshade. Use the **Spin** mode for the " "CSGPolygon and draw a `trapezoid `_ " "while in **Front View** (numeric keypad 1); this shape will extrude around " "the origin and form the lampshade." msgstr "" #: ../../docs/tutorials/3d/csg_tools.rst:217 msgid "Adjust the placement of the 3 parts to make it look like a lamp." msgstr "" #: ../../docs/tutorials/3d/csg_tools.rst:221 msgid "Create a CSGCombiner and name it ``bookshelf``." msgstr "" #: ../../docs/tutorials/3d/csg_tools.rst:223 msgid "" "We will use 3 CSGBox nodes for the bookshelf. Create a CSGBox and adjust its " "dimensions; this will be the size of the bookshelf." msgstr "" #: ../../docs/tutorials/3d/csg_tools.rst:228 msgid "" "Duplicate the CSGBox and shorten the dimensions of each axis and change the " "mode to **Subtraction**." msgstr "" #: ../../docs/tutorials/3d/csg_tools.rst:235 msgid "" "You've almost built a shelf. Create one more CSGBox for dividing the shelf " "into two levels." msgstr "" #: ../../docs/tutorials/3d/csg_tools.rst:240 msgid "" "Position your furniture in your room as you like and your scene should look " "this:" msgstr "" #: ../../docs/tutorials/3d/csg_tools.rst:245 msgid "" "You've successfully prototyped a room level with the CSG tools in Godot. CSG " "tools can be used for designing all kinds of levels, such as a maze or a " "city; explore its limitations when designing your game." msgstr "" #: ../../docs/tutorials/3d/csg_tools.rst:250 msgid "Using prototype textures" msgstr "" #: ../../docs/tutorials/3d/csg_tools.rst:252 msgid "" "Godot's :ref:`doc_spatial_material` supports *triplanar mapping*, which can " "be used to automatically apply a texture to arbitrary objects without " "distortion. This is handy when using CSG as Godot doesn't support editing UV " "maps on CSG nodes yet. Triplanar mapping is relatively slow, which usually " "restricts its usage to organic surfaces like terrain. Still, when " "prototyping, it can be used to quickly apply textures to CSG-based levels." msgstr "" #: ../../docs/tutorials/3d/csg_tools.rst:259 msgid "" "If you need some textures for prototyping, Kenney made a `set of CC0-" "licensed prototype textures `__." msgstr "" #: ../../docs/tutorials/3d/csg_tools.rst:262 msgid "There are two ways to apply a material to a CSG node:" msgstr "" #: ../../docs/tutorials/3d/csg_tools.rst:264 msgid "" "Applying it to a CSGCombiner node as a material override (**Geometry > " "Material Override** in the Inspector). This will affect its children " "automatically, but will make it impossible to change the material in " "individual children." msgstr "" #: ../../docs/tutorials/3d/csg_tools.rst:268 msgid "" "Applying a material to individual nodes (**Material** in the Inspector). " "This way, each CSG node can have its own appearance. Subtractive CSG nodes " "will apply their material to the nodes they're \"digging\" into." msgstr "" #: ../../docs/tutorials/3d/csg_tools.rst:272 msgid "" "To apply triplanar mapping to a CSG node, select it, go to the Inspector, " "click the **[empty]** text next to **Material Override** (or **Material** " "for individual CSG nodes). Choose **New SpatialMaterial**. Click the newly " "created material's icon to edit it. Unfold the **Albedo** section and load a " "texture into the **Texture** property. Now, unfold the **Uv1** section and " "check **Triplanar**. You can change the texture offset and scale on each " "axis by playing with the **Scale** and **Offset** properties just above. " "Higher values in the **Scale** property will cause the texture to repeat " "more often." msgstr "" #: ../../docs/tutorials/3d/csg_tools.rst:281 msgid "" "You can copy a SpatialMaterial to reuse it across CSG nodes. To do so, click " "the dropdown arrow next to a material property in the Inspector and choose " "**Copy**. To paste it, select the node you'd like to apply the material " "onto, click the dropdown arrow next to its material property then choose " "**Paste**." msgstr "" #: ../../docs/tutorials/3d/procedural_geometry/index.rst:4 msgid "Procedural geometry" msgstr "" #: ../../docs/tutorials/3d/procedural_geometry/index.rst:6 msgid "" "There are many ways to procedurally generate geometry in Godot. In this " "tutorial series we will explore a few of them. Each technique has its own " "benefits and drawbacks, so it is best to understand each one and how it can " "be useful in a given situation." msgstr "" #: ../../docs/tutorials/3d/procedural_geometry/index.rst:20 msgid "What is geometry?" msgstr "" #: ../../docs/tutorials/3d/procedural_geometry/index.rst:22 msgid "" "Geometry is a fancy way of saying shape. In computer graphics, geometry is " "typically represented by an array of positions called \"vertices\". In " "Godot, geometry is represented by Meshes." msgstr "" #: ../../docs/tutorials/3d/procedural_geometry/index.rst:26 msgid "What is a Mesh?" msgstr "" #: ../../docs/tutorials/3d/procedural_geometry/index.rst:28 msgid "" "Many things in Godot have mesh in their name: the :ref:`Mesh `, " "the :ref:`ArrayMesh `, the :ref:`MeshInstance " "`, the :ref:`MultiMesh `, and the :ref:" "`MultiMeshInstance `. While they are all related, " "they have slightly different uses." msgstr "" #: ../../docs/tutorials/3d/procedural_geometry/index.rst:32 msgid "" "Meshes and ArrayMeshes are resources that are drawn using a MeshInstance " "node. Resources like Meshes and ArrayMeshes cannot be added to the scene " "directly. A MeshInstance represents one instance of a mesh in your scene. " "You can reuse a single mesh in multiple MeshInstances to draw it in " "different parts of your scene with different materials or transformations " "(scale, rotation, position etc.)." msgstr "" #: ../../docs/tutorials/3d/procedural_geometry/index.rst:38 msgid "" "If you are going to draw the same object many times, it can be helpful to " "use a MultiMesh with a MultiMeshInstance. The MultiMeshInstance draws meshes " "thousands of times very cheaply. It takes advantage of hardware instancing " "in order to do so. The drawback with using a MultiMeshInstance is that you " "are limited to one material for all instances. It uses an instance array to " "store different colors and transformations for each instance, but all the " "instances use the same material." msgstr "" #: ../../docs/tutorials/3d/procedural_geometry/index.rst:46 msgid "What a Mesh is" msgstr "" #: ../../docs/tutorials/3d/procedural_geometry/index.rst:48 msgid "" "A Mesh is composed of one or more surfaces. A surface is an array composed " "of multiple sub-arrays containing vertices, normals, UVs, etc. Normally the " "process of constructing surfaces and meshes is hidden from the user in the :" "ref:`VisualServer `, but with ArrayMeshes, the user can " "construct a Mesh manually by passing in an array containing the surface " "information." msgstr "" #: ../../docs/tutorials/3d/procedural_geometry/index.rst:54 msgid "Surfaces" msgstr "" #: ../../docs/tutorials/3d/procedural_geometry/index.rst:56 msgid "" "Each surface has its own material. Alternatively, you can override the " "material for all surfaces in the Mesh when you use a MeshInstance using " "``MeshInstance.override_material``." msgstr "" #: ../../docs/tutorials/3d/procedural_geometry/index.rst:60 msgid "Surface array" msgstr "" #: ../../docs/tutorials/3d/procedural_geometry/index.rst:62 msgid "" "The surface array is an array of length ``ArrayMesh.ARRAY_MAX``. Each " "position in the array is filled with a sub-array containing per-vertex " "information. For example, the array located at ``ArrayMesh.ARRAY_NORMAL`` is " "a :ref:`PoolVector3Array ` of vertex normals." msgstr "" #: ../../docs/tutorials/3d/procedural_geometry/index.rst:66 msgid "" "The surface array can be indexed or non-indexed. Creating a non-indexed " "array is as easy as not assigning an array at the index ``ArrayMesh." "ARRAY_INDEX``. A non-indexed array stores unique vertex information for " "every triangle, meaning that when two triangles share a vertex, the vertex " "is duplicated in the array. An indexed surface array only stores vertex " "information for each unique vertex and then also stores an array of indices " "which maps out how to construct the triangles from the vertex array. In " "general, using an indexed array is faster, but it means you have to share " "vertex data between triangles, which is not always desired (e.g. when you " "want per-face normals)." msgstr "" #: ../../docs/tutorials/3d/procedural_geometry/index.rst:77 msgid "" "Godot provides different ways of accessing and working with geometry. More " "information on each will be provided in the following tutorials." msgstr "" #: ../../docs/tutorials/3d/procedural_geometry/index.rst:81 #: ../../docs/tutorials/3d/procedural_geometry/arraymesh.rst:48 #: ../../docs/development/file_formats/tscn.rst:327 msgid "ArrayMesh" msgstr "" #: ../../docs/tutorials/3d/procedural_geometry/index.rst:83 msgid "" "The ArrayMesh resource extends Mesh to add a few different quality of life " "functions, and most importantly, the ability to construct a Mesh surface " "through scripting." msgstr "" #: ../../docs/tutorials/3d/procedural_geometry/index.rst:86 msgid "" "For more information about the ArrayMesh, please see the :ref:`ArrayMesh " "tutorial `." msgstr "" #: ../../docs/tutorials/3d/procedural_geometry/index.rst:89 msgid "MeshDataTool" msgstr "" #: ../../docs/tutorials/3d/procedural_geometry/index.rst:91 msgid "" "The MeshDataTool is a resource that converts Mesh data into arrays of " "vertices, faces, and edges that can be modified at runtime." msgstr "" #: ../../docs/tutorials/3d/procedural_geometry/index.rst:94 msgid "" "For more information about the MeshDataTool, please see the :ref:" "`MeshDataTool tutorial `." msgstr "" #: ../../docs/tutorials/3d/procedural_geometry/index.rst:97 msgid "SurfaceTool" msgstr "" #: ../../docs/tutorials/3d/procedural_geometry/index.rst:99 msgid "" "The SurfaceTool allows the creation of Meshes using an OpenGL 1.x immediate " "mode style interface." msgstr "" #: ../../docs/tutorials/3d/procedural_geometry/index.rst:101 msgid "" "For more information about the SurfaceTool, please see the :ref:`SurfaceTool " "tutorial `." msgstr "" #: ../../docs/tutorials/3d/procedural_geometry/index.rst:104 msgid "ImmediateGeometry" msgstr "" #: ../../docs/tutorials/3d/procedural_geometry/index.rst:106 msgid "" "ImmediateGeometry is a node that uses an immediate mode style interface " "(like SurfaceTool) to draw objects. The difference between ImmediateGeometry " "and the SurfaceTool is that ImmediateGeometry is a node itself that can be " "added to the scene tree and is drawn directly from the code. The SurfaceTool " "generates a Mesh that needs to be added a MeshInstance to be seen." msgstr "" #: ../../docs/tutorials/3d/procedural_geometry/index.rst:111 msgid "" "ImmediateGeometry is useful for prototyping because of the straightforward " "API, but it is slow because the geometry is rebuilt every frame. It is most " "useful for quickly adding simple geometry to debug visually (e.g. by drawing " "lines to visualize physics raycasts etc.)." msgstr "" #: ../../docs/tutorials/3d/procedural_geometry/index.rst:115 msgid "" "For more information about ImmediateGeometry, please see the :ref:" "`ImmediateGeometry tutorial `." msgstr "" #: ../../docs/tutorials/3d/procedural_geometry/index.rst:118 #, fuzzy msgid "Which one should I use?" msgstr "GDScript là gì và tại sao tôi nên sử dụng nó?" #: ../../docs/tutorials/3d/procedural_geometry/index.rst:120 msgid "" "Which method you use depends on what you are trying to do and what kind of " "procedure you are comfortable with." msgstr "" #: ../../docs/tutorials/3d/procedural_geometry/index.rst:122 msgid "" "Both SurfaceTool and ArrayMesh are excellent for generating static geometry " "(meshes) that don't change over time." msgstr "" #: ../../docs/tutorials/3d/procedural_geometry/index.rst:124 msgid "" "Using an ArrayMesh is slightly faster than using a SurfaceTool, but the API " "is a little more challenging. Additionally, SurfaceTool has a few quality of " "life methods such as ``generate_normals()`` and ``index()``." msgstr "" #: ../../docs/tutorials/3d/procedural_geometry/index.rst:127 msgid "" "ImmediateGeometry regenerates the mesh every frame, so it is much slower " "than ArrayMesh or SurfaceTool. However, if you need the geometry to change " "every frame anyway, it provides a much easier interface that may even be a " "little faster than generating an ArrayMesh every frame." msgstr "" #: ../../docs/tutorials/3d/procedural_geometry/index.rst:131 msgid "" "The MeshDataTool is not fast, but it gives you access to all kinds of " "properties of the mesh that you don't get with the others (edges, faces, " "etc.). It is incredibly useful when you need that sort of data to transform " "the mesh, but it is not a good idea to use it if that information is not " "needed. The MeshDataTool is best used if you are going to be using an " "algorithm that requires access to the face or edge array." msgstr "" #: ../../docs/tutorials/3d/procedural_geometry/arraymesh.rst:4 msgid "Using the ArrayMesh" msgstr "" #: ../../docs/tutorials/3d/procedural_geometry/arraymesh.rst:6 msgid "" "This tutorial will present the basics of using an :ref:`ArrayMesh " "`" msgstr "" #: ../../docs/tutorials/3d/procedural_geometry/arraymesh.rst:8 msgid "" "To do so, we will use the function :ref:`add_surface_from_arrays() " "`, which takes up to four " "parameters. The first two are required, while the second two are optional." msgstr "" #: ../../docs/tutorials/3d/procedural_geometry/arraymesh.rst:11 msgid "" "The first is the ``PrimitiveType``, this is an OpenGL concept that instructs " "the GPU how to arrange the primitive based on the vertices given whether it " "is triangles, lines, points, etc. A complete list can be found under the :" "ref:`Mesh ` class reference page." msgstr "" #: ../../docs/tutorials/3d/procedural_geometry/arraymesh.rst:16 msgid "" "The second is the actual Array that stores the mesh information. The array " "is a normal Godot array that is constructed with empty brackets ``[]``. It " "stores a ``Pool**Array`` (e.g. PoolVector3Array, PoolIntArray, etc.) for " "each type of information." msgstr "" #: ../../docs/tutorials/3d/procedural_geometry/arraymesh.rst:20 msgid "``ARRAY_VERTEX`` = 0 | PoolVector3Array or PoolVector2Array" msgstr "" #: ../../docs/tutorials/3d/procedural_geometry/arraymesh.rst:21 msgid "``ARRAY_NORMAL`` = 1 | PoolVector3Array" msgstr "" #: ../../docs/tutorials/3d/procedural_geometry/arraymesh.rst:22 msgid "" "``ARRAY_TANGENT`` = 2 | PoolRealArray of groups of 4 floats. First 3 floats " "determine the tangent, and the last the binormal direction as -1 or 1." msgstr "" #: ../../docs/tutorials/3d/procedural_geometry/arraymesh.rst:24 msgid "``ARRAY_COLOR`` = 3 | PoolColorArray" msgstr "" #: ../../docs/tutorials/3d/procedural_geometry/arraymesh.rst:25 msgid "``ARRAY_TEX_UV`` = 4 | PoolVector2Array or PoolVector3Array" msgstr "" #: ../../docs/tutorials/3d/procedural_geometry/arraymesh.rst:26 msgid "``ARRAY_TEX_UV2`` = 5 | PoolVector2Array or PoolVector3Array" msgstr "" #: ../../docs/tutorials/3d/procedural_geometry/arraymesh.rst:27 msgid "" "``ARRAY_BONES`` = 6 | PoolRealArray of groups of 4 floats or PoolIntArray of " "groups of 4 ints" msgstr "" #: ../../docs/tutorials/3d/procedural_geometry/arraymesh.rst:28 msgid "``ARRAY_WEIGHTS`` = 7 | PoolRealArray of groups of 4 floats" msgstr "" #: ../../docs/tutorials/3d/procedural_geometry/arraymesh.rst:29 msgid "``ARRAY_INDEX`` = 8 | PoolIntArray" msgstr "" #: ../../docs/tutorials/3d/procedural_geometry/arraymesh.rst:31 msgid "" "The Array of vertices is always required. All the others are optional and " "will only be used if included." msgstr "" #: ../../docs/tutorials/3d/procedural_geometry/arraymesh.rst:33 msgid "" "Each array needs to have the same number of elements as the vertex array " "except for the index array. For arrays like tangents, an element is a group " "of 4 floats. So the array size will be four times the size of the vertex " "array size, but they will have the same number of elements" msgstr "" #: ../../docs/tutorials/3d/procedural_geometry/arraymesh.rst:37 msgid "The index array is unique." msgstr "" #: ../../docs/tutorials/3d/procedural_geometry/arraymesh.rst:39 msgid "" "The third parameter is an array of blendshapes for the Mesh to use. While " "this tutorial does not cover using blendshapes, it is possible to specify " "them when creating a surface from arrays." msgstr "" #: ../../docs/tutorials/3d/procedural_geometry/arraymesh.rst:42 msgid "" "The last parameter is the compress flags which specifies which arrays to " "store with half as many bits. The values can be found in the classref for :" "ref:`VisualServer ` under :ref:`ArrayFormat " "`." msgstr "" #: ../../docs/tutorials/3d/procedural_geometry/arraymesh.rst:45 msgid "" "For normal usage you will find it is best to leave the last two parameters " "empty." msgstr "" #: ../../docs/tutorials/3d/procedural_geometry/arraymesh.rst:50 msgid "" "Add an :ref:`ArrayMesh ` to a MeshInstance. Normally, " "adding an ArrayMesh in the editor is not useful, but in this case it allows " "as to access the ArrayMesh from code without creating one." msgstr "" #: ../../docs/tutorials/3d/procedural_geometry/arraymesh.rst:54 msgid "Next, add a script to the MeshInstance." msgstr "" #: ../../docs/tutorials/3d/procedural_geometry/arraymesh.rst:56 msgid "Under ``_ready()``, create a new Array." msgstr "" #: ../../docs/tutorials/3d/procedural_geometry/arraymesh.rst:63 msgid "" "This will be the array that we keep our surface information in, it will hold " "all the arrays of data that the surface needs. Godot will expect it to be of " "size ``Mesh.ARRAY_MAX``, so resize it accordingly." msgstr "" #: ../../docs/tutorials/3d/procedural_geometry/arraymesh.rst:73 msgid "Next create the arrays for each data type you will use." msgstr "" #: ../../docs/tutorials/3d/procedural_geometry/arraymesh.rst:83 msgid "" "Once you have filled your data arrays with your geometry you can create a " "mesh by adding each array to ``surface_array`` and then committing to the " "mesh." msgstr "" #: ../../docs/tutorials/3d/procedural_geometry/arraymesh.rst:96 msgid "" "In this example, we used ``Mesh.PRIMITIVE_TRIANGLES``, but you can use any " "primitive type available from mesh." msgstr "" #: ../../docs/tutorials/3d/procedural_geometry/arraymesh.rst:99 msgid "Put together the full code looks like:" msgstr "" #: ../../docs/tutorials/3d/procedural_geometry/arraymesh.rst:130 msgid "" "The code that goes in the middle can be whatever you want. Below we will " "present some example code that could go in the middle." msgstr "" #: ../../docs/tutorials/3d/procedural_geometry/arraymesh.rst:134 #, fuzzy msgid "Generating geometry" msgstr "Tạo nội dung" #: ../../docs/tutorials/3d/procedural_geometry/arraymesh.rst:136 msgid "" "Here is sample code for generating a sphere. Although the code is presented " "in GDScript, there is nothing Godot specific about the approach to " "generating it. This implementation has nothing in particular to do with " "ArrayMeshes and is just a generic approach to generating a sphere. If you " "are having trouble understanding it or want to learn more about procedural " "geometry in general, you can use any tutorial that you find online." msgstr "" #: ../../docs/tutorials/3d/procedural_geometry/arraymesh.rst:203 msgid "Combined with the code above, this code will generate a sphere." msgstr "" #: ../../docs/tutorials/3d/procedural_geometry/arraymesh.rst:205 msgid "" "When it comes to generating geometry with the ArrayMesh you need to " "understand what goes in each array and then you can follow tutorials for any " "language/engine and convert it into Godot." msgstr "" #: ../../docs/tutorials/3d/procedural_geometry/arraymesh.rst:209 msgid "Saving" msgstr "" #: ../../docs/tutorials/3d/procedural_geometry/arraymesh.rst:211 msgid "" "Finally, Godot provides a single method to save ArrayMeshes using the :ref:" "`ResourceSaver ` class. This is useful when you want to " "generate a mesh and then use it later without having to re-generate." msgstr "" #: ../../docs/tutorials/3d/procedural_geometry/meshdatatool.rst:4 msgid "Using the MeshDataTool" msgstr "" #: ../../docs/tutorials/3d/procedural_geometry/meshdatatool.rst:6 msgid "" "The :ref:`MeshDataTool ` is not used to generate " "geometry. But it is helpful for dynamically altering geometry, for example " "if you want to write a script to tessellate, simplify, or deform meshes." msgstr "" #: ../../docs/tutorials/3d/procedural_geometry/meshdatatool.rst:9 msgid "" "The MeshDataTool is not as fast as altering arrays directly using ArrayMesh. " "However, it provides more information and tools to work with meshes than the " "ArrayMesh does. When the MeshDataTool is used, it calculates mesh data that " "is not available in ArrayMeshes such as faces and edges, which are necessary " "for certain mesh algorithms. If you do not need this extra information then " "it may be better to use an ArrayMesh." msgstr "" #: ../../docs/tutorials/3d/procedural_geometry/meshdatatool.rst:14 msgid "" "MeshDataTool can only be used on Meshes that use the PrimitiveType ``Mesh." "PRIMITIVE_TRIANGLES``." msgstr "" #: ../../docs/tutorials/3d/procedural_geometry/meshdatatool.rst:16 msgid "" "As an example, let's walk through the process of deforming the mesh " "generated in the :ref:`ArrayMesh tutorial `." msgstr "" #: ../../docs/tutorials/3d/procedural_geometry/meshdatatool.rst:18 msgid "" "Assume the mesh is stored in an ArrayMesh named ``mesh``. We then initialize " "the MeshDataTool from ``mesh`` by calling ``create_from_surface()``. If " "there is already data initialized in the MeshDataTool calling " "``create_from_surface()`` will clear it for you. Alternatively, you can call " "``clear()`` yourself before re-using the MeshDataTool" msgstr "" #: ../../docs/tutorials/3d/procedural_geometry/meshdatatool.rst:29 msgid "" "``create_from_surface()`` uses the vertex arrays from the ArrayMesh to " "calculate two additional arrays, one for edges and one for faces." msgstr "" #: ../../docs/tutorials/3d/procedural_geometry/meshdatatool.rst:32 msgid "" "An edge is a connection between any two vertices. Each edge in the edge " "array contains a reference to the two vertices it is composed of, and up to " "two faces that it is contained within." msgstr "" #: ../../docs/tutorials/3d/procedural_geometry/meshdatatool.rst:35 msgid "" "A face is a triangle made up of three vertices and three corresponding " "edges. Each face in the face array contains a reference to the three " "vertices and three edges it is composed of." msgstr "" #: ../../docs/tutorials/3d/procedural_geometry/meshdatatool.rst:38 msgid "" "The vertex array contains edges, faces, normals, color, tangent, uv, uv2, " "bones, and weight information connected with each vertex." msgstr "" #: ../../docs/tutorials/3d/procedural_geometry/meshdatatool.rst:41 msgid "" "To access information from these arrays you use a function of the form " "``get_****()``:" msgstr "" #: ../../docs/tutorials/3d/procedural_geometry/meshdatatool.rst:51 msgid "" "What you choose to do with these functions is up to you. A common use case " "is to iterate over all vertices and transform them in some way:" msgstr "" #: ../../docs/tutorials/3d/procedural_geometry/meshdatatool.rst:62 msgid "" "Finally, ``commit_to_surface()`` adds a new surface to the ArrayMesh. So if " "you are dynamically updating an existing ArrayMesh, first delete the " "existing surface before adding a new one." msgstr "" #: ../../docs/tutorials/3d/procedural_geometry/meshdatatool.rst:71 msgid "" "Below is a complete example that creates a pulsing blob complete with new " "normals and vertex colors." msgstr "" #: ../../docs/tutorials/3d/procedural_geometry/surfacetool.rst:4 #, fuzzy msgid "Using the SurfaceTool" msgstr "Tạo nội dung" #: ../../docs/tutorials/3d/procedural_geometry/surfacetool.rst:6 msgid "" "The :ref:`SurfaceTool ` provides a useful interface for " "constructing geometry. The interface is similar to the :ref:" "`ImmediateGeometry ` node. You set each per-vertex " "attribute (e.g. normal, uv, color) and then when you add a vertex it " "captures the attributes." msgstr "" #: ../../docs/tutorials/3d/procedural_geometry/surfacetool.rst:11 msgid "" "The SurfaceTool also provides some useful helper functions like ``index()`` " "and ``generate_normals()``." msgstr "" #: ../../docs/tutorials/3d/procedural_geometry/surfacetool.rst:13 msgid "Attributes are added before each vertex is added:" msgstr "" #: ../../docs/tutorials/3d/procedural_geometry/surfacetool.rst:24 msgid "" "When finished generating your geometry with the :ref:`SurfaceTool " "` call ``commit()`` to finish generating the mesh. If an :" "ref:`ArrayMesh ` is passed to ``commit()`` then it appends " "a new surface to the end of the ArrayMesh. While if nothing is passed in, " "``commit()`` returns an ArrayMesh." msgstr "" #: ../../docs/tutorials/3d/procedural_geometry/surfacetool.rst:36 msgid "Code creates a triangle with indices" msgstr "" #: ../../docs/tutorials/3d/procedural_geometry/surfacetool.rst:62 msgid "" "You can optionally add an index array, either by calling ``add_index()`` and " "adding vertices to the index array or by calling ``index()`` which shrinks " "the vertex array to remove duplicate vertices." msgstr "" #: ../../docs/tutorials/3d/procedural_geometry/surfacetool.rst:82 msgid "" "Similarly, if you have an index array, but you want each vertex to be unique " "(e.g. because you want to use unique normals or colors per face instead of " "per-vertex), you can call ``deindex()``." msgstr "" #: ../../docs/tutorials/3d/procedural_geometry/surfacetool.rst:90 msgid "" "If you don't add custom normals yourself, you can add them using " "``generate_normals()``, which should be called after generating geometry and " "before committing the mesh using ``commit()`` or ``commit_to_arrays()``. " "Calling ``generate_normals(true)`` will flip the resulting normals. As a " "side note, ``generate_normals()`` only works if the primitive type is set to " "``Mesh.PRIMITIVE_TRIANGLES``." msgstr "" #: ../../docs/tutorials/3d/procedural_geometry/surfacetool.rst:95 msgid "" "If you don't add custom tangents, they can be added with " "``generate_tangents()``, but it requires that each vertex have UVs and " "normals set already." msgstr "" #: ../../docs/tutorials/3d/procedural_geometry/surfacetool.rst:104 msgid "" "By default, when generating normals, they will be calculated on a per-face " "basis. If you want smooth vertex normals, when adding vertices, call " "``add_smooth_group()``. ``add_smooth_group()`` needs to be called while " "building the geometry, e.g. before the call to ``add_vertex()`` (if non-" "indexed) or ``add_index()`` (if indexed)." msgstr "" #: ../../docs/tutorials/3d/procedural_geometry/immediategeometry.rst:4 msgid "Using ImmediateGeometry" msgstr "" #: ../../docs/tutorials/3d/procedural_geometry/immediategeometry.rst:6 msgid "" "Unlike the SurfaceTool or ArrayMesh, :ref:`ImmediateGeometry " "` is an actual node. Being a node makes it quick to " "add to a scene and get visual output. It uses an OpenGL 1.x-style API like " "SurfaceTool, but it's actually designed to create meshes on the fly." msgstr "" #: ../../docs/tutorials/3d/procedural_geometry/immediategeometry.rst:10 msgid "" "Generating complex geometry (several thousand vertices) with this node is " "inefficient, even if it's done only once. Instead, it is designed to " "generate simple geometry that changes every frame." msgstr "" #: ../../docs/tutorials/3d/procedural_geometry/immediategeometry.rst:13 msgid "" "Before starting, you should clear the geometry by calling ``clear()``. This " "ensures that you are not building upon the geometry from the previous frame. " "If you want to keep geometry between frames, do not call ``clear()``." msgstr "" #: ../../docs/tutorials/3d/procedural_geometry/immediategeometry.rst:17 msgid "" "To begin generating geometry you must call ``begin()``. ``begin()`` takes a " "``PrimitiveType`` as an argument. ``PrimitiveType`` is an OpenGL concept " "that instructs the GPU how to arrange the primitive based on the vertices " "given whether it is triangles, lines, points, etc. A complete list can be " "found under the :ref:`Mesh ` class reference page." msgstr "" #: ../../docs/tutorials/3d/procedural_geometry/immediategeometry.rst:22 msgid "" "Once you have called ``begin()`` you are ready to start adding vertices. You " "add vertices one at a time. First you add vertex specific attributes such as " "normals or UVs using ``set_****()`` (e.g. ``set_normal()``). Then you call " "``add_vertex()`` to add a vertex with those attributes. For example:" msgstr "" #: ../../docs/tutorials/3d/procedural_geometry/immediategeometry.rst:34 msgid "" "Only attributes added before the call to ``add_vertex()`` will be included " "in that vertex." msgstr "" #: ../../docs/tutorials/3d/procedural_geometry/immediategeometry.rst:36 msgid "" "Finally, once you have added all your vertices call ``end()`` to signal that " "you have finished generating the mesh." msgstr "" #: ../../docs/tutorials/3d/procedural_geometry/immediategeometry.rst:38 msgid "The example code below draws a single triangle." msgstr "" #: ../../docs/tutorials/3d/occluders.rst:4 #, fuzzy msgid "Occluder Nodes" msgstr "Cắt các nút" #: ../../docs/tutorials/3d/occluders.rst:6 msgid "" "In addition to occlusion via :ref:`doc_rooms_and_portals`, Godot also has " "the ability to provide basic occlusion using simple geometric ``Occluder`` " "nodes. These are geometric shapes that are shown in the editor using gizmos, " "but are invisible at runtime." msgstr "" #: ../../docs/tutorials/3d/occluders.rst:8 msgid "" "Any object that is fully occluded by the shape (behind or in some cases " "inside) will be culled at runtime. They are designed to be simple to use and " "inexpensive at runtime, but the trade off is they may not be as effective at " "culling as :ref:`doc_rooms_and_portals`. Nevertheless they can still " "significantly boost performance in some situations." msgstr "" #: ../../docs/tutorials/3d/occluders.rst:10 msgid "" "It is important to understand that geometric occluders work by testing the " "axis aligned bounding box (``AABB``) of the occludee against the occluder. " "The AABB must be *fully occluded* to be culled. The consequence of this is " "that smaller objects are more likely to be effectively culled than larger " "objects." msgstr "" #: ../../docs/tutorials/3d/occluders.rst:12 msgid "" "A major advantage to Occluder nodes is that they are fully dynamic. For " "example if you place an occluder node as a child of a spaceship, it will " "move as you move the parent object." msgstr "" #: ../../docs/tutorials/3d/occluders.rst:14 msgid "" "The reason that Occluder nodes are so cheap in performance terms is that the " "engine dynamically chooses the most relevant occluders at runtime, based on " "the current viewpoint of the Camera. This means you can often have hundreds " "of occluders present in the scene. Only the most relevant will be active at " "any one time." msgstr "" #: ../../docs/tutorials/3d/occluders.rst:16 msgid "" "The Occluder node itself is a holder for an OccluderShape resource, which " "determines the functionality. To get started, add an Occluder node to your " "scene tree." msgstr "" #: ../../docs/tutorials/3d/occluders.rst:18 msgid "" "You will see a yellow warning triangle that lets you know that you must set " "an OccluderShape from the inspector before the ``Occluder`` becomes " "functional." msgstr "" #: ../../docs/tutorials/3d/occluders.rst:21 msgid "OccluderShapeSphere" msgstr "" #: ../../docs/tutorials/3d/occluders.rst:23 msgid "" "The sphere is one of the simplest and fastest occluders, and is easy to " "setup and position. The downside is that the sphere only tends to make sense " "in certain game level designs, and is more suited to terrain or organic " "background geometry." msgstr "" #: ../../docs/tutorials/3d/occluders.rst:25 msgid "" "Once you have added an OccluderNode and chosen to add a new " "``OccluderShapeSphere`` in the inspector, click the OccluderShapeSphere in " "the inspector to bring up the parameters." msgstr "" #: ../../docs/tutorials/3d/occluders.rst:29 msgid "" "Unlike many Nodes, the ``OccluderShapeSphere`` can store multiple spheres in " "the same object. This is more efficient in the engine, and keeps your " "SceneTree clearer. You don't have to store all your spheres in one Occluder " "as it could become tricky to manage, but it is perfectly reasonable to add " "10 or so spheres or more. They are very cheap, and often the more you place, " "the better the match you will get to your geometry." msgstr "" #: ../../docs/tutorials/3d/occluders.rst:31 msgid "" "In order to store multiple spheres, they are stored as an Array. If you " "click on the Array in the inspector, you can increase the size of the Array " "to add one." msgstr "" #: ../../docs/tutorials/3d/occluders.rst:35 msgid "" "The sphere will appear as a small pink spherical object in the editor " "window. There are two handles on each sphere. The larger middle handle " "enables you to move the sphere around in the local space of the Occluder, " "and the small handle enables you to adjust the radius." msgstr "" #: ../../docs/tutorials/3d/occluders.rst:37 msgid "" "Although you can change the position of the sphere using the Occluder Node " "transform in the inspector, this moves *the entire array* of spheres. When " "you want to use multiple spheres in one occluder, the handles do this job. " "In order to allow positioning in 3D, the gizmo will only move the 3D " "position in the two principal axes depending on the viewpoint in the editor. " "This is easier for you to get the hang of by trying it out than by " "explanation." msgstr "" #: ../../docs/tutorials/3d/occluders.rst:39 msgid "" "There is one more handy function in the editor when using multiple spheres. " "If you click the `Center Node` toolbar button it will recalculate the local " "positions of the spheres relative to the average of the entire node, and " "change the transform of the Occluder Node. This is a handy convenience " "function to make it easier to place them." msgstr "" #: ../../docs/tutorials/3d/occluders.rst:41 msgid "" "At runtime the spheres can be switched on and off changing the Occluder node " "visibility, and the Node can be moved and scaled and rotated etc." msgstr "" #: ../../docs/tutorials/3d/occluders.rst:43 msgid "" "A common use case for occluder spheres is providing occlusion on " "mountainous / hilly terrain. By placing spheres inside mountains you can " "prevent trees, plants, building and objects rendering behind mountains. With " "some creativity they can also be used for moving objects such as large " "spacecraft, planets etc." msgstr "" #: ../../docs/tutorials/3d/portals/index.rst:4 msgid "Rooms and Portals" msgstr "" #: ../../docs/tutorials/3d/portals/introduction_to_rooms_and_portals.rst:4 #, fuzzy msgid "Introduction to Rooms and Portals" msgstr "Hướng dẫn Godot editor" #: ../../docs/tutorials/3d/portals/introduction_to_rooms_and_portals.rst:6 msgid "" "The rooms and portals system is an optional component of Godot that allows " "you to partition your 3D game levels into a series of :ref:" "`Room` s (*aka cells*), and :ref:`Portal` s. " "Portals are openings between the rooms that the :ref:`Camera` " "(and lights) can see through." msgstr "" #: ../../docs/tutorials/3d/portals/introduction_to_rooms_and_portals.rst:8 msgid "This allows several features:" msgstr "" #: ../../docs/tutorials/3d/portals/introduction_to_rooms_and_portals.rst:10 msgid "" "**Portal occlusion culling**, which can increase performance by reducing the " "number of objects that are drawn, both to cameras and to shadow maps." msgstr "" #: ../../docs/tutorials/3d/portals/introduction_to_rooms_and_portals.rst:12 msgid "" "**Gameplay callbacks**, which allow turning off activity outside the " "gameplay area - AI, physics, animation, processing etc." msgstr "" #: ../../docs/tutorials/3d/portals/introduction_to_rooms_and_portals.rst:14 msgid "" "The trade off for these features is that we have to manually partition our " "level into rooms, and add portals between them." msgstr "" #: ../../docs/tutorials/3d/portals/introduction_to_rooms_and_portals.rst:16 msgid "" "Godot portals should not be confused with those in the `game of the same " "name `__. They do not " "warp space, they simply represent a window that the camera (or lights) can " "see through." msgstr "" #: ../../docs/tutorials/3d/portals/introduction_to_rooms_and_portals.rst:19 msgid "Minimizing manual labour" msgstr "" #: ../../docs/tutorials/3d/portals/introduction_to_rooms_and_portals.rst:21 msgid "" "Although the effort involved in creating rooms for a large level may seem " "daunting, there are several factors which can make this much easier:" msgstr "" #: ../../docs/tutorials/3d/portals/introduction_to_rooms_and_portals.rst:23 msgid "" "If you are \"kit bashing\" and reusing rooms or areas already, this is an " "ideal way to save effort. Your level tiles can be rooms, with portals " "already placed." msgstr "" #: ../../docs/tutorials/3d/portals/introduction_to_rooms_and_portals.rst:24 msgid "" "If you are creating procedural levels, you can create rooms and portals as " "part of the procedural generation algorithm you're writing." msgstr "" #: ../../docs/tutorials/3d/portals/introduction_to_rooms_and_portals.rst:25 msgid "" "Finally, if you are manually creating freeform levels, bear in mind there " "are absolutely no rules as to how far you go with portalling. Even if you " "separate a large game level into only two rooms, with a single portal " "between them, this can still result in relatively large performance gains." msgstr "" #: ../../docs/tutorials/3d/portals/introduction_to_rooms_and_portals.rst:27 msgid "" "The performance benefits (especially in terms of occlusion) follow an L-" "shaped curve, with the lion's share occurring when you have created just a " "few rooms. So do not be afraid to be lazy - **\\*work smart\\***." msgstr "" #: ../../docs/tutorials/3d/portals/introduction_to_rooms_and_portals.rst:29 msgid "" "In general, when it comes to medium and large-sized levels, it is better to " "do a little portalling than none at all." msgstr "" #: ../../docs/tutorials/3d/portals/introduction_to_rooms_and_portals.rst:32 msgid "Some caveats" msgstr "" #: ../../docs/tutorials/3d/portals/introduction_to_rooms_and_portals.rst:34 msgid "" "The portal system should be considered an **advanced feature** of Godot. You " "should not attempt to use rooms and portals until you are familiar with the " "Godot editor, and have successfully made at least a couple of test games." msgstr "" #: ../../docs/tutorials/3d/portals/introduction_to_rooms_and_portals.rst:36 msgid "" "It gives you great power as a game designer, but the trade off is that it " "requires a very technical approach to level design. It is aimed at producing " "professional-grade results, and assumes the user is prepared to put in the " "work for this. It is not intended to be used for all 3D games. Not all games " "will significantly benefit from portals, and it may require more time than a " "short game jam allows." msgstr "" #: ../../docs/tutorials/3d/portals/first_steps_with_rooms_and_portals.rst:2 msgid "First steps with Rooms and Portals" msgstr "" #: ../../docs/tutorials/3d/portals/first_steps_with_rooms_and_portals.rst:5 #, fuzzy msgid "The RoomManager" msgstr "Project manager (Quản lý dự án)" #: ../../docs/tutorials/3d/portals/first_steps_with_rooms_and_portals.rst:7 msgid "" "Anytime you want to use the portal system, you need to include a special " "node in your scene tree, called the :ref:`RoomManager`. " "The RoomManager is responsible for the runtime maintenance of the system, " "especially converting the objects in your rooms into a *room graph* which is " "used at runtime to perform occlusion culling and other tasks." msgstr "" #: ../../docs/tutorials/3d/portals/first_steps_with_rooms_and_portals.rst:10 msgid "Room Conversion" msgstr "" #: ../../docs/tutorials/3d/portals/first_steps_with_rooms_and_portals.rst:12 msgid "" "This conversion must take place every time you want to activate the system. " "It does not store the *room graph* in your project (for flexibility and to " "save memory). You can either trigger it by pressing the **Convert Rooms** " "button in the editor toolbar (which also has a keyboard shortcut), or you " "can call the ``rooms_convert()`` method in the RoomManager. This latter " "method will be what you use in-game. Note that for safety, best practice is " "to call ``rooms_clear()`` before unloading or changing levels." msgstr "" #: ../../docs/tutorials/3d/portals/first_steps_with_rooms_and_portals.rst:16 msgid "" "If you convert the level while the editor is running, the portal culling " "system will take over from the normal Godot frustum culling. This may affect " "some editor features. For this reason, you can turn the portal culling on " "and off, using either the **View Portal Culling** toggle in the **View** " "menu on the editor toolbar (which also has a keyboard shortcut), or via the " "**Active** setting in the RoomManager node." msgstr "" #: ../../docs/tutorials/3d/portals/first_steps_with_rooms_and_portals.rst:18 msgid "" "To use the RoomManager, you have to tell it where the rooms are in your " "scene tree, or rather where the RoomList node is. This RoomList is the " "parent of your rooms - see below. If the RoomList is not set, conversion " "will fail, and you will see a warning dialog box." msgstr "" #: ../../docs/tutorials/3d/portals/first_steps_with_rooms_and_portals.rst:23 msgid "The RoomList" msgstr "" #: ../../docs/tutorials/3d/portals/first_steps_with_rooms_and_portals.rst:25 msgid "" "Before we create any rooms, we must first create a node to be the parent of " "all the static objects, rooms, roomgroups and so on in our level. This node " "is referred to as the the ``RoomList``." msgstr "" #: ../../docs/tutorials/3d/portals/first_steps_with_rooms_and_portals.rst:29 msgid "" "The roomlist is **not** a special node type, it can just be a regular " "Spatial." msgstr "" #: ../../docs/tutorials/3d/portals/first_steps_with_rooms_and_portals.rst:31 msgid "" "You will need to assign the roomlist node in the RoomManager, so the " "RoomManager knows where to find the rooms." msgstr "" #: ../../docs/tutorials/3d/portals/first_steps_with_rooms_and_portals.rst:33 msgid "" "Why do we use a specific branch of the scene tree, and not use the scene " "root? The answer is that there are many internal details of the system which " "are easier to manage if the rooms are placed on their own branch." msgstr "" #: ../../docs/tutorials/3d/portals/first_steps_with_rooms_and_portals.rst:35 msgid "" "Often, you will end up completely replacing the roomlist branch at runtime " "in your game as you load and unload levels." msgstr "" #: ../../docs/tutorials/3d/portals/first_steps_with_rooms_and_portals.rst:38 msgid "Rooms" msgstr "" #: ../../docs/tutorials/3d/portals/first_steps_with_rooms_and_portals.rst:41 msgid "What is a room?" msgstr "" #: ../../docs/tutorials/3d/portals/first_steps_with_rooms_and_portals.rst:43 msgid "" ":ref:`Room`\\ s are a way of spatially partitioning your level " "into areas that make sense in terms of the level design. Rooms often quite " "literally *are* rooms (for instance in a building). Ultimately though, as " "far as the engine is concerned, a room respresents a **non-overlapping** " "convex volume, in which you would typically place most of your objects that " "fall within that area." msgstr "" #: ../../docs/tutorials/3d/portals/first_steps_with_rooms_and_portals.rst:45 msgid "" "A room doesn't need to correspond to a literal room. It could for example " "also be a canyon in an outdoor area, or a smaller part of a concave room. " "With a little imagination, you can use the system in almost any scenario." msgstr "" #: ../../docs/tutorials/3d/portals/first_steps_with_rooms_and_portals.rst:48 msgid "Why convex?" msgstr "" #: ../../docs/tutorials/3d/portals/first_steps_with_rooms_and_portals.rst:50 msgid "" "The reason why rooms are defined as convex volumes (or *convex hulls* as " "they are known), is that mathematically, it is very easy to determine " "whether a point is within a convex hull. A simple plane check will tell you " "the distance of a point from a plane. If a point is behind all the planes " "bounding the convex hull, then by definition, it is inside the room. This " "makes all kinds of things easier in the internals of the system, such as " "checking which room a camera is within." msgstr "" #: ../../docs/tutorials/3d/portals/first_steps_with_rooms_and_portals.rst:52 msgid "" "*A convex hull. The hull is defined as a series of planes facing outward. If " "a point is behind all the planes, it is within the hull.*" msgstr "" #: ../../docs/tutorials/3d/portals/first_steps_with_rooms_and_portals.rst:57 msgid "Why non-overlapping?" msgstr "" #: ../../docs/tutorials/3d/portals/first_steps_with_rooms_and_portals.rst:59 msgid "" "If two rooms overlap, and a camera or player is in this overlapping zone, " "then there is no way to tell which room the object should be in (and hence " "render from), or be rendered in. This requirement for non-overlapping rooms " "does have implications for level design." msgstr "" #: ../../docs/tutorials/3d/portals/first_steps_with_rooms_and_portals.rst:61 msgid "" "If you accidentally create overlapping rooms, the editor will flag a warning " "when you convert the rooms, and indicate any overlapping zones in red." msgstr "" #: ../../docs/tutorials/3d/portals/first_steps_with_rooms_and_portals.rst:65 msgid "" "The system does attempt to cope with overlapping rooms as best as possible " "by making the current room *\"sticky\"*. Each object remembers which room it " "was in last frame, and stays within it as long as it does not move outside " "the convex hull room bound. This can result in some hysteresis in these " "overlapping zones." msgstr "" #: ../../docs/tutorials/3d/portals/first_steps_with_rooms_and_portals.rst:67 msgid "" "There is one exception however for :ref:`internal " "rooms`. You do not have to worry about " "these to start with." msgstr "" #: ../../docs/tutorials/3d/portals/first_steps_with_rooms_and_portals.rst:70 #, fuzzy msgid "How do I create a room?" msgstr "Làm sao để mở rộng Godot?" #: ../../docs/tutorials/3d/portals/first_steps_with_rooms_and_portals.rst:72 msgid "" "A :ref:`Room` is a node type that can be added to the scene tree " "like any other. You can place objects within the room by making them " "children and grand-children of the Room node." msgstr "" #: ../../docs/tutorials/3d/portals/first_steps_with_rooms_and_portals.rst:75 msgid "How do I define the shape and position of my room convex hull?" msgstr "" #: ../../docs/tutorials/3d/portals/first_steps_with_rooms_and_portals.rst:77 msgid "" "Because defining the room bound is the most important aspect of the system, " "there are THREE methods available to define the shape of a room in Godot:" msgstr "" #: ../../docs/tutorials/3d/portals/first_steps_with_rooms_and_portals.rst:79 msgid "" "Use the geometry of the objects contained within the room to automatically " "create an approximate bound." msgstr "" #: ../../docs/tutorials/3d/portals/first_steps_with_rooms_and_portals.rst:80 msgid "" "By manually editing the points that define the convex hull, in the room " "inspector, or dragging the points using the editor gizmo (see :ref:" "`doc_room_point_editing`)." msgstr "" #: ../../docs/tutorials/3d/portals/first_steps_with_rooms_and_portals.rst:81 msgid "" "Provide a manual bound. This is a MeshInstance in the room that has geometry " "in the shape of the desired bound, with a name with a postfix ``-bound``. " "This is something you might choose to do if you create your levels in " "Blender or similar (see :ref:`doc_rooms_and_portals_blender`)." msgstr "" #: ../../docs/tutorials/3d/portals/first_steps_with_rooms_and_portals.rst:83 msgid "" "While the first option can be all that is required, particularly with simple " "rooms, or for pre-production, the power of the manual bounds gives you " "ultimate control (at the expense of a small amount of editing). You can also " "combine the two approaches, perhaps using automatic bounds for most rooms " "but manually editing problem areas." msgstr "" #: ../../docs/tutorials/3d/portals/first_steps_with_rooms_and_portals.rst:85 msgid "The automatic method is used whenever a manual bound is not supplied." msgstr "" #: ../../docs/tutorials/3d/portals/first_steps_with_rooms_and_portals.rst:87 msgid "" "*A simple pair of rooms. The portal margin is shown with translucent red, " "and the room hulls are shown with green wireframe.*" msgstr "" #: ../../docs/tutorials/3d/portals/first_steps_with_rooms_and_portals.rst:92 #: ../../docs/tutorials/3d/portals/editing_rooms_and_portals.rst:43 #: ../../docs/tutorials/3d/portals/editing_rooms_and_portals.rst:119 msgid "Portals" msgstr "" #: ../../docs/tutorials/3d/portals/first_steps_with_rooms_and_portals.rst:94 msgid "" "If you create some rooms, place objects within them, then convert the level " "in the editor, you will see the objects in the rooms appearing and showing " "as you move between rooms. There is one problem however! Although you can " "see the objects within the room that the camera is in, you can't see to any " "neighbouring rooms! For that we need portals." msgstr "" #: ../../docs/tutorials/3d/portals/first_steps_with_rooms_and_portals.rst:96 msgid "" ":ref:`Portal`\\ s are special convex polygons. You position " "over the openings between rooms, in order to allow the system to see between " "them. You can create a portal node directly in the editor. The default " "portal has 4 points and behaves much like a ``plane`` :ref:" "`MeshInstance`. You can add or remove points using the " "inspector. A portal will require at least 3 points to work - this is because " "it needs to form a polygon rather than a point or line." msgstr "" #: ../../docs/tutorials/3d/portals/first_steps_with_rooms_and_portals.rst:98 msgid "" "To save editing effort, **only one Portal is required between each pair of " "Rooms**. You *do not need* to (and indeed should not) create two Portals " "that overlap in opposite directions. Portals default to being two-way (but " "you can make them one-way in the Portal inspector)." msgstr "" #: ../../docs/tutorials/3d/portals/first_steps_with_rooms_and_portals.rst:100 msgid "" "You should therefore place a portal in only one of each pair of neighbouring " "rooms - this is the portal's *\"source room\"*. Generally it doesn't matter " "which you choose as the source room. The portal normal (the arrow in the " "gizmo) should face *outward* from the source room." msgstr "" #: ../../docs/tutorials/3d/portals/first_steps_with_rooms_and_portals.rst:104 msgid "" "Do not be confused by the arrow. Although the arrow shows which direction " "the portal faces, most portals will be *two-way*, and can be seen through " "from both directions. The arrow is more important for ensuring that the " "portal links to the correct neighbouring room." msgstr "" #: ../../docs/tutorials/3d/portals/first_steps_with_rooms_and_portals.rst:107 msgid "Portal linking" msgstr "" #: ../../docs/tutorials/3d/portals/first_steps_with_rooms_and_portals.rst:109 msgid "" "There are two options for dealing with specifying which room the portal " "should link to." msgstr "" #: ../../docs/tutorials/3d/portals/first_steps_with_rooms_and_portals.rst:111 msgid "" "Leave the **Linked Room** in the inspector blank. The system will attempt to " "*autolink* the portal to the nearest neighbour room during conversion. This " "works fine in most cases." msgstr "" #: ../../docs/tutorials/3d/portals/first_steps_with_rooms_and_portals.rst:112 msgid "" "You can explicitly specify the room by setting the **Linked Room** in the " "inspector." msgstr "" #: ../../docs/tutorials/3d/portals/first_steps_with_rooms_and_portals.rst:114 msgid "" "Portals are defined as a set of 2D points. This ensures that the polygon " "formed is in a single plane. The transform determines the portal " "orientation. The points must also form a *convex* polygon. This is enforced " "by validating the points you specify, ignoring any that do not form a convex " "shape. This makes editing easier while making it difficult to break the " "system." msgstr "" #: ../../docs/tutorials/3d/portals/first_steps_with_rooms_and_portals.rst:117 msgid "Trying it out" msgstr "" #: ../../docs/tutorials/3d/portals/first_steps_with_rooms_and_portals.rst:119 msgid "" "By now you should be able to create a couple of rooms, add some nodes such " "as MeshInstances within the rooms, and add a portal between the rooms. Try " "converting the rooms in the editor, and see if you can now see the objects " "in neighbouring rooms, through the portal." msgstr "" #: ../../docs/tutorials/3d/portals/first_steps_with_rooms_and_portals.rst:123 msgid "You have now mastered the basic principles of the system." msgstr "" #: ../../docs/tutorials/3d/portals/first_steps_with_rooms_and_portals.rst:125 msgid "" "The next step is to look at the different types of objects that can be " "managed by the system." msgstr "" #: ../../docs/tutorials/3d/portals/using_objects_in_rooms_and_portals.rst:2 msgid "Using objects in Rooms and Portals" msgstr "" #: ../../docs/tutorials/3d/portals/using_objects_in_rooms_and_portals.rst:4 msgid "" "Normally, when you use Godot, all objects that you can see (:ref:" "`VisualInstance`\\ s) are treated in the same way by " "the engine. The portal renderer is slightly different, in that it makes a " "distinction between the different roles objects will have in your game. It " "makes this distinction to define the :ref:`Room`\\ s, and to " "render and process everything in the most efficient way." msgstr "" #: ../../docs/tutorials/3d/portals/using_objects_in_rooms_and_portals.rst:7 msgid "Portal mode" msgstr "" #: ../../docs/tutorials/3d/portals/using_objects_in_rooms_and_portals.rst:9 msgid "" "If you look in the inspector, every VisualInstance in Godot is derived from " "a :ref:`CullInstance`, where you can set a " "``PortalMode``. This determines how objects will behave in the portal system." msgstr "" #: ../../docs/tutorials/3d/portals/using_objects_in_rooms_and_portals.rst:14 msgid "STATIC" msgstr "" #: ../../docs/tutorials/3d/portals/using_objects_in_rooms_and_portals.rst:16 msgid "" "The default mode for objects is ``STATIC``. Static objects are objects " "within rooms that will not move throughout the lifecycle of the level. " "Things like floors, walls, ceilings are good candidates for ``STATIC`` " "objects." msgstr "" #: ../../docs/tutorials/3d/portals/using_objects_in_rooms_and_portals.rst:19 msgid "DYNAMIC" msgstr "" #: ../../docs/tutorials/3d/portals/using_objects_in_rooms_and_portals.rst:21 msgid "" "Dynamic mode is for objects that are expected to move during the game. But " "there is a limitation - **they must not move outside of their original " "room**. These objects are handled very efficiently by the system. Examples " "might include moving platforms, and elevators." msgstr "" #: ../../docs/tutorials/3d/portals/using_objects_in_rooms_and_portals.rst:24 msgid "ROAMING" msgstr "" #: ../../docs/tutorials/3d/portals/using_objects_in_rooms_and_portals.rst:26 msgid "" "Roaming mode is for objects that can move between rooms. Things like players " "and enemies should be marked as roaming. These are more expensive to " "calculate than ``STATIC`` or ``DYNAMIC`` modes, because the system has to " "keep track of which room a roaming object is within." msgstr "" #: ../../docs/tutorials/3d/portals/using_objects_in_rooms_and_portals.rst:29 msgid "GLOBAL" msgstr "" #: ../../docs/tutorials/3d/portals/using_objects_in_rooms_and_portals.rst:31 msgid "" "Global mode is for objects that you don't want occlusion culled at all. " "Things like a main player's weapon, bullets and some particle effects are " "good candidates for ``GLOBAL`` mode." msgstr "" #: ../../docs/tutorials/3d/portals/using_objects_in_rooms_and_portals.rst:34 msgid "IGNORE" msgstr "" #: ../../docs/tutorials/3d/portals/using_objects_in_rooms_and_portals.rst:36 msgid "" "Ignore is a special mode for objects that will be essentially free in the " "system. Manual bounds (``-bound``) get converted to ignore portal mode " "automatically. They don't need to show up during the game, but are kept in " "the scene tree in case you need to convert the level multiple times (e.g. in " "the Editor). You might also choose to use this for objects that you *only* " "want to show up in the editor (when RoomManager is inactive)." msgstr "" #: ../../docs/tutorials/3d/portals/using_objects_in_rooms_and_portals.rst:39 msgid "Should you place objects within rooms (in the scene tree) or not?" msgstr "" #: ../../docs/tutorials/3d/portals/using_objects_in_rooms_and_portals.rst:41 msgid "" "``STATIC`` and ``DYNAMIC`` objects are ideally placed within rooms in the " "scene tree. The system needs to know which room they are in during " "conversion as it assumes they will never change room. Placing them within " "rooms in the scene tree allows you to explicitly tell the system where you " "want them." msgstr "" #: ../../docs/tutorials/3d/portals/using_objects_in_rooms_and_portals.rst:44 #, fuzzy msgid "Autoplace" msgstr "Thay thế" #: ../../docs/tutorials/3d/portals/using_objects_in_rooms_and_portals.rst:46 msgid "" "However, for ease of use, it is also possible to place ``STATIC`` and " "``DYNAMIC`` objects *outside* the rooms in the scene tree, but within the " "RoomList branch. The system will attempt to **autoplace** the objects into " "the appropriate room. This works in most cases but if in doubt, use the " "explicit approach. The explicit approach is especially needed when dealing " "with internal rooms, which have some restrictions for sprawling objects." msgstr "" #: ../../docs/tutorials/3d/portals/using_objects_in_rooms_and_portals.rst:50 msgid "" "Note that if you place ``STATIC`` and ``DYNAMIC`` objects outside of rooms, " "they will not contribute to the room bound. If you are using the room " "geometry to derive the bound, tables and chairs can be placed outside the " "room. However, walls and floors should be explicitly within the Room's " "branch of the scene tree to ensure the bound is correct." msgstr "" #: ../../docs/tutorials/3d/portals/using_objects_in_rooms_and_portals.rst:52 msgid "" "``ROAMING`` and ``GLOBAL`` objects are recommended to be kept in a branch of " "the scene tree outside of any rooms or the RoomList. They *can* be placed " "inside the rooms, but to save confusion, they are normally better kept on " "their own branch. There are no restrictions on the placement of ``IGNORE`` " "objects." msgstr "" #: ../../docs/tutorials/3d/portals/using_objects_in_rooms_and_portals.rst:55 msgid "Object Lifetimes" msgstr "" #: ../../docs/tutorials/3d/portals/using_objects_in_rooms_and_portals.rst:57 msgid "" "It is important to note that the lifetime of ``STATIC`` and ``DYNAMIC`` " "objects is tied to the lifetime of the level, between when you call " "``rooms_convert()`` to activate the portal system, and calling " "``rooms_clear()`` to unload the system. This is because quite a bit of pre-" "processing goes on during the conversion phase in order to render them " "efficiently." msgstr "" #: ../../docs/tutorials/3d/portals/using_objects_in_rooms_and_portals.rst:59 msgid "" "You should therefore not try to create or delete ``STATIC`` or ``DYNAMIC`` " "objects while the portal system is active. Doing so will cause the system to " "automatically unload because it is in an invalid state. You can however, " "freely ``show()`` and ``hide()`` these objects." msgstr "" #: ../../docs/tutorials/3d/portals/using_objects_in_rooms_and_portals.rst:61 #, fuzzy msgid "The sequence should be therefore:" msgstr "Scene tree nên trông như thế này:" #: ../../docs/tutorials/3d/portals/using_objects_in_rooms_and_portals.rst:63 msgid "Load your level." msgstr "" #: ../../docs/tutorials/3d/portals/using_objects_in_rooms_and_portals.rst:64 msgid "Place any ``STATIC`` or ``DYNAMIC`` objects." msgstr "" #: ../../docs/tutorials/3d/portals/using_objects_in_rooms_and_portals.rst:65 msgid "" "Then run ``rooms_convert()`` *after* all the ``STATIC`` and ``DYNAMIC`` " "objects were added to the scene tree." msgstr "" #: ../../docs/tutorials/3d/portals/using_objects_in_rooms_and_portals.rst:67 msgid "" "Objects that are ``ROAMING``, ``GLOBAL`` or ``IGNORE`` can be freely created " "and deleted as required." msgstr "" #: ../../docs/tutorials/3d/portals/using_objects_in_rooms_and_portals.rst:70 msgid "Sprawling" msgstr "" #: ../../docs/tutorials/3d/portals/using_objects_in_rooms_and_portals.rst:72 msgid "" "Although users can usually ignore the internals of the portal system, they " "should be aware that it is capable of handling objects that are so big they " "end up in more than one room. Each object has a central room, but using the " "AABB or geometry the system can detect when an object extends across a " "portal into a neighbouring room (or several rooms). This is referred to as " "**sprawling**." msgstr "" #: ../../docs/tutorials/3d/portals/using_objects_in_rooms_and_portals.rst:74 msgid "" "This means that if the corner of an object extends into a neighbouring room, " "but the object's main room is not showing (e.g. a train where the end is in " "a different room), the object will not be culled, and will still be shown. " "The object will only be culled if it is not present in any of the rooms that " "are visible." msgstr "" #: ../../docs/tutorials/3d/portals/using_objects_in_rooms_and_portals.rst:77 msgid "Portal Margins" msgstr "" #: ../../docs/tutorials/3d/portals/using_objects_in_rooms_and_portals.rst:79 msgid "" "It is hard to place objects exactly at the edges of rooms, and if we chose " "to sprawl objects to the adjacent room the moment a portal was crossed (even " "by a very small amount), there would be an unnecessary amount of sprawling, " "and objects would end up being rendered when not really required. To counter " "this, portals have an adjustable ``margin`` over which an object can cross " "without being considered in the next room. The margin is shown in the editor " "gizmo as a red translucent area." msgstr "" #: ../../docs/tutorials/3d/portals/using_objects_in_rooms_and_portals.rst:81 msgid "" "You can set the margin globally in the RoomManager. You can also override " "this margin value in any portal if you need to finetune things. As you edit " "the margin values in the inspector, you should see the margins update in the " "3D editor viewport." msgstr "" #: ../../docs/tutorials/3d/portals/using_objects_in_rooms_and_portals.rst:84 msgid "Include in Bound" msgstr "" #: ../../docs/tutorials/3d/portals/using_objects_in_rooms_and_portals.rst:86 msgid "" "The support for objects that are larger than a single room has one side " "effect. You may not want to include some objects in the calculation of the " "automatic room bound. You can turn this on and off in the inspector for each " "object. See **Cull Instance > Include In Bound**." msgstr "" #: ../../docs/tutorials/3d/portals/using_objects_in_rooms_and_portals.rst:88 msgid "" "While sprawling works great for large moving objects, it also gives you a " "lot more leeway in level design. You can for instance create a large terrain " "section and have it present in multiple rooms, without having to split up " "the mesh." msgstr "" #: ../../docs/tutorials/3d/portals/using_objects_in_rooms_and_portals.rst:91 msgid "Lighting" msgstr "" #: ../../docs/tutorials/3d/portals/using_objects_in_rooms_and_portals.rst:93 msgid "" "In general lights are handled like any other visual instance. They can be " "placed in rooms, and they will sprawl to affect neighbouring rooms, " "following the dimensions and direction of the light. The exception to this " "is :ref:`DirectionalLight`\\ s. DirectionalLights " "have no source room as they affect *everywhere*. They should therefore not " "be placed in a room. As DirectionalLights can be expensive, it is a good " "idea to turn them off when inside, see the later :ref:" "`doc_rooms_and_portals_roomgroups` section for details on how to do this." msgstr "" #: ../../docs/tutorials/3d/portals/using_objects_in_rooms_and_portals.rst:95 msgid "" "Congratulations! You have now mastered the intermediate techniques required " "to use rooms and portals. You can use these to make games already, but there " "are many more features." msgstr "" #: ../../docs/tutorials/3d/portals/advanced_room_and_portal_usage.rst:2 msgid "Advanced Room and Portal usage" msgstr "" #: ../../docs/tutorials/3d/portals/advanced_room_and_portal_usage.rst:5 msgid "Gameplay callbacks" msgstr "" #: ../../docs/tutorials/3d/portals/advanced_room_and_portal_usage.rst:7 msgid "" "Although occlusion culling greatly reduces the number of objects that need " "to be rendered, there are other costs to maintaining objects in a game " "besides the final rendering. For instance, in Godot, animated objects will " "still be animated whether they appear on screen or not. This can take up a " "lot of processing power, especially for objects that use software skinning " "(where skinning is calculated on the CPU)." msgstr "" #: ../../docs/tutorials/3d/portals/advanced_room_and_portal_usage.rst:9 msgid "Fear not, rooms and portals can solve these problems, and more." msgstr "" #: ../../docs/tutorials/3d/portals/advanced_room_and_portal_usage.rst:11 msgid "" "By building our system of rooms for our game level, not only do we have the " "information needed for occlusion culling, we also have handily created the " "information required to know which rooms are in the local \"gameplay area\" " "of the player (or camera). If you think about it, in a lot of cases, there " "is no need to do a lot of simulation on objects that have nothing to do with " "gameplay." msgstr "" #: ../../docs/tutorials/3d/portals/advanced_room_and_portal_usage.rst:13 msgid "" "The gameplay area is not confined to just the objects you can see in front " "of you. AI monsters behind you still need to attack you when your back is " "turned! In Godot the gameplay area is defined as the *potentially visible " "set* (PVS) of rooms, from the room you are currently within. That is, if " "there is any part of a room that can possibly be viewed from any part of the " "room you are in (even from a corner), it is considered within the PVS, and " "hence the gameplay area." msgstr "" #: ../../docs/tutorials/3d/portals/advanced_room_and_portal_usage.rst:15 msgid "" "This works because if a monster is in an area that is completely out of view " "for yourself or the monster, you are less likely to care what it is doing." msgstr "" #: ../../docs/tutorials/3d/portals/advanced_room_and_portal_usage.rst:18 msgid "How does a monster know whether it is within the gameplay area?" msgstr "" #: ../../docs/tutorials/3d/portals/advanced_room_and_portal_usage.rst:20 msgid "" "This problem is solved because the portal system contains a subsystem called " "the **Gameplay Monitor** that can be turned on and off from the :ref:" "`RoomManager`. When switched on, any roaming objects that " "move inside or outside the gameplay area (whether by moving themselves, or " "the camera moving) will receive callbacks to let them know of this change." msgstr "" #: ../../docs/tutorials/3d/portals/advanced_room_and_portal_usage.rst:22 msgid "" "You can choose to either receive these callbacks as ``signals``, or as " "``notifications``." msgstr "" #: ../../docs/tutorials/3d/portals/advanced_room_and_portal_usage.rst:24 msgid "Notifications can be handled in GDScript or other scripting languages:" msgstr "" #: ../../docs/tutorials/3d/portals/advanced_room_and_portal_usage.rst:35 msgid "" "Signals are sent just as any other signal. They can be attached to functions " "using the editor inspector. The signals are called ``gameplay_entered`` and " "``gameplay_exited``." msgstr "" #: ../../docs/tutorials/3d/portals/advanced_room_and_portal_usage.rst:37 msgid "" "In fact, you don't just receive these callbacks for ``ROAMING`` objects. In " "addition Rooms and RoomGroups (which can be used to form groups of rooms) " "can also receive callbacks. For example, you can use this to trigger AI " "behaviour when the player reaches certain points in a level." msgstr "" #: ../../docs/tutorials/3d/portals/advanced_room_and_portal_usage.rst:40 #, fuzzy msgid "VisbilityNotifiers / VisibilityEnablers" msgstr "" ":ref:`VisibilityNotifier2D ` (tên là " "``Visibility``)" #: ../../docs/tutorials/3d/portals/advanced_room_and_portal_usage.rst:42 msgid "" "Gameplay callbacks have one more useful function. By default in Godot, " "animation and physics are still processed regardless of whether an object is " "within view. This can sap performance, especially when using software " "skinning." msgstr "" #: ../../docs/tutorials/3d/portals/advanced_room_and_portal_usage.rst:44 msgid "" "The engine's solution to this problem is the :ref:" "`VisibilityNotifier` node, and its slightly easier " "to use variation, the :ref:`VisibilityEnabler` " "node. VisibilityEnabler can be used to switch off animation and sleep " "physics when an object is outside the view frustum. You do this by simply " "placing a VisibilityEnabler node in your subscene (for e.g. a monster). It " "will do the rest. Consult the :ref:" "`VisibilityEnabler` documentation for full details." msgstr "" #: ../../docs/tutorials/3d/portals/advanced_room_and_portal_usage.rst:48 msgid "" "What if the VisibilityEnabler could turn off objects when they were " "occlusion culled? Well it turns out VisibilityEnabler can. All you have to " "do is enable the **Gameplay Monitor** in the RoomManager and the rest " "happens automatically." msgstr "" #: ../../docs/tutorials/3d/portals/advanced_room_and_portal_usage.rst:53 #, fuzzy msgid "RoomGroups" msgstr "Nhóm" #: ../../docs/tutorials/3d/portals/advanced_room_and_portal_usage.rst:55 msgid "" "A :ref:`RoomGroup` is a special node which allows you to " "deal with a group of rooms at once, instead of having write code for them " "individually. This is especially useful in conjunction with gameplay " "callbacks. The most important use for RoomGroups is to delineate between " "\"inside\" and \"outside\" areas." msgstr "" #: ../../docs/tutorials/3d/portals/advanced_room_and_portal_usage.rst:59 msgid "" "For instance, when outside you may wish to use a :ref:" "`DirectionalLight` to represent the sun. When the " "outside RoomGroup receives an ``enter gameplay`` callback, you can turn the " "light on, and you can turn it off when the RoomGroup exits gameplay. With " "the light off, performance will increase as there is no need to render it " "indoors." msgstr "" #: ../../docs/tutorials/3d/portals/advanced_room_and_portal_usage.rst:61 msgid "" "This is an example of a simple RoomGroup script to turn on and off a " "DirectionalLight. Note that you can also use signals for callbacks (the " "choice is up to you):" msgstr "" #: ../../docs/tutorials/3d/portals/advanced_room_and_portal_usage.rst:65 msgid "" "You can apply the same technique for switching on and off weather effects, " "skyboxes and much more." msgstr "" #: ../../docs/tutorials/3d/portals/advanced_room_and_portal_usage.rst:70 msgid "Internal Rooms" msgstr "" #: ../../docs/tutorials/3d/portals/advanced_room_and_portal_usage.rst:72 msgid "" "There is one more trick that RoomGroups have up their sleeve. A very common " "desire is to have a game level with a mixed outdoor and indoor environment. " "We have already mentioned that rooms can be used to represent both rooms in " "a building, and areas of landscape, such as a canyon." msgstr "" #: ../../docs/tutorials/3d/portals/advanced_room_and_portal_usage.rst:75 msgid "What happens if you wish to have a house in a terrain 'room'?" msgstr "" #: ../../docs/tutorials/3d/portals/advanced_room_and_portal_usage.rst:77 msgid "" "With the functionality described so far you *can* do it - you would need to " "place portals around the exterior of the house though, forming needless " "rooms above the house. This has been done in many games. But what if there " "was a simpler way?" msgstr "" #: ../../docs/tutorials/3d/portals/advanced_room_and_portal_usage.rst:79 msgid "" "It turns out there is a simpler way of handling this scenario. Godot " "supports *rooms **within** rooms* (we will call them **\"internal " "rooms\"**). That is, you can place a house within a terrain room, or even a " "building, or set of buildings, and even have exit portals in different " "terrain rooms!" msgstr "" #: ../../docs/tutorials/3d/portals/advanced_room_and_portal_usage.rst:81 msgid "" "To create internal rooms, you don't need to place a room within another room " "in the scene tree - in fact you will get a warning if you try this. Instead, " "create them as regular rooms. The internal rooms should be grouped together " "with a RoomGroup as parent. If you look in the inspector for the RoomGroup, " "there is a **Room Group Priority** which defaults to ``0``." msgstr "" #: ../../docs/tutorials/3d/portals/advanced_room_and_portal_usage.rst:83 msgid "" "If you want a room or set of rooms to be internal, set the priority to a " "higher value than the outer (enclosing) room, using the RoomGroup." msgstr "" #: ../../docs/tutorials/3d/portals/advanced_room_and_portal_usage.rst:85 msgid "" "The system uses the priority setting to give priority to the internal room " "when deciding which room a camera or object is within. Higher priority " "*always* wins. Everything else works in a mostly similar way." msgstr "" #: ../../docs/tutorials/3d/portals/advanced_room_and_portal_usage.rst:87 msgid "The only differences:" msgstr "" #: ../../docs/tutorials/3d/portals/advanced_room_and_portal_usage.rst:89 msgid "" "Portals between internal rooms and outer rooms should always *be placed in " "the inner (internal) room*." msgstr "" #: ../../docs/tutorials/3d/portals/advanced_room_and_portal_usage.rst:90 msgid "" "Portals of internal rooms are not considered as part of the bound of outer " "rooms." msgstr "" #: ../../docs/tutorials/3d/portals/advanced_room_and_portal_usage.rst:91 msgid "" "``STATIC`` and ``DYNAMIC`` objects from outer rooms will not sprawl into " "internal rooms. If you want objects to cross these portals, place them in " "the internal room. This is to prevent large objects like terrain sections " "sprawling into entire buildings, and rendering when not necessary." msgstr "" #: ../../docs/tutorials/3d/portals/advanced_room_and_portal_usage.rst:94 #, fuzzy msgid "Internal room example" msgstr "Ví dụ về instance" #: ../../docs/tutorials/3d/portals/advanced_room_and_portal_usage.rst:96 msgid "" "The tent is a simple room inside a terrain room (which contains the ground, " "the trees etc)." msgstr "" #: ../../docs/tutorials/3d/portals/advanced_room_and_portal_usage.rst:100 msgid "" "To use internal rooms for buildings, it is usually a good idea to split the " "*interior* mesh of the building from the *exterior*. The exterior can be " "placed in the outer room (so it can be seen from outside, but not from the " "inside), and the interior should be placed in the interior room (so it only " "visible inside, or through the portal)." msgstr "" #: ../../docs/tutorials/3d/portals/advanced_room_and_portal_usage.rst:104 msgid "" "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." msgstr "" #: ../../docs/tutorials/3d/portals/advanced_room_and_portal_usage.rst:106 msgid "" "*Scene is 'Diorama Eco scene' by Odo, with slight changes for illustration " "purposes.* `CC Attribution `_" msgstr "" #: ../../docs/tutorials/3d/portals/advanced_room_and_portal_usage.rst:109 msgid "Internal room scenes" msgstr "" #: ../../docs/tutorials/3d/portals/advanced_room_and_portal_usage.rst:111 msgid "" "Let us look in detail at another practical example for an open world. We " "want to place houses (as internal rooms) on an island, but have each house " "as a self-contained scene containing both the interior *and* the external " "mesh of the house." msgstr "" #: ../../docs/tutorials/3d/portals/advanced_room_and_portal_usage.rst:115 msgid "" "We have created a Room node (which will become the internal room) into which " "we have placed the interior meshes. We have also created a Portal with no " "links (so autolinking will be used). The exterior mesh is *not* within the " "room. It will be autoplaced, and we are intending for it to be placed within " "the outer room." msgstr "" #: ../../docs/tutorials/3d/portals/advanced_room_and_portal_usage.rst:117 msgid "" "However there is a problem. The naive autoplace algorithm will look at the " "center of the exterior mesh, and attempt to place it *within* the internal " "room. We want to avoid this somehow, as the idea of the exterior mesh is to " "have something rendered from the outside, so it must be in the outer room " "for everything to work." msgstr "" #: ../../docs/tutorials/3d/portals/advanced_room_and_portal_usage.rst:119 msgid "" "To get around this problem, there is a special setting to enable you to " "express a preference for autoplacing in an outer room. Each object has an " "**Autoplace Priority** setting. When set to ``0``, there is no preference " "(the object will be placed in the highest priority room)." msgstr "" #: ../../docs/tutorials/3d/portals/advanced_room_and_portal_usage.rst:121 msgid "" "However, if we set this autoplace priority to ``-1`` for example, the " "autoplace will always choose a ``-1`` priority room (if one is present at " "that location). So if we set the outer room priority to ``-1``, it will " "always place our exterior into our \"outside\" room." msgstr "" #: ../../docs/tutorials/3d/portals/advanced_room_and_portal_usage.rst:125 msgid "" "This gives us a helpful extra bit of control for these kinds of situations, " "and makes the entire system much more flexible." msgstr "" #: ../../docs/tutorials/3d/portals/advanced_room_and_portal_usage.rst:127 msgid "" "As the default autoplace priority is ``0``, you can't effectively force " "objects into RoomGroups with priority ``0``. However there are plenty of " "priority values available so this should not be a problem in practice." msgstr "" #: ../../docs/tutorials/3d/portals/advanced_room_and_portal_usage.rst:129 msgid "" "The final scene looks something like this, with houses instanced wherever " "you want them on a giant outer room." msgstr "" #: ../../docs/tutorials/3d/portals/advanced_room_and_portal_usage.rst:133 msgid "" "The house exteriors will be placed in the outer room, and therefore can " "always be seen when looking from the outside. The interiors will only be " "rendered when a view into the entry portals is visible." msgstr "" #: ../../docs/tutorials/3d/portals/editing_rooms_and_portals.rst:2 #, fuzzy msgid "Editing Rooms and Portals" msgstr "Chỉnh sửa instance" #: ../../docs/tutorials/3d/portals/editing_rooms_and_portals.rst:5 msgid "Example SceneTree" msgstr "" #: ../../docs/tutorials/3d/portals/editing_rooms_and_portals.rst:7 msgid "Putting all the ideas together, here is an example scene tree:" msgstr "" #: ../../docs/tutorials/3d/portals/editing_rooms_and_portals.rst:11 msgid "" "We have used a :ref:`RoomGroup` to denote an outside area." msgstr "" #: ../../docs/tutorials/3d/portals/editing_rooms_and_portals.rst:12 msgid "" "The :ref:`MeshInstance`\\ s inside the :ref:" "`Room`\\ s are either ``STATIC`` or ``DYNAMIC``." msgstr "" #: ../../docs/tutorials/3d/portals/editing_rooms_and_portals.rst:13 msgid "" "We have created a :ref:`Spatial` (I decided to call it " "'Freeform', but you could use any name) under which to place ``STATIC`` and " "``DYNAMIC`` objects that will be autoplaced in rooms (Freeform is inside the " "``roomlist``, but *not* inside a room.)" msgstr "" #: ../../docs/tutorials/3d/portals/editing_rooms_and_portals.rst:15 msgid "The player and the monsters are on branches *OUTSIDE* the ``roomlist``." msgstr "" #: ../../docs/tutorials/3d/portals/editing_rooms_and_portals.rst:16 msgid "" "The player and monster meshes have portal mode ``ROAMING`` so they can be in " "any room." msgstr "" #: ../../docs/tutorials/3d/portals/editing_rooms_and_portals.rst:17 msgid "The camera is outside the ``roomlist``." msgstr "" #: ../../docs/tutorials/3d/portals/editing_rooms_and_portals.rst:22 msgid "Creating room systems in Blender (or other modeling tools)" msgstr "" #: ../../docs/tutorials/3d/portals/editing_rooms_and_portals.rst:24 msgid "" "Although you can create your room system entirely within the editor, you can " "also build rooms and portals within your modeling tool. There is one small " "snag - modeling tools such as Blender have no knowledge of Room, RoomGroup " "and Portal nodes. In order to work around this we use a series of naming " "conventions. The first time Godot encounters these specially named nodes, it " "will convert them into Rooms, RoomGroups and Portals." msgstr "" #: ../../docs/tutorials/3d/portals/editing_rooms_and_portals.rst:27 msgid "Postfix convention" msgstr "" #: ../../docs/tutorials/3d/portals/editing_rooms_and_portals.rst:29 msgid "``-room`` becomes a :ref:`Room`." msgstr "" #: ../../docs/tutorials/3d/portals/editing_rooms_and_portals.rst:30 msgid "``-roomgroup`` becomes a :ref:`RoomGroup`." msgstr "" #: ../../docs/tutorials/3d/portals/editing_rooms_and_portals.rst:31 msgid "``-portal`` becomes a :ref:`Portal`." msgstr "" #: ../../docs/tutorials/3d/portals/editing_rooms_and_portals.rst:32 msgid "``-bound`` becomes a manual bound." msgstr "" #: ../../docs/tutorials/3d/portals/editing_rooms_and_portals.rst:34 msgid "" "Rooms and RoomGroups should be created as Empties within Blender. Any mesh " "children of the ``-room`` Empty will thus be placed in the Room during " "conversion in Godot." msgstr "" #: ../../docs/tutorials/3d/portals/editing_rooms_and_portals.rst:36 #: ../../docs/development/cpp/object_class.rst:139 msgid "For example:" msgstr "" #: ../../docs/tutorials/3d/portals/editing_rooms_and_portals.rst:38 msgid "``kitchen-room`` - create a Room called \"kitchen\"." msgstr "" #: ../../docs/tutorials/3d/portals/editing_rooms_and_portals.rst:39 msgid "``outside-roomgroup`` - create a RoomGroup called \"outside\"." msgstr "" #: ../../docs/tutorials/3d/portals/editing_rooms_and_portals.rst:40 msgid "``kitchen-portal`` - create a Portal leading to the \"kitchen\" Room." msgstr "" #: ../../docs/tutorials/3d/portals/editing_rooms_and_portals.rst:45 msgid "" "Portals are different from Rooms. In Portals, we need to specify the " "geometry of the Portal in our modelling tool, in addition to just the name. " "To do this your \"portal-to-be\" should be created as a Mesh." msgstr "" #: ../../docs/tutorials/3d/portals/editing_rooms_and_portals.rst:47 msgid "" "Portal meshes have some restrictions to work properly. They must be convex, " "and the polygon points should be in the same plane. The accuracy to the " "plane does not have to be exact, as Godot will automatically average the " "direction of the portal plane. Once converted to a :ref:" "`Portal` node, the snapping to the portal plane is enforced, " "and the vertices are specified (and editable) as 2D coordinates in the " "inspector, rather than 3D points." msgstr "" #: ../../docs/tutorials/3d/portals/editing_rooms_and_portals.rst:49 msgid "" "The portal's naming is quite important. You can either name the portal ``-" "portal`` which will attempt to autolink the Portal in Godot, or you can use " "the name of the Room you wish to link the Portal to as a prefix." msgstr "" #: ../../docs/tutorials/3d/portals/editing_rooms_and_portals.rst:52 msgid "Wildcard" msgstr "" #: ../../docs/tutorials/3d/portals/editing_rooms_and_portals.rst:54 msgid "" "In most cases, this can be done using a name such as ``kitchen-portal``. " "However, there is one problem. Blender and Godot do not deal well when you " "have multiple objects with the same name. What happens when we want more " "than one Portal to lead to the kitchen?" msgstr "" #: ../../docs/tutorials/3d/portals/editing_rooms_and_portals.rst:56 msgid "" "The workaround is the use of a *wildcard* character, ``*``. When Godot reads " "the wildcard, it will ignore anything placed after it in the name." msgstr "" #: ../../docs/tutorials/3d/portals/editing_rooms_and_portals.rst:58 #, fuzzy msgid "This means we can use the following portal names:" msgstr "Cảnh Mob sẽ sử dụng các node sau:" #: ../../docs/tutorials/3d/portals/editing_rooms_and_portals.rst:60 msgid "``kitchen*1-portal`` - creates a Portal leading to the \"kitchen\"." msgstr "" #: ../../docs/tutorials/3d/portals/editing_rooms_and_portals.rst:61 msgid "" "``kitchen*2-portal`` - also creates a Portal leading to the \"kitchen\"." msgstr "" #: ../../docs/tutorials/3d/portals/editing_rooms_and_portals.rst:62 msgid "``kitchen*anything_you_want_here-portal`` - also works." msgstr "" #: ../../docs/tutorials/3d/portals/editing_rooms_and_portals.rst:64 msgid "Wildcards work on all of the nodes which use these naming conventions." msgstr "" #: ../../docs/tutorials/3d/portals/editing_rooms_and_portals.rst:67 msgid "Manual bounds" msgstr "" #: ../../docs/tutorials/3d/portals/editing_rooms_and_portals.rst:69 msgid "" "Manual bounds are a way of explicitly setting the convex hull for a room, " "and are used if they are present as children of a room in the scene tree. " "Aside from the postfix, the naming is unimportant. They should be meshes (i." "e. MeshInstance in Godot). Bear in mind they will be converted to convex " "hulls during the conversion process, so they don't have to be perfect." msgstr "" #: ../../docs/tutorials/3d/portals/editing_rooms_and_portals.rst:71 msgid "" "Once used during conversion, they will be converted to the ``IGNORE`` " "**Portal Mode** and won't be shown. You can alternatively use **Generate " "Points** within the editor to convert these to a set of points stored in the " "room, and delete the original ``-bound`` MeshInstance." msgstr "" #: ../../docs/tutorials/3d/portals/editing_rooms_and_portals.rst:74 msgid "Portal point editing" msgstr "" #: ../../docs/tutorials/3d/portals/editing_rooms_and_portals.rst:76 msgid "" "Portals are defined by a combination of the transform of the portal node, " "and by a set of points which form the corners." msgstr "" #: ../../docs/tutorials/3d/portals/editing_rooms_and_portals.rst:78 msgid "The default portal has 4 corners as shown in the inspector:" msgstr "" #: ../../docs/tutorials/3d/portals/editing_rooms_and_portals.rst:82 msgid "" "You can edit these points in the gizmo or inspector to make a better match " "to the opening in your game level. It's generally better to keep the number " "of points as low as possible for the efficiency of the system. For example, " "it's better to risk rendering a little too much than to spend the time " "culling objects at 20 different edges." msgstr "" #: ../../docs/tutorials/3d/portals/editing_rooms_and_portals.rst:87 msgid "Room point editing" msgstr "" #: ../../docs/tutorials/3d/portals/editing_rooms_and_portals.rst:89 msgid "" "You also have the option to manually edit the points used to define the " "convex hull of a room. These points are not present by default. You would " "typically create them by pressing the **Generate Points** button in the " "editor toolbar when a room is selected. This will transfer the auto bound " "from the geometry (or manual ``-bound`` mesh) into the inspector. Once there " "are points in the inspector, they will be used and override any other " "method. So if you wish to revert your manual editing, delete all the room's " "points." msgstr "" #: ../../docs/tutorials/3d/portals/editing_rooms_and_portals.rst:93 msgid "" "Manually editing points can be useful in some situations, especially where " "the auto-bound doesn't *quite* get the right result you want. It is usually " "a good idea to use a lot of **Simplification** in the inspector for the Room " "before generating the points. Be aware though that by default, the " "**Simplification** value will be inherited from the RoomManager." msgstr "" #: ../../docs/tutorials/3d/portals/editing_rooms_and_portals.rst:96 #, fuzzy msgid "RoomManager" msgstr "Project manager (Quản lý dự án)" #: ../../docs/tutorials/3d/portals/editing_rooms_and_portals.rst:99 #, fuzzy msgid "Show Debug" msgstr "Gỡ lỗi" #: ../../docs/tutorials/3d/portals/editing_rooms_and_portals.rst:101 msgid "" "This can be used to control the amount of logging, especially the room " "conversion logs. Debug will always be set to ``false`` on exported projects." msgstr "" #: ../../docs/tutorials/3d/portals/editing_rooms_and_portals.rst:104 #, fuzzy msgid "Debug Sprawl" msgstr "Trình gỡ lỗi" #: ../../docs/tutorials/3d/portals/editing_rooms_and_portals.rst:106 msgid "" "This mode will only display meshes that are sprawling through portals from " "the current camera room. Large statics that cross portals are usually the " "ones you want to sprawl. Typical examples might be terrain mesh areas, or " "large floor or ceiling meshes. You usually don't want things like door " "frames to sprawl to the adjacent room - that is what fine tuning the " "**Portal Margin** is for." msgstr "" #: ../../docs/tutorials/3d/portals/editing_rooms_and_portals.rst:109 #, fuzzy msgid "Merge Meshes" msgstr "Nhiều instance" #: ../../docs/tutorials/3d/portals/editing_rooms_and_portals.rst:111 msgid "" "To keep drawcalls to a minimum, the system offers the option to " "automatically merge similar ``STATIC`` meshes within a room (also known as " "*static batching*). This can increase performance in many cases. The culling " "accuracy is reduced, but as a room is a fairly logical unit for culling, " "this trade off usually works in your favor." msgstr "" #: ../../docs/tutorials/3d/portals/editing_rooms_and_portals.rst:114 msgid "Plane Simplification" msgstr "" #: ../../docs/tutorials/3d/portals/editing_rooms_and_portals.rst:116 msgid "" "In some cases, the convex hulls automatically generated for rooms may " "contain a very large number of planes, particularly if you use curved " "surfaces. This is not ideal because it slows down the system. This option " "can optionally simplify hulls. The degree of simplification can be selected " "by the user, between ``0`` (no simplification) and ``1`` (maximum " "simplification). You can also override this value in individual rooms." msgstr "" #: ../../docs/tutorials/3d/portals/editing_rooms_and_portals.rst:122 msgid "Portal Active" msgstr "" #: ../../docs/tutorials/3d/portals/editing_rooms_and_portals.rst:124 msgid "" "Portals can be turned on and off at runtime. This is especially useful if " "you have doors that can open and close." msgstr "" #: ../../docs/tutorials/3d/portals/editing_rooms_and_portals.rst:127 msgid "Two Way" msgstr "" #: ../../docs/tutorials/3d/portals/editing_rooms_and_portals.rst:129 msgid "" "Portals can either be two-way or one-way. The default two-way portals are " "quicker to set up in most circumstances, but one-way portals can be useful " "in some cases. For example, you can use one-way portals to create windows " "that can be seen out of, but not seen into. This can help performance when " "viewing buildings from outdoors." msgstr "" #: ../../docs/tutorials/3d/portals/editing_rooms_and_portals.rst:132 #, fuzzy msgid "Particle Systems" msgstr "Tạo các node" #: ../../docs/tutorials/3d/portals/editing_rooms_and_portals.rst:134 msgid "" "Be aware that when placing ``STATIC`` particle systems, the AABB on " "conversion may have zero size. This means the particle system may be " "unexpectedly culled early. To prevent this, either set the particle system " "``portal mode`` to ``DYNAMIC``, or alternatively, add an **Extra Cull " "Margin** to the particle system in the Geometry Inspector." msgstr "" #: ../../docs/tutorials/3d/portals/editing_rooms_and_portals.rst:137 #, fuzzy msgid "Multimeshes" msgstr "Nhiều instance" #: ../../docs/tutorials/3d/portals/editing_rooms_and_portals.rst:139 msgid "" "Note that multimeshes will be culled as a group, rather than individually. " "You should therefore attempt to keep them localised to the same area " "wherever possible." msgstr "" #: ../../docs/tutorials/3d/portals/rooms_and_portals_example.rst:2 msgid "Rooms and Portals example" msgstr "" #: ../../docs/tutorials/3d/portals/rooms_and_portals_example.rst:4 msgid "" "Download this tutorial project: `Simple Portals Example `_ ." msgstr "" #: ../../docs/tutorials/3d/portals/rooms_and_portals_example.rst:11 msgid "" "This tutorial will introduce you to building a \"Hello World\" room system " "with two rooms, and a portal in between." msgstr "" #: ../../docs/tutorials/3d/portals/rooms_and_portals_example.rst:14 #, fuzzy msgid "Step 1" msgstr "Bước vào" #: ../../docs/tutorials/3d/portals/rooms_and_portals_example.rst:18 #, fuzzy msgid "Create a new project." msgstr "Tạo một dự án mới" #: ../../docs/tutorials/3d/portals/rooms_and_portals_example.rst:19 msgid "" "Add a :ref:`Spatial` as the scene root (on the screenshot, " "it's called \"Root\")." msgstr "" #: ../../docs/tutorials/3d/portals/rooms_and_portals_example.rst:20 msgid "" "Next add a :ref:`RoomManager` node. We will need this " "later to process the room system." msgstr "" #: ../../docs/tutorials/3d/portals/rooms_and_portals_example.rst:21 msgid "" "Next we need to start defining our rooms. We create all our rooms under " "another Spatial we have called 'RoomList'." msgstr "" #: ../../docs/tutorials/3d/portals/rooms_and_portals_example.rst:22 msgid "Add a new :ref:`Room` node as a child of the roomlist." msgstr "" #: ../../docs/tutorials/3d/portals/rooms_and_portals_example.rst:23 msgid "We have named the room ``Kitchen``." msgstr "" #: ../../docs/tutorials/3d/portals/rooms_and_portals_example.rst:24 msgid "" "We will now create the geometry of our room. The names you give to the " "geometry is up to you." msgstr "" #: ../../docs/tutorials/3d/portals/rooms_and_portals_example.rst:25 msgid "" "Create a :ref:`MeshInstance` for the floor. Create a box " "by adding a CubeMesh resource to the MeshInstance. Scale and position it to " "form a floor." msgstr "" #: ../../docs/tutorials/3d/portals/rooms_and_portals_example.rst:26 msgid "" "Create MeshInstances for the walls. Create more box meshes for this, then " "scale and position them. Be sure to leave an opening on one side. You will " "need to create two wall segments to do this on that side." msgstr "" #: ../../docs/tutorials/3d/portals/rooms_and_portals_example.rst:29 #, fuzzy msgid "Step 2" msgstr "Bước vào" #: ../../docs/tutorials/3d/portals/rooms_and_portals_example.rst:33 msgid "Now we need to create the other room." msgstr "" #: ../../docs/tutorials/3d/portals/rooms_and_portals_example.rst:34 msgid "" "You can do this simply by duplicating the first room (select the ``Kitchen`` " "node, right click and choose **Duplicate**)." msgstr "" #: ../../docs/tutorials/3d/portals/rooms_and_portals_example.rst:35 msgid "Rotate and position the second room so that the openings line up." msgstr "" #: ../../docs/tutorials/3d/portals/rooms_and_portals_example.rst:36 msgid "Rename the second room to ``Lounge``." msgstr "" #: ../../docs/tutorials/3d/portals/rooms_and_portals_example.rst:39 #, fuzzy msgid "Step 3" msgstr "Bước vào" #: ../../docs/tutorials/3d/portals/rooms_and_portals_example.rst:43 msgid "Next, we will add a portal between the two rooms." msgstr "" #: ../../docs/tutorials/3d/portals/rooms_and_portals_example.rst:44 msgid "Create a new :ref:`Portal` in the kitchen." msgstr "" #: ../../docs/tutorials/3d/portals/rooms_and_portals_example.rst:45 msgid "" "Scale and position the portal using the node ``Transform`` in the inspector, " "so it fits within the opening between the two rooms." msgstr "" #: ../../docs/tutorials/3d/portals/rooms_and_portals_example.rst:46 msgid "" "The portal plane should face *outward* from the source room, i.e. towards " "the lounge. This direction is indicated by the arrow in the editor gizmo, " "and portal gizmo's color." msgstr "" #: ../../docs/tutorials/3d/portals/rooms_and_portals_example.rst:49 #, fuzzy msgid "Step 4" msgstr "Bước vào" #: ../../docs/tutorials/3d/portals/rooms_and_portals_example.rst:53 msgid "" "To make things more exciting, we want to add a few more boxes to the rooms." msgstr "" #: ../../docs/tutorials/3d/portals/rooms_and_portals_example.rst:54 msgid "" "Placing these boxes as children or grandchildren of the room nodes " "explicitly tells the system which room the objects should be in. However, we " "can also create these objects *outside* the rooms. Provided they are in the " "RoomList branch, the system will attempt to automatically place them in the " "correct room at runtime." msgstr "" #: ../../docs/tutorials/3d/portals/rooms_and_portals_example.rst:55 msgid "" "On the screenshot, the boxes were places as children of a Spatial I have " "called ``Freeform`` to keep things tidy." msgstr "" #: ../../docs/tutorials/3d/portals/rooms_and_portals_example.rst:56 msgid "" "Boxes also have a green SpatialMaterial assigned to them to make them stand " "out more from the rest of the room." msgstr "" #: ../../docs/tutorials/3d/portals/rooms_and_portals_example.rst:57 msgid "" "Let's also create an :ref:`OmniLight` so it will be " "autoplaced in one of the rooms." msgstr "" #: ../../docs/tutorials/3d/portals/rooms_and_portals_example.rst:60 #, fuzzy msgid "Step 5" msgstr "Bước vào" #: ../../docs/tutorials/3d/portals/rooms_and_portals_example.rst:64 msgid "" "Next comes a crucial stage. We must let the RoomManager know where the rooms " "are!" msgstr "" #: ../../docs/tutorials/3d/portals/rooms_and_portals_example.rst:65 msgid "" "Select the RoomManager and look in the Inspector window in the **Paths** " "section." msgstr "" #: ../../docs/tutorials/3d/portals/rooms_and_portals_example.rst:66 msgid "" "You need to assign the **Room List** to point to the RoomList node we " "created earlier (which is the parent of all the rooms)." msgstr "" #: ../../docs/tutorials/3d/portals/rooms_and_portals_example.rst:69 #, fuzzy msgid "Step 6" msgstr "Bước vào" #: ../../docs/tutorials/3d/portals/rooms_and_portals_example.rst:73 msgid "" "Make sure you have saved your project before this next step. It is always a " "good idea to save and make a backup before converting." msgstr "" #: ../../docs/tutorials/3d/portals/rooms_and_portals_example.rst:74 msgid "" "Select the RoomManager, and you will see a button in the toolbar at the top " "of the 3d editor viewport called **Convert Rooms**. Press this button." msgstr "" #: ../../docs/tutorials/3d/portals/rooms_and_portals_example.rst:75 msgid "" "If all goes well, the RoomManager will have created the runtime data (the " "*room graph*) to perform occlusion culling at runtime." msgstr "" #: ../../docs/tutorials/3d/portals/rooms_and_portals_example.rst:76 msgid "" "You can see a log of the conversion process in the output window. This is " "helpful for finding problems." msgstr "" #: ../../docs/tutorials/3d/portals/rooms_and_portals_example.rst:77 msgid "" "If you now move the editor camera inside the rooms, you should see the " "meshes in the opposite room being culled depending on what you can see " "through the portal." msgstr "" #: ../../docs/tutorials/3d/portals/rooms_and_portals_example.rst:80 #: ../../docs/tutorials/best_practices/scenes_versus_scripts.rst:205 #: ../../docs/tutorials/shaders/your_first_shader/your_first_2d_shader.rst:240 msgid "Conclusion" msgstr "Kết luận" #: ../../docs/tutorials/3d/portals/rooms_and_portals_example.rst:82 msgid "" "This concludes this simple tutorial. Don't be afraid to experiment with the " "new room system you have created." msgstr "" #: ../../docs/tutorials/3d/portals/rooms_and_portals_example.rst:85 msgid "Some things to try" msgstr "" #: ../../docs/tutorials/3d/portals/rooms_and_portals_example.rst:87 msgid "" "Create different types of geometry. CSG nodes, Particle systems, and " "Multimeshes are all supported by the portal system." msgstr "" #: ../../docs/tutorials/3d/portals/rooms_and_portals_example.rst:88 msgid "" "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." msgstr "" #: ../../docs/tutorials/3d/portals/rooms_and_portals_example.rst:89 msgid "" "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." msgstr "" #: ../../docs/tutorials/3d/portals/rooms_and_portals_example.rst:90 msgid "" "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." msgstr "" #: ../../docs/tutorials/3d/portals/rooms_and_portals_example.rst:91 msgid "" "There are several ``portal_modes``, these are described in the main " "documentation." msgstr "" #: ../../docs/tutorials/3d/portals/rooms_and_portals_example.rst:92 msgid "" "Try turning the portal on and off at runtime from your script. You can call " "``set_portal_active()`` to open and close the portal." msgstr "" #: ../../docs/tutorials/3d/portals/rooms_and_portals_example.rst:93 msgid "" "If you select the portal, you should see 4 handles appear. Try dragging the " "portal points with the mouse, and see how it affects the objects that are " "culled." msgstr "" #: ../../docs/tutorials/3d/portals/rooms_and_portals_example.rst:94 msgid "" "If you select a room and click the **Generate Points** button in the " "toolbar, it will store the points of the room hull in the room inspector. " "You can now edit these with the gizmo handles." msgstr "" #: ../../docs/tutorials/animation/introduction.rst:4 #, fuzzy msgid "Introduction to the animation features" msgstr "Hướng dẫn Godot's editor" #: ../../docs/tutorials/animation/introduction.rst:6 msgid "" "The :ref:`class_AnimationPlayer` node allows you to create anything from " "simple to complex animations." msgstr "" #: ../../docs/tutorials/animation/introduction.rst:9 msgid "In this guide you learn to:" msgstr "" #: ../../docs/tutorials/animation/introduction.rst:11 msgid "Work with the Animation Panel" msgstr "" #: ../../docs/tutorials/animation/introduction.rst:12 msgid "Animate any property of any node" msgstr "" #: ../../docs/tutorials/animation/introduction.rst:13 msgid "Create a simple animation" msgstr "" #: ../../docs/tutorials/animation/introduction.rst:14 msgid "Call functions with the powerful Call Function Tracks" msgstr "" #: ../../docs/tutorials/animation/introduction.rst:16 msgid "" "In Godot, you can animate anything available in the Inspector, such as Node " "transforms, sprites, UI elements, particles, visibility and color of " "materials, and so on. You can also modify values of script variables and " "call any function." msgstr "" #: ../../docs/tutorials/animation/introduction.rst:22 msgid "Create an AnimationPlayer node" msgstr "" #: ../../docs/tutorials/animation/introduction.rst:24 msgid "" "To use the animation tools we first have to create an :ref:" "`class_AnimationPlayer` node." msgstr "" #: ../../docs/tutorials/animation/introduction.rst:27 msgid "" "The AnimationPlayer node type is the data container for your animations. One " "AnimationPlayer node can hold multiple animations, that can automatically " "transition to one another." msgstr "" #: ../../docs/tutorials/animation/introduction.rst:34 msgid "The AnimationPlayer node" msgstr "" #: ../../docs/tutorials/animation/introduction.rst:36 msgid "" "After creating one click on the AnimationPlayer node in the Node tab to open " "the Animation Panel at the bottom of the viewport." msgstr "" #: ../../docs/tutorials/animation/introduction.rst:42 msgid "The animation panel position" msgstr "" #: ../../docs/tutorials/animation/introduction.rst:44 msgid "It consists of four parts:" msgstr "" #: ../../docs/tutorials/animation/introduction.rst:49 msgid "The animation panel" msgstr "" #: ../../docs/tutorials/animation/introduction.rst:51 msgid "Animation controls (i.e. add, load, save, and delete animations)" msgstr "" #: ../../docs/tutorials/animation/introduction.rst:52 msgid "The tracks listing" msgstr "" #: ../../docs/tutorials/animation/introduction.rst:53 msgid "The timeline with keyframes" msgstr "" #: ../../docs/tutorials/animation/introduction.rst:54 msgid "" "The timeline and track controls, where you can zoom the timeline and edit " "tracks for example." msgstr "" #: ../../docs/tutorials/animation/introduction.rst:58 msgid "Computer animation relies on keyframes" msgstr "" #: ../../docs/tutorials/animation/introduction.rst:60 msgid "A keyframe defines the value of a property at a certain point in time." msgstr "" #: ../../docs/tutorials/animation/introduction.rst:62 msgid "" "Diamond shapes represent keyframes in the timeline. A line between two " "keyframes indicates that the value hasn't changed." msgstr "" #: ../../docs/tutorials/animation/introduction.rst:68 msgid "Keyframes in Godot" msgstr "" #: ../../docs/tutorials/animation/introduction.rst:70 msgid "" "The engine interpolates values between keyframes, resulting in a gradual " "change in values over time." msgstr "" #: ../../docs/tutorials/animation/introduction.rst:76 msgid "Two keyframes are all it takes to obtain a smooth motion" msgstr "" #: ../../docs/tutorials/animation/introduction.rst:78 msgid "" "The timeline lets you insert keyframes and change their timing. It also " "defines how long the animation is." msgstr "" #: ../../docs/tutorials/animation/introduction.rst:84 msgid "The timeline in the animation panel" msgstr "" #: ../../docs/tutorials/animation/introduction.rst:86 msgid "" "Each line of the Animation Panel is an animation track. Normal and Transform " "tracks reference node properties. Their name or id is a path to the node and " "the affected property." msgstr "" #: ../../docs/tutorials/animation/introduction.rst:93 msgid "Example of Normal animation tracks" msgstr "" #: ../../docs/tutorials/animation/introduction.rst:97 msgid "" "If you animate the wrong property, you can edit a track's path anytime. " "Double click on it and type the new path. Play the animation using the " "\"Play from beginning\" button |Play from beginning| (or pressing :kbd:" "`Shift + D` on keyboard) to see the changes instantly." msgstr "" #: ../../docs/tutorials/animation/introduction.rst:380 msgid "Play from beginning" msgstr "" #: ../../docs/tutorials/animation/introduction.rst:103 msgid "Tutorial: Creating a simple animation" msgstr "" #: ../../docs/tutorials/animation/introduction.rst:108 msgid "" "For this tutorial, we'll create a Sprite node with an AnimationPlayer as its " "child. We will animate the sprite to move between two points on the screen." msgstr "" #: ../../docs/tutorials/animation/introduction.rst:114 msgid "Our scene setup" msgstr "" #: ../../docs/tutorials/animation/introduction.rst:118 msgid "" "AnimationPlayer inherits from Node instead of Node2D or Node3D, which means " "that the child nodes will not inherit the transform from the parent nodes " "due to a bare Node being present in the hierarchy." msgstr "" #: ../../docs/tutorials/animation/introduction.rst:122 msgid "" "Therefore, it is not recommended to add nodes that have a 2D/3D transform as " "a child of an AnimationPlayer node." msgstr "" #: ../../docs/tutorials/animation/introduction.rst:125 msgid "" "The sprite holds an image texture. We animate that sprite to move between " "two points on the screen. For this tutorial, use the default Godot icon as " "the sprite's texture. As a starting point, move the sprite to a left " "position on the screen." msgstr "" #: ../../docs/tutorials/animation/introduction.rst:130 msgid "" "Select the AnimationPlayer node, then click the \"Animation\" button in the " "animation editor. From the list select \"New\" (|Add Animation|) to add a " "new animation. And Enter a name for the animation in the dialog box." msgstr "" #: ../../docs/tutorials/animation/introduction.rst:381 msgid "Add Animation" msgstr "Thêm hoạt hình" #: ../../docs/tutorials/animation/introduction.rst:138 msgid "Add a new animation" msgstr "" #: ../../docs/tutorials/animation/introduction.rst:141 msgid "Adding a track" msgstr "" #: ../../docs/tutorials/animation/introduction.rst:143 msgid "" "To add a new track for our sprite, select it and take a look in the toolbar:" msgstr "" #: ../../docs/tutorials/animation/introduction.rst:149 msgid "Convenience buttons" msgstr "" #: ../../docs/tutorials/animation/introduction.rst:151 msgid "" "These switches and buttons allow you to add keyframes for the selected " "node's location, rotation, and scale respectively." msgstr "" #: ../../docs/tutorials/animation/introduction.rst:154 msgid "" "Deselect rotation, because we are only interested in the location of our " "sprite for this tutorial and click on the key button." msgstr "" #: ../../docs/tutorials/animation/introduction.rst:157 msgid "" "As we don't have a track already set up for the transform/location property, " "Godot asks whether it should set it up for us. Click **Create**." msgstr "" #: ../../docs/tutorials/animation/introduction.rst:160 msgid "" "This creates a new track and our first keyframe at the beginning of the " "timeline:" msgstr "" #: ../../docs/tutorials/animation/introduction.rst:166 msgid "The sprite track" msgstr "" #: ../../docs/tutorials/animation/introduction.rst:169 msgid "The second keyframe" msgstr "" #: ../../docs/tutorials/animation/introduction.rst:171 msgid "" "Now we need to set the destination where our sprite should be headed and how " "much time it takes to get there." msgstr "" #: ../../docs/tutorials/animation/introduction.rst:174 msgid "" "Let's say, we want it to take 2 seconds to go to the other point. By default " "the animation is set to last only 1 second, so change this in the timeline " "controls in animation panel's lower panel to 2." msgstr "" #: ../../docs/tutorials/animation/introduction.rst:181 msgid "Animation length" msgstr "" #: ../../docs/tutorials/animation/introduction.rst:183 msgid "" "Click on the timeline header near the 2-second mark and move the sprite to " "the target destination on the right side." msgstr "" #: ../../docs/tutorials/animation/introduction.rst:186 msgid "" "Again, click the key button in the toolbar. This creates our second keyframe." msgstr "" #: ../../docs/tutorials/animation/introduction.rst:190 msgid "Run the animation" msgstr "" #: ../../docs/tutorials/animation/introduction.rst:192 msgid "Click on the \"Play from beginning\" (|Play from beginning|) button." msgstr "" #: ../../docs/tutorials/animation/introduction.rst:194 msgid "Yay! Our animation runs:" msgstr "" #: ../../docs/tutorials/animation/introduction.rst:199 msgid "The animation" msgstr "" #: ../../docs/tutorials/animation/introduction.rst:202 msgid "Back and forth" msgstr "" #: ../../docs/tutorials/animation/introduction.rst:204 msgid "" "Godot has an additional feature here. Like said before, Godot always " "calculates the frames between two keyframes. In a loop, the first keyframe " "is also the last keyframe, if no keyframe is specified at the end." msgstr "" #: ../../docs/tutorials/animation/introduction.rst:212 msgid "Animation loop" msgstr "" #: ../../docs/tutorials/animation/introduction.rst:214 msgid "" "If you set the animation length to 4 seconds now, the animation moves back " "and forth. You can change this behavior if you change the track's loop mode. " "This is covered in the next chapter." msgstr "" #: ../../docs/tutorials/animation/introduction.rst:219 #: ../../docs/tutorials/animation/introduction.rst:227 msgid "Track settings" msgstr "" #: ../../docs/tutorials/animation/introduction.rst:221 msgid "" "Each track has a settings panel at the end, where you can set the update " "mode, the track interpolation, and the loop mode." msgstr "" #: ../../docs/tutorials/animation/introduction.rst:229 msgid "" "The update mode of a track tells Godot when to update the property values. " "This can be:" msgstr "" #: ../../docs/tutorials/animation/introduction.rst:232 msgid "**Continuous:** Update the property on each frame." msgstr "" #: ../../docs/tutorials/animation/introduction.rst:233 msgid "**Discrete:** Only update the property on keyframes." msgstr "" #: ../../docs/tutorials/animation/introduction.rst:234 msgid "" "**Trigger:** Only update the property on keyframes or triggers. Triggers are " "a type of keyframe used by the ``current_animation`` property of a :ref:" "`class_AnimationPlayer`, and Animation Playback tracks." msgstr "" #: ../../docs/tutorials/animation/introduction.rst:238 msgid "" "**Capture:** If the first keyframe's time is greater than ``0.0``, the " "current value of the property will be remembered and will be blended with " "the first animation key. For example, you could use the Capture mode to move " "a node that's located anywhere to a specific location." msgstr "" #: ../../docs/tutorials/animation/introduction.rst:247 msgid "Track mode" msgstr "" #: ../../docs/tutorials/animation/introduction.rst:249 msgid "" "In normal animations, you usually use \"Continuous\". The other types are " "used to script complex animations." msgstr "" #: ../../docs/tutorials/animation/introduction.rst:252 msgid "" "The interpolation tells Godot how to calculate the frame values between the " "keyframes. These interpolation modes are supported:" msgstr "" #: ../../docs/tutorials/animation/introduction.rst:255 msgid "Nearest: Set the nearest keyframe value" msgstr "" #: ../../docs/tutorials/animation/introduction.rst:256 msgid "" "Linear: Set the value based on a linear function calculation between the two " "keyframes" msgstr "" #: ../../docs/tutorials/animation/introduction.rst:258 msgid "" "Cubic: Set the value based on a cubic function calculation between the two " "keyframes" msgstr "" #: ../../docs/tutorials/animation/introduction.rst:264 msgid "Track interpolation" msgstr "" #: ../../docs/tutorials/animation/introduction.rst:266 msgid "" "Cubic interpolation leads to a more natural movement, where the animation is " "slower at a keyframe and faster between keyframes. This is usually used for " "character animation. Linear interpolation creates more of a robotic movement." msgstr "" #: ../../docs/tutorials/animation/introduction.rst:271 msgid "" "Godot supports two loop modes, which affect the animation if it's set to " "loop:" msgstr "" #: ../../docs/tutorials/animation/introduction.rst:277 msgid "Loop modes" msgstr "" #: ../../docs/tutorials/animation/introduction.rst:279 msgid "" "Clamp loop interpolation: When this is selected, the animation stops after " "the last keyframe for this track. When the first keyframe is reached again, " "the animation will reset to its values." msgstr "" #: ../../docs/tutorials/animation/introduction.rst:282 msgid "" "Wrap loop interpolation: When this is selected, Godot calculates the " "animation after the last keyframe to reach the values of the first keyframe " "again." msgstr "" #: ../../docs/tutorials/animation/introduction.rst:287 #: ../../docs/tutorials/animation/introduction.rst:300 msgid "Keyframes for other properties" msgstr "" #: ../../docs/tutorials/animation/introduction.rst:289 msgid "" "Godot doesn't restrict you to only edit transform properties. Every property " "can be used as a track where you can set keyframes." msgstr "" #: ../../docs/tutorials/animation/introduction.rst:292 msgid "" "If you select your sprite while the animation panel is visible, you get a " "small keyframe button for all the sprite's properties. Click on this button " "and Godot automatically adds a track and keyframe to the current animation." msgstr "" #: ../../docs/tutorials/animation/introduction.rst:303 msgid "Edit keyframes" msgstr "" #: ../../docs/tutorials/animation/introduction.rst:305 msgid "" "For advanced use and to edit keyframes in detail, You can click on them to " "bring up the keyframe editor in the inspector. You can use this to directly " "edit its values." msgstr "" #: ../../docs/tutorials/animation/introduction.rst:312 msgid "Keyframe editor editing a key" msgstr "" #: ../../docs/tutorials/animation/introduction.rst:314 msgid "" "Additionally, you can also edit the easing value for this keyframe by " "clicking and dragging the easing setting. This tells Godot, how to change " "the property values when it reaches this keyframe." msgstr "" #: ../../docs/tutorials/animation/introduction.rst:318 msgid "" "You usually tweak your animations this way, when the movement doesn't \"look " "right\"." msgstr "" #: ../../docs/tutorials/animation/introduction.rst:322 msgid "Advanced: Call Method tracks" msgstr "" #: ../../docs/tutorials/animation/introduction.rst:324 msgid "" "Godot's animation engine doesn't stop here. If you're already comfortable " "with Godot's scripting language :ref:`doc_gdscript` and :doc:`/classes/" "index` you know that each node type is a class and has a bunch of callable " "methods." msgstr "" #: ../../docs/tutorials/animation/introduction.rst:330 msgid "" "For example, the :ref:`class_AudioStreamPlayer` node type has a method to " "play an audio stream." msgstr "" #: ../../docs/tutorials/animation/introduction.rst:333 msgid "" "Wouldn't it be great to use a method at a specific keyframe in an animation? " "This is where \"Call Method Tracks\" come in handy. These tracks reference a " "node again, this time without a reference to a property. Instead, a keyframe " "holds the name and arguments of a method, that Godot should call when it " "reaches this keyframe." msgstr "" #: ../../docs/tutorials/animation/introduction.rst:339 msgid "" "To demonstrate, we're going to use a call method track to play audio at a " "specific keyframe. Normally to play audio you should use an audio track, but " "for the sake of demonstrating methods we're going to do it this way." msgstr "" #: ../../docs/tutorials/animation/introduction.rst:343 msgid "" "Add a :ref:`class_AudioStreamPlayer` to the Scene Tree and setup a stream " "using an audio file you put in your project." msgstr "" #: ../../docs/tutorials/animation/introduction.rst:346 msgid "" "Click on \"Add track\" (|Add track|) on the animation panel's track controls." msgstr "" #: ../../docs/tutorials/animation/introduction.rst:382 msgid "Add track" msgstr "" #: ../../docs/tutorials/animation/introduction.rst:349 msgid "Select \"Add Call Method Track\" from the list of possible track types." msgstr "" #: ../../docs/tutorials/animation/introduction.rst:354 msgid "Add Call Method Track" msgstr "" #: ../../docs/tutorials/animation/introduction.rst:356 msgid "" "Select the :ref:`class_AudioStreamPlayer` node in the selection window. " "Godot adds the track with the reference to the node." msgstr "" #: ../../docs/tutorials/animation/introduction.rst:362 msgid "Select AudioStreamPlayer" msgstr "" #: ../../docs/tutorials/animation/introduction.rst:364 msgid "" "Right click the timeline where Godot should play the sample and click the " "\"Insert Key\" option. This will bring up a list of methods that can be " "called for the AudioStreamPlayer node. Select the first one." msgstr "" #: ../../docs/tutorials/animation/introduction.rst:371 msgid "" "When Godot reaches the keyframe, Godot calls the :ref:" "`class_AudioStreamPlayer` node's \"play\" function and the stream plays." msgstr "" #: ../../docs/tutorials/animation/introduction.rst:375 msgid "" "You can change its position by dragging it on the timeline, you can also " "click on the keyframe and use the keyframe settings in the inspector." msgstr "" #: ../../docs/tutorials/animation/introduction.rst:385 msgid "Using RESET tracks" msgstr "" #: ../../docs/tutorials/animation/introduction.rst:387 msgid "" "You can set up a special *RESET* animation to contain the \"default pose\". " "This is used to ensure that the default pose is restored when you save the " "scene and open it again in the editor." msgstr "" #: ../../docs/tutorials/animation/introduction.rst:391 msgid "" "For existing tracks, you can add an animation called \"RESET\" (case-" "sensitive), then add tracks for each property that you want to reset. The " "only keyframe should be at time 0, and give it the desired default value for " "each track." msgstr "" #: ../../docs/tutorials/animation/introduction.rst:396 msgid "" "If AnimationPlayer's **Reset On Save** property is set to ``true``, the " "scene will be saved with the effects of the reset animation applied (as if " "it had been seeked to time ``0.0``). This only affects the saved file – the " "property tracks in the editor stay where they were." msgstr "" #: ../../docs/tutorials/animation/introduction.rst:402 msgid "" "If you want to reset the tracks in the editor, select the AnimationPlayer " "node, open the **Animation** bottom panel then choose **Apply Reset** in the " "animation editor's **Animation** dropdown menu." msgstr "" #: ../../docs/tutorials/animation/introduction.rst:406 msgid "" "When adding tracks on new animations, the editor will ask you to " "automatically create a RESET track when using the keyframe icon next to a " "property in the inspector. This does not apply on tracks created with Godot " "versions prior to 3.4, as the animation reset track feature was added in 3.4." msgstr "" #: ../../docs/tutorials/animation/cutout_animation.rst:4 msgid "Cutout animation" msgstr "" #: ../../docs/tutorials/animation/cutout_animation.rst:7 #: ../../docs/tutorials/inputs/inputevent.rst:7 msgid "What is it?" msgstr "" #: ../../docs/tutorials/animation/cutout_animation.rst:9 msgid "" "Traditionally, `cutout animation `__ is a type of `stop motion animation `__ in which pieces of paper (or other thin " "material) are cut into special shapes and arranged in two-dimensional " "representations of characters and objects. Characters' bodies are usually " "made out of several pieces. The pieces are arranged and photographed once " "for each frame of the film. The animator moves and rotates the parts in " "small increments between each shot to create the illusion of movement when " "the images are played back quickly in sequence." msgstr "" #: ../../docs/tutorials/animation/cutout_animation.rst:18 msgid "" "Simulations of cutout animation can now be created using software as seen in " "`South Park `__ and `Jake and the " "Never Land Pirates `__." msgstr "" #: ../../docs/tutorials/animation/cutout_animation.rst:22 msgid "" "In video games, this technique has also become popular. Examples of this are " "`Paper Mario `__ or `Rayman " "Origins `__ ." msgstr "" #: ../../docs/tutorials/animation/cutout_animation.rst:27 msgid "Cutout animation in Godot" msgstr "" #: ../../docs/tutorials/animation/cutout_animation.rst:29 msgid "" "Godot provides tools for working with cutout rigs, and is ideal for the " "workflow:" msgstr "" #: ../../docs/tutorials/animation/cutout_animation.rst:31 msgid "" "**The animation system is fully integrated with the engine**: This means " "animations can control much more than just motion of objects. Textures, " "sprite sizes, pivots, opacity, color modulation, and more, can all be " "animated and blended." msgstr "" #: ../../docs/tutorials/animation/cutout_animation.rst:35 msgid "" "**Combine animation styles**: AnimatedSprite allows traditional cel " "animation to be used alongside cutout animation. In cel animation different " "animation frames use entirely different drawings rather than the same pieces " "positioned differently. In an otherwise cutout-based animation, cel " "animation can be used selectively for complex parts such as hands, feet, " "changing facial expressions, etc." msgstr "" #: ../../docs/tutorials/animation/cutout_animation.rst:41 msgid "" "**Custom Shaped Elements**: Custom shapes can be created with :ref:" "`Polygon2D ` allowing UV animation, deformations, etc." msgstr "" #: ../../docs/tutorials/animation/cutout_animation.rst:44 msgid "" "**Particle Systems**: A cutout animation rig can be combined with particle " "systems. This can be useful for magic effects, jetpacks, etc." msgstr "" #: ../../docs/tutorials/animation/cutout_animation.rst:46 msgid "" "**Custom Colliders**: Set colliders and influence areas in different parts " "of the skeletons, great for bosses and fighting games." msgstr "" #: ../../docs/tutorials/animation/cutout_animation.rst:48 msgid "" "**Animation Tree**: Allows complex combinations and blending between several " "animations, the same way it works in 3D." msgstr "" #: ../../docs/tutorials/animation/cutout_animation.rst:51 #: ../../docs/tutorials/shaders/shader_materials.rst:24 msgid "And much more!" msgstr "" #: ../../docs/tutorials/animation/cutout_animation.rst:54 msgid "Making of GBot" msgstr "" #: ../../docs/tutorials/animation/cutout_animation.rst:56 msgid "" "For this tutorial, we will use as demo content the pieces of the `GBot " "`__ character, created by " "Andreas Esau." msgstr "" #: ../../docs/tutorials/animation/cutout_animation.rst:62 msgid "" "Get your assets: :download:`gbot_resources.zip `." msgstr "" #: ../../docs/tutorials/animation/cutout_animation.rst:65 msgid "Setting up the rig" msgstr "" #: ../../docs/tutorials/animation/cutout_animation.rst:67 msgid "Create an empty Node2D as root of the scene, we will work under it:" msgstr "" #: ../../docs/tutorials/animation/cutout_animation.rst:71 msgid "" "The first node of the model is the hip. Generally, both in 2D and 3D, the " "hip is the root of the skeleton. This makes it easier to animate:" msgstr "" #: ../../docs/tutorials/animation/cutout_animation.rst:77 msgid "" "Next will be the torso. The torso needs to be a child of the hip, so create " "a child sprite and load the torso texture, later accommodate it properly:" msgstr "" #: ../../docs/tutorials/animation/cutout_animation.rst:82 msgid "" "This looks good. Let's see if our hierarchy works as a skeleton by rotating " "the torso. We can do this be pressing :kbd:`E` to enter rotate mode, and " "dragging with the left mouse button. To exit rotate mode hit :kbd:`ESC`." msgstr "" #: ../../docs/tutorials/animation/cutout_animation.rst:88 msgid "The rotation pivot is wrong and needs to be adjusted." msgstr "" #: ../../docs/tutorials/animation/cutout_animation.rst:90 msgid "" "This small cross in the middle of the :ref:`Sprite ` is the " "rotation pivot:" msgstr "" #: ../../docs/tutorials/animation/cutout_animation.rst:96 msgid "Adjusting the pivot" msgstr "" #: ../../docs/tutorials/animation/cutout_animation.rst:98 msgid "" "The pivot can be adjusted by changing the *offset* property in the Sprite:" msgstr "" #: ../../docs/tutorials/animation/cutout_animation.rst:103 msgid "" "The pivot can also be adjusted *visually*. While hovering over the desired " "pivot point, press :kbd:`V` to move the pivot there for the selected " "Sprite. There is also a tool in the tool bar that has a similar function." msgstr "" #: ../../docs/tutorials/animation/cutout_animation.rst:110 msgid "" "Continue adding body pieces, starting with the right arm. Make sure to put " "each sprite in its correct place in the hierarchy, so its rotations and " "translations are relative to its parent:" msgstr "" #: ../../docs/tutorials/animation/cutout_animation.rst:116 msgid "" "With the left arm there's a problem. In 2D, child nodes appear in front of " "their parents:" msgstr "" #: ../../docs/tutorials/animation/cutout_animation.rst:121 msgid "" "We want the left arm to appear *behind* the hip and the torso. We could move " "the left arm nodes behind the hip (above the hip node in the scene " "hierarchy), but then the left arm is no longer in its proper place in the " "hierarchy. This means it wouldn't be affected by the movement of the torso. " "We'll fix this problem with ``RemoteTransform2D`` nodes." msgstr "" #: ../../docs/tutorials/animation/cutout_animation.rst:127 msgid "" "You can also fix depth ordering problems by adjusting the Z property of any " "node inheriting from Node2D." msgstr "" #: ../../docs/tutorials/animation/cutout_animation.rst:131 msgid "RemoteTransform2D node" msgstr "" #: ../../docs/tutorials/animation/cutout_animation.rst:133 msgid "" "The :ref:`RemoteTransform2D ` node transforms nodes " "somewhere else in the hierarchy. This node applies its own transform " "(including any transformation it inherits from its parents) to the remote " "node it targets." msgstr "" #: ../../docs/tutorials/animation/cutout_animation.rst:137 msgid "" "This allows us to correct the visibility order of our elements, " "independently of the locations of those parts in the cutout hierarchy." msgstr "" #: ../../docs/tutorials/animation/cutout_animation.rst:140 msgid "" "Create a ``RemoteTransform2D`` node as a child of the torso. Call it " "``remote_arm_l``. Create another RemoteTransform2D node inside the first and " "call it ``remote_hand_l``. Use the ``Remote Path`` property of the two new " "nodes to target the ``arm_l`` and ``hand_l`` sprites respectively:" msgstr "" #: ../../docs/tutorials/animation/cutout_animation.rst:147 msgid "" "Moving the ``RemoteTransform2D`` nodes now moves the sprites. So we can " "create animations by adjusting the ``RemoteTransform2D`` transforms:" msgstr "" #: ../../docs/tutorials/animation/cutout_animation.rst:153 msgid "Completing the skeleton" msgstr "" #: ../../docs/tutorials/animation/cutout_animation.rst:155 msgid "" "Complete the skeleton by following the same steps for the rest of the parts. " "The resulting scene should look similar to this:" msgstr "" #: ../../docs/tutorials/animation/cutout_animation.rst:160 msgid "" "The resulting rig will be easy to animate. By selecting the nodes and " "rotating them you can animate forward kinematics (FK) efficiently." msgstr "" #: ../../docs/tutorials/animation/cutout_animation.rst:163 msgid "For simple objects and rigs this is fine, but there are limitations:" msgstr "" #: ../../docs/tutorials/animation/cutout_animation.rst:165 msgid "" "Selecting sprites in the main viewport can become difficult in complex rigs. " "The scene tree ends up being used to select parts instead, which can be " "slower." msgstr "" #: ../../docs/tutorials/animation/cutout_animation.rst:167 msgid "" "Inverse Kinematics (IK) is useful for animating extremities like hands and " "feet, and can't be used with our rig in its current state." msgstr "" #: ../../docs/tutorials/animation/cutout_animation.rst:170 msgid "To solve these problems we'll use Godot's skeletons." msgstr "" #: ../../docs/tutorials/animation/cutout_animation.rst:173 msgid "Skeletons" msgstr "Khung xương" #: ../../docs/tutorials/animation/cutout_animation.rst:175 msgid "" "In Godot there is a helper to create \"bones\" between nodes. The bone-" "linked nodes are called skeletons." msgstr "" #: ../../docs/tutorials/animation/cutout_animation.rst:178 msgid "" "As an example, let's turn the right arm into a skeleton. To create a " "skeleton, a chain of nodes must be selected from top to bottom:" msgstr "" #: ../../docs/tutorials/animation/cutout_animation.rst:183 msgid "Then, click on the Skeleton menu and select ``Make Bones``." msgstr "" #: ../../docs/tutorials/animation/cutout_animation.rst:187 msgid "This will add bones covering the arm, but the result may be surprising." msgstr "" #: ../../docs/tutorials/animation/cutout_animation.rst:191 msgid "" "Why does the hand lack a bone? In Godot, a bone connects a node with its " "parent. And there's currently no child of the hand node. With this knowledge " "let's try again." msgstr "" #: ../../docs/tutorials/animation/cutout_animation.rst:195 msgid "" "The first step is creating an endpoint node. Any kind of node will do, but :" "ref:`Position2D ` is preferred because it's visible in the " "editor. The endpoint node will ensure that the last bone has orientation." msgstr "" #: ../../docs/tutorials/animation/cutout_animation.rst:202 msgid "" "Now select the whole chain, from the endpoint to the arm and create bones:" msgstr "" #: ../../docs/tutorials/animation/cutout_animation.rst:207 msgid "" "The result resembles a skeleton a lot more, and now the arm and forearm can " "be selected and animated." msgstr "" #: ../../docs/tutorials/animation/cutout_animation.rst:210 msgid "" "Create endpoints for all important extremities. Generate bones for all " "articulable parts of the cutout, with the hip as the ultimate connection " "between all of them." msgstr "" #: ../../docs/tutorials/animation/cutout_animation.rst:214 msgid "" "You may notice that an extra bone is created when connecting the hip and " "torso. Godot has connected the hip node to the scene root with a bone, and " "we don't want that. To fix this, select the root and hip node, open the " "Skeleton menu, click ``clear bones``." msgstr "" #: ../../docs/tutorials/animation/cutout_animation.rst:221 msgid "Your final skeleton should look something like this:" msgstr "" #: ../../docs/tutorials/animation/cutout_animation.rst:225 msgid "" "You might have noticed a second set of endpoints in the hands. This will " "make sense soon." msgstr "" #: ../../docs/tutorials/animation/cutout_animation.rst:228 msgid "" "Now that the whole figure is rigged, the next step is setting up the IK " "chains. IK chains allow for more natural control of extremities." msgstr "" #: ../../docs/tutorials/animation/cutout_animation.rst:232 msgid "IK chains" msgstr "" #: ../../docs/tutorials/animation/cutout_animation.rst:234 msgid "" "IK stands for inverse kinematics. It's a convenient technique for animating " "the position of hands, feet and other extremities of rigs like the one we've " "made. Imagine you want to pose a character's foot in a specific position on " "the ground. Without IK chains, each motion of the foot would require " "rotating and positioning several other bones (the shin and the thigh at " "least). This would be quite complex and lead to imprecise results." msgstr "" #: ../../docs/tutorials/animation/cutout_animation.rst:241 msgid "" "IK allows us to move directly the foot while the shin and thigh self-adjust." msgstr "" #: ../../docs/tutorials/animation/cutout_animation.rst:243 msgid "" "To create an IK chain, select a chain of bones from endpoint to the base for " "the chain. For example, to create an IK chain for the right leg, select the " "following:" msgstr "" #: ../../docs/tutorials/animation/cutout_animation.rst:249 msgid "Then enable this chain for IK. Go to Edit > Make IK Chain." msgstr "" #: ../../docs/tutorials/animation/cutout_animation.rst:253 msgid "As a result, the base of the chain will turn *Yellow*." msgstr "" #: ../../docs/tutorials/animation/cutout_animation.rst:257 msgid "" "Once the IK chain is set-up grab any child or grand-child of the base of the " "chain (e.g. a foot) and move it. You'll see the rest of the chain adjust as " "you adjust its position." msgstr "" #: ../../docs/tutorials/animation/cutout_animation.rst:264 #, fuzzy msgid "Animation tips" msgstr "Tạo nội dung" #: ../../docs/tutorials/animation/cutout_animation.rst:266 msgid "" "The following section will be a collection of tips for creating animation " "for your cutout rigs. For more information on how the animation system in " "Godot works, see :ref:`doc_introduction_animation`." msgstr "" #: ../../docs/tutorials/animation/cutout_animation.rst:271 msgid "Setting keyframes and excluding properties" msgstr "" #: ../../docs/tutorials/animation/cutout_animation.rst:273 msgid "" "Special contextual elements appear in the top toolbar when the animation " "editor window is open:" msgstr "" #: ../../docs/tutorials/animation/cutout_animation.rst:278 msgid "" "The key button inserts location, rotation, and scale keyframes for the " "selected objects or bones at the current playhead position." msgstr "" #: ../../docs/tutorials/animation/cutout_animation.rst:281 msgid "" "The \"loc\", \"rot\", and \"scl\" toggle buttons to the left of the key " "button modify its function, allowing you to specify which of the three " "properties keyframes will be created for." msgstr "" #: ../../docs/tutorials/animation/cutout_animation.rst:285 msgid "" "Here's an illustration of how this can be useful: Imagine you have a node " "which already has two keyframes animating its scale only. You want to add an " "overlapping rotation movement to the same node. The rotation movement should " "begin and end at different times from the scale change that's already set " "up. You can use the toggle buttons to have only rotation information added " "when you add a new keyframe. This way, you can avoid adding unwanted scale " "keyframes which would disrupt the existing scale animation." msgstr "" #: ../../docs/tutorials/animation/cutout_animation.rst:294 #, fuzzy msgid "Creating a rest pose" msgstr "Tạo nội dung" #: ../../docs/tutorials/animation/cutout_animation.rst:296 msgid "" "Think of a rest pose as a default pose that your cutout rig should be set to " "when no other pose is active in your game. Create a rest pose as follows:" msgstr "" #: ../../docs/tutorials/animation/cutout_animation.rst:299 msgid "" "1. Make sure the rig parts are positioned in what looks like a \"resting\" " "arrangement." msgstr "" #: ../../docs/tutorials/animation/cutout_animation.rst:302 #, fuzzy msgid "Create a new animation, rename it \"rest\"." msgstr "Tạo nội dung" #: ../../docs/tutorials/animation/cutout_animation.rst:304 msgid "Select all nodes in your rig (box selection should work fine)." msgstr "" #: ../../docs/tutorials/animation/cutout_animation.rst:306 msgid "" "4. Make sure the \"loc\", \"rot\", and \"scl\" toggle buttons are all active " "in the toolbar." msgstr "" #: ../../docs/tutorials/animation/cutout_animation.rst:309 msgid "" "5. Press the key button. Keys will be inserted for all selected parts " "storing their current arrangement. This pose can now be recalled when " "necessary in your game by playing the \"rest\" animation you've created." msgstr "" #: ../../docs/tutorials/animation/cutout_animation.rst:316 msgid "Modifying rotation only" msgstr "" #: ../../docs/tutorials/animation/cutout_animation.rst:318 msgid "" "When animating a cutout rig, often it's only the rotation of the nodes that " "needs to change. Location and scale are rarely used." msgstr "" #: ../../docs/tutorials/animation/cutout_animation.rst:322 msgid "" "So when inserting keys, you might find it convenient to have only the " "\"rot\" toggle active most of the time:" msgstr "" #: ../../docs/tutorials/animation/cutout_animation.rst:327 msgid "" "This will avoid the creation of unwanted animation tracks for position and " "scale." msgstr "" #: ../../docs/tutorials/animation/cutout_animation.rst:331 msgid "Keyframing IK chains" msgstr "" #: ../../docs/tutorials/animation/cutout_animation.rst:333 msgid "" "When editing IK chains, it's not necessary to select the whole chain to add " "keyframes. Selecting the endpoint of the chain and inserting a keyframe will " "automatically insert keyframes for all other parts of the chain too." msgstr "" #: ../../docs/tutorials/animation/cutout_animation.rst:338 msgid "Visually move a sprite behind its parent" msgstr "" #: ../../docs/tutorials/animation/cutout_animation.rst:340 msgid "" "Sometimes it is necessary to have a node change its visual depth relative to " "its parent node during an animation. Think of a character facing the camera, " "who pulls something out from behind his back and holds it out in front of " "him. During this animation the whole arm and the object in his hand would " "need to change their visual depth relative to the body of the character." msgstr "" #: ../../docs/tutorials/animation/cutout_animation.rst:346 msgid "" "To help with this there's a keyframable \"Behind Parent\" property on all " "Node2D-inheriting nodes. When planning your rig, think about the movements " "it will need to perform and give some thought to how you'll use \"Behind " "Parent\" and/or RemoteTransform2D nodes. They provide overlapping " "functionality." msgstr "" #: ../../docs/tutorials/animation/cutout_animation.rst:354 msgid "Setting easing curves for multiple keys" msgstr "" #: ../../docs/tutorials/animation/cutout_animation.rst:356 msgid "To apply the same easing curve to multiple keyframes at once:" msgstr "" #: ../../docs/tutorials/animation/cutout_animation.rst:358 msgid "Select the relevant keys." msgstr "" #: ../../docs/tutorials/animation/cutout_animation.rst:359 msgid "" "Click on the pencil icon in the bottom right of the animation panel. This " "will open the transition editor." msgstr "" #: ../../docs/tutorials/animation/cutout_animation.rst:361 msgid "In the transition editor, click on the desired curve to apply it." msgstr "" #: ../../docs/tutorials/animation/cutout_animation.rst:366 msgid "2D Skeletal deform" msgstr "" #: ../../docs/tutorials/animation/cutout_animation.rst:368 msgid "" "Skeletal deform can be used to augment a cutout rig, allowing single pieces " "to deform organically (e.g. antennae that wobble as an insect character " "walks)." msgstr "" #: ../../docs/tutorials/animation/cutout_animation.rst:371 msgid "" "This process is described in a :ref:`separate tutorial `." msgstr "" #: ../../docs/tutorials/animation/2d_skeletons.rst:4 msgid "2D skeletons" msgstr "" #: ../../docs/tutorials/animation/2d_skeletons.rst:9 msgid "" "When working with 3D, skeletal deforms are common for characters and " "creatures and most 3D modelling applications support it. For 2D, as this " "function is not used as often, it's difficult to find mainstream software " "aimed for this." msgstr "" #: ../../docs/tutorials/animation/2d_skeletons.rst:13 msgid "" "One option is to create animations in third-party software such as Spine or " "Dragonbones. From Godot 3.1 onwards, though, this functionality is supported " "built-in." msgstr "" #: ../../docs/tutorials/animation/2d_skeletons.rst:17 msgid "" "Why would you want to do skeletal animations directly in Godot? The answer " "is that there are many advantages to it:" msgstr "" #: ../../docs/tutorials/animation/2d_skeletons.rst:20 msgid "" "Better integration with the engine, so less hassle importing and editing " "from an external tool." msgstr "" #: ../../docs/tutorials/animation/2d_skeletons.rst:22 msgid "" "Ability to control particle systems, shaders, sounds, call scripts, colors, " "transparency, etc. in animations." msgstr "" #: ../../docs/tutorials/animation/2d_skeletons.rst:24 msgid "" "The built-in skeletal system in Godot is very efficient and designed for " "performance." msgstr "" #: ../../docs/tutorials/animation/2d_skeletons.rst:27 msgid "The following tutorial will, then, explain 2D skeletal deformations." msgstr "" #: ../../docs/tutorials/animation/2d_skeletons.rst:34 msgid "" "Before starting, we recommend you to go through the :ref:" "`doc_cutout_animation` tutorial to gain a general understanding of animating " "within Godot." msgstr "" #: ../../docs/tutorials/animation/2d_skeletons.rst:38 msgid "" "For this tutorial, we will be using a single image to construct our " "character. Download it from :download:`gBot_pieces.png ` or save the image below." msgstr "" #: ../../docs/tutorials/animation/2d_skeletons.rst:44 msgid "" "It is also advised to download the final character image :download:" "`gBot_complete.png ` to have a good reference for " "putting the different pieces together." msgstr "" #: ../../docs/tutorials/animation/2d_skeletons.rst:51 #, fuzzy msgid "Creating the polygons" msgstr "Tạo nội dung" #: ../../docs/tutorials/animation/2d_skeletons.rst:53 msgid "" "Create a new scene for your model (if it's going to be an animated " "character, you may want to use a ``KinematicBody2D``). For ease of use, an " "empty 2D node is created as a root for the polygons." msgstr "" #: ../../docs/tutorials/animation/2d_skeletons.rst:57 msgid "" "Begin with a ``Polygon2D`` node. There is no need to place it anywhere in " "the scene for now, so simply create it like this:" msgstr "" #: ../../docs/tutorials/animation/2d_skeletons.rst:62 msgid "" "Select it and assign the texture with the character pieces you have " "downloaded before:" msgstr "" #: ../../docs/tutorials/animation/2d_skeletons.rst:67 msgid "" "Drawing a polygon directly is not advised. Instead, open the \"UV\" dialog " "for the polygon:" msgstr "" #: ../../docs/tutorials/animation/2d_skeletons.rst:72 msgid "" "Head over to the *Points* mode, select the pencil and draw a polygon around " "the desired piece:" msgstr "" #: ../../docs/tutorials/animation/2d_skeletons.rst:77 msgid "" "Duplicate the polygon node and give it a proper name. Then, enter the \"UV\" " "dialog again and replace the old polygon with another one in the new desired " "piece." msgstr "" #: ../../docs/tutorials/animation/2d_skeletons.rst:81 msgid "" "When you duplicate nodes and the next piece has a similar shape, you can " "edit the previous polygon instead of drawing a new one." msgstr "" #: ../../docs/tutorials/animation/2d_skeletons.rst:84 msgid "" "After moving the polygon, remember to update the UV by selecting Edit -> " "\"Polygon -> UV\" in the Polygon 2D UV Editor." msgstr "" #: ../../docs/tutorials/animation/2d_skeletons.rst:89 msgid "Keep doing this until you mapped all pieces." msgstr "" #: ../../docs/tutorials/animation/2d_skeletons.rst:93 msgid "" "You will notice that pieces for nodes appear in the same layout as they do " "in the original texture. This is because by default, when you draw a " "polygon, the UV and points are the same." msgstr "" #: ../../docs/tutorials/animation/2d_skeletons.rst:97 msgid "" "Rearrange the pieces and build the character. This should be pretty quick. " "There is no need to change pivots, so don't bother making sure rotation " "pivots for each piece are right; you can leave them be for now." msgstr "" #: ../../docs/tutorials/animation/2d_skeletons.rst:103 msgid "" "Ah, the visual order of the pieces is not correct yet, as some are covering " "wrong pieces. Rearrange the order of the nodes to fix this:" msgstr "" #: ../../docs/tutorials/animation/2d_skeletons.rst:108 msgid "" "And there you go! It was definitely much easier than in the cutout tutorial." msgstr "" #: ../../docs/tutorials/animation/2d_skeletons.rst:111 #, fuzzy msgid "Creating the skeleton" msgstr "Tạo nội dung" #: ../../docs/tutorials/animation/2d_skeletons.rst:113 msgid "" "Create a ``Skeleton2D`` node as a child of the root node. This will be the " "base of our skeleton:" msgstr "" #: ../../docs/tutorials/animation/2d_skeletons.rst:118 msgid "" "Create a ``Bone2D`` node as a child of the skeleton. Put it on the hip " "(usually skeletons start here). The bone will be pointing to the right, but " "you can ignore this for now." msgstr "" #: ../../docs/tutorials/animation/2d_skeletons.rst:124 msgid "Keep creating bones in hierarchy and naming them accordingly." msgstr "" #: ../../docs/tutorials/animation/2d_skeletons.rst:128 msgid "" "At the end of this chain, there will be a *jaw* node. It is, again, very " "short and pointing to the right. This is normal for bones without children. " "The length of *tip* bones can be changed with a property in the inspector:" msgstr "" #: ../../docs/tutorials/animation/2d_skeletons.rst:134 msgid "" "In this case, we don't need to rotate the bone (coincidentally the jaw " "points right in the sprite), but in case you need to, feel free to do it. " "Again, this is only really needed for tip bones as nodes with children don't " "usually need a length or a specific rotation." msgstr "" #: ../../docs/tutorials/animation/2d_skeletons.rst:139 msgid "Keep going and build the whole skeleton:" msgstr "" #: ../../docs/tutorials/animation/2d_skeletons.rst:143 msgid "" "You will notice that all bones raise an annoying warning about a missing " "rest pose. This means that it's time to set one. Go to the *skeleton* node " "and create a rest pose. This pose is the default one, you can come back to " "it anytime you want (which is very handy for animating):" msgstr "" #: ../../docs/tutorials/animation/2d_skeletons.rst:150 msgid "" "The warnings will go away. If you modify the skeleton (add/remove bones) you " "will need to set the rest pose again." msgstr "" #: ../../docs/tutorials/animation/2d_skeletons.rst:154 msgid "Deforming the polygons" msgstr "" #: ../../docs/tutorials/animation/2d_skeletons.rst:156 msgid "" "Select the previously created polygons and assign the skeleton node to their " "``Skeleton`` property. This will ensure that they can eventually be deformed " "by it." msgstr "" #: ../../docs/tutorials/animation/2d_skeletons.rst:162 msgid "Click the property highlighted above and select the skeleton node:" msgstr "" #: ../../docs/tutorials/animation/2d_skeletons.rst:166 msgid "" "Again, open the UV editor for the polygon and go to the *Bones* section." msgstr "" #: ../../docs/tutorials/animation/2d_skeletons.rst:170 msgid "" "You will not be able to paint weights yet. For this you need to synchronize " "the list of bones from the skeleton with the polygon. This step is done only " "once and manually (unless you modify the skeleton by adding/removing/" "renaming bones). It ensures that your rigging information is kept in the " "polygon, even if a skeleton node is accidentally lost or the skeleton " "modified. Push the \"Sync Bones to Polygon\" button to sync the list." msgstr "" #: ../../docs/tutorials/animation/2d_skeletons.rst:179 msgid "" "The list of bones will automatically appear. By default, your polygon has no " "weight assigned to any of them. Select the bones you want to assign weight " "to and paint them:" msgstr "" #: ../../docs/tutorials/animation/2d_skeletons.rst:185 msgid "" "Points in white have a full weight assigned, while points in black are not " "influenced by the bone. If the same point is painted white for multiple " "bones, the influence will be distributed amongst them (so usually there is " "not that much need to use shades in-between unless you want to polish the " "bending effect)." msgstr "" #: ../../docs/tutorials/animation/2d_skeletons.rst:193 msgid "" "After painting the weights, animating the bones (NOT the polygons!) will " "have the desired effect of modifying and bending the polygons accordingly. " "As you only need to animate bones in this approach, work becomes much easier!" msgstr "" #: ../../docs/tutorials/animation/2d_skeletons.rst:197 msgid "" "But it's not all roses. Trying to animate bones that bend the polygon will " "often yield unexpected results:" msgstr "" #: ../../docs/tutorials/animation/2d_skeletons.rst:202 msgid "" "This happens because Godot generates internal triangles that connect the " "points when drawing the polygon. They don't always bend the way you would " "expect. To solve this, you need to set hints in the geometry to clarify how " "you expect it to deform." msgstr "" #: ../../docs/tutorials/animation/2d_skeletons.rst:208 msgid "Internal vertices" msgstr "" #: ../../docs/tutorials/animation/2d_skeletons.rst:210 msgid "" "Open the UV menu for each bone again and go to the *Points* section. Add " "some internal vertices in the regions where you expect the geometry to bend:" msgstr "" #: ../../docs/tutorials/animation/2d_skeletons.rst:215 msgid "" "Now, go to the *Polygon* section and redraw your own polygons with more " "detail. Imagine that, as your polygons bend, you need to make sure they " "deform the least possible, so experiment a bit to find the right setup." msgstr "" #: ../../docs/tutorials/animation/2d_skeletons.rst:221 msgid "" "Once you start drawing, the original polygon will disappear and you will be " "free to create your own:" msgstr "" #: ../../docs/tutorials/animation/2d_skeletons.rst:226 msgid "" "This amount of detail is usually fine, though you may want to have more fine-" "grained control over where triangles go. Experiment by yourself until you " "get the results you like." msgstr "" #: ../../docs/tutorials/animation/2d_skeletons.rst:230 msgid "" "**Note:** Don't forget that your newly added internal vertices also need " "weight painting! Go to the *Bones* section again to assign them to the right " "bones." msgstr "" #: ../../docs/tutorials/animation/2d_skeletons.rst:233 msgid "Once you are all set, you will get much better results:" msgstr "" #: ../../docs/tutorials/animation/animation_tree.rst:4 #, fuzzy msgid "Using AnimationTree" msgstr "Cây Hoạt ảnh" #: ../../docs/tutorials/animation/animation_tree.rst:9 msgid "" "With :ref:`AnimationPlayer `, Godot has one of the " "most flexible animation systems that you can find in any game engine. The " "ability to animate pretty much any property in any node or resource, as well " "as having dedicated transform, bezier, function calling, audio and sub-" "animation tracks, is pretty much unique." msgstr "" #: ../../docs/tutorials/animation/animation_tree.rst:13 msgid "" "However, the support for blending those animations via ``AnimationPlayer`` " "is relatively limited, as only a fixed cross-fade transition time can be set." msgstr "" #: ../../docs/tutorials/animation/animation_tree.rst:15 msgid "" ":ref:`AnimationTree ` is a new node introduced in Godot " "3.1 to deal with advanced transitions. It supersedes the ancient " "``AnimationTreePlayer``, while adding a huge amount of features and " "flexibility." msgstr "" #: ../../docs/tutorials/animation/animation_tree.rst:19 #, fuzzy msgid "Creating an AnimationTree" msgstr "Tạo nội dung" #: ../../docs/tutorials/animation/animation_tree.rst:21 msgid "" "Before starting, it must be made clear that an ``AnimationTree`` node does " "not contain its own animations. Instead, it uses animations contained in an " "``AnimationPlayer`` node. This way, you can edit your animations (or import " "them from a 3D scene) as usual and then use this extra node to control the " "playback." msgstr "" #: ../../docs/tutorials/animation/animation_tree.rst:25 msgid "" "The most common way to use ``AnimationTree`` is in a 3D scene. When " "importing your scenes from a 3D exchange format, they will usually come with " "animations built-in (either multiple ones or split from a large one on " "import). At the end, the imported Godot scene will contain the animations in " "a ``AnimationPlayer`` node." msgstr "" #: ../../docs/tutorials/animation/animation_tree.rst:29 msgid "" "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." msgstr "" #: ../../docs/tutorials/animation/animation_tree.rst:32 msgid "" "This is how it's done in the `Third Person Shooter demo `_, for reference:" msgstr "" #: ../../docs/tutorials/animation/animation_tree.rst:36 msgid "" "A new scene was created for the player with a ``KinematicBody`` as root. " "Inside this scene, the original ``.dae`` (Collada) file was instantiated and " "an ``AnimationTree`` node was created." msgstr "" #: ../../docs/tutorials/animation/animation_tree.rst:40 #, fuzzy msgid "Creating a tree" msgstr "Tạo nội dung" #: ../../docs/tutorials/animation/animation_tree.rst:42 msgid "" "There are three main types of nodes that can be used in ``AnimationTree``:" msgstr "" #: ../../docs/tutorials/animation/animation_tree.rst:44 msgid "" "Animation nodes, which reference an animation from the linked " "``AnimationTree``." msgstr "" #: ../../docs/tutorials/animation/animation_tree.rst:45 msgid "Animation Root nodes, which are used to blend sub-nodes." msgstr "" #: ../../docs/tutorials/animation/animation_tree.rst:46 msgid "" "Animation Blend nodes, which are used within ``AnimationNodeBlendTree`` as " "single-graph blending via multiple input ports." msgstr "" #: ../../docs/tutorials/animation/animation_tree.rst:48 msgid "To set a root node in ``AnimationTree``, a few types are available:" msgstr "" #: ../../docs/tutorials/animation/animation_tree.rst:52 msgid "" "``AnimationNodeAnimation``: Selects an animation from the list and plays it. " "This is the simplest root node, and generally not used directly as root." msgstr "" #: ../../docs/tutorials/animation/animation_tree.rst:53 msgid "" "``AnimationNodeBlendTree``: Contains many *blend* type nodes, such as mix, " "blend2, blend3, one shot, etc. This is one of the most commonly used roots." msgstr "" #: ../../docs/tutorials/animation/animation_tree.rst:54 msgid "" "``AnimationNodeStateMachine``: Contains multiple root nodes as children in a " "graph. Each node is used as a *state*, and provides multiple functions to " "alternate between states." msgstr "" #: ../../docs/tutorials/animation/animation_tree.rst:55 msgid "" "``AnimationNodeBlendSpace2D``: Allows placing root nodes in a 2D blend " "space. Control the blend position in 2D to mix between multiple animations." msgstr "" #: ../../docs/tutorials/animation/animation_tree.rst:56 msgid "``AnimationNodeBlendSpace1D``: Simplified version of the above (1D)." msgstr "" #: ../../docs/tutorials/animation/animation_tree.rst:59 msgid "Blend tree" msgstr "" #: ../../docs/tutorials/animation/animation_tree.rst:61 msgid "" "An ``AnimationNodeBlendTree`` can contain both root and regular nodes used " "for blending. Nodes are added to the graph from a menu:" msgstr "" #: ../../docs/tutorials/animation/animation_tree.rst:65 msgid "" "All blend trees contain an ``Output`` node by default, and something has to " "be connected to it in order for animations to play." msgstr "" #: ../../docs/tutorials/animation/animation_tree.rst:67 msgid "" "The easiest way to test this functionality is to connect an ``Animation`` " "node to it directly:" msgstr "" #: ../../docs/tutorials/animation/animation_tree.rst:71 msgid "" "This will simply play back the animation. Make sure that the " "``AnimationTree`` is active for something to actually happen." msgstr "" #: ../../docs/tutorials/animation/animation_tree.rst:73 msgid "Following is a short description of available nodes:" msgstr "" #: ../../docs/tutorials/animation/animation_tree.rst:76 msgid "Blend2 / Blend3" msgstr "" #: ../../docs/tutorials/animation/animation_tree.rst:78 msgid "" "These nodes will blend between two or three inputs by a user-specified blend " "value:" msgstr "" #: ../../docs/tutorials/animation/animation_tree.rst:82 msgid "For more complex blending, it is advised to use blend spaces instead." msgstr "" #: ../../docs/tutorials/animation/animation_tree.rst:84 msgid "" "Blending can also use filters, i.e. you can control individually which " "tracks go through the blend function. This is very useful for layering " "animations on top of each other." msgstr "" #: ../../docs/tutorials/animation/animation_tree.rst:90 msgid "OneShot" msgstr "" #: ../../docs/tutorials/animation/animation_tree.rst:92 msgid "" "This node will execute a sub-animation and return once it finishes. Blend " "times for fading in and out can be customized, as well as filters." msgstr "" #: ../../docs/tutorials/animation/animation_tree.rst:97 msgid "Seek" msgstr "" #: ../../docs/tutorials/animation/animation_tree.rst:99 msgid "" "This node can be used to cause a seek command to happen to any sub-children " "of the animation graph. Use this node type to play an ``Animation`` from the " "start or a certain playback position inside the ``AnimationNodeBlendTree``." msgstr "" #: ../../docs/tutorials/animation/animation_tree.rst:101 msgid "" "After setting the time and changing the animation playback, the seek node " "automatically goes into sleep mode on the next process frame by setting its " "``seek_position`` value to ``-1.0``." msgstr "" #: ../../docs/tutorials/animation/animation_tree.rst:125 msgid "TimeScale" msgstr "" #: ../../docs/tutorials/animation/animation_tree.rst:127 msgid "" "Allows scaling the speed of the animation (or reverse it) in any children " "nodes. Setting it to 0 will pause the animation." msgstr "" #: ../../docs/tutorials/animation/animation_tree.rst:130 msgid "Transition" msgstr "" #: ../../docs/tutorials/animation/animation_tree.rst:132 msgid "" "Very simple state machine (when you don't want to cope with a " "``StateMachine`` node). Animations can be connected to the outputs and " "transition times can be specified." msgstr "" #: ../../docs/tutorials/animation/animation_tree.rst:135 msgid "BlendSpace2D" msgstr "" #: ../../docs/tutorials/animation/animation_tree.rst:137 msgid "" "``BlendSpace2D`` is a node to do advanced blending in two dimensions. Points " "are added to a two-dimensional space and then a position can be controlled " "to determine blending:" msgstr "" #: ../../docs/tutorials/animation/animation_tree.rst:142 msgid "" "The ranges in X and Y can be controlled (and labeled for convenience). By " "default, points can be placed anywhere (just right-click on the coordinate " "system or use the *add point* button) and triangles will be generated " "automatically using Delaunay." msgstr "" #: ../../docs/tutorials/animation/animation_tree.rst:147 msgid "" "It is also possible to draw the triangles manually by disabling the *auto " "triangle* option, though this is rarely necessary:" msgstr "" #: ../../docs/tutorials/animation/animation_tree.rst:151 msgid "" "Finally, it is possible to change the blend mode. By default, blending " "happens by interpolating points inside the closest triangle. When dealing " "with 2D animations (frame by frame), you may want to switch to *Discrete* " "mode. Alternatively, if you want to keep the current play position when " "switching between discrete animations, there is a *Carry* mode. This mode " "can be changed in the *Blend* menu:" msgstr "" #: ../../docs/tutorials/animation/animation_tree.rst:159 msgid "BlendSpace1D" msgstr "" #: ../../docs/tutorials/animation/animation_tree.rst:161 msgid "" "This is similar to 2D blend spaces, but in one dimension (so triangles are " "not needed)." msgstr "" #: ../../docs/tutorials/animation/animation_tree.rst:164 msgid "StateMachine" msgstr "" #: ../../docs/tutorials/animation/animation_tree.rst:166 msgid "" "This node is a relatively simple state machine. Root nodes can be created " "and connected via lines. States are connected via *Transitions*, which are " "connections with special properties. Transitions are uni-directional, but " "two can be used to connect in both ways." msgstr "" #: ../../docs/tutorials/animation/animation_tree.rst:171 msgid "There are many types of transitions:" msgstr "" #: ../../docs/tutorials/animation/animation_tree.rst:175 msgid "" "*Immediate*: Will switch to the next state immediately. The current state " "will end and blend into the beginning of the new one." msgstr "" #: ../../docs/tutorials/animation/animation_tree.rst:176 msgid "" "*Sync*: Will switch to the next state immediately, but will seek the new " "state to the playback position of the old state." msgstr "" #: ../../docs/tutorials/animation/animation_tree.rst:177 msgid "" "*At End*: Will wait for the current state playback to end, then switch to " "the beginning of the next state animation." msgstr "" #: ../../docs/tutorials/animation/animation_tree.rst:179 msgid "" "Transitions also have a few properties. Click any transition and it will be " "displayed in the inspector dock:" msgstr "" #: ../../docs/tutorials/animation/animation_tree.rst:183 msgid "" "*Switch Mode* is the transition type (see above), it can be modified after " "creation here." msgstr "" #: ../../docs/tutorials/animation/animation_tree.rst:184 msgid "" "*Auto Advance* will turn on the transition automatically when this state is " "reached. This works best with the *At End* switch mode." msgstr "" #: ../../docs/tutorials/animation/animation_tree.rst:185 msgid "" "*Advance Condition* will turn on auto advance when this condition is set. " "This is a custom text field that can be filled with a variable name. The " "variable can be modified from code (more on this later)." msgstr "" #: ../../docs/tutorials/animation/animation_tree.rst:187 msgid "*Xfade Time* is the time to cross-fade between this state and the next." msgstr "" #: ../../docs/tutorials/animation/animation_tree.rst:188 msgid "" "*Priority* is used together with the ``travel()`` function from code (more " "on this later). When travelling from a state to another, give more priority " "to this node." msgstr "" #: ../../docs/tutorials/animation/animation_tree.rst:189 msgid "" "*Disabled* allows to disable this transition (it will not be used during " "travel or auto advance)." msgstr "" #: ../../docs/tutorials/animation/animation_tree.rst:193 msgid "Root motion" msgstr "" #: ../../docs/tutorials/animation/animation_tree.rst:195 msgid "" "When working with 3D animations, a popular technique is for animators to use " "the root skeleton bone to give motion to the rest of the skeleton. This " "allows animating characters in a way where steps actually match the floor " "below. It also allows precise interaction with objects during cinematics." msgstr "" #: ../../docs/tutorials/animation/animation_tree.rst:198 msgid "" "When playing back the animation in Godot, it is possible to select this bone " "as the *root motion track*. Doing so will cancel the bone transformation " "visually (the animation will stay in place)." msgstr "" #: ../../docs/tutorials/animation/animation_tree.rst:203 msgid "" "Afterwards, the actual motion can be retrieved via the :ref:`AnimationTree " "` API as a transform:" msgstr "" #: ../../docs/tutorials/animation/animation_tree.rst:214 msgid "" "This can be fed to functions such as :ref:`KinematicBody.move_and_slide " "` to control the character " "movement." msgstr "" #: ../../docs/tutorials/animation/animation_tree.rst:216 msgid "" "There is also a tool node, ``RootMotionView``, that can be placed in a scene " "and will act as a custom floor for your character and animations (this node " "is normally disabled during the game)." msgstr "" #: ../../docs/tutorials/animation/animation_tree.rst:223 msgid "Controlling from code" msgstr "" #: ../../docs/tutorials/animation/animation_tree.rst:225 msgid "" "After building the tree and previewing it, the only question remaining is " "\"How is all this controlled from code?\"." msgstr "" #: ../../docs/tutorials/animation/animation_tree.rst:227 msgid "" "Keep in mind that the animation nodes are just resources and, as such, they " "are shared between all the instances. Setting values in the nodes directly " "will affect all instances of the scene that uses this ``AnimationTree``. " "This has some cool use cases, though, e.g. you can copy and paste parts of " "your animation tree, or reuse nodes with a complex layout (such as a state " "machine or blend space) in different animation trees." msgstr "" #: ../../docs/tutorials/animation/animation_tree.rst:232 msgid "" "The actual animation data is contained in the ``AnimationTree`` node and is " "accessed via properties. Check the \"Parameters\" section of the " "``AnimationTree`` node to see all the parameters that can be modified in " "real-time:" msgstr "" #: ../../docs/tutorials/animation/animation_tree.rst:237 msgid "" "This is handy because it makes it possible to animate them from an " "``AnimationPlayer``, or even the ``AnimationTree`` itself, allowing the " "realization of very complex animation logic." msgstr "" #: ../../docs/tutorials/animation/animation_tree.rst:240 msgid "" "To modify these values from code, the property path must be obtained. This " "is done easily by hovering the mouse over any of the parameters:" msgstr "" #: ../../docs/tutorials/animation/animation_tree.rst:244 msgid "Which allows setting them or reading them:" msgstr "" #: ../../docs/tutorials/animation/animation_tree.rst:259 msgid "State machine travel" msgstr "" #: ../../docs/tutorials/animation/animation_tree.rst:261 msgid "" "One of the nice features in Godot's ``StateMachine`` implementation is the " "ability to travel. The graph can be instructed to go from the current state " "to another one, while visiting all the intermediate ones. This is done via " "the A\\* algorithm. In the absence of any transition between the current " "state and the destination state, the graph teleports to the destination " "state." msgstr "" #: ../../docs/tutorials/animation/animation_tree.rst:265 msgid "" "To use the travel ability, you should first retrieve the :ref:" "`AnimationNodeStateMachinePlayback " "` object from the ``AnimationTree`` " "node (it is exported as a property)." msgstr "" #: ../../docs/tutorials/animation/animation_tree.rst:278 msgid "" "Once retrieved, it can be used by calling one of the many functions it " "offers:" msgstr "" #: ../../docs/tutorials/animation/animation_tree.rst:289 msgid "" "The state machine must be running before you can travel. Make sure to either " "call ``start()`` or choose a node to **Autoplay on Load**." msgstr "" #: ../../docs/tutorials/assets_pipeline/index.rst:2 msgid "Assets pipeline" msgstr "" #: ../../docs/tutorials/assets_pipeline/import_process.rst:4 msgid "Import process" msgstr "" #: ../../docs/tutorials/assets_pipeline/import_process.rst:7 msgid "Importing assets in Godot 3.0+" msgstr "" #: ../../docs/tutorials/assets_pipeline/import_process.rst:9 msgid "" "Previously, importing assets in Godot 2.x required manual maintenance of a " "separate directory with source assets. Without doing this, it was impossible " "to specify how to convert and change import flags for textures, audio files, " "scenes, etc." msgstr "" #: ../../docs/tutorials/assets_pipeline/import_process.rst:14 msgid "" "In Godot 3.0+, we use a more modern approach to importing: Simply drop your " "assets (image files, scenes, audio files, fonts, etc) directly in the " "project folder (copy them manually with your OS file explorer). Godot will " "automatically import these files internally and keep the imported resources " "hidden in a ``res://.import`` folder." msgstr "" #: ../../docs/tutorials/assets_pipeline/import_process.rst:20 msgid "" "This means that when trying to access imported assets through code you need " "to use the :ref:`Resource Loader` as it will " "automatically take into account where the internal files are saved. If you " "try and access an imported asset using the :ref:`File ` class it " "will work in the editor, but break in the exported project." msgstr "" #: ../../docs/tutorials/assets_pipeline/import_process.rst:26 msgid "" "However, the :ref:`Resource Loader` cannot access non " "imported files, only the :ref:`File ` class can." msgstr "" #: ../../docs/tutorials/assets_pipeline/import_process.rst:30 msgid "Changing import parameters" msgstr "" #: ../../docs/tutorials/assets_pipeline/import_process.rst:32 msgid "" "To change the import parameters of an asset in Godot (again, keep in mind " "import parameters are only present in non-native Godot resource types) " "select the relevant resource in the filesystem dock:" msgstr "" #: ../../docs/tutorials/assets_pipeline/import_process.rst:38 msgid "" "Then, after adjusting the parameters, press \"Reimport\". These parameters " "will only be used for this asset and on future reimports." msgstr "" #: ../../docs/tutorials/assets_pipeline/import_process.rst:41 msgid "" "Changing the import parameters of several assets at the same time is also " "possible. Simply select all of them together in the resources dock and the " "exposed parameters will apply to all of them when reimporting." msgstr "" #: ../../docs/tutorials/assets_pipeline/import_process.rst:46 msgid "Reimporting multiple assets" msgstr "" #: ../../docs/tutorials/assets_pipeline/import_process.rst:48 msgid "" "While working on a project you may find that several assets need to have the " "same parameters changed, such as enabling mipmaps, but you only want those " "specific parameters changed. To do this, select every asset you want to " "reimport in the file system. In the import tab there will now be a checkbox " "to the left of every import parameter." msgstr "" #: ../../docs/tutorials/assets_pipeline/import_process.rst:56 msgid "" "Select the checkbox of the parameters you want to change on your imported " "assets, then change the parameters normally. Finally, click the reimport " "button and every selected asset will be reimported with only those " "parameters changed." msgstr "" #: ../../docs/tutorials/assets_pipeline/import_process.rst:62 msgid "Automatic reimport" msgstr "" #: ../../docs/tutorials/assets_pipeline/import_process.rst:64 msgid "" "When the MD5 checksum of the source asset changes, Godot will perform an " "automatic reimport of it, applying the preset configured for that specific " "asset." msgstr "" #: ../../docs/tutorials/assets_pipeline/import_process.rst:69 msgid "Files generated" msgstr "" #: ../../docs/tutorials/assets_pipeline/import_process.rst:71 msgid "" "Importing will add an extra ``.import`` file, containing the import " "configuration. Make sure to commit these to your version control system!" msgstr "" #: ../../docs/tutorials/assets_pipeline/import_process.rst:76 msgid "" "Additionally, extra assets will be preset in the hidden ``res://.import`` " "folder:" msgstr "" #: ../../docs/tutorials/assets_pipeline/import_process.rst:80 msgid "" "If any of the files present in this folder is erased (or the whole folder), " "the asset or assets will be reimported automatically. As such, committing " "this folder to the version control system is optional. It can shorten " "reimporting time when checking out on another computer, but it takes " "considerably more space and transfer time. Pick your poison!" msgstr "" #: ../../docs/tutorials/assets_pipeline/import_process.rst:87 msgid "Changing import resource type" msgstr "" #: ../../docs/tutorials/assets_pipeline/import_process.rst:89 msgid "" "Some source assets can be imported as different types of resources. For " "this, select the relevant type of resource desired and press \"Reimport\":" msgstr "" #: ../../docs/tutorials/assets_pipeline/import_process.rst:97 msgid "Changing default import parameters" msgstr "" #: ../../docs/tutorials/assets_pipeline/import_process.rst:99 msgid "" "Different types of games might require different defaults. Changing the " "defaults per project can be achieved by using the \"Preset..\" Menu. Besides " "some resource types offering presets, the default setting can be saved and " "cleared too:" msgstr "" #: ../../docs/tutorials/assets_pipeline/import_process.rst:107 msgid "Simplicity is key!" msgstr "" #: ../../docs/tutorials/assets_pipeline/import_process.rst:109 msgid "" "This is a very simple workflow which should take very little time to get " "used to. It also enforces a more correct way to deal with resources." msgstr "" #: ../../docs/tutorials/assets_pipeline/import_process.rst:112 msgid "" "There are many types of assets available for import, so please continue " "reading to understand how to work with all of them!" msgstr "" #: ../../docs/tutorials/assets_pipeline/importing_images.rst:4 msgid "Importing images" msgstr "" #: ../../docs/tutorials/assets_pipeline/importing_images.rst:7 msgid "Supported image formats" msgstr "" #: ../../docs/tutorials/assets_pipeline/importing_images.rst:9 msgid "Godot can import the following image formats:" msgstr "" #: ../../docs/tutorials/assets_pipeline/importing_images.rst:11 msgid "" "BMP (``.bmp``) - No support for 16-bit per pixel images. Only 1-bit, 4-bit, " "8-bit, 24-bit, and 32-bit per pixel images are supported." msgstr "" #: ../../docs/tutorials/assets_pipeline/importing_images.rst:13 msgid "" "DirectDraw Surface (``.dds``) - If mipmaps are present in the texture, they " "will be loaded directly. This can be used to achieve effects using custom " "mipmaps." msgstr "" #: ../../docs/tutorials/assets_pipeline/importing_images.rst:16 msgid "" "OpenEXR (``.exr``) - Supports HDR (highly recommended for panorama skies)." msgstr "" #: ../../docs/tutorials/assets_pipeline/importing_images.rst:18 msgid "" "Radiance HDR (``.hdr``) - Supports HDR (highly recommended for panorama " "skies)." msgstr "" #: ../../docs/tutorials/assets_pipeline/importing_images.rst:20 msgid "" "JPEG (``.jpg``, ``.jpeg``) - Doesn't support transparency per the format's " "limitations." msgstr "" #: ../../docs/tutorials/assets_pipeline/importing_images.rst:22 msgid "" "PNG (``.png``) - Precision is limited to 8 bits per channel upon importing " "(no HDR images)." msgstr "" #: ../../docs/tutorials/assets_pipeline/importing_images.rst:24 msgid "Truevision Targa (``.tga``)" msgstr "" #: ../../docs/tutorials/assets_pipeline/importing_images.rst:25 msgid "" "SVG (``.svg``, ``.svgz``) - SVGs are rasterized using `NanoSVG `__ when importing them. Support is limited; " "complex vectors may not render correctly. For complex vectors, rendering " "them to PNGs using Inkscape is often a better solution. This can be " "automated thanks to its `command-line interface `__." msgstr "" #: ../../docs/tutorials/assets_pipeline/importing_images.rst:30 msgid "" "WebP (``.webp``) - WebP files support transparency and can be compressed " "lossily or losslessly. The precision is limited to 8 bits per channel." msgstr "" #: ../../docs/tutorials/assets_pipeline/importing_images.rst:36 msgid "" "If you've compiled the Godot editor from source with specific modules " "disabled, some formats may not be available." msgstr "" #: ../../docs/tutorials/assets_pipeline/importing_images.rst:40 msgid "Importing textures" msgstr "" #: ../../docs/tutorials/assets_pipeline/importing_images.rst:42 msgid "" "The default action in Godot is to import images as textures. Textures are " "stored in video memory and can't be accessed directly. This is what makes " "drawing them efficient." msgstr "" #: ../../docs/tutorials/assets_pipeline/importing_images.rst:46 msgid "Import options are vast:" msgstr "" #: ../../docs/tutorials/assets_pipeline/importing_images.rst:51 msgid "Detect 3D" msgstr "" #: ../../docs/tutorials/assets_pipeline/importing_images.rst:53 msgid "" "This option makes Godot be aware of when a texture (which is imported for 2D " "as default) is used in 3D. If this happens, setting are changed so the " "texture flags are friendlier to 3D (mipmaps, filter and repeat become " "enabled and compression is changed to VRAM). Texture is also reimported " "automatically." msgstr "" #: ../../docs/tutorials/assets_pipeline/importing_images.rst:57 msgid "Compression" msgstr "Nén" #: ../../docs/tutorials/assets_pipeline/importing_images.rst:59 msgid "" "Images are one of the largest assets in a game. To handle them efficiently, " "they need to be compressed. Godot offers several compression methods, " "depending on the use case." msgstr "" #: ../../docs/tutorials/assets_pipeline/importing_images.rst:63 msgid "Compress Mode" msgstr "" #: ../../docs/tutorials/assets_pipeline/importing_images.rst:65 msgid "" "**VRAM Compression:** This is the most common compression mode for 3D " "assets. Size on disk is reduced and video memory usage is also decreased " "considerably (usually by a factor between 4 and 6). This mode should be " "avoided for 2D as it exhibits noticeable artifacts." msgstr "" #: ../../docs/tutorials/assets_pipeline/importing_images.rst:69 msgid "" "**Lossless Compression:** This is the most common compression mode for 2D " "assets. It shows assets without any kind of artifacting, and disk " "compression is decent. It will use considerably more amount of video memory " "than VRAM Compression, though. This is also the recommended setting for " "pixel art." msgstr "" #: ../../docs/tutorials/assets_pipeline/importing_images.rst:73 msgid "" "**Lossy Compression:** This is a good choice for large 2D assets. It has " "some artifacts, but less than VRAM and the file size is several times lower " "compared to Lossless or Uncompressed. Video memory usage isn't decreased by " "this mode; it's the same as with Lossless Compression or Uncompressed." msgstr "" #: ../../docs/tutorials/assets_pipeline/importing_images.rst:77 msgid "" "**Uncompressed:** Only useful for formats that can't be compressed (such as " "raw float images)." msgstr "" #: ../../docs/tutorials/assets_pipeline/importing_images.rst:80 msgid "" "In this table, each of the four options are described together with their " "advantages and disadvantages (|good| = best, |bad| = worst):" msgstr "" #: ../../docs/tutorials/assets_pipeline/importing_images.rst:101 msgid "good" msgstr "" #: ../../docs/tutorials/assets_pipeline/importing_images.rst:99 msgid "bad" msgstr "" #: ../../docs/tutorials/assets_pipeline/importing_images.rst:84 msgid "Uncompressed" msgstr "" #: ../../docs/tutorials/assets_pipeline/importing_images.rst:84 msgid "Compress Lossless" msgstr "" #: ../../docs/tutorials/assets_pipeline/importing_images.rst:84 msgid "Compress Lossy" msgstr "" #: ../../docs/tutorials/assets_pipeline/importing_images.rst:84 msgid "Compress VRAM" msgstr "" #: ../../docs/tutorials/assets_pipeline/importing_images.rst:86 #: ../../docs/tutorials/editor/command_line_tutorial.rst:33 #: ../../docs/tutorials/editor/command_line_tutorial.rst:47 #: ../../docs/tutorials/editor/command_line_tutorial.rst:75 #: ../../docs/tutorials/editor/command_line_tutorial.rst:103 #: ../../docs/tutorials/editor/command_line_tutorial.rst:133 #: ../../docs/tutorials/export/exporting_for_mac.rst:49 #: ../../docs/tutorials/export/exporting_for_mac.rst:72 #: ../../docs/tutorials/export/exporting_for_mac.rst:95 #: ../../docs/tutorials/export/exporting_for_mac.rst:138 #: ../../docs/tutorials/inputs/inputevent.rst:130 #: ../../docs/tutorials/io/binary_serialization_api.rst:102 #: ../../docs/tutorials/io/binary_serialization_api.rst:113 #: ../../docs/tutorials/io/binary_serialization_api.rst:122 #: ../../docs/tutorials/io/binary_serialization_api.rst:133 #: ../../docs/tutorials/io/binary_serialization_api.rst:142 #: ../../docs/tutorials/io/binary_serialization_api.rst:151 #: ../../docs/tutorials/io/binary_serialization_api.rst:164 #: ../../docs/tutorials/io/binary_serialization_api.rst:175 #: ../../docs/tutorials/io/binary_serialization_api.rst:190 #: ../../docs/tutorials/io/binary_serialization_api.rst:203 #: ../../docs/tutorials/io/binary_serialization_api.rst:222 #: ../../docs/tutorials/io/binary_serialization_api.rst:237 #: ../../docs/tutorials/io/binary_serialization_api.rst:252 #: ../../docs/tutorials/io/binary_serialization_api.rst:271 #: ../../docs/tutorials/io/binary_serialization_api.rst:296 #: ../../docs/tutorials/io/binary_serialization_api.rst:327 #: ../../docs/tutorials/io/binary_serialization_api.rst:342 #: ../../docs/tutorials/io/binary_serialization_api.rst:351 #: ../../docs/tutorials/io/binary_serialization_api.rst:362 #: ../../docs/tutorials/io/binary_serialization_api.rst:372 #: ../../docs/tutorials/io/binary_serialization_api.rst:391 #: ../../docs/tutorials/io/binary_serialization_api.rst:403 #: ../../docs/tutorials/io/binary_serialization_api.rst:415 #: ../../docs/tutorials/io/binary_serialization_api.rst:428 #: ../../docs/tutorials/io/binary_serialization_api.rst:439 #: ../../docs/tutorials/io/binary_serialization_api.rst:450 #: ../../docs/tutorials/io/binary_serialization_api.rst:458 #: ../../docs/tutorials/io/binary_serialization_api.rst:471 #: ../../docs/tutorials/io/binary_serialization_api.rst:484 #: ../../docs/tutorials/io/binary_serialization_api.rst:499 #: ../../docs/tutorials/plugins/editor/import_plugins.rst:246 #: ../../docs/tutorials/scripting/gdscript/gdscript_basics.rst:141 #: ../../docs/tutorials/scripting/creating_script_templates.rst:125 #: ../../docs/tutorials/shaders/shader_reference/shading_language.rst:21 #: ../../docs/tutorials/shaders/shader_reference/shading_language.rst:523 #: ../../docs/tutorials/shaders/shader_reference/shading_language.rst:569 #: ../../docs/tutorials/shaders/shader_reference/shading_language.rst:643 #: ../../docs/tutorials/shaders/shader_reference/spatial_shader.rst:15 #: ../../docs/tutorials/shaders/shader_reference/spatial_shader.rst:94 #: ../../docs/tutorials/shaders/shader_reference/spatial_shader.rst:139 #: ../../docs/tutorials/shaders/shader_reference/spatial_shader.rst:191 #: ../../docs/tutorials/shaders/shader_reference/spatial_shader.rst:309 #: ../../docs/tutorials/shaders/shader_reference/canvas_item_shader.rst:17 #: ../../docs/tutorials/shaders/shader_reference/canvas_item_shader.rst:52 #: ../../docs/tutorials/shaders/shader_reference/canvas_item_shader.rst:114 #: ../../docs/tutorials/shaders/shader_reference/canvas_item_shader.rst:165 #: ../../docs/tutorials/shaders/shader_reference/canvas_item_shader.rst:218 #: ../../docs/tutorials/shaders/shader_reference/particle_shader.rst:30 #: ../../docs/tutorials/shaders/shader_reference/particle_shader.rst:53 #: ../../docs/tutorials/shaders/shader_reference/particle_shader.rst:65 #: ../../docs/tutorials/shaders/converting_glsl_to_godot_shaders.rst:98 #: ../../docs/tutorials/shaders/converting_glsl_to_godot_shaders.rst:171 #: ../../docs/tutorials/shaders/converting_glsl_to_godot_shaders.rst:236 #: ../../docs/tutorials/ui/bbcode_in_richtextlabel.rst:53 msgid "Description" msgstr "Mô tả" #: ../../docs/tutorials/assets_pipeline/importing_images.rst:86 msgid "Stored as raw pixels" msgstr "" #: ../../docs/tutorials/assets_pipeline/importing_images.rst:86 msgid "Stored as Lossless WebP / PNG" msgstr "" #: ../../docs/tutorials/assets_pipeline/importing_images.rst:86 msgid "Stored as Lossy WebP" msgstr "" #: ../../docs/tutorials/assets_pipeline/importing_images.rst:86 msgid "Stored as S3TC/BC or PVRTC/ETC depending on platform" msgstr "" #: ../../docs/tutorials/assets_pipeline/importing_images.rst:88 msgid "Size on Disk" msgstr "" #: ../../docs/tutorials/assets_pipeline/importing_images.rst:88 #: ../../docs/tutorials/assets_pipeline/importing_images.rst:90 msgid "|bad| Large" msgstr "" #: ../../docs/tutorials/assets_pipeline/importing_images.rst:88 msgid "|regular| Small" msgstr "" #: ../../docs/tutorials/assets_pipeline/importing_images.rst:103 msgid "regular" msgstr "" #: ../../docs/tutorials/assets_pipeline/importing_images.rst:88 msgid "|good| Very Small" msgstr "" #: ../../docs/tutorials/assets_pipeline/importing_images.rst:90 msgid "Memory Usage" msgstr "" #: ../../docs/tutorials/assets_pipeline/importing_images.rst:90 msgid "|good| Small" msgstr "" #: ../../docs/tutorials/assets_pipeline/importing_images.rst:92 msgid "Performance" msgstr "" #: ../../docs/tutorials/assets_pipeline/importing_images.rst:92 #: ../../docs/tutorials/assets_pipeline/importing_images.rst:96 msgid "|regular| Normal" msgstr "" #: ../../docs/tutorials/assets_pipeline/importing_images.rst:92 #: ../../docs/tutorials/assets_pipeline/importing_images.rst:96 msgid "|good| Fast" msgstr "" #: ../../docs/tutorials/assets_pipeline/importing_images.rst:94 msgid "Quality Loss" msgstr "" #: ../../docs/tutorials/assets_pipeline/importing_images.rst:94 msgid "|good| None" msgstr "" #: ../../docs/tutorials/assets_pipeline/importing_images.rst:94 msgid "|regular| Slight" msgstr "" #: ../../docs/tutorials/assets_pipeline/importing_images.rst:94 msgid "|bad| Moderate" msgstr "" #: ../../docs/tutorials/assets_pipeline/importing_images.rst:96 msgid "Load Time" msgstr "" #: ../../docs/tutorials/assets_pipeline/importing_images.rst:96 msgid "|bad| Slow" msgstr "" #: ../../docs/tutorials/assets_pipeline/importing_images.rst:106 msgid "HDR Mode" msgstr "" #: ../../docs/tutorials/assets_pipeline/importing_images.rst:108 msgid "" "Godot supports high dynamic range textures (as .HDR or .EXR). These are " "mostly useful as high dynamic range equirectangular panorama skies (the " "internet has plenty if you search for them), which replace Cubemaps in Godot " "2.x. Modern PCs support the BC6H VRAM format, but there are still plenty " "that do not." msgstr "" #: ../../docs/tutorials/assets_pipeline/importing_images.rst:111 msgid "" "If you want Godot to ensure full compatibility in terms of the kind of " "textures, enable the \"Force RGBE\" option." msgstr "" #: ../../docs/tutorials/assets_pipeline/importing_images.rst:114 msgid "Normal Map" msgstr "" #: ../../docs/tutorials/assets_pipeline/importing_images.rst:116 msgid "" "When using a texture as normal map, only the red and green channels are " "required. Given regular texture compression algorithms produce artifacts " "that don't look that nice in normal maps, the RGTC compression format is the " "best fit for this data. Forcing this option to \"Enabled\" will make Godot " "import the image as RGTC compressed. By default, it's set to \"Detect\", " "which means that if the texture is ever used as a normal map, it will be " "changed to \"Enabled\" and reimported automatically." msgstr "" #: ../../docs/tutorials/assets_pipeline/importing_images.rst:121 msgid "" "Note that RGTC compression affects the resulting normal map image. You will " "have to adjust custom shaders that use the normal map to take this into " "account." msgstr "" #: ../../docs/tutorials/assets_pipeline/importing_images.rst:137 msgid "" "There are plenty of settings that can be toggled when importing an image as " "a texture, depending on the use case." msgstr "" #: ../../docs/tutorials/assets_pipeline/importing_images.rst:140 msgid "Repeat" msgstr "" #: ../../docs/tutorials/assets_pipeline/importing_images.rst:142 msgid "" "This setting is most commonly used in 3D, and is therefore generally " "disabled in 2D. It sets UV coordinates going beyond the 0,0 - 1,1 range to " "\"loop\"." msgstr "" #: ../../docs/tutorials/assets_pipeline/importing_images.rst:144 msgid "Repeating can optionally be set to mirrored mode." msgstr "" #: ../../docs/tutorials/assets_pipeline/importing_images.rst:147 #: ../../docs/tutorials/audio/audio_buses.rst:187 msgid "Filter" msgstr "" #: ../../docs/tutorials/assets_pipeline/importing_images.rst:149 msgid "" "When pixels become larger than the screen pixels, this option enables linear " "interpolation for them. The result is a smoother (less blocky) texture. This " "setting can be commonly used in 2D and 3D, but it's usually disabled when " "making pixel perfect games." msgstr "" #: ../../docs/tutorials/assets_pipeline/importing_images.rst:152 msgid "Mipmaps" msgstr "" #: ../../docs/tutorials/assets_pipeline/importing_images.rst:154 msgid "" "When pixels become smaller than the screen, mipmaps kick in. This helps " "reduce the grainy effect when shrinking the textures. Keep in mind that, in " "older hardware (GLES2, mainly mobile), there are some requirements to use " "mipmaps:" msgstr "" #: ../../docs/tutorials/assets_pipeline/importing_images.rst:157 msgid "Texture width and height must be powers of 2" msgstr "" #: ../../docs/tutorials/assets_pipeline/importing_images.rst:158 msgid "Repeat must be enabled" msgstr "" #: ../../docs/tutorials/assets_pipeline/importing_images.rst:160 msgid "" "Keep in mind the above when making phone games and applications, want to aim " "for full compatibility, and need mipmaps." msgstr "" #: ../../docs/tutorials/assets_pipeline/importing_images.rst:162 msgid "" "When doing 3D, mipmap should be turned on, as this also improves performance " "(smaller versions of the texture are used for objects further away)." msgstr "" #: ../../docs/tutorials/assets_pipeline/importing_images.rst:165 msgid "Anisotropic" msgstr "" #: ../../docs/tutorials/assets_pipeline/importing_images.rst:167 msgid "" "When textures are near parallel to the view (like floors), this option makes " "them have more detail by reducing blurriness." msgstr "" #: ../../docs/tutorials/assets_pipeline/importing_images.rst:170 msgid "sRGB" msgstr "" #: ../../docs/tutorials/assets_pipeline/importing_images.rst:172 msgid "" "Godot uses Linear colorspace when rendering 3D. Textures mapped to albedo or " "detail channels need to have this option turned on in order for colors to " "look correct. When set to **Detect** mode, the texture will be marked as " "sRGB when used in albedo channels." msgstr "" #: ../../docs/tutorials/assets_pipeline/importing_images.rst:177 msgid "" "Since the texture will have its data modified when sRGB is enabled, this " "means using the same texture in both 2D and 3D will make the texture display " "with incorrect colors in either 2D or 3D." msgstr "" #: ../../docs/tutorials/assets_pipeline/importing_images.rst:181 msgid "" "To work around this, make a copy of the texture on the filesystem and enable " "sRGB on one of the copies only. Use the copy with sRGB enabled in 3D, and " "the copy with sRGB disabled in 2D." msgstr "" #: ../../docs/tutorials/assets_pipeline/importing_images.rst:186 msgid "Process" msgstr "" #: ../../docs/tutorials/assets_pipeline/importing_images.rst:188 msgid "" "Some special processes can be applied to images when imported as textures." msgstr "" #: ../../docs/tutorials/assets_pipeline/importing_images.rst:191 msgid "Fix Alpha Border" msgstr "" #: ../../docs/tutorials/assets_pipeline/importing_images.rst:193 msgid "" "This puts pixels of the same surrounding color in transition from " "transparency to non transparency. It helps mitigate the outline effect when " "exporting images from Photoshop and the like." msgstr "" #: ../../docs/tutorials/assets_pipeline/importing_images.rst:198 msgid "" "It's a good idea to leave it on by default, unless specific values are " "needed." msgstr "" #: ../../docs/tutorials/assets_pipeline/importing_images.rst:201 msgid "Premultiplied Alpha" msgstr "" #: ../../docs/tutorials/assets_pipeline/importing_images.rst:203 msgid "" "An alternative to fix darkened borders is to use premultiplied alpha. By " "enabling this option, the texture will be converted to this format. Keep in " "mind that a material will need to be created that uses the PREMULT ALPHA " "blend mode on canvas items that need it." msgstr "" #: ../../docs/tutorials/assets_pipeline/importing_images.rst:207 msgid "HDR as sRGB" msgstr "" #: ../../docs/tutorials/assets_pipeline/importing_images.rst:209 msgid "" "A few HDR files are broken and contain sRGB color data. It is advised not to " "use them, but, in the worst-case scenario, toggling this option on will make " "them look right." msgstr "" #: ../../docs/tutorials/assets_pipeline/importing_images.rst:212 msgid "Invert Color" msgstr "" #: ../../docs/tutorials/assets_pipeline/importing_images.rst:214 msgid "" "Reverses the image's color. This is useful, for example, to convert a height " "map generated by external programs to depth map to use with :ref:" "`doc_spatial_material`." msgstr "" #: ../../docs/tutorials/assets_pipeline/importing_images.rst:217 msgid "Svg" msgstr "" #: ../../docs/tutorials/assets_pipeline/importing_images.rst:222 msgid "" "This option only applies to SVG files. It controls the scale of the SVG " "image. The default scale (1.0) will make the imported SVG match its original " "design scale." msgstr "" #: ../../docs/tutorials/assets_pipeline/importing_audio_samples.rst:4 msgid "Importing audio samples" msgstr "" #: ../../docs/tutorials/assets_pipeline/importing_audio_samples.rst:7 msgid "Supported files" msgstr "" #: ../../docs/tutorials/assets_pipeline/importing_audio_samples.rst:9 msgid "" "Godot provides three options to import your audio data: WAV, Ogg Vorbis and " "MP3." msgstr "" #: ../../docs/tutorials/assets_pipeline/importing_audio_samples.rst:12 msgid "Each has different advantages." msgstr "" #: ../../docs/tutorials/assets_pipeline/importing_audio_samples.rst:14 msgid "" "WAV files use raw data or light compression (IMA-ADPCM). They are " "lightweight on the CPU to play back (hundreds of simultaneous voices in this " "format are fine). The downside is that they take up a lot of disk space." msgstr "" #: ../../docs/tutorials/assets_pipeline/importing_audio_samples.rst:17 msgid "" "Ogg Vorbis files use a stronger compression that results in much smaller " "file size, but require significantly more processing power to play back." msgstr "" #: ../../docs/tutorials/assets_pipeline/importing_audio_samples.rst:20 msgid "" "MP3 files use better compression than WAV with IMA-ADPCM, but worse than Ogg " "Vorbis. This means that a MP3 file with roughly equal quality to Ogg Vorbis " "will be significantly larger. On the bright side, MP3 requires less CPU " "usage to play back compared to Ogg Vorbis. This makes MP3 useful for mobile " "and HTML5 projects where CPU resources are limited, especially when playing " "multiple compressed sounds at the same time (such as long ambient sounds)." msgstr "" #: ../../docs/tutorials/assets_pipeline/importing_audio_samples.rst:28 msgid "Here is a comparative chart." msgstr "" #: ../../docs/tutorials/assets_pipeline/importing_audio_samples.rst:31 msgid "Format" msgstr "Định dạng" #: ../../docs/tutorials/assets_pipeline/importing_audio_samples.rst:31 msgid "1 second of audio" msgstr "" #: ../../docs/tutorials/assets_pipeline/importing_audio_samples.rst:33 msgid "WAV 24-bit, 96 kHz, stereo" msgstr "" #: ../../docs/tutorials/assets_pipeline/importing_audio_samples.rst:33 msgid "576 KB" msgstr "" #: ../../docs/tutorials/assets_pipeline/importing_audio_samples.rst:35 msgid "WAV 16-bit, 44 kHz, mono" msgstr "" #: ../../docs/tutorials/assets_pipeline/importing_audio_samples.rst:35 msgid "88 KB" msgstr "" #: ../../docs/tutorials/assets_pipeline/importing_audio_samples.rst:37 msgid "WAV 16-bit, IMA-ADPCM, mono" msgstr "" #: ../../docs/tutorials/assets_pipeline/importing_audio_samples.rst:37 msgid "22 KB" msgstr "" #: ../../docs/tutorials/assets_pipeline/importing_audio_samples.rst:39 msgid "MP3 192 Kb/s, stereo" msgstr "" #: ../../docs/tutorials/assets_pipeline/importing_audio_samples.rst:39 msgid "24 KB" msgstr "" #: ../../docs/tutorials/assets_pipeline/importing_audio_samples.rst:41 msgid "Ogg Vorbis 128 Kb/s, stereo" msgstr "" #: ../../docs/tutorials/assets_pipeline/importing_audio_samples.rst:41 msgid "16 KB" msgstr "" #: ../../docs/tutorials/assets_pipeline/importing_audio_samples.rst:43 msgid "Ogg Vorbis 96 Kb/s, stereo" msgstr "" #: ../../docs/tutorials/assets_pipeline/importing_audio_samples.rst:43 msgid "12 KB" msgstr "" #: ../../docs/tutorials/assets_pipeline/importing_audio_samples.rst:46 msgid "" "Consider using WAV for short and repetitive sound effects, and Ogg Vorbis " "for music, speech, and long sound effects." msgstr "" #: ../../docs/tutorials/assets_pipeline/importing_audio_samples.rst:50 #: ../../docs/tutorials/best_practices/index.rst:2 msgid "Best practices" msgstr "" #: ../../docs/tutorials/assets_pipeline/importing_audio_samples.rst:52 msgid "" "Godot has an :ref:`extensive bus system ` with built-in " "effects. This saves SFX artists the need to add reverb to the sound effects, " "reducing their size greatly and ensuring correct trimming. Say no to SFX " "with baked reverb!" msgstr "" #: ../../docs/tutorials/assets_pipeline/importing_audio_samples.rst:59 msgid "As you can see above, sound effects become huge with reverb added." msgstr "" #: ../../docs/tutorials/assets_pipeline/importing_audio_samples.rst:62 msgid "Trimming" msgstr "" #: ../../docs/tutorials/assets_pipeline/importing_audio_samples.rst:64 msgid "" "One issue that happens often is that the waveform is exported with long " "silences at the beginning and at the end. These are inserted by DAWs when " "saving to a waveform, increase their size unnecessarily and add latency to " "the moment they are played back." msgstr "" #: ../../docs/tutorials/assets_pipeline/importing_audio_samples.rst:69 msgid "Importing as WAV with the **Trimming** option enabled solves this." msgstr "" #: ../../docs/tutorials/assets_pipeline/importing_audio_samples.rst:73 msgid "Looping" msgstr "" #: ../../docs/tutorials/assets_pipeline/importing_audio_samples.rst:75 msgid "" "Godot supports looping in the samples (tools such as Sound Forge or Audition " "can add loop points to WAV files). This is useful for sound effects, such as " "engines, machine guns etc. Ping-pong looping is also supported." msgstr "" #: ../../docs/tutorials/assets_pipeline/importing_audio_samples.rst:80 msgid "" "As an alternative, the Import dock has a **Loop** option that enables " "looping for the entire sample when importing." msgstr "" #: ../../docs/tutorials/assets_pipeline/importing_translations.rst:4 msgid "Importing translations" msgstr "" #: ../../docs/tutorials/assets_pipeline/importing_translations.rst:7 msgid "Games and internationalization" msgstr "" #: ../../docs/tutorials/assets_pipeline/importing_translations.rst:9 msgid "" "The world is full of different languages and cultures, so nowadays games are " "released in several languages. To handle this, internationalized text must " "be supported in any modern game engine." msgstr "" #: ../../docs/tutorials/assets_pipeline/importing_translations.rst:13 msgid "" "In regular desktop or mobile applications, internationalized text is usually " "located in resource files (or .po files for GNU stuff). Games, however, can " "use several orders of magnitude more text than applications, so they must " "support efficient methods for dealing with loads of multilingual text." msgstr "" #: ../../docs/tutorials/assets_pipeline/importing_translations.rst:19 msgid "" "There are two approaches to generate multilingual language games and " "applications. Both are based on a key:value system. The first is to use one " "of the languages as the key (usually English), the second is to use a " "specific identifier. The first approach is probably easier for development " "if a game is released first in English, later in other languages, but a " "complete nightmare if working with many languages at the same time." msgstr "" #: ../../docs/tutorials/assets_pipeline/importing_translations.rst:27 msgid "" "In general, games use the second approach and a unique ID is used for each " "string. This allows you to revise the text while it is being translated to " "other languages. The unique ID can be a number, a string, or a string with a " "number (it's just a unique string anyway)." msgstr "" #: ../../docs/tutorials/assets_pipeline/importing_translations.rst:32 msgid "" "If you need a more powerful file format, Godot also supports loading " "translations written in the gettext ``.po`` format. See :ref:" "`doc_localization_using_gettext` for details." msgstr "" #: ../../docs/tutorials/assets_pipeline/importing_translations.rst:37 msgid "Translation format" msgstr "" #: ../../docs/tutorials/assets_pipeline/importing_translations.rst:39 msgid "" "To complete the picture and allow efficient support for translations, Godot " "has a special importer that can read CSV files. Most spreadsheet editors can " "export to this format, so the only requirement is that the files have a " "special arrangement. The CSV files **must** be saved with UTF-8 encoding " "without a `byte order mark `__." msgstr "" #: ../../docs/tutorials/assets_pipeline/importing_translations.rst:47 msgid "" "By default, Microsoft Excel will always save CSV files with ANSI encoding " "rather than UTF-8. There is no built-in way to do this, but there are " "workarounds as described `here `__." msgstr "" #: ../../docs/tutorials/assets_pipeline/importing_translations.rst:52 msgid "" "We recommend using `LibreOffice `__ or Google " "Sheets instead." msgstr "" #: ../../docs/tutorials/assets_pipeline/importing_translations.rst:54 msgid "CSV files must be formatted as follows:" msgstr "" #: ../../docs/tutorials/assets_pipeline/importing_translations.rst:57 #: ../../docs/tutorials/assets_pipeline/importing_translations.rst:76 msgid "keys" msgstr "" #: ../../docs/tutorials/assets_pipeline/importing_translations.rst:57 msgid "" msgstr "" #: ../../docs/tutorials/assets_pipeline/importing_translations.rst:57 msgid "" msgstr "" #: ../../docs/tutorials/assets_pipeline/importing_translations.rst:57 msgid "" msgstr "" #: ../../docs/tutorials/assets_pipeline/importing_translations.rst:59 msgid "KEY1" msgstr "" #: ../../docs/tutorials/assets_pipeline/importing_translations.rst:59 #: ../../docs/tutorials/assets_pipeline/importing_translations.rst:61 #: ../../docs/tutorials/assets_pipeline/importing_translations.rst:63 #: ../../docs/tutorials/io/binary_serialization_api.rst:39 #: ../../docs/tutorials/platform/html5_shell_classref.rst:193 #: ../../docs/tutorials/platform/html5_shell_classref.rst:195 #: ../../docs/tutorials/platform/html5_shell_classref.rst:197 #: ../../docs/tutorials/platform/html5_shell_classref.rst:244 #: ../../docs/tutorials/platform/html5_shell_classref.rst:252 #: ../../docs/tutorials/platform/html5_shell_classref.rst:263 msgid "string" msgstr "" #: ../../docs/tutorials/assets_pipeline/importing_translations.rst:61 msgid "KEY2" msgstr "" #: ../../docs/tutorials/assets_pipeline/importing_translations.rst:63 msgid "KEYN" msgstr "" #: ../../docs/tutorials/assets_pipeline/importing_translations.rst:66 msgid "" "The \"lang\" tags must represent a language, which must be one of the :ref:" "`valid locales ` supported by the engine. The \"KEY\" tags must " "be unique and represent a string universally (they are usually in uppercase, " "to differentiate from other strings). These keys will be replaced at runtime " "by the matching translated string. Note that the case is important, \"KEY1\" " "and \"Key1\" will be different keys. The top-left cell is ignored and can be " "left empty or having any content. Here's an example:" msgstr "" #: ../../docs/tutorials/assets_pipeline/importing_translations.rst:76 #: ../../docs/tutorials/i18n/locales.rst:182 msgid "en" msgstr "" #: ../../docs/tutorials/assets_pipeline/importing_translations.rst:76 #: ../../docs/tutorials/i18n/locales.rst:222 msgid "es" msgstr "" #: ../../docs/tutorials/assets_pipeline/importing_translations.rst:76 #: ../../docs/tutorials/i18n/locales.rst:376 msgid "ja" msgstr "" #: ../../docs/tutorials/assets_pipeline/importing_translations.rst:78 msgid "GREET" msgstr "" #: ../../docs/tutorials/assets_pipeline/importing_translations.rst:78 msgid "Hello, friend!" msgstr "" #: ../../docs/tutorials/assets_pipeline/importing_translations.rst:78 msgid "Hola, amigo!" msgstr "" #: ../../docs/tutorials/assets_pipeline/importing_translations.rst:78 msgid "こんにちは" msgstr "" #: ../../docs/tutorials/assets_pipeline/importing_translations.rst:80 msgid "ASK" msgstr "" #: ../../docs/tutorials/assets_pipeline/importing_translations.rst:80 msgid "How are you?" msgstr "" #: ../../docs/tutorials/assets_pipeline/importing_translations.rst:80 msgid "Cómo está?" msgstr "" #: ../../docs/tutorials/assets_pipeline/importing_translations.rst:80 msgid "元気ですか" msgstr "" #: ../../docs/tutorials/assets_pipeline/importing_translations.rst:82 msgid "BYE" msgstr "" #: ../../docs/tutorials/assets_pipeline/importing_translations.rst:82 msgid "Goodbye" msgstr "" #: ../../docs/tutorials/assets_pipeline/importing_translations.rst:82 msgid "Adiós" msgstr "" #: ../../docs/tutorials/assets_pipeline/importing_translations.rst:82 msgid "さようなら" msgstr "" #: ../../docs/tutorials/assets_pipeline/importing_translations.rst:84 msgid "QUOTE" msgstr "" #: ../../docs/tutorials/assets_pipeline/importing_translations.rst:84 msgid "\"Hello\" said the man." msgstr "" #: ../../docs/tutorials/assets_pipeline/importing_translations.rst:84 msgid "\"Hola\" dijo el hombre." msgstr "" #: ../../docs/tutorials/assets_pipeline/importing_translations.rst:84 msgid "「こんにちは」男は言いました" msgstr "" #: ../../docs/tutorials/assets_pipeline/importing_translations.rst:87 msgid "" "The same example is shown below as a comma-separated plain text file, which " "should be the result of editing the above in a spreadsheet. When editing the " "plain text version, be sure to enclose with double quotes any message that " "contains commas, line breaks or double quotes, so that commas are not parsed " "as delimiters, line breaks don't create new entries and double quotes are " "not parsed as enclosing characters. Be sure to escape any double quotes a " "message may contain by preceding them with another double quote. " "Alternatively, you can select another delimiter than comma in the import " "options." msgstr "" #: ../../docs/tutorials/assets_pipeline/importing_translations.rst:106 msgid "CSV importer" msgstr "" #: ../../docs/tutorials/assets_pipeline/importing_translations.rst:108 msgid "" "Godot will treat CSV files as translations by default. It will import them " "and generate one or more compressed translation resource files next to it." msgstr "" #: ../../docs/tutorials/assets_pipeline/importing_translations.rst:111 msgid "" "Importing will also add the translation to the list of translations to load " "when the game runs, specified in project.godot (or the project settings). " "Godot allows loading and removing translations at runtime as well." msgstr "" #: ../../docs/tutorials/assets_pipeline/importing_translations.rst:116 msgid "" "Select the ``.csv`` file and access the **Import** dock to define import " "options. You can toggle the compression of the imported translations, and " "select the delimiter to use when parsing the CSV file." msgstr "" #: ../../docs/tutorials/assets_pipeline/importing_translations.rst:122 msgid "Be sure to click **Reimport** after any change to these options." msgstr "" #: ../../docs/tutorials/assets_pipeline/importing_scenes.rst:4 msgid "Importing 3D scenes" msgstr "" #: ../../docs/tutorials/assets_pipeline/importing_scenes.rst:7 msgid "Godot scene importer" msgstr "" #: ../../docs/tutorials/assets_pipeline/importing_scenes.rst:9 msgid "" "When dealing with 3D assets, Godot has a flexible and configurable importer." msgstr "" #: ../../docs/tutorials/assets_pipeline/importing_scenes.rst:11 msgid "" "Godot works with *scenes*. This means that the entire scene being worked on " "in your favorite 3D DCC will be transferred as close as possible." msgstr "" #: ../../docs/tutorials/assets_pipeline/importing_scenes.rst:14 msgid "Godot supports the following 3D *scene file formats*:" msgstr "" #: ../../docs/tutorials/assets_pipeline/importing_scenes.rst:16 msgid "" "glTF 2.0 **(recommended)**. Godot has full support for both text (``.gltf``) " "and binary (``.glb``) formats." msgstr "" #: ../../docs/tutorials/assets_pipeline/importing_scenes.rst:17 msgid "DAE (COLLADA), an older format that is fully supported." msgstr "" #: ../../docs/tutorials/assets_pipeline/importing_scenes.rst:18 msgid "" "OBJ (Wavefront) format + their MTL material files. This is also fully " "supported, but pretty limited (no support for pivots, skeletons, animations, " "PBR materials, ...)." msgstr "" #: ../../docs/tutorials/assets_pipeline/importing_scenes.rst:19 msgid "ESCN, a Godot-specific format that Blender can export with a plugin." msgstr "" #: ../../docs/tutorials/assets_pipeline/importing_scenes.rst:20 msgid "" "FBX, supported via the Open Asset Import library. However, FBX is " "proprietary, so we recommend using other formats listed above, if suitable " "for your workflow." msgstr "" #: ../../docs/tutorials/assets_pipeline/importing_scenes.rst:23 msgid "" "Just copy the scene file together with the texture to the project " "repository, and Godot will do a full import." msgstr "" #: ../../docs/tutorials/assets_pipeline/importing_scenes.rst:25 msgid "" "It is important that the mesh is not deformed by bones when exporting. Make " "sure that the skeleton is reset to its T-pose or default rest pose before " "exporting with your favorite 3D editor." msgstr "" #: ../../docs/tutorials/assets_pipeline/importing_scenes.rst:29 msgid "Exporting DAE files from Maya and 3DS Max" msgstr "" #: ../../docs/tutorials/assets_pipeline/importing_scenes.rst:31 msgid "" "Autodesk added built-in COLLADA support to Maya and 3DS Max, but it's broken " "by default and should not be used. The best way to export this format is by " "using the `OpenCollada `__ plugins. They work well, although they are not always " "up-to date with the latest version of the software." msgstr "" #: ../../docs/tutorials/assets_pipeline/importing_scenes.rst:39 msgid "Exporting glTF 2.0 files from Blender" msgstr "" #: ../../docs/tutorials/assets_pipeline/importing_scenes.rst:41 msgid "" "There are three ways to export glTF files from Blender. As a glTF binary (``." "glb`` file), glTF embedded (``.gltf`` file), and with textures (``gltf`` + " "``.bin`` + textures)." msgstr "" #: ../../docs/tutorials/assets_pipeline/importing_scenes.rst:44 msgid "" "glTF binary files are the smallest of the three options. They include the " "mesh and textures set up in Blender. When brought into Godot the textures " "are part of the object's material file." msgstr "" #: ../../docs/tutorials/assets_pipeline/importing_scenes.rst:47 msgid "" "glTF embedded files function the same way as binary files. They don't " "provide extra functionality in Godot, and shouldn't be used since they have " "a larger file size." msgstr "" #: ../../docs/tutorials/assets_pipeline/importing_scenes.rst:50 msgid "" "There are two reasons to use glTF with the textures separate. One is to have " "the scene description in a text based format and the binary data in a " "separate binary file. This can be useful for version control if you want to " "review changes in a text based format. The second is you need the texture " "files separate from the material file. If you don't need either of those " "glTF binary files are fine." msgstr "" #: ../../docs/tutorials/assets_pipeline/importing_scenes.rst:57 msgid "" "Blender does not export emissive textures with the glTF file. If your model " "uses one, it must be brought in separately." msgstr "" #: ../../docs/tutorials/assets_pipeline/importing_scenes.rst:68 msgid "Exporting DAE files from Blender" msgstr "" #: ../../docs/tutorials/assets_pipeline/importing_scenes.rst:70 msgid "" "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." msgstr "" #: ../../docs/tutorials/assets_pipeline/importing_scenes.rst:73 msgid "" "Godot provides a `Blender plugin `_ 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." msgstr "" #: ../../docs/tutorials/assets_pipeline/importing_scenes.rst:78 msgid "Exporting ESCN files from Blender" msgstr "" #: ../../docs/tutorials/assets_pipeline/importing_scenes.rst:80 msgid "" "The most powerful one, called `godot-blender-exporter `__. It uses a .escn file, which is kind " "of another name for a .tscn file (Godot scene file); it keeps as much " "information as possible from a Blender scene. However, it is considered " "experimental." msgstr "" #: ../../docs/tutorials/assets_pipeline/importing_scenes.rst:86 msgid "" "The ESCN exporter has a detailed `document `__ " "describing its functionality and usage." msgstr "" #: ../../docs/tutorials/assets_pipeline/importing_scenes.rst:90 msgid "Exporting textures separately" msgstr "" #: ../../docs/tutorials/assets_pipeline/importing_scenes.rst:92 msgid "" "While textures can be exported with a model in certain file formats, such as " "glTF 2.0, you can also export them separately. Godot uses PBR (physically " "based rendering) for its materials, so if a texturing program can export PBR " "textures, they can work in Godot. This includes the `Substance suite " "`__, `ArmorPaint (open source) `__, and `Material Maker (open source) `__." msgstr "" #: ../../docs/tutorials/assets_pipeline/importing_scenes.rst:97 #, fuzzy msgid "" "For more information on Godot's materials, see :ref:`doc_spatial_material`." msgstr "Xem :ref:`doc_ways_to_contribute`." #: ../../docs/tutorials/assets_pipeline/importing_scenes.rst:100 #, fuzzy msgid "Exporting considerations" msgstr "Tạo nội dung" #: ../../docs/tutorials/assets_pipeline/importing_scenes.rst:102 msgid "" "Since GPUs can only render triangles, meshes that contain quads or N-gons " "have to be *triangulated* before they can be rendered. Godot can triangulate " "meshes on import, but results may be unpredictable or incorrect, especially " "with N-gons. Regardless of the target application, triangulating *before* " "exporting the scene will lead to more consistent results and should be done " "whenever possible." msgstr "" #: ../../docs/tutorials/assets_pipeline/importing_scenes.rst:109 msgid "" "To avoid issues with incorrect triangulation after importing in Godot, it is " "recommended to make the 3D DCC triangulate objects on its own. In Blender, " "this can be done by adding a Triangulate modifier to your objects and making " "sure **Apply Modifiers** is checked in the export dialog. Alternatively, " "depending on the exporter, you may be able to find and enable a " "**Triangulate Faces** option in the export dialog." msgstr "" #: ../../docs/tutorials/assets_pipeline/importing_scenes.rst:116 msgid "" "To avoid issues with 3D selection in the editor, it is recommended to apply " "the object transform in the 3D DCC before exporting the scene." msgstr "" #: ../../docs/tutorials/assets_pipeline/importing_scenes.rst:120 msgid "Import workflows" msgstr "" #: ../../docs/tutorials/assets_pipeline/importing_scenes.rst:122 msgid "" "Godot scene importer allows different workflows regarding how data is " "imported. Depending on many options, it is possible to import a scene with:" msgstr "" #: ../../docs/tutorials/assets_pipeline/importing_scenes.rst:125 msgid "" "External materials (default): Where each material is saved to a file " "resource. Modifications to them are kept." msgstr "" #: ../../docs/tutorials/assets_pipeline/importing_scenes.rst:126 msgid "" "External meshes: Where each mesh is saved to a different file. Many users " "prefer to deal with meshes directly." msgstr "" #: ../../docs/tutorials/assets_pipeline/importing_scenes.rst:127 msgid "" "External animations: Allowing saved animations to be modified and merged " "when sources change." msgstr "" #: ../../docs/tutorials/assets_pipeline/importing_scenes.rst:128 msgid "" "External scenes: Save each of the root nodes of the imported scenes as a " "separate scene." msgstr "" #: ../../docs/tutorials/assets_pipeline/importing_scenes.rst:129 msgid "Single scene: A single scene file with everything built in." msgstr "" #: ../../docs/tutorials/assets_pipeline/importing_scenes.rst:133 msgid "" "As different developers have different needs, this import process is highly " "customizable." msgstr "" #: ../../docs/tutorials/assets_pipeline/importing_scenes.rst:136 msgid "Import options" msgstr "" #: ../../docs/tutorials/assets_pipeline/importing_scenes.rst:138 msgid "The importer has several options, which will be discussed below:" msgstr "" #: ../../docs/tutorials/assets_pipeline/importing_scenes.rst:146 msgid "Root Type" msgstr "" #: ../../docs/tutorials/assets_pipeline/importing_scenes.rst:148 msgid "" "By default, the type of the root node in imported scenes is \"Spatial\", but " "this can be modified." msgstr "" #: ../../docs/tutorials/assets_pipeline/importing_scenes.rst:151 msgid "Root Name" msgstr "" #: ../../docs/tutorials/assets_pipeline/importing_scenes.rst:153 msgid "Allows setting a specific name to the generated root node." msgstr "" #: ../../docs/tutorials/assets_pipeline/importing_scenes.rst:156 msgid "Root Scale" msgstr "" #: ../../docs/tutorials/assets_pipeline/importing_scenes.rst:158 msgid "The scale of the root node." msgstr "" #: ../../docs/tutorials/assets_pipeline/importing_scenes.rst:161 msgid "Custom Script" msgstr "Tập lệnh tuỳ chỉnh" #: ../../docs/tutorials/assets_pipeline/importing_scenes.rst:163 msgid "" "A special script to process the whole scene after import can be provided. " "This is great for post processing, changing materials, doing funny stuff " "with the geometry etc." msgstr "" #: ../../docs/tutorials/assets_pipeline/importing_scenes.rst:167 msgid "Create a script like this:" msgstr "" #: ../../docs/tutorials/assets_pipeline/importing_scenes.rst:179 msgid "" "The ``post_import`` function takes the imported scene as argument (the " "parameter is actually the root node of the scene). The scene that will " "finally be used must be returned. It can be a different one." msgstr "" #: ../../docs/tutorials/assets_pipeline/importing_scenes.rst:184 #: ../../docs/tutorials/assets_pipeline/importing_scenes.rst:203 #: ../../docs/tutorials/assets_pipeline/importing_scenes.rst:268 #: ../../docs/tutorials/assets_pipeline/importing_scenes.rst:366 msgid "Storage" msgstr "" #: ../../docs/tutorials/assets_pipeline/importing_scenes.rst:186 msgid "" "By default, Godot imports a single scene. This option allows specifying that " "nodes below the root will each be a separate scene and instanced into the " "imported one." msgstr "" #: ../../docs/tutorials/assets_pipeline/importing_scenes.rst:190 msgid "" "Of course, instancing such imported scenes in other places manually works, " "too." msgstr "" #: ../../docs/tutorials/assets_pipeline/importing_scenes.rst:197 #: ../../docs/tutorials/export/exporting_for_mac.rst:109 #: ../../docs/tutorials/io/data_paths.rst:57 msgid "Location" msgstr "" #: ../../docs/tutorials/assets_pipeline/importing_scenes.rst:199 msgid "" "Godot supports materials in meshes or nodes. By default, materials will be " "put on each node." msgstr "" #: ../../docs/tutorials/assets_pipeline/importing_scenes.rst:205 msgid "" "Materials can be stored within the scene or in external files. By default, " "they are stored in external files so editing them is possible. This is " "because most 3D DCCs don't have the same material options as those present " "in Godot." msgstr "" #: ../../docs/tutorials/assets_pipeline/importing_scenes.rst:209 msgid "" "When materials are built-in, they will be lost each time the source scene is " "modified and re-imported." msgstr "" #: ../../docs/tutorials/assets_pipeline/importing_scenes.rst:214 msgid "" "Godot will not reimport materials that are stored in external files unless " "you remove the associated ``.material`` file before reimporting." msgstr "" #: ../../docs/tutorials/assets_pipeline/importing_scenes.rst:217 msgid "" "To force reimporting materials every time the 3D scene is reimported, change " "the material storage mode in the 3D scene by selecting it in the FileSystem " "dock, going to the Import dock then setting **Material > Storage** to " "**Built-In** instead of **Files**." msgstr "" #: ../../docs/tutorials/assets_pipeline/importing_scenes.rst:223 msgid "Keep On Reimport" msgstr "" #: ../../docs/tutorials/assets_pipeline/importing_scenes.rst:225 msgid "" "Once materials are edited to use Godot features, the importer will keep the " "edited ones and ignore the ones coming from the source scene. This option is " "only present if materials are saved as files." msgstr "" #: ../../docs/tutorials/assets_pipeline/importing_scenes.rst:230 msgid "Meshes" msgstr "" #: ../../docs/tutorials/assets_pipeline/importing_scenes.rst:233 msgid "Compress" msgstr "" #: ../../docs/tutorials/assets_pipeline/importing_scenes.rst:235 msgid "" "Makes meshes use less precise numbers for multiple aspects of the mesh in " "order to save space." msgstr "" #: ../../docs/tutorials/assets_pipeline/importing_scenes.rst:248 msgid "These are:" msgstr "" #: ../../docs/tutorials/assets_pipeline/importing_scenes.rst:239 msgid "" "Transform Matrix (Location, rotation, and scale) : 32-bit float " "to 16-bit signed integer." msgstr "" #: ../../docs/tutorials/assets_pipeline/importing_scenes.rst:240 msgid "" "Vertices : 32-bit float " "to 16-bit signed integer." msgstr "" #: ../../docs/tutorials/assets_pipeline/importing_scenes.rst:241 msgid "" "Normals : 32-bit float " "to 32-bit unsigned integer." msgstr "" #: ../../docs/tutorials/assets_pipeline/importing_scenes.rst:242 msgid "" "Tangents : 32-bit float " "to 32-bit unsigned integer." msgstr "" #: ../../docs/tutorials/assets_pipeline/importing_scenes.rst:243 msgid "" "Vertex Colors : 32-bit float " "to 32-bit unsigned integer." msgstr "" #: ../../docs/tutorials/assets_pipeline/importing_scenes.rst:244 msgid "" "UV : 32-bit float " "to 32-bit unsigned integer." msgstr "" #: ../../docs/tutorials/assets_pipeline/importing_scenes.rst:245 msgid "" "UV2 : 32-bit float " "to 32-bit unsigned integer." msgstr "" #: ../../docs/tutorials/assets_pipeline/importing_scenes.rst:246 msgid "" "Vertex weights : 32-bit float " "to 16-bit unsigned integer." msgstr "" #: ../../docs/tutorials/assets_pipeline/importing_scenes.rst:247 msgid "" "Armature bones : 32-bit float " "to 16-bit unsigned integer." msgstr "" #: ../../docs/tutorials/assets_pipeline/importing_scenes.rst:248 msgid "" "Array index : 32-bit or 16-" "bit unsigned integer based on how many elements there are." msgstr "" #: ../../docs/tutorials/assets_pipeline/importing_scenes.rst:252 msgid "Additional info:" msgstr "" #: ../../docs/tutorials/assets_pipeline/importing_scenes.rst:251 msgid "" "UV2 = The second UV channel for detail textures and baked lightmap textures." msgstr "" #: ../../docs/tutorials/assets_pipeline/importing_scenes.rst:252 msgid "" "Array index = An array of numbers that number each element of the arrays " "above; i.e. they number the vertices and normals." msgstr "" #: ../../docs/tutorials/assets_pipeline/importing_scenes.rst:254 msgid "" "In some cases, this might lead to loss of precision, so disabling this " "option may be needed. For instance, if a mesh is very big or there are " "multiple meshes being imported that cover a large area, compressing the " "import of this mesh(es) may lead to gaps in geometry or vertices not being " "exactly where they should be." msgstr "" #: ../../docs/tutorials/assets_pipeline/importing_scenes.rst:260 msgid "Ensure Tangents" msgstr "" #: ../../docs/tutorials/assets_pipeline/importing_scenes.rst:262 msgid "" "If textures with normal mapping are to be used, meshes need to have tangent " "arrays. This option ensures that these are generated if not present in the " "source scene. Godot uses Mikktspace for this, but it's always better to have " "them generated in the exporter." msgstr "" #: ../../docs/tutorials/assets_pipeline/importing_scenes.rst:270 msgid "" "Meshes can be stored in separate files (resources) instead of built-in. This " "does not have much practical use unless one wants to build objects with them " "directly." msgstr "" #: ../../docs/tutorials/assets_pipeline/importing_scenes.rst:273 msgid "" "This option is provided to help those who prefer working directly with " "meshes instead of scenes." msgstr "" #: ../../docs/tutorials/assets_pipeline/importing_scenes.rst:277 msgid "Light Baking" msgstr "" #: ../../docs/tutorials/assets_pipeline/importing_scenes.rst:279 msgid "Whether or not the mesh is used in baked lightmaps." msgstr "" #: ../../docs/tutorials/assets_pipeline/importing_scenes.rst:281 msgid "**Disabled:** The mesh is not used in baked lightmaps." msgstr "" #: ../../docs/tutorials/assets_pipeline/importing_scenes.rst:282 msgid "**Enable:** The mesh is used in baked lightmaps." msgstr "" #: ../../docs/tutorials/assets_pipeline/importing_scenes.rst:283 msgid "" "**Gen Lightmaps:** The mesh is used in baked lightmaps, and unwraps a second " "UV layer for lightmaps." msgstr "" #: ../../docs/tutorials/assets_pipeline/importing_scenes.rst:285 msgid "For more information on light baking see :ref:`doc_baked_lightmaps`." msgstr "" #: ../../docs/tutorials/assets_pipeline/importing_scenes.rst:288 msgid "External Files" msgstr "" #: ../../docs/tutorials/assets_pipeline/importing_scenes.rst:290 msgid "" "Generated meshes and materials can be optionally stored in a subdirectory " "with the name of the scene." msgstr "" #: ../../docs/tutorials/assets_pipeline/importing_scenes.rst:294 #, fuzzy msgid "Animation options" msgstr "Tạo nội dung" #: ../../docs/tutorials/assets_pipeline/importing_scenes.rst:296 msgid "" "Godot provides many options regarding how animation data is dealt with. Some " "exporters (such as Blender) can generate many animations in a single file. " "Others, such as 3DS Max or Maya, need many animations put into the same " "timeline or, at worst, put each animation in a separate file." msgstr "" #: ../../docs/tutorials/assets_pipeline/importing_scenes.rst:303 msgid "Import of animations is enabled by default." msgstr "" #: ../../docs/tutorials/assets_pipeline/importing_scenes.rst:307 msgid "" "To modify animations from an imported 3D scene, you need to change the " "animation storage option from **Built-In** to **Files** in the Import dock. " "Otherwise, changes made to animations from Godot will be lost when the " "project is run." msgstr "" #: ../../docs/tutorials/assets_pipeline/importing_scenes.rst:312 msgid "FPS" msgstr "Khung hình(FPS)" #: ../../docs/tutorials/assets_pipeline/importing_scenes.rst:314 msgid "" "Most 3D export formats store animation timeline in seconds instead of " "frames. To ensure animations are imported as faithfully as possible, please " "specify the frames per second used to edit them. Failing to do this may " "result in shaky animations." msgstr "" #: ../../docs/tutorials/assets_pipeline/importing_scenes.rst:319 msgid "Filter Script" msgstr "Lọc tập lệnh" #: ../../docs/tutorials/assets_pipeline/importing_scenes.rst:321 msgid "" "It is possible to specify a filter script in a special syntax to decide " "which tracks from which animations should be kept." msgstr "" #: ../../docs/tutorials/assets_pipeline/importing_scenes.rst:324 msgid "" "The filter script is executed against each imported animation. The syntax " "consists of two types of statements, the first for choosing which animations " "to filter, and the second for filtering individual tracks within the matched " "animation. All name patterns are performed using a case insensitive " "expression match, using ``?`` and ``*`` wildcards (using ``String.matchn()`` " "under the hood)." msgstr "" #: ../../docs/tutorials/assets_pipeline/importing_scenes.rst:330 msgid "" "The script must start with an animation filter statement (as denoted by the " "line beginning with an ``@``). For example, if we would like to apply " "filters to all imported animations which have a name ending in " "``\"_Loop\"``::" msgstr "" #: ../../docs/tutorials/assets_pipeline/importing_scenes.rst:336 msgid "" "Similarly, additional patterns can be added to the same line, separated by " "commas. Here is a modified example to additionally *include* all animations " "with names that begin with ``\"Arm_Left\"``, but also *exclude* all " "animations which have names ending in ``\"Attack\"``::" msgstr "" #: ../../docs/tutorials/assets_pipeline/importing_scenes.rst:342 msgid "" "Following the animation selection filter statement, we add track filtering " "patterns to indicate which animation tracks should be kept or discarded. If " "no track filter patterns are specified, then all tracks within the matched " "animations will be discarded!" msgstr "" #: ../../docs/tutorials/assets_pipeline/importing_scenes.rst:346 msgid "" "It's important to note that track filter statements are applied in order for " "each track within the animation, this means that one line may include a " "track, a later rule can still discard it. Similarly, a track excluded by an " "early rule may then be re-included once again by a filter rule further down " "in the filter script." msgstr "" #: ../../docs/tutorials/assets_pipeline/importing_scenes.rst:351 msgid "" "For example: include all tracks in animations with names ending in " "``\"_Loop\"``, but discard any tracks affecting a ``\"Skeleton\"`` which end " "in ``\"Control\"``, unless they have ``\"Arm\"`` in their name::" msgstr "" #: ../../docs/tutorials/assets_pipeline/importing_scenes.rst:360 msgid "" "In the above example, tracks like ``\"Skeleton:Leg_Control\"`` would be " "discarded, while tracks such as ``\"Skeleton:Head\"`` or ``\"Skeleton:" "Arm_Left_Control\"`` would be retained." msgstr "" #: ../../docs/tutorials/assets_pipeline/importing_scenes.rst:363 msgid "" "Any track filter lines that do not begin with a ``+`` or ``-`` are ignored." msgstr "" #: ../../docs/tutorials/assets_pipeline/importing_scenes.rst:368 msgid "" "By default, animations are saved as built-in. It is possible to save them to " "a file instead. This allows adding custom tracks to the animations and " "keeping them after a reimport." msgstr "" #: ../../docs/tutorials/assets_pipeline/importing_scenes.rst:372 msgid "Optimizer" msgstr "" #: ../../docs/tutorials/assets_pipeline/importing_scenes.rst:374 msgid "" "When animations are imported, an optimizer is run, which reduces the size of " "the animation considerably. In general, this should always be turned on " "unless you suspect that an animation might be broken due to it being enabled." msgstr "" #: ../../docs/tutorials/assets_pipeline/importing_scenes.rst:378 msgid "Clips" msgstr "" #: ../../docs/tutorials/assets_pipeline/importing_scenes.rst:380 msgid "" "It is possible to specify multiple animations from a single timeline as " "clips. For this to work, the model must have only one animation that is " "named ``default``. To create clips, change the clip amount to something " "greater than zero. You can then name a clip, specify which frames it starts " "and stops on, and choose whether the animation loops or not." msgstr "" #: ../../docs/tutorials/assets_pipeline/importing_scenes.rst:389 msgid "Scene inheritance" msgstr "" #: ../../docs/tutorials/assets_pipeline/importing_scenes.rst:391 msgid "" "In many cases, it may be desired to make modifications to the imported " "scene. By default, this is not possible because if the source asset changes " "(source ``.dae``, ``.gltf``, ``.obj`` file re-exported from 3D modelling " "app), Godot will re-import the whole scene." msgstr "" #: ../../docs/tutorials/assets_pipeline/importing_scenes.rst:394 msgid "" "It is possible, however, to make local modifications by using *Scene " "Inheritance*. Try to open the imported scene and the following dialog will " "appear:" msgstr "" #: ../../docs/tutorials/assets_pipeline/importing_scenes.rst:399 msgid "In inherited scenes, the only limitations for modifications are:" msgstr "" #: ../../docs/tutorials/assets_pipeline/importing_scenes.rst:401 msgid "Nodes can't be removed (but can be added anywhere)." msgstr "" #: ../../docs/tutorials/assets_pipeline/importing_scenes.rst:402 msgid "" "Sub-Resources can't be edited (save them externally as described above for " "this)" msgstr "" #: ../../docs/tutorials/assets_pipeline/importing_scenes.rst:404 msgid "Other than that, everything is allowed!" msgstr "" #: ../../docs/tutorials/assets_pipeline/importing_scenes.rst:409 msgid "Import hints" msgstr "" #: ../../docs/tutorials/assets_pipeline/importing_scenes.rst:411 msgid "" "Many times, when editing a scene, there are common tasks that need to be " "done after exporting:" msgstr "" #: ../../docs/tutorials/assets_pipeline/importing_scenes.rst:413 #, fuzzy msgid "Adding collision detection to objects." msgstr "Thêm mã này vào hàm:" #: ../../docs/tutorials/assets_pipeline/importing_scenes.rst:414 msgid "Setting objects as navigation meshes." msgstr "" #: ../../docs/tutorials/assets_pipeline/importing_scenes.rst:415 msgid "" "Deleting nodes that are not used in the game engine (like specific lights " "used for modelling)." msgstr "" #: ../../docs/tutorials/assets_pipeline/importing_scenes.rst:417 msgid "" "To simplify this workflow, Godot offers several suffixes that can be added " "to the names of the objects in your 3D modelling software. When imported, " "Godot will detect suffixes in object names and will perform actions " "automatically." msgstr "" #: ../../docs/tutorials/assets_pipeline/importing_scenes.rst:423 msgid "All the suffixes described below are *case-sensitive*." msgstr "" #: ../../docs/tutorials/assets_pipeline/importing_scenes.rst:426 msgid "Remove nodes (-noimp)" msgstr "" #: ../../docs/tutorials/assets_pipeline/importing_scenes.rst:428 msgid "" "Objects that have the ``-noimp`` suffix will be removed at import-time no " "matter what their type is. They will not appear in the imported scene." msgstr "" #: ../../docs/tutorials/assets_pipeline/importing_scenes.rst:432 msgid "Create collisions (-col, -convcol, -colonly, -convcolonly)" msgstr "" #: ../../docs/tutorials/assets_pipeline/importing_scenes.rst:434 msgid "" "The option ``-col`` will work only for Mesh objects. If it is detected, a " "child static collision node will be added, using the same geometry as the " "mesh. This will create a triangle mesh collision shape, which is a slow, but " "accurate option for collision detection. This option is usually what you " "want for level geometry (but see also ``-colonly`` below)." msgstr "" #: ../../docs/tutorials/assets_pipeline/importing_scenes.rst:440 msgid "" "The option ``-convcol`` will create a :ref:`class_convexpolygonshape` " "instead of a :ref:`class_concavepolygonshape`. Unlike triangle meshes which " "can be concave, a convex shape can only accurately represent a shape that " "doesn't have any concave angles (a pyramid is convex, but a hollow box is " "concave). Due to this, convex collision shapes are generally not suited for " "level geometry. When representing simple enough meshes, convex collision " "shapes can result in better performance compared to a triangle collision " "shape. This option is ideal for simple or dynamic objects that require " "mostly-accurate collision detection." msgstr "" #: ../../docs/tutorials/assets_pipeline/importing_scenes.rst:449 msgid "" "However, in both cases, the visual geometry may be too complex or not smooth " "enough for collisions. This can create physics glitches and slow down the " "engine unnecessarily." msgstr "" #: ../../docs/tutorials/assets_pipeline/importing_scenes.rst:453 msgid "" "To solve this, the ``-colonly`` modifier exists. It will remove the mesh " "upon importing and will create a :ref:`class_staticbody` collision instead. " "This helps the visual mesh and actual collision to be separated." msgstr "" #: ../../docs/tutorials/assets_pipeline/importing_scenes.rst:457 msgid "" "The option ``-convcolonly`` works in a similar way, but will create a :ref:" "`class_convexpolygonshape` instead." msgstr "" #: ../../docs/tutorials/assets_pipeline/importing_scenes.rst:459 msgid "" "The option ``-colonly`` can also be used with Blender's empty objects. On " "import, it will create a :ref:`class_staticbody` with a collision node as a " "child. The collision node will have one of a number of predefined shapes, " "depending on Blender's empty draw type:" msgstr "" #: ../../docs/tutorials/assets_pipeline/importing_scenes.rst:466 msgid "Single arrow will create a :ref:`class_rayshape`." msgstr "" #: ../../docs/tutorials/assets_pipeline/importing_scenes.rst:467 msgid "Cube will create a :ref:`class_boxshape`." msgstr "" #: ../../docs/tutorials/assets_pipeline/importing_scenes.rst:468 msgid "Image will create a :ref:`class_planeshape`." msgstr "" #: ../../docs/tutorials/assets_pipeline/importing_scenes.rst:469 msgid "" "Sphere (and the others not listed) will create a :ref:`class_sphereshape`." msgstr "" #: ../../docs/tutorials/assets_pipeline/importing_scenes.rst:471 msgid "" "When possible, **try to use a few primitive collision shapes** instead of " "triangle mesh or convex shapes. Primitive shapes often have the best " "performance and reliability." msgstr "" #: ../../docs/tutorials/assets_pipeline/importing_scenes.rst:477 msgid "" "For better visibility in Blender's editor, you can set the \"X-Ray\" option " "on collision empties and set some distinct color for them in Blender's " "**User Preferences > Themes > 3D View > Empty**." msgstr "" #: ../../docs/tutorials/assets_pipeline/importing_scenes.rst:483 msgid "" "See :ref:`doc_collision_shapes_3d` for a comprehensive overview of collision " "shapes." msgstr "" #: ../../docs/tutorials/assets_pipeline/importing_scenes.rst:487 msgid "Create navigation (-navmesh)" msgstr "" #: ../../docs/tutorials/assets_pipeline/importing_scenes.rst:489 msgid "" "A mesh node with the ``-navmesh`` suffix will be converted to a navigation " "mesh. The original Mesh object will be removed at import-time." msgstr "" #: ../../docs/tutorials/assets_pipeline/importing_scenes.rst:493 msgid "Create a VehicleBody (-vehicle)" msgstr "" #: ../../docs/tutorials/assets_pipeline/importing_scenes.rst:495 msgid "" "A mesh node with the ``-vehicle`` suffix will be imported as a child to a :" "ref:`class_VehicleBody` node." msgstr "" #: ../../docs/tutorials/assets_pipeline/importing_scenes.rst:499 msgid "Create a VehicleWheel (-wheel)" msgstr "" #: ../../docs/tutorials/assets_pipeline/importing_scenes.rst:501 msgid "" "A mesh node with the ``-wheel`` suffix will be imported as a child to a :ref:" "`class_VehicleWheel` node." msgstr "" #: ../../docs/tutorials/assets_pipeline/importing_scenes.rst:505 msgid "Rigid Body (-rigid)" msgstr "" #: ../../docs/tutorials/assets_pipeline/importing_scenes.rst:507 msgid "" "A mesh node with the ``-rigid`` suffix will be imported as a :ref:" "`class_RigidBody`." msgstr "" #: ../../docs/tutorials/assets_pipeline/importing_scenes.rst:510 msgid "Animation loop (-loop, -cycle)" msgstr "" #: ../../docs/tutorials/assets_pipeline/importing_scenes.rst:512 msgid "" "Animation clips in the COLLADA document that start or end with the token " "``loop`` or ``cycle`` will be imported as a Godot Animation with the loop " "flag set. **Unlike the other suffixes described above, this does not require " "a hyphen.**" msgstr "" #: ../../docs/tutorials/assets_pipeline/importing_scenes.rst:516 msgid "" "In Blender, this requires using the NLA Editor and naming the Action with " "the ``loop`` or ``cycle`` prefix or suffix." msgstr "" #: ../../docs/tutorials/assets_pipeline/exporting_3d_scenes.rst:4 #, fuzzy msgid "Exporting 3D scenes" msgstr "Script một scene" #: ../../docs/tutorials/assets_pipeline/exporting_3d_scenes.rst:7 #: ../../docs/tutorials/export/exporting_basics.rst:7 #: ../../docs/community/asset_library/using_assetlib.rst:10 msgid "Overview" msgstr "Tổng quan" #: ../../docs/tutorials/assets_pipeline/exporting_3d_scenes.rst:9 msgid "" "In Godot it is possible to export 3D scenes as a glTF 2.0 file. You can " "export as a glTF binary (``.glb`` file) or glTF embedded with textures " "(``gltf`` + ``.bin`` + textures). This allows you to create scenes in Godot, " "such as a CSG mesh blockout for a level, export it to clean it up in a " "program such as Blender, and then bring it back into Godot." msgstr "" #: ../../docs/tutorials/assets_pipeline/exporting_3d_scenes.rst:17 msgid "Only Blender 2.83 and newer can import glTF files exported by Godot." msgstr "" #: ../../docs/tutorials/assets_pipeline/exporting_3d_scenes.rst:19 msgid "" "To export a scene in the editor go to **Project > Tools > Export GLTF...**" msgstr "" #: ../../docs/tutorials/assets_pipeline/exporting_3d_scenes.rst:24 #: ../../docs/tutorials/editor/using_the_web_editor.rst:43 #: ../../docs/tutorials/export/exporting_for_web.rst:82 #: ../../docs/tutorials/performance/general_optimization.rst:70 msgid "Limitations" msgstr "" #: ../../docs/tutorials/assets_pipeline/exporting_3d_scenes.rst:26 #, fuzzy msgid "There are several limitations with glTF export." msgstr "Godot không có bất kỳ ràng buộc gì" #: ../../docs/tutorials/assets_pipeline/exporting_3d_scenes.rst:28 msgid "" "No support for exporting particles since their implementation varies across " "engines." msgstr "" #: ../../docs/tutorials/assets_pipeline/exporting_3d_scenes.rst:29 msgid "ShaderMaterials cannot be exported." msgstr "" #: ../../docs/tutorials/assets_pipeline/exporting_3d_scenes.rst:30 msgid "No support for exporting 2D scenes." msgstr "" #: ../../docs/tutorials/assets_pipeline/exporting_3d_scenes.rst:31 msgid "Only supported in editor builds (``tools=yes``)." msgstr "" #: ../../docs/tutorials/assets_pipeline/escn_exporter/index.rst:2 msgid "Blender ESCN exporter" msgstr "" #: ../../docs/tutorials/assets_pipeline/escn_exporter/index.rst:4 msgid "" "This chapter relates to the Blender plugin called \"Godot Blender " "Exporter\", which can be downloaded here: https://github.com/godotengine/" "godot-blender-exporter" msgstr "" #: ../../docs/tutorials/assets_pipeline/escn_exporter/index.rst:7 msgid "" "This plugin can be used to export Blender scenes in a Godot-specific scene " "format called ESCN, which is similar to TSCN (text format) but will be " "imported as binary SCN for performance." msgstr "" #: ../../docs/tutorials/assets_pipeline/escn_exporter/index.rst:12 msgid "Details on exporting" msgstr "" #: ../../docs/tutorials/assets_pipeline/escn_exporter/index.rst:27 msgid "Disabling specific objects" msgstr "" #: ../../docs/tutorials/assets_pipeline/escn_exporter/index.rst:29 msgid "" "Sometimes you don't want some objects exported (e.g. high-res models used " "for baking). An object will not be exported if it is not rendered in the " "scene. This can be set in the outliner:" msgstr "" #: ../../docs/tutorials/assets_pipeline/escn_exporter/index.rst:35 msgid "" "Objects hidden in the viewport will be exported, but will be hidden in the " "Godot scene." msgstr "" #: ../../docs/tutorials/assets_pipeline/escn_exporter/index.rst:40 msgid "Build pipeline integration" msgstr "" #: ../../docs/tutorials/assets_pipeline/escn_exporter/index.rst:42 msgid "" "If you have hundreds of model files, you don't want your artists to waste " "time manually exporting their blend files. To combat this, the exporter " "provides a python function ``io_scene_godot.export(out_file_path)`` that can " "be called to export a file. This allows easy integration with other build " "systems. An example Makefile and python script that exports all the blends " "in a directory are present in the Godot-Blender-exporter repository." msgstr "" #: ../../docs/tutorials/assets_pipeline/escn_exporter/material.rst:5 msgid "Using existing Godot materials" msgstr "" #: ../../docs/tutorials/assets_pipeline/escn_exporter/material.rst:7 msgid "" "One way in which the exporter can handle materials is to attempt to match " "the Blender material with an existing Godot material. This has the advantage " "of being able to use all of the features of Godot's material system, but it " "means that you cannot see your model with the material applied inside " "Blender." msgstr "" #: ../../docs/tutorials/assets_pipeline/escn_exporter/material.rst:12 msgid "" "To do this, the exporter attempts to find Godot materials with names that " "match those of the material name in Blender. So if you export an object in " "Blender with the material name ``PurpleDots`` then the exporter will search " "for the file ``PurpleDots.tres`` and assign it to the object. If this file " "is not a ``SpatialMaterial`` or ``ShaderMaterial`` or if it cannot be found, " "then the exporter will fall back to exporting the material from Blender." msgstr "" #: ../../docs/tutorials/assets_pipeline/escn_exporter/material.rst:20 msgid "" "Where the exporter searches for the ``.tres`` file is determined by the " "\"Material Search Paths\" option:" msgstr "" #: ../../docs/tutorials/assets_pipeline/escn_exporter/material.rst:34 msgid "This can take the value of:" msgstr "" #: ../../docs/tutorials/assets_pipeline/escn_exporter/material.rst:26 msgid "" "Project Directory - Attempts to find the ``project.Godot`` and recursively " "searches through subdirectories. If ``project.Godot`` cannot be found it " "will throw an error. This is useful for most projects where naming conflicts " "are unlikely." msgstr "" #: ../../docs/tutorials/assets_pipeline/escn_exporter/material.rst:30 msgid "" "Export Directory - Look for materials in subdirectories of the export " "location. This is useful for projects where you may have duplicate material " "names and need more control over what material gets assigned." msgstr "" #: ../../docs/tutorials/assets_pipeline/escn_exporter/material.rst:33 msgid "None - Do not search for materials. Export them from the Blender file." msgstr "" #: ../../docs/tutorials/assets_pipeline/escn_exporter/material.rst:37 msgid "Export of Cycles/EEVEE materials" msgstr "" #: ../../docs/tutorials/assets_pipeline/escn_exporter/material.rst:39 msgid "" "The exporter has a primitive support for converting Cycles/EEVEE material " "node tree to Godot Shader Material. Note that some of the Shader Node are " "not supported yet due to difficulties in implementation, which are:" msgstr "" #: ../../docs/tutorials/assets_pipeline/escn_exporter/material.rst:43 msgid "all the ``noisy textures``" msgstr "" #: ../../docs/tutorials/assets_pipeline/escn_exporter/material.rst:44 msgid "``generated texture coordinates``" msgstr "" #: ../../docs/tutorials/assets_pipeline/escn_exporter/material.rst:45 msgid "``group node``" msgstr "" #: ../../docs/tutorials/assets_pipeline/escn_exporter/material.rst:46 msgid "" "shader nodes except ``PrincipledBSDF``, ``Diffuse``, ``Glossy``, ``Glass``, " "``add shader`` and ``mix shader``" msgstr "" #: ../../docs/tutorials/assets_pipeline/escn_exporter/material.rst:50 msgid "" "If possible, try to use PrincipledBSDF node with GGX distribution as the " "output shader node, it is the only one guaranteed to be exactly correct. " "Others are just based on approximation." msgstr "" #: ../../docs/tutorials/assets_pipeline/escn_exporter/material.rst:53 msgid "" "Sometimes materials may not be valid for exporting (e.g. has some " "unsupported node) or it is using Blender Internal Engine, only the diffuse " "color and a few flags (e.g. unshaded) are exported and form a Spatial " "Material." msgstr "" #: ../../docs/tutorials/assets_pipeline/escn_exporter/material.rst:59 msgid "Generate external materials" msgstr "" #: ../../docs/tutorials/assets_pipeline/escn_exporter/material.rst:61 msgid "" "The default configuration of material exporting would keep all the materials " "internal to the ``escn`` file. There is an option which could enable " "generating external ``.material`` file when the ``escn`` file opens in Godot." msgstr "" #: ../../docs/tutorials/assets_pipeline/escn_exporter/material.rst:67 msgid "" "``.material`` file can be assigned to any material slot to be a external " "resource." msgstr "" #: ../../docs/tutorials/assets_pipeline/escn_exporter/physics.rst:2 msgid "Physics properties" msgstr "" #: ../../docs/tutorials/assets_pipeline/escn_exporter/physics.rst:4 msgid "" "Exporting physics properties is done by enabling \"Rigid Body\" in Blender's " "physics tab:" msgstr "" #: ../../docs/tutorials/assets_pipeline/escn_exporter/physics.rst:10 msgid "" "By default, a single Blender object with rigid body enabled will export as " "three nodes: a PhysicsBody, a CollisionShape, and a MeshInstance." msgstr "" #: ../../docs/tutorials/assets_pipeline/escn_exporter/physics.rst:14 msgid "Body type" msgstr "" #: ../../docs/tutorials/assets_pipeline/escn_exporter/physics.rst:16 msgid "" "Blender only has the concept of \"Active\" and \"Passive\" rigid bodies. " "These turn into Static and RigidBody nodes. To create a kinematic body, " "enable the \"animated\" checkbox on an \"Active\" body:" msgstr "" #: ../../docs/tutorials/assets_pipeline/escn_exporter/physics.rst:25 msgid "" "Many of the parameters for collision shapes are missing from Blender, and " "many of the collision shapes are also not present. However, almost all of " "the options in Blender's rigid body collision and rigid body dynamics " "interfaces are supported:" msgstr "" #: ../../docs/tutorials/assets_pipeline/escn_exporter/physics.rst:39 msgid "There are the following caveats:" msgstr "" #: ../../docs/tutorials/assets_pipeline/escn_exporter/physics.rst:33 msgid "" "Not all of the collision shapes are supported. Only ``Mesh``, ``Convex " "Hull``, ``Capsule``, ``Sphere`` and ``Box`` are supported in both Blender " "and Godot" msgstr "" #: ../../docs/tutorials/assets_pipeline/escn_exporter/physics.rst:36 msgid "" "In Godot, you can have different collision groups and collision masks. In " "Blender you only have collision groups. As a result, the exported object's " "collision mask is equal to its collision group. Most of the time, this is " "what you want." msgstr "" #: ../../docs/tutorials/assets_pipeline/escn_exporter/physics.rst:42 msgid "" "To build compound physics shapes, parent together multiple objects with " "rigid body enabled. The physics properties are taken from the parent-most " "rigid body, and the rest are used as collision shapes." msgstr "" #: ../../docs/tutorials/assets_pipeline/escn_exporter/physics.rst:47 msgid "Collision geometry only" msgstr "" #: ../../docs/tutorials/assets_pipeline/escn_exporter/physics.rst:49 msgid "" "Frequently you want different geometry for your collision meshes and your " "graphical meshes, but by default, the exporter will export a mesh along with " "the collision shape. To only export the collision shape, set the object's " "maximum draw type to Wire:" msgstr "" #: ../../docs/tutorials/assets_pipeline/escn_exporter/physics.rst:56 msgid "" "This will also influence how the object is shown in Blender's viewport. Most " "of the time, you want your collision geometry to be shown see-through when " "working on the models, so this works out fairly nicely." msgstr "" #: ../../docs/tutorials/assets_pipeline/escn_exporter/lights.rst:4 msgid "" "By default, lamps in Blender have shadows enabled. This can cause " "performance issues in Godot." msgstr "" #: ../../docs/tutorials/assets_pipeline/escn_exporter/lights.rst:8 msgid "" "Lamps are exported using their \"Blender Render\" settings. When Blender 2.8 " "is released, this will be removed and this part of the exporter will change." msgstr "" #: ../../docs/tutorials/assets_pipeline/escn_exporter/lights.rst:11 msgid "" "Sun, point and spot lamps are all exported from Blender along with many of " "their properties:" msgstr "" #: ../../docs/tutorials/assets_pipeline/escn_exporter/lights.rst:16 msgid "There are some things to note:" msgstr "" #: ../../docs/tutorials/assets_pipeline/escn_exporter/lights.rst:18 msgid "" "In Blender, a light casts light all the way to infinity. In Godot, it is " "clamped by the attenuation distance. To most closely match between the " "viewport and Godot, enable the \"Sphere\" checkbox. (Highlighted green)" msgstr "" #: ../../docs/tutorials/assets_pipeline/escn_exporter/lights.rst:21 msgid "" "Light attenuation models differ between Godot and Blender. The exporter " "attempts to make them match, but it isn't always very good." msgstr "" #: ../../docs/tutorials/assets_pipeline/escn_exporter/lights.rst:23 msgid "" "Spotlight angular attenuation models also differ between Godot and Blender. " "The exporter attempts to make them similar, but it doesn't always look the " "same." msgstr "" #: ../../docs/tutorials/assets_pipeline/escn_exporter/lights.rst:26 msgid "" "There is no difference between buffer shadow and ray shadow in the export." msgstr "" #: ../../docs/tutorials/assets_pipeline/escn_exporter/mesh.rst:2 msgid "Mesh" msgstr "Lưới" #: ../../docs/tutorials/assets_pipeline/escn_exporter/mesh.rst:5 msgid "Modifiers" msgstr "" #: ../../docs/tutorials/assets_pipeline/escn_exporter/mesh.rst:6 msgid "" "There is an exporting option :code:`Apply Modifiers` to control whether mesh " "modifiers are applied to the exported mesh." msgstr "" #: ../../docs/tutorials/assets_pipeline/escn_exporter/mesh.rst:11 msgid "Shape Key" msgstr "" #: ../../docs/tutorials/assets_pipeline/escn_exporter/mesh.rst:12 msgid "" "Exporting mesh shape key is supported, however exporting each shape key is " "almost like exporting the mesh again, so don't be surprised it takes a " "relatively long time." msgstr "" #: ../../docs/tutorials/assets_pipeline/escn_exporter/mesh.rst:17 msgid "" "A lot of modifiers are not compatible with shape keys (e.g. subsurface " "modifier), so if you found you have incorrect shape keys exported, try to " "disable :code:`Apply Modifiers` and do the exporting again. Besides, it is " "worthwhile to report the incompatible modifier to the `issue list `__, which helps to " "develop the exporter to have a more precise check of modifiers." msgstr "" #: ../../docs/tutorials/assets_pipeline/escn_exporter/skeleton.rst:2 #: ../../docs/development/file_formats/tscn.rst:167 msgid "Skeleton" msgstr "Khung xương" #: ../../docs/tutorials/assets_pipeline/escn_exporter/skeleton.rst:7 msgid "Rest Bone" msgstr "" #: ../../docs/tutorials/assets_pipeline/escn_exporter/skeleton.rst:9 msgid "" "Armature object in Blender is exported as a Skeleton node along with rest " "position (transform in Godot) of bones." msgstr "" #: ../../docs/tutorials/assets_pipeline/escn_exporter/skeleton.rst:13 msgid "" "The three check boxes :code:`Inherit Rotation`, :code:`Inherit Scale`, :code:" "`Local Location` (colored in red) must be ticked when building armature in " "Blender, so that the exported bone transform be consistent between Blender " "and Godot" msgstr "" #: ../../docs/tutorials/assets_pipeline/escn_exporter/skeleton.rst:18 msgid "" "It is important that the mesh is not deformed by bones when exporting in " "Blender. Make sure that the skeleton is reset to its T-pose or default rest " "pose." msgstr "" #: ../../docs/tutorials/assets_pipeline/escn_exporter/skeleton.rst:22 msgid "Bone Weights" msgstr "" #: ../../docs/tutorials/assets_pipeline/escn_exporter/skeleton.rst:24 msgid "" "Blender put rigged mesh vertices which has no bone weights at its original " "position, but these vertices would be placed at (0, 0, 0) in Godot, making " "the mesh deformed. Therefore, the exporter would raise an error for any " "vertex with no bone weights detected in a rigged mesh." msgstr "" #: ../../docs/tutorials/assets_pipeline/escn_exporter/skeleton.rst:30 msgid "Non-Deform Bone" msgstr "" #: ../../docs/tutorials/assets_pipeline/escn_exporter/skeleton.rst:32 msgid "" "Note that the non-deform bone can be configured as not exported by enabling " "the :code:`Exclude Control Bones`; the deform bone checkbox is shown in the " "picture." msgstr "" #: ../../docs/tutorials/assets_pipeline/escn_exporter/skeleton.rst:38 msgid "Bone Attachment" msgstr "" #: ../../docs/tutorials/assets_pipeline/escn_exporter/skeleton.rst:39 msgid "" "A bone can be the parent of an object in Blender; this relation is exported " "as a BoneAttachment node in the Godot scene." msgstr "" #: ../../docs/tutorials/assets_pipeline/escn_exporter/animation.rst:8 msgid "Animation supported:" msgstr "" #: ../../docs/tutorials/assets_pipeline/escn_exporter/animation.rst:4 msgid "transform animation of all types of objects" msgstr "" #: ../../docs/tutorials/assets_pipeline/escn_exporter/animation.rst:5 msgid "transform animation of pose bones" msgstr "" #: ../../docs/tutorials/assets_pipeline/escn_exporter/animation.rst:6 msgid "shape key animation" msgstr "" #: ../../docs/tutorials/assets_pipeline/escn_exporter/animation.rst:7 msgid "light animation" msgstr "" #: ../../docs/tutorials/assets_pipeline/escn_exporter/animation.rst:8 msgid "camera animation" msgstr "" #: ../../docs/tutorials/assets_pipeline/escn_exporter/animation.rst:11 msgid "Multiple Actions For Single Object" msgstr "" #: ../../docs/tutorials/assets_pipeline/escn_exporter/animation.rst:12 msgid "" "In most games, one object would have several animations to switch between. " "This add-on has support for exporting multiple actions all at once into a " "single AnimationPlayer and makes it easy to switch actions." msgstr "" #: ../../docs/tutorials/assets_pipeline/escn_exporter/animation.rst:16 msgid "" "This workflow makes use of blender nla_tracks. Here is a brief guide on how " "to use this feature:" msgstr "" #: ../../docs/tutorials/assets_pipeline/escn_exporter/animation.rst:19 msgid "**1. Stash active action**" msgstr "" #: ../../docs/tutorials/assets_pipeline/escn_exporter/animation.rst:21 msgid "" "New created action is always an active action bound to object. There are " "several ways to place an active action into NLA track, one is of course " "doing it in ``NLA Editor``" msgstr "" #: ../../docs/tutorials/assets_pipeline/escn_exporter/animation.rst:28 msgid "Or it can be done stashing the action in ``Dope Sheet``" msgstr "" #: ../../docs/tutorials/assets_pipeline/escn_exporter/animation.rst:33 msgid "**2. Check mute status of NLA tracks**" msgstr "" #: ../../docs/tutorials/assets_pipeline/escn_exporter/animation.rst:35 msgid "" "An NLA track can be ``mute`` or ``unmute``, the exporter will export all the " "``mute`` NLA track as a separate action, while blends all the ``unmute`` NLA " "tracks into every action (including the action action) being exported." msgstr "" #: ../../docs/tutorials/assets_pipeline/escn_exporter/animation.rst:41 msgid "**3. Export the scene**" msgstr "" #: ../../docs/tutorials/assets_pipeline/escn_exporter/animation.rst:43 msgid "Make sure the ``Export Stashed Actions`` option has been turned on." msgstr "" #: ../../docs/tutorials/assets_pipeline/escn_exporter/animation.rst:47 msgid "" "Then all the stashed actions, as well as the active action, are exported to " "an AnimationPlayer." msgstr "" #: ../../docs/tutorials/assets_pipeline/escn_exporter/animation.rst:54 msgid "Constraints" msgstr "" #: ../../docs/tutorials/assets_pipeline/escn_exporter/animation.rst:55 msgid "" "Sometimes complicated animation is built with object constraint; a usual " "example is inverse kinematics. The add-on would automatically check if an " "object has some constraint; if it does, all the constraints are baked into " "actions and then exported along with the object." msgstr "" #: ../../docs/tutorials/assets_pipeline/escn_exporter/animation.rst:62 msgid "Animation Mode" msgstr "" #: ../../docs/tutorials/assets_pipeline/escn_exporter/animation.rst:63 msgid "" "Godot and Blender have different structure to store animation data. In Godot " "animation data is stored in an AnimationPlayer node, instead of in each " "animated node. In order to fix this inconsistence and still make the " "animation play versatile, this add-on has three animation exporting modes." msgstr "" #: ../../docs/tutorials/assets_pipeline/escn_exporter/animation.rst:70 msgid "**Mode 'Animation as Actions'**" msgstr "" #: ../../docs/tutorials/assets_pipeline/escn_exporter/animation.rst:72 msgid "" "Treat all the animations as object actions, so in the exported scene, every " "object would have its own AnimationPlayer and hold its actions." msgstr "" #: ../../docs/tutorials/assets_pipeline/escn_exporter/animation.rst:76 msgid "**Mode 'Scene Animation'**" msgstr "" #: ../../docs/tutorials/assets_pipeline/escn_exporter/animation.rst:78 msgid "" "If you want your animation to generate the same result as playing at " "Blender's timeline, this is what you want. In this mode, all the animations " "in the scene are placed in just one AnimationPlayer in the scene root." msgstr "" #: ../../docs/tutorials/assets_pipeline/escn_exporter/animation.rst:82 msgid "**Mode 'Animation as Action with Squash'**" msgstr "" #: ../../docs/tutorials/assets_pipeline/escn_exporter/animation.rst:84 msgid "" "This mode has very similar behavior of mode 'Animation as Action', but it " "can generate fewer AnimationPlayers; objects in parent-children relationship " "would share their AnimationPlayer. It is useful when you have several rigs, " "and each Skeleton and Mesh has actions; then one rig would have just one " "AnimationPlayer." msgstr "" #: ../../docs/tutorials/audio/audio_buses.rst:4 #: ../../docs/tutorials/audio/audio_buses.rst:48 msgid "Audio buses" msgstr "" #: ../../docs/tutorials/audio/audio_buses.rst:9 msgid "" "Godot's audio processing code has been written with games in mind, with the " "aim of achieving an optimal balance between performance and sound quality." msgstr "" #: ../../docs/tutorials/audio/audio_buses.rst:12 msgid "" "Godot's audio engine allows any number of audio buses to be created and any " "number of effect processors can be added to each bus. Only the hardware of " "the device running your game will limit the number of buses and effects that " "can be used before performance starts to suffer." msgstr "" #: ../../docs/tutorials/audio/audio_buses.rst:18 msgid "Decibel scale" msgstr "" #: ../../docs/tutorials/audio/audio_buses.rst:20 msgid "" "Godot's sound interface is designed to meet the expectations of sound design " "professionals. To this end, it primarily uses the decibel scale." msgstr "" #: ../../docs/tutorials/audio/audio_buses.rst:23 msgid "For those unfamiliar with it, it can be explained with a few facts:" msgstr "" #: ../../docs/tutorials/audio/audio_buses.rst:25 msgid "" "The decibel (dB) scale is a relative scale. It represents the ratio of sound " "power by using 20 times the base 10 logarithm of the ratio (20 × log\\ :sub:" "`10`\\ (P/P\\ :sub:`0`\\ ))." msgstr "" #: ../../docs/tutorials/audio/audio_buses.rst:28 msgid "" "For every 6 dB, sound amplitude doubles or halves. 12 dB represents a factor " "of 4, 18 dB a factor of 8, 20 dB a factor of 10, 40 dB a factor of 100, etc." msgstr "" #: ../../docs/tutorials/audio/audio_buses.rst:30 msgid "" "Since the scale is logarithmic, true zero (no audio) can't be represented." msgstr "" #: ../../docs/tutorials/audio/audio_buses.rst:31 msgid "" "0 dB is the maximum amplitude possible in a digital audio system. This limit " "is not the human limit, but a limit from the sound hardware. Audio with " "amplitudes that are too high to be represented properly below 0 dB create a " "kind of distortion called *clipping*." msgstr "" #: ../../docs/tutorials/audio/audio_buses.rst:35 msgid "" "To avoid clipping, your sound mix should be arranged so that the output of " "the *master bus* (more on that later) never exceeds 0 dB." msgstr "" #: ../../docs/tutorials/audio/audio_buses.rst:37 msgid "" "Every 6 dB below the 0 dB limit, sound energy is *halved*. It means the " "sound volume at -6 dB is half as loud as 0dB. -12 dB is half as loud as -6 " "dB and so on." msgstr "" #: ../../docs/tutorials/audio/audio_buses.rst:40 msgid "" "When working with decibels, sound is considered no longer audible between " "-60 dB and -80 dB. This makes your working range generally between -60 dB " "and 0 dB." msgstr "" #: ../../docs/tutorials/audio/audio_buses.rst:44 msgid "" "This can take a bit getting used to, but it's friendlier in the end and will " "allow you to communicate better with audio professionals." msgstr "" #: ../../docs/tutorials/audio/audio_buses.rst:50 msgid "Audio buses can be found in the bottom panel of the Godot editor:" msgstr "" #: ../../docs/tutorials/audio/audio_buses.rst:54 msgid "" "An *audio bus* (also called an *audio channel*) can be considered a place " "that audio is channeled through on the way to playback through a device's " "speakers. Audio data can be *modified* and *re-routed* by an audio bus. An " "audio bus has a VU meter (the bars that light up when sound is played) which " "indicates the amplitude of the signal passing through." msgstr "" #: ../../docs/tutorials/audio/audio_buses.rst:60 msgid "" "The leftmost bus is the *master bus*. This bus outputs the mix to your " "speakers so, as mentioned in the *Decibel scale* section above, make sure " "that your mix level doesn't reach 0 dB in this bus. The rest of the audio " "buses can be flexibly routed. After modifying the sound, they send it to " "another bus to the left. The destination bus can be specified for each of " "the non-master audio buses. Routing always passes audio from buses on the " "right to buses further to the left. This avoids infinite routing loops." msgstr "" #: ../../docs/tutorials/audio/audio_buses.rst:70 msgid "" "In the above image, the output of *Bus 2* has been routed to the *Master* " "bus." msgstr "" #: ../../docs/tutorials/audio/audio_buses.rst:73 msgid "Playback of audio through a bus" msgstr "" #: ../../docs/tutorials/audio/audio_buses.rst:75 msgid "" "To test passing audio to a bus, create an AudioStreamPlayer node, load an " "AudioStream and select a target bus for playback:" msgstr "" #: ../../docs/tutorials/audio/audio_buses.rst:80 msgid "Finally, toggle the **Playing** property to **On** and sound will flow." msgstr "" #: ../../docs/tutorials/audio/audio_buses.rst:84 msgid "" "You may also be interested in reading about :ref:`doc_audio_streams` now." msgstr "" #: ../../docs/tutorials/audio/audio_buses.rst:87 msgid "Adding effects" msgstr "" #: ../../docs/tutorials/audio/audio_buses.rst:89 msgid "" "Audio buses can contain all sorts of effects. These effects modify the sound " "in one way or another and are applied in order." msgstr "" #: ../../docs/tutorials/audio/audio_buses.rst:94 msgid "" "Try them all out to get a sense of how they alter sound. Here follows a " "short description of the available effects:" msgstr "" #: ../../docs/tutorials/audio/audio_buses.rst:98 msgid "Amplify" msgstr "" #: ../../docs/tutorials/audio/audio_buses.rst:100 msgid "" "Amplify changes the amplitude of the signal. Some care needs to be taken. " "Setting the level too high can make the sound clip, which is usually " "undesirable." msgstr "" #: ../../docs/tutorials/audio/audio_buses.rst:105 msgid "BandLimit and BandPass" msgstr "" #: ../../docs/tutorials/audio/audio_buses.rst:107 msgid "" "These are resonant filters which block frequencies around the *Cutoff* " "point. BandPass can be used to simulate sound passing through an old " "telephone line or megaphone. Modulating the BandPass frequency can simulate " "the sound of a wah-wah guitar pedal, think of the guitar in Jimi Hendrix's " "*Voodoo Child (Slight Return)*." msgstr "" #: ../../docs/tutorials/audio/audio_buses.rst:116 msgid "" "The Capture effect copies the audio frames of the audio bus that it is on " "into an internal buffer. This can be used to capture data from the " "microphone or to transmit audio over the network in real-time." msgstr "" #: ../../docs/tutorials/audio/audio_buses.rst:121 msgid "Chorus" msgstr "" #: ../../docs/tutorials/audio/audio_buses.rst:123 msgid "" "The Chorus effect duplicates the incoming audio, delays the duplicate " "slightly and uses an LFO to continuously modulate the pitch of the " "duplicated signal before mixing the duplicated signal(s) and the original " "together again. This creates a shimmering effect and adds stereo width to " "the sound." msgstr "" #: ../../docs/tutorials/audio/audio_buses.rst:129 msgid "Compressor" msgstr "" #: ../../docs/tutorials/audio/audio_buses.rst:131 msgid "" "A dynamic range compressor automatically attenuates the level of the " "incoming signal when its amplitude exceeds a certain threshold. The level of " "attenuation applied is proportional to how far the incoming audio exceeds " "the threshold. The compressor's Ratio parameter controls the degree of " "attenuation. One of the main uses of a compressor is to reduce the dynamic " "range of signals with very loud and quiet parts. Reducing the dynamic range " "of a signal can make it easier to mix." msgstr "" #: ../../docs/tutorials/audio/audio_buses.rst:139 msgid "The compressor has many uses. For example:" msgstr "" #: ../../docs/tutorials/audio/audio_buses.rst:141 msgid "It can be used in the Master bus to compress the whole output." msgstr "" #: ../../docs/tutorials/audio/audio_buses.rst:142 msgid "" "It can be used in voice channels to ensure they sound as even as possible." msgstr "" #: ../../docs/tutorials/audio/audio_buses.rst:143 msgid "" "It can be *sidechained*. This means it can reduce the sound level of one " "signal using the level of another audio bus for threshold detection. This " "technique is very common in video game mixing to \"duck\" the level of music " "or sound effects when voices need to be heard." msgstr "" #: ../../docs/tutorials/audio/audio_buses.rst:147 msgid "" "It can accentuate transients by using a slower attack. This can make sound " "effects more punchy." msgstr "" #: ../../docs/tutorials/audio/audio_buses.rst:152 msgid "" "If your goal is to prevent a signal from exceeding a given amplitude " "altogether, rather than to reduce the dynamic range of the signal, a :ref:" "`limiter ` is likely a better choice than a " "compressor." msgstr "" #: ../../docs/tutorials/audio/audio_buses.rst:159 msgid "Delay" msgstr "" #: ../../docs/tutorials/audio/audio_buses.rst:161 msgid "" "Adds an \"echo\" effect with a feedback loop. It can be used together with " "*Reverb* to simulate wide rooms, canyons, etc. where sound bounces are far " "apart." msgstr "" #: ../../docs/tutorials/audio/audio_buses.rst:166 msgid "Distortion" msgstr "" #: ../../docs/tutorials/audio/audio_buses.rst:168 msgid "" "Makes the sound distorted. Godot offers several types of distortion: " "*overdrive*, *tan* and *bit crushing*. Distortion can be used to simulate " "sound coming through a low-quality speaker or device." msgstr "" #: ../../docs/tutorials/audio/audio_buses.rst:173 msgid "EQ" msgstr "" #: ../../docs/tutorials/audio/audio_buses.rst:175 msgid "" "EQ is what all other equalizers inherit from. It can be extended with with " "Custom scripts to create an equalizer with a custom number of bands." msgstr "" #: ../../docs/tutorials/audio/audio_buses.rst:179 msgid "EQ6, EQ10, EQ21" msgstr "" #: ../../docs/tutorials/audio/audio_buses.rst:181 msgid "" "Godot provides three equalizers with different numbers of bands. An " "equalizer on the Master bus can be useful to cut frequencies that the " "device's speakers can't reproduce well (e.g. a mobile phone's speakers won't " "reproduce bass content well). The equalizer effect can be disabled when " "headphones are plugged in." msgstr "" #: ../../docs/tutorials/audio/audio_buses.rst:189 msgid "" "Filter is what all other filters inherit from and should not be used " "directly." msgstr "" #: ../../docs/tutorials/audio/audio_buses.rst:192 msgid "HighPassFilter" msgstr "" #: ../../docs/tutorials/audio/audio_buses.rst:194 msgid "" "Cuts frequencies below a specific *Cutoff* frequency. HighPassFilter is used " "to reduce the bass content of a signal." msgstr "" #: ../../docs/tutorials/audio/audio_buses.rst:199 msgid "HighShelfFilter" msgstr "" #: ../../docs/tutorials/audio/audio_buses.rst:201 msgid "Reduces all frequencies above a specific *Cutoff* frequency." msgstr "" #: ../../docs/tutorials/audio/audio_buses.rst:206 msgid "Limiter" msgstr "" #: ../../docs/tutorials/audio/audio_buses.rst:208 msgid "" "A limiter is similar to a compressor, but it's less flexible and designed to " "prevent a signal's amplitude exceeding a given dB threshold. Adding a " "limiter to the Master bus is a safeguard against clipping." msgstr "" #: ../../docs/tutorials/audio/audio_buses.rst:213 msgid "LowPassFilter" msgstr "" #: ../../docs/tutorials/audio/audio_buses.rst:215 msgid "" "Cuts frequencies above a specific *Cutoff* frequency and can also resonate " "(boost frequencies close to the *Cutoff* frequency). Low pass filters can be " "used to simulate \"muffled\" sound. For instance, underwater sounds, sounds " "blocked by walls, or distant sounds." msgstr "" #: ../../docs/tutorials/audio/audio_buses.rst:221 msgid "LowShelfFilter" msgstr "" #: ../../docs/tutorials/audio/audio_buses.rst:223 msgid "Reduces all frequencies below a specific *Cutoff* frequency." msgstr "" #: ../../docs/tutorials/audio/audio_buses.rst:226 msgid "NotchFilter" msgstr "" #: ../../docs/tutorials/audio/audio_buses.rst:228 msgid "" "The opposite of the BandPassFilter, it removes a band of sound from the " "frequency spectrum at a given *Cutoff* frequency." msgstr "" #: ../../docs/tutorials/audio/audio_buses.rst:232 msgid "Panner" msgstr "" #: ../../docs/tutorials/audio/audio_buses.rst:234 msgid "" "The Panner allows the stereo balance of a signal to be adjusted between the " "left and right channels (wear headphones to audition this effect)." msgstr "" #: ../../docs/tutorials/audio/audio_buses.rst:238 msgid "Phaser" msgstr "" #: ../../docs/tutorials/audio/audio_buses.rst:240 msgid "" "It probably does not make much sense to explain that this effect is formed " "by two signals being dephased and cancelling each other out. You can make a " "Darth Vader voice with it, or jet-like sounds." msgstr "" #: ../../docs/tutorials/audio/audio_buses.rst:245 msgid "PitchShift" msgstr "" #: ../../docs/tutorials/audio/audio_buses.rst:247 msgid "" "This effect allows the adjustment of the signal's pitch independently of its " "speed. All frequencies can be increased/decreased with minimal effect on " "transients. PitchShift can be useful to create unusually high or deep voices." msgstr "" #: ../../docs/tutorials/audio/audio_buses.rst:252 msgid "Record" msgstr "" #: ../../docs/tutorials/audio/audio_buses.rst:254 msgid "The Record effect allows the user to record sound from a microphone." msgstr "" #: ../../docs/tutorials/audio/audio_buses.rst:257 msgid "Reverb" msgstr "" #: ../../docs/tutorials/audio/audio_buses.rst:259 msgid "" "Reverb simulates rooms of different sizes. It has adjustable parameters that " "can be tweaked to obtain the sound of a specific room. Reverb is commonly " "outputted from :ref:`Areas ` (see :ref:`Reverb buses " "`), or to apply a \"chamber\" feel to all " "sounds." msgstr "" #: ../../docs/tutorials/audio/audio_buses.rst:266 msgid "SpectrumAnalyzer" msgstr "" #: ../../docs/tutorials/audio/audio_buses.rst:268 msgid "" "This effect doesn't alter audio, instead, you add this effect to buses you " "want a spectrum analysis of. This would typically be used for audio " "visualization. A demo project using this can be found `here `__." msgstr "" #: ../../docs/tutorials/audio/audio_buses.rst:273 msgid "StereoEnhance" msgstr "" #: ../../docs/tutorials/audio/audio_buses.rst:275 msgid "" "This effect uses a few algorithms to enhance a signal's stereo spectrum." msgstr "" #: ../../docs/tutorials/audio/audio_buses.rst:278 msgid "Automatic bus disabling" msgstr "" #: ../../docs/tutorials/audio/audio_buses.rst:280 msgid "" "There is no need to disable buses manually when not in use. Godot detects " "that the bus has been silent for a few seconds and disables it (including " "all effects)." msgstr "" #: ../../docs/tutorials/audio/audio_buses.rst:286 msgid "Disabled buses have a blue VU meter instead of a red-green one." msgstr "" #: ../../docs/tutorials/audio/audio_buses.rst:289 msgid "Bus rearrangement" msgstr "" #: ../../docs/tutorials/audio/audio_buses.rst:291 msgid "" "Stream Players use bus names to identify a bus, which allows adding, " "removing and moving buses around while the reference to them is kept. " "However, if a bus is renamed, the reference will be lost and the Stream " "Player will output to Master. This system was chosen because rearranging " "buses is a more common process than renaming them." msgstr "" #: ../../docs/tutorials/audio/audio_buses.rst:298 msgid "Default bus layout" msgstr "" #: ../../docs/tutorials/audio/audio_buses.rst:300 msgid "" "The default bus layout is automatically saved to the ``res://" "default_bus_layout.tres`` file. Custom bus arrangements can be saved and " "loaded from disk." msgstr "" #: ../../docs/tutorials/audio/audio_streams.rst:4 msgid "Audio streams" msgstr "" #: ../../docs/tutorials/audio/audio_streams.rst:9 msgid "" "As you might have already read in :ref:`doc_audio_buses`, sound is sent to " "each bus via an AudioStreamPlayer node. There are different kinds of " "AudioStreamPlayers. Each one loads an AudioStream and plays it back." msgstr "" #: ../../docs/tutorials/audio/audio_streams.rst:14 msgid "AudioStream" msgstr "" #: ../../docs/tutorials/audio/audio_streams.rst:16 msgid "" "An audio stream is an abstract object that emits sound. The sound can come " "from many places, but is most commonly loaded from the filesystem. Audio " "files can be loaded as AudioStreams and placed inside an AudioStreamPlayer. " "You can find information on supported formats and differences in :ref:" "`doc_importing_audio_samples`." msgstr "" #: ../../docs/tutorials/audio/audio_streams.rst:21 msgid "" "There are other types of AudioStreams, such as AudioStreamRandomPitch. This " "one makes a random adjustment to the sound's pitch every time it's played " "back. This can be helpful for adding variation to sounds that are played " "back often." msgstr "" #: ../../docs/tutorials/audio/audio_streams.rst:27 msgid "AudioStreamPlayer" msgstr "" #: ../../docs/tutorials/audio/audio_streams.rst:31 msgid "" "This is the standard, non-positional stream player. It can play to any bus. " "In 5.1 sound setups, it can send audio to stereo mix or front speakers." msgstr "" #: ../../docs/tutorials/audio/audio_streams.rst:35 msgid "AudioStreamPlayer2D" msgstr "" #: ../../docs/tutorials/audio/audio_streams.rst:39 msgid "" "This is a variant of AudioStreamPlayer, but emits sound in a 2D positional " "environment. When close to the left of the screen, the panning will go left. " "When close to the right side, it will go right." msgstr "" #: ../../docs/tutorials/audio/audio_streams.rst:45 msgid "" "Area2Ds can be used to divert sound from any AudioStreamPlayer2Ds they " "contain to specific buses. This makes it possible to create buses with " "different reverb or sound qualities to handle action happening in a " "particular parts of your game world." msgstr "" #: ../../docs/tutorials/audio/audio_streams.rst:53 msgid "AudioStreamPlayer3D" msgstr "" #: ../../docs/tutorials/audio/audio_streams.rst:57 msgid "" "This is a variant of AudioStreamPlayer, but emits sound in a 3D positional " "environment. Depending on the location of the player relative to the screen, " "it can position sound in stereo, 5.1 or 7.1 depending on the chosen audio " "setup." msgstr "" #: ../../docs/tutorials/audio/audio_streams.rst:61 msgid "" "Similar to AudioStreamPlayer2D, an Area can divert the sound to an audio bus." msgstr "" #: ../../docs/tutorials/audio/audio_streams.rst:65 msgid "" "Unlike for 2D, the 3D version of AudioStreamPlayer has a few more advanced " "options:" msgstr "" #: ../../docs/tutorials/audio/audio_streams.rst:70 msgid "Reverb buses" msgstr "" #: ../../docs/tutorials/audio/audio_streams.rst:72 msgid "" "Godot allows for 3D audio streams that enter a specific Area node to send " "dry and wet audio to separate buses. This is useful when you have several " "reverb configurations for different types of rooms. This is done by enabling " "this type of reverb in the **Reverb Bus** section of the Area's properties:" msgstr "" #: ../../docs/tutorials/audio/audio_streams.rst:79 msgid "" "At the same time, a special bus layout is created where each area receives " "the reverb info from each area. A Reverb effect needs to be created and " "configured in each reverb bus to complete the setup for the desired effect:" msgstr "" #: ../../docs/tutorials/audio/audio_streams.rst:85 msgid "" "The Area's **Reverb Bus** section also has a parameter named **Uniformity**. " "Some types of rooms bounce sounds more than others (like a warehouse), so " "reverberation can be heard almost uniformly across the room even though the " "source may be far away. Playing around with this parameter can simulate that " "effect." msgstr "" #: ../../docs/tutorials/audio/audio_streams.rst:92 msgid "Doppler" msgstr "" #: ../../docs/tutorials/audio/audio_streams.rst:94 msgid "" "When the relative velocity between an emitter and listener changes, this is " "perceived as an increase or decrease in the pitch of the emitted sound. " "Godot can track velocity changes in the AudioStreamPlayer3D and Camera " "nodes. Both nodes have this property, which must be enabled manually:" msgstr "" #: ../../docs/tutorials/audio/audio_streams.rst:101 msgid "" "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 happen automatically." msgstr "" #: ../../docs/tutorials/audio/sync_with_audio.rst:4 msgid "Sync the gameplay with audio and music" msgstr "" #: ../../docs/tutorials/audio/sync_with_audio.rst:9 msgid "" "In any application or game, sound and music playback will have a slight " "delay. For games, this delay is often so small that it is negligible. Sound " "effects will come out a few milliseconds after any play() function is " "called. For music this does not matter as in most games it does not interact " "with the gameplay." msgstr "" #: ../../docs/tutorials/audio/sync_with_audio.rst:11 msgid "" "Still, for some games (mainly, rhythm games), it may be required to " "synchronize player actions with something happening in a song (usually in " "sync with the BPM). For this, having more precise timing information for an " "exact playback position is useful." msgstr "" #: ../../docs/tutorials/audio/sync_with_audio.rst:13 msgid "" "Achieving very low playback timing precision is difficult. This is because " "many factors are at play during audio playback:" msgstr "" #: ../../docs/tutorials/audio/sync_with_audio.rst:15 msgid "" "Audio is mixed in chunks (not continuously), depending on the size of audio " "buffers used (check latency in project settings)." msgstr "" #: ../../docs/tutorials/audio/sync_with_audio.rst:16 msgid "Mixed chunks of audio are not played immediately." msgstr "" #: ../../docs/tutorials/audio/sync_with_audio.rst:17 msgid "Graphics APIs display two or three frames late." msgstr "" #: ../../docs/tutorials/audio/sync_with_audio.rst:18 msgid "When playing on TVs, some delay may be added due to image processing." msgstr "" #: ../../docs/tutorials/audio/sync_with_audio.rst:20 msgid "" "The most common way to reduce latency is to shrink the audio buffers (again, " "by editing the latency setting in the project settings). The problem is that " "when latency is too small, sound mixing will require considerably more CPU. " "This increases the risk of skipping (a crack in sound because a mix callback " "was lost)." msgstr "" #: ../../docs/tutorials/audio/sync_with_audio.rst:22 msgid "" "This is a common tradeoff, so Godot ships with sensible defaults that should " "not need to be altered." msgstr "" #: ../../docs/tutorials/audio/sync_with_audio.rst:24 msgid "" "The problem, in the end, is not this slight delay but synchronizing graphics " "and audio for games that require it. Beginning with Godot 3.2, some helpers " "were added to obtain more precise playback timing." msgstr "" #: ../../docs/tutorials/audio/sync_with_audio.rst:27 msgid "Using the system clock to sync" msgstr "" #: ../../docs/tutorials/audio/sync_with_audio.rst:29 msgid "" "As mentioned before, If you call :ref:`AudioStreamPlayer." "play()`, sound will not begin " "immediately, but when the audio thread processes the next chunk." msgstr "" #: ../../docs/tutorials/audio/sync_with_audio.rst:31 msgid "" "This delay can't be avoided but it can be estimated by calling :ref:" "`AudioServer." "get_time_to_next_mix()`." msgstr "" #: ../../docs/tutorials/audio/sync_with_audio.rst:33 msgid "" "The output latency (what happens after the mix) can also be estimated by " "calling :ref:`AudioServer." "get_output_latency()`." msgstr "" #: ../../docs/tutorials/audio/sync_with_audio.rst:35 msgid "" "Add these two and it's possible to guess almost exactly when sound or music " "will begin playing in the speakers during *_process()*:" msgstr "" #: ../../docs/tutorials/audio/sync_with_audio.rst:79 msgid "" "In the long run, though, as the sound hardware clock is never exactly in " "sync with the system clock, the timing information will slowly drift away." msgstr "" #: ../../docs/tutorials/audio/sync_with_audio.rst:81 msgid "" "For a rhythm game where a song begins and ends after a few minutes, this " "approach is fine (and it's the recommended approach). For a game where " "playback can last a much longer time, the game will eventually go out of " "sync and a different approach is needed." msgstr "" #: ../../docs/tutorials/audio/sync_with_audio.rst:84 msgid "Using the sound hardware clock to sync" msgstr "" #: ../../docs/tutorials/audio/sync_with_audio.rst:86 msgid "" "Using :ref:`AudioStreamPlayer." "get_playback_position()` " "to obtain the current position for the song sounds ideal, but it's not that " "useful as-is. This value will increment in chunks (every time the audio " "callback mixed a block of sound), so many calls can return the same value. " "Added to this, the value will be out of sync with the speakers too because " "of the previously mentioned reasons." msgstr "" #: ../../docs/tutorials/audio/sync_with_audio.rst:88 msgid "" "To compensate for the \"chunked\" output, there is a function that can " "help: :ref:`AudioServer." "get_time_since_last_mix()`." msgstr "" #: ../../docs/tutorials/audio/sync_with_audio.rst:91 msgid "" "Adding the return value from this function to *get_playback_position()* " "increases precision:" msgstr "" #: ../../docs/tutorials/audio/sync_with_audio.rst:103 msgid "" "To increase precision, subtract the latency information (how much it takes " "for the audio to be heard after it was mixed):" msgstr "" #: ../../docs/tutorials/audio/sync_with_audio.rst:114 msgid "" "The result may be a bit jittery due how multiple threads work. Just check " "that the value is not less than in the previous frame (discard it if so). " "This is also a less precise approach than the one before, but it will work " "for songs of any length, or synchronizing anything (sound effects, as an " "example) to music." msgstr "" #: ../../docs/tutorials/audio/sync_with_audio.rst:116 msgid "Here is the same code as before using this approach:" msgstr "" #: ../../docs/tutorials/audio/recording_with_microphone.rst:4 msgid "Recording with microphone" msgstr "" #: ../../docs/tutorials/audio/recording_with_microphone.rst:6 msgid "" "Godot supports in-game audio recording for Windows, macOS, Linux, Android " "and iOS." msgstr "" #: ../../docs/tutorials/audio/recording_with_microphone.rst:9 msgid "" "A simple demo is included in the official demo projects and will be used as " "support for this tutorial: ``_." msgstr "" #: ../../docs/tutorials/audio/recording_with_microphone.rst:14 msgid "The structure of the demo" msgstr "" #: ../../docs/tutorials/audio/recording_with_microphone.rst:16 msgid "" "The demo consists of a single scene. This scene includes two major parts: " "the GUI and the audio." msgstr "" #: ../../docs/tutorials/audio/recording_with_microphone.rst:19 msgid "" "We will focus on the audio part. In this demo, a bus named ``Record`` with " "the effect ``Record`` is created to handle the audio recording. An " "``AudioStreamPlayer`` named ``AudioStreamRecord`` is used for recording." msgstr "" #: ../../docs/tutorials/audio/recording_with_microphone.rst:55 msgid "" "The audio recording is handled by the :ref:`class_AudioEffectRecord` " "resource which has three methods: :ref:`get_recording() " "`, :ref:`is_recording_active() " "`, and :ref:" "`set_recording_active() " "`." msgstr "" #: ../../docs/tutorials/audio/recording_with_microphone.rst:102 msgid "" "At the start of the demo, the recording effect is not active. When the user " "presses the ``RecordButton``, the effect is enabled with " "``set_recording_active(true)``." msgstr "" #: ../../docs/tutorials/audio/recording_with_microphone.rst:106 msgid "" "On the next button press, as ``effect.is_recording_active()`` is ``true``, " "the recorded stream can be stored into the ``recording`` variable by calling " "``effect.get_recording()``." msgstr "" #: ../../docs/tutorials/audio/recording_with_microphone.rst:140 msgid "" "To playback the recording, you assign the recording as the stream of the " "``AudioStreamPlayer`` and call ``play()``." msgstr "" #: ../../docs/tutorials/audio/recording_with_microphone.rst:160 msgid "" "To save the recording, you call ``save_to_wav()`` with the path to a file. " "In this demo, the path is defined by the user via a ``LineEdit`` input box." msgstr "" #: ../../docs/tutorials/best_practices/introduction_best_practices.rst:6 msgid "" "This series is a collection of best practices to help you work efficiently " "with Godot." msgstr "" #: ../../docs/tutorials/best_practices/introduction_best_practices.rst:9 msgid "" "Godot allows for a great amount of flexibility in how you structure a " "project's codebase and break it down into scenes. Each approach has its pros " "and cons, and they can be hard to weigh until you've worked with the engine " "for long enough." msgstr "" #: ../../docs/tutorials/best_practices/introduction_best_practices.rst:13 msgid "" "There are always many ways to structure your code and solve specific " "programming problems. It would be impossible to cover them all here." msgstr "" #: ../../docs/tutorials/best_practices/introduction_best_practices.rst:16 msgid "" "That is why each article starts from a real-world problem. We will break " "down each problem in fundamental questions, suggest solutions, analyze the " "pros and cons of each option, and highlight the best course of action for " "the problem at hand." msgstr "" #: ../../docs/tutorials/best_practices/introduction_best_practices.rst:20 msgid "" "You should start by reading :ref:`doc_what_are_godot_classes`. It explains " "how Godot's nodes and scenes relate to classes and objects in other Object-" "Oriented programming languages. It will help you make sense of the rest of " "the series." msgstr "" #: ../../docs/tutorials/best_practices/introduction_best_practices.rst:26 msgid "" "The best practices in Godot rely on Object-Oriented design principles. We " "use tools like the `single responsibility `_ principle and `encapsulation `_." msgstr "" #: ../../docs/tutorials/best_practices/what_are_godot_classes.rst:4 msgid "Applying object-oriented principles in Godot" msgstr "" #: ../../docs/tutorials/best_practices/what_are_godot_classes.rst:6 msgid "" "The engine offers two main ways to create reusable objects: scripts and " "scenes. Neither of these technically define classes under the hood." msgstr "" #: ../../docs/tutorials/best_practices/what_are_godot_classes.rst:9 msgid "" "Still, many best practices using Godot involve applying object-oriented " "programming principles to the scripts and scenes that compose your game. " "That is why it's useful to understand how we can think of them as classes." msgstr "" #: ../../docs/tutorials/best_practices/what_are_godot_classes.rst:13 msgid "" "This guide briefly explains how scripts and scenes work in the engine's core " "to help you understand how they work under the hood." msgstr "" #: ../../docs/tutorials/best_practices/what_are_godot_classes.rst:17 msgid "How scripts work in the engine" msgstr "" #: ../../docs/tutorials/best_practices/what_are_godot_classes.rst:19 msgid "" "The engine provides built-in classes like :ref:`Node `. You can " "extend those to create derived types using a script." msgstr "" #: ../../docs/tutorials/best_practices/what_are_godot_classes.rst:22 msgid "" "These scripts are not technically classes. Instead, they are resources that " "tell the engine a sequence of initializations to perform on one of the " "engine's built-in classes." msgstr "" #: ../../docs/tutorials/best_practices/what_are_godot_classes.rst:25 msgid "" "Godot's internal classes have methods that register a class's data with a :" "ref:`ClassDB `. This database provides runtime access to " "class information. ``ClassDB`` contains information about classes like:" msgstr "" #: ../../docs/tutorials/best_practices/what_are_godot_classes.rst:29 #, fuzzy msgid "Properties." msgstr "Nó có thuộc tính có thể chỉnh sửa." #: ../../docs/tutorials/best_practices/what_are_godot_classes.rst:30 #, fuzzy msgid "Methods." msgstr "Tạo các node" #: ../../docs/tutorials/best_practices/what_are_godot_classes.rst:31 msgid "Constants." msgstr "" #: ../../docs/tutorials/best_practices/what_are_godot_classes.rst:32 #, fuzzy msgid "Signals." msgstr "Tín hiệu (Signal)" #: ../../docs/tutorials/best_practices/what_are_godot_classes.rst:34 msgid "" "This ``ClassDB`` is what objects check against when performing an operation " "like accessing a property or calling a method. It checks the database's " "records and the object's base types' records to see if the object supports " "the operation." msgstr "" #: ../../docs/tutorials/best_practices/what_are_godot_classes.rst:38 msgid "" "Attaching a :ref:`Script ` to your object extends the methods, " "properties, and signals available from the ``ClassDB``." msgstr "" #: ../../docs/tutorials/best_practices/what_are_godot_classes.rst:43 msgid "" "Even scripts that don't use the ``extends`` keyword implicitly inherit from " "the engine's base :ref:`Reference ` class. As a result, you " "can instantiate scripts without the ``extends`` keyword from code. Since " "they extend ``Reference`` though, you cannot attach them to a :ref:`Node " "`." msgstr "" #: ../../docs/tutorials/best_practices/what_are_godot_classes.rst:51 msgid "" "The behavior of scenes has many similarities to classes, so it can make " "sense to think of a scene as a class. Scenes are reusable, instantiable, and " "inheritable groups of nodes. Creating a scene is similar to having a script " "that creates nodes and adds them as children using ``add_child()``." msgstr "" #: ../../docs/tutorials/best_practices/what_are_godot_classes.rst:55 msgid "" "We often pair a scene with a scripted root node that makes use of the " "scene's nodes. As such, the scene is often an extension of the script's " "declarative code." msgstr "" #: ../../docs/tutorials/best_practices/what_are_godot_classes.rst:58 msgid "The content of a scene helps to define:" msgstr "" #: ../../docs/tutorials/best_practices/what_are_godot_classes.rst:60 msgid "What nodes are available to the script" msgstr "" #: ../../docs/tutorials/best_practices/what_are_godot_classes.rst:61 msgid "How they are organized" msgstr "" #: ../../docs/tutorials/best_practices/what_are_godot_classes.rst:62 msgid "How they are initialized" msgstr "" #: ../../docs/tutorials/best_practices/what_are_godot_classes.rst:63 msgid "What signal connections they have with each other" msgstr "" #: ../../docs/tutorials/best_practices/what_are_godot_classes.rst:65 msgid "" "Why is any of this important to scene organization? Because instances of " "scenes *are* objects. As a result, many object-oriented principles that " "apply to written code also apply to scenes: single responsibility, " "encapsulation, and others." msgstr "" #: ../../docs/tutorials/best_practices/what_are_godot_classes.rst:69 msgid "" "The scene is *always an extension of the script attached to its root node*, " "so you can interpret it as part of a class." msgstr "" #: ../../docs/tutorials/best_practices/what_are_godot_classes.rst:72 msgid "" "Most of the techniques explained in this best practices series build on this " "point." msgstr "" #: ../../docs/tutorials/best_practices/scene_organization.rst:4 msgid "Scene organization" msgstr "" #: ../../docs/tutorials/best_practices/scene_organization.rst:6 msgid "" "This article covers topics related to the effective organization of scene " "content. Which nodes should one use? Where should one place them? How should " "they interact?" msgstr "" #: ../../docs/tutorials/best_practices/scene_organization.rst:11 msgid "How to build relationships effectively" msgstr "" #: ../../docs/tutorials/best_practices/scene_organization.rst:13 msgid "" "When Godot users begin crafting their own scenes, they often run into the " "following problem:" msgstr "" #: ../../docs/tutorials/best_practices/scene_organization.rst:16 msgid "" "They create their first scene and fill it with content only to eventually " "end up saving branches of their scene into separate scenes as the nagging " "feeling that they should split things up starts to accumulate. However, they " "then notice that the hard references they were able to rely on before are no " "longer possible. Re-using the scene in multiple places creates issues " "because the node paths do not find their targets and signal connections " "established in the editor break." msgstr "" #: ../../docs/tutorials/best_practices/scene_organization.rst:24 msgid "" "To fix these problems, one must instantiate the sub-scenes without them " "requiring details about their environment. One needs to be able to trust " "that the sub-scene will create itself without being picky about how one uses " "it." msgstr "" #: ../../docs/tutorials/best_practices/scene_organization.rst:29 msgid "" "One of the biggest things to consider in OOP is maintaining focused, " "singular-purpose classes with `loose coupling `_ to other parts of the codebase. This keeps the size of " "objects small (for maintainability) and improves their reusability." msgstr "" #: ../../docs/tutorials/best_practices/scene_organization.rst:35 msgid "" "These OOP best practices have *several* implications for best practices in " "scene structure and script usage." msgstr "" #: ../../docs/tutorials/best_practices/scene_organization.rst:38 msgid "" "**If at all possible, one should design scenes to have no dependencies.** " "That is, one should create scenes that keep everything they need within " "themselves." msgstr "" #: ../../docs/tutorials/best_practices/scene_organization.rst:42 msgid "" "If a scene must interact with an external context, experienced developers " "recommend the use of `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." msgstr "" #: ../../docs/tutorials/best_practices/scene_organization.rst:49 msgid "" "To do this, one must expose data and then rely on a parent context to " "initialize it:" msgstr "" #: ../../docs/tutorials/best_practices/scene_organization.rst:52 msgid "" "Connect to a signal. Extremely safe, but should be used only to \"respond\" " "to behavior, not start it. Note that signal names are usually past-tense " "verbs like \"entered\", \"skill_activated\", or \"item_collected\"." msgstr "" #: ../../docs/tutorials/best_practices/scene_organization.rst:73 msgid "Call a method. Used to start behavior." msgstr "" #: ../../docs/tutorials/best_practices/scene_organization.rst:92 msgid "" "Initialize a :ref:`FuncRef ` property. Safer than a method as " "ownership of the method is unnecessary. Used to start behavior." msgstr "" #: ../../docs/tutorials/best_practices/scene_organization.rst:112 msgid "Initialize a Node or other Object reference." msgstr "" #: ../../docs/tutorials/best_practices/scene_organization.rst:131 msgid "Initialize a NodePath." msgstr "" #: ../../docs/tutorials/best_practices/scene_organization.rst:150 msgid "" "These options hide the points of access from the child node. This in turn " "keeps the child **loosely coupled** to its environment. One can re-use it in " "another context without any extra changes to its API." msgstr "" #: ../../docs/tutorials/best_practices/scene_organization.rst:156 msgid "" "Although the examples above illustrate parent-child relationships, the same " "principles apply towards all object relations. Nodes which are siblings " "should only be aware of their hierarchies while an ancestor mediates their " "communications and references." msgstr "" #: ../../docs/tutorials/best_practices/scene_organization.rst:203 msgid "" "The same principles also apply to non-Node objects that maintain " "dependencies on other objects. Whichever object actually owns the objects " "should manage the relationships between them." msgstr "" #: ../../docs/tutorials/best_practices/scene_organization.rst:209 msgid "" "One should favor keeping data in-house (internal to a scene) though as " "placing a dependency on an external context, even a loosely coupled one, " "still means that the node will expect something in its environment to be " "true. The project's design philosophies should prevent this from happening. " "If not, the code's inherent liabilities will force developers to use " "documentation to keep track of object relations on a microscopic scale; this " "is otherwise known as development hell. Writing code that relies on external " "documentation for one to use it safely is error-prone by default." msgstr "" #: ../../docs/tutorials/best_practices/scene_organization.rst:218 msgid "" "To avoid creating and maintaining such documentation, one converts the " "dependent node (\"child\" above) into a tool script that implements :ref:" "`_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 :ref:`Area2D ` node when it has no child :" "ref:`CollisionShape2D ` nodes defined. The editor " "then self-documents the scene through the script code. No content " "duplication via documentation is necessary." msgstr "" #: ../../docs/tutorials/best_practices/scene_organization.rst:229 msgid "" "A GUI like this can better inform project users of critical information " "about a Node. Does it have external dependencies? Have those dependencies " "been satisfied? Other programmers, and especially designers and writers, " "will need clear instructions in the messages telling them what to do to " "configure it." msgstr "" #: ../../docs/tutorials/best_practices/scene_organization.rst:234 msgid "" "So, why do all this complex switcharoo work? Well, because scenes operate " "best when they operate alone. If unable to work alone, then working with " "others anonymously (with minimal hard dependencies, i.e. loose coupling) is " "the next best thing. Inevitably, changes may need to be made to a class and " "if these changes cause it to interact with other scenes in unforeseen ways, " "then things will start to break down. The whole point of all this " "indirection is to avoid ending up in a situation where changing one class " "results in adversely effecting other classes." msgstr "" #: ../../docs/tutorials/best_practices/scene_organization.rst:243 msgid "" "Scripts and scenes, as extensions of engine classes, should abide by *all* " "OOP principles. Examples include..." msgstr "" #: ../../docs/tutorials/best_practices/scene_organization.rst:246 msgid "`SOLID `_" msgstr "" #: ../../docs/tutorials/best_practices/scene_organization.rst:247 msgid "`DRY `_" msgstr "" #: ../../docs/tutorials/best_practices/scene_organization.rst:248 msgid "`KISS `_" msgstr "" #: ../../docs/tutorials/best_practices/scene_organization.rst:249 msgid "`YAGNI `_" msgstr "" #: ../../docs/tutorials/best_practices/scene_organization.rst:252 msgid "Choosing a node tree structure" msgstr "" #: ../../docs/tutorials/best_practices/scene_organization.rst:254 msgid "" "So, a developer starts work on a game only to stop at the vast possibilities " "before them. They might know what they want to do, what systems they want to " "have, but *where* to put them all? Well, how one goes about making their " "game is always up to them. One can construct node trees in countless ways. " "But, for those who are unsure, this helpful guide can give them a sample of " "a decent structure to start with." msgstr "" #: ../../docs/tutorials/best_practices/scene_organization.rst:261 msgid "" "A game should always have a sort of \"entry point\"; somewhere the developer " "can definitively track where things begin so that they can follow the logic " "as it continues elsewhere. This place also serves as a bird's eye view of " "all of the other data and logic in the program. For traditional " "applications, this would be the \"main\" function. In this case, it would be " "a Main node." msgstr "" #: ../../docs/tutorials/best_practices/scene_organization.rst:267 #: ../../docs/tutorials/best_practices/scene_organization.rst:278 msgid "Node \"Main\" (main.gd)" msgstr "" #: ../../docs/tutorials/best_practices/scene_organization.rst:269 msgid "" "The ``main.gd`` script would then serve as the primary controller of one's " "game." msgstr "" #: ../../docs/tutorials/best_practices/scene_organization.rst:272 msgid "" "Then one has their actual in-game \"World\" (a 2D or 3D one). This can be a " "child of Main. In addition, one will need a primary GUI for their game that " "manages the various menus and widgets the project needs." msgstr "" #: ../../docs/tutorials/best_practices/scene_organization.rst:277 msgid "Node2D/Spatial \"World\" (game_world.gd)" msgstr "" #: ../../docs/tutorials/best_practices/scene_organization.rst:278 msgid "Control \"GUI\" (gui.gd)" msgstr "" #: ../../docs/tutorials/best_practices/scene_organization.rst:280 msgid "" "When changing levels, one can then swap out the children of the \"World\" " "node. :ref:`Changing scenes manually ` gives " "users full control over how their game world transitions." msgstr "" #: ../../docs/tutorials/best_practices/scene_organization.rst:284 msgid "" "The next step is to consider what gameplay systems one's project requires. " "If one has a system that..." msgstr "" #: ../../docs/tutorials/best_practices/scene_organization.rst:287 msgid "tracks all of its data internally" msgstr "" #: ../../docs/tutorials/best_practices/scene_organization.rst:288 msgid "should be globally accessible" msgstr "" #: ../../docs/tutorials/best_practices/scene_organization.rst:289 msgid "should exist in isolation" msgstr "" #: ../../docs/tutorials/best_practices/scene_organization.rst:291 msgid "" "... then one should create an :ref:`autoload 'singleton' node " "`." msgstr "" #: ../../docs/tutorials/best_practices/scene_organization.rst:295 msgid "" "For smaller games, a simpler alternative with less control would be to have " "a \"Game\" singleton that simply calls the :ref:`SceneTree.change_scene() " "` method to swap out the main scene's " "content. This structure more or less keeps the \"World\" as the main game " "node." msgstr "" #: ../../docs/tutorials/best_practices/scene_organization.rst:301 msgid "" "Any GUI would need to also be a singleton; be a transitory part of the " "\"World\"; or be manually added as a direct child of the root. Otherwise, " "the GUI nodes would also delete themselves during scene transitions." msgstr "" #: ../../docs/tutorials/best_practices/scene_organization.rst:306 msgid "" "If one has systems that modify other systems' data, one should define those " "as their own scripts or scenes rather than autoloads. For more information " "on the reasons, please see the :ref:`Autoloads versus regular nodes " "` documentation." msgstr "" #: ../../docs/tutorials/best_practices/scene_organization.rst:312 msgid "" "Each subsystem within one's game should have its own section within the " "SceneTree. One should use parent-child relationships only in cases where " "nodes are effectively elements of their parents. Does removing the parent " "reasonably mean that one should also remove the children? If not, then it " "should have its own place in the hierarchy as a sibling or some other " "relation." msgstr "" #: ../../docs/tutorials/best_practices/scene_organization.rst:320 msgid "" "In some cases, one needs these separated nodes to *also* position themselves " "relative to each other. One can use the :ref:`RemoteTransform " "` / :ref:`RemoteTransform2D " "` nodes for this purpose. They will allow a target " "node to conditionally inherit selected transform elements from the Remote\\* " "node. To assign the ``target`` :ref:`NodePath `, use one of " "the following:" msgstr "" #: ../../docs/tutorials/best_practices/scene_organization.rst:328 msgid "" "A reliable third party, likely a parent node, to mediate the assignment." msgstr "" #: ../../docs/tutorials/best_practices/scene_organization.rst:329 msgid "" "A group, to easily pull a reference to the desired node (assuming there will " "only ever be one of the targets)." msgstr "" #: ../../docs/tutorials/best_practices/scene_organization.rst:332 msgid "" "When should one do this? Well, this is subjective. The dilemma arises when " "one must micro-manage when a node must move around the SceneTree to preserve " "itself. For example..." msgstr "" #: ../../docs/tutorials/best_practices/scene_organization.rst:336 msgid "Add a \"player\" node to a \"room\"." msgstr "" #: ../../docs/tutorials/best_practices/scene_organization.rst:337 msgid "Need to change rooms, so one must delete the current room." msgstr "" #: ../../docs/tutorials/best_practices/scene_organization.rst:338 msgid "" "Before the room can be deleted, one must preserve and/or move the player." msgstr "" #: ../../docs/tutorials/best_practices/scene_organization.rst:340 msgid "Is memory a concern?" msgstr "" #: ../../docs/tutorials/best_practices/scene_organization.rst:342 msgid "" "If not, one can just create the two rooms, move the player and delete the " "old one. No problem." msgstr "" #: ../../docs/tutorials/best_practices/scene_organization.rst:345 msgid "If so, one will need to..." msgstr "" #: ../../docs/tutorials/best_practices/scene_organization.rst:347 msgid "Move the player somewhere else in the tree." msgstr "" #: ../../docs/tutorials/best_practices/scene_organization.rst:348 msgid "Delete the room." msgstr "" #: ../../docs/tutorials/best_practices/scene_organization.rst:349 msgid "Instantiate and add the new room." msgstr "" #: ../../docs/tutorials/best_practices/scene_organization.rst:350 msgid "Re-add the player." msgstr "" #: ../../docs/tutorials/best_practices/scene_organization.rst:352 msgid "" "The issue is that the player here is a \"special case\"; one where the " "developers must *know* that they need to handle the player this way for the " "project. As such, the only way to reliably share this information as a team " "is to *document* it. Keeping implementation details in documentation however " "is dangerous. It's a maintenance burden, strains code readability, and " "bloats the intellectual content of a project unnecessarily." msgstr "" #: ../../docs/tutorials/best_practices/scene_organization.rst:359 msgid "" "In a more complex game with larger assets, it can be a better idea to simply " "keep the player somewhere else in the SceneTree entirely. This results in:" msgstr "" #: ../../docs/tutorials/best_practices/scene_organization.rst:362 msgid "More consistency." msgstr "" #: ../../docs/tutorials/best_practices/scene_organization.rst:363 msgid "No \"special cases\" that must be documented and maintained somewhere." msgstr "" #: ../../docs/tutorials/best_practices/scene_organization.rst:364 msgid "" "No opportunity for errors to occur because these details are not accounted " "for." msgstr "" #: ../../docs/tutorials/best_practices/scene_organization.rst:367 msgid "" "In contrast, if one ever needs to have a child node that does *not* inherit " "the transform of their parent, one has the following options:" msgstr "" #: ../../docs/tutorials/best_practices/scene_organization.rst:370 msgid "" "The **declarative** solution: place a :ref:`Node ` in between " "them. As nodes with no transform, Nodes will not pass along such information " "to their children." msgstr "" #: ../../docs/tutorials/best_practices/scene_organization.rst:373 msgid "" "The **imperative** solution: Use the ``set_as_toplevel`` setter for the :ref:" "`CanvasItem ` or :ref:`Spatial " "` node. This will make the node ignore " "its inherited transform." msgstr "" #: ../../docs/tutorials/best_practices/scene_organization.rst:380 msgid "" "If building a networked game, keep in mind which nodes and gameplay systems " "are relevant to all players versus those just pertinent to the authoritative " "server. For example, users do not all need to have a copy of every players' " "\"PlayerController\" logic. Instead, they need only their own. As such, " "keeping these in a separate branch from the \"world\" can help simplify the " "management of game connections and the like." msgstr "" #: ../../docs/tutorials/best_practices/scene_organization.rst:387 msgid "" "The key to scene organization is to consider the SceneTree in relational " "terms rather than spatial terms. Are the nodes dependent on their parent's " "existence? If not, then they can thrive all by themselves somewhere else. If " "they are dependent, then it stands to reason that they should be children of " "that parent (and likely part of that parent's scene if they aren't already)." msgstr "" #: ../../docs/tutorials/best_practices/scene_organization.rst:393 msgid "" "Does this mean nodes themselves are components? Not at all. Godot's node " "trees form an aggregation relationship, not one of composition. But while " "one still has the flexibility to move nodes around, it is still best when " "such moves are unnecessary by default." msgstr "" #: ../../docs/tutorials/best_practices/scenes_versus_scripts.rst:4 msgid "When to use scenes versus scripts" msgstr "" #: ../../docs/tutorials/best_practices/scenes_versus_scripts.rst:6 msgid "" "We've already covered how scenes and scripts are different. Scripts define " "an engine class extension with imperative code, scenes with declarative code." msgstr "" #: ../../docs/tutorials/best_practices/scenes_versus_scripts.rst:10 msgid "" "Each system's capabilities are different as a result. Scenes can define how " "an extended class initializes, but not what its behavior actually is. Scenes " "are often used in conjunction with a script so that the scene acts as an " "extension of the scripts declarative code." msgstr "" #: ../../docs/tutorials/best_practices/scenes_versus_scripts.rst:16 msgid "Anonymous types" msgstr "" #: ../../docs/tutorials/best_practices/scenes_versus_scripts.rst:18 msgid "" "It *is* possible to completely define a scenes' contents using a script " "alone. This is, in essence, what the Godot Editor does, only in the C++ " "constructor of its objects." msgstr "" #: ../../docs/tutorials/best_practices/scenes_versus_scripts.rst:22 msgid "" "But, choosing which one to use can be a dilemma. Creating script instances " "is identical to creating in-engine classes whereas handling scenes requires " "a change in API:" msgstr "" #: ../../docs/tutorials/best_practices/scenes_versus_scripts.rst:59 msgid "" "Also, scripts will operate a little slower than scenes due to the speed " "differences between engine and script code. The larger and more complex the " "node, the more reason there is to build it as a scene." msgstr "" #: ../../docs/tutorials/best_practices/scenes_versus_scripts.rst:64 msgid "Named types" msgstr "" #: ../../docs/tutorials/best_practices/scenes_versus_scripts.rst:66 msgid "" "In some cases, a user can register a script as a new type within the editor " "itself. This displays it as a new type in the node or resource creation " "dialog with an optional icon. In these cases, the user's ability to use the " "script is much more streamlined. Rather than having to..." msgstr "" #: ../../docs/tutorials/best_practices/scenes_versus_scripts.rst:71 msgid "Know the base type of the script they would like to use." msgstr "" #: ../../docs/tutorials/best_practices/scenes_versus_scripts.rst:73 msgid "Create an instance of that base type." msgstr "" #: ../../docs/tutorials/best_practices/scenes_versus_scripts.rst:75 msgid "Add the script to the node." msgstr "" #: ../../docs/tutorials/best_practices/scenes_versus_scripts.rst:77 msgid "(Drag-n-drop method)" msgstr "" #: ../../docs/tutorials/best_practices/scenes_versus_scripts.rst:79 msgid "Find the script in the FileSystem dock." msgstr "" #: ../../docs/tutorials/best_practices/scenes_versus_scripts.rst:81 msgid "Drag and drop the script onto the node in the Scene dock." msgstr "" #: ../../docs/tutorials/best_practices/scenes_versus_scripts.rst:83 msgid "(Property method)" msgstr "" #: ../../docs/tutorials/best_practices/scenes_versus_scripts.rst:85 msgid "" "Scroll down to the bottom of the Inspector to find the ``script`` property " "and select it." msgstr "" #: ../../docs/tutorials/best_practices/scenes_versus_scripts.rst:87 msgid "Select \"Load\" from the dropdown." msgstr "" #: ../../docs/tutorials/best_practices/scenes_versus_scripts.rst:89 msgid "Select the script from the file dialog." msgstr "" #: ../../docs/tutorials/best_practices/scenes_versus_scripts.rst:91 msgid "" "With a registered script, the scripted type instead becomes a creation " "option like the other nodes and resources in the system. One need not do any " "of the above work. The creation dialog even has a search bar to look up the " "type by name." msgstr "" #: ../../docs/tutorials/best_practices/scenes_versus_scripts.rst:96 msgid "There are two systems for registering types..." msgstr "" #: ../../docs/tutorials/best_practices/scenes_versus_scripts.rst:98 msgid ":ref:`Custom Types `" msgstr "" #: ../../docs/tutorials/best_practices/scenes_versus_scripts.rst:100 msgid "Editor-only. Typenames are not accessible at runtime." msgstr "" #: ../../docs/tutorials/best_practices/scenes_versus_scripts.rst:102 msgid "Does not support inherited custom types." msgstr "" #: ../../docs/tutorials/best_practices/scenes_versus_scripts.rst:104 msgid "An initializer tool. Creates the node with the script. Nothing more." msgstr "" #: ../../docs/tutorials/best_practices/scenes_versus_scripts.rst:106 msgid "" "Editor has no type-awareness of the script or its relationship to other " "engine types or scripts." msgstr "" #: ../../docs/tutorials/best_practices/scenes_versus_scripts.rst:109 #: ../../docs/tutorials/best_practices/scenes_versus_scripts.rst:127 msgid "Allows users to define an icon." msgstr "" #: ../../docs/tutorials/best_practices/scenes_versus_scripts.rst:111 msgid "" "Works for all scripting languages because it deals with Script resources in " "abstract." msgstr "" #: ../../docs/tutorials/best_practices/scenes_versus_scripts.rst:113 msgid "" "Set up using :ref:`EditorPlugin.add_custom_type " "`." msgstr "" #: ../../docs/tutorials/best_practices/scenes_versus_scripts.rst:115 msgid ":ref:`Script Classes `" msgstr "" #: ../../docs/tutorials/best_practices/scenes_versus_scripts.rst:117 msgid "Editor and runtime accessible." msgstr "" #: ../../docs/tutorials/best_practices/scenes_versus_scripts.rst:119 msgid "Displays inheritance relationships in full." msgstr "" #: ../../docs/tutorials/best_practices/scenes_versus_scripts.rst:121 msgid "" "Creates the node with the script, but can also change types or extend the " "type from the editor." msgstr "" #: ../../docs/tutorials/best_practices/scenes_versus_scripts.rst:124 msgid "" "Editor is aware of inheritance relationships between scripts, script " "classes, and engine C++ classes." msgstr "" #: ../../docs/tutorials/best_practices/scenes_versus_scripts.rst:129 msgid "" "Engine developers must add support for languages manually (both name " "exposure and runtime accessibility)." msgstr "" #: ../../docs/tutorials/best_practices/scenes_versus_scripts.rst:132 msgid "Godot 3.1+ only." msgstr "" #: ../../docs/tutorials/best_practices/scenes_versus_scripts.rst:134 msgid "" "The Editor scans project folders and registers any exposed names for all " "scripting languages. Each scripting language must implement its own support " "for exposing this information." msgstr "" #: ../../docs/tutorials/best_practices/scenes_versus_scripts.rst:138 msgid "" "Both methodologies add names to the creation dialog, but script classes, in " "particular, also allow for users to access the typename without loading the " "script resource. Creating instances and accessing constants or static " "methods is viable from anywhere." msgstr "" #: ../../docs/tutorials/best_practices/scenes_versus_scripts.rst:143 msgid "" "With features like these, one may wish their type to be a script without a " "scene due to the ease of use it grants users. Those developing plugins or " "creating in-house tools for designers to use will find an easier time of " "things this way." msgstr "" #: ../../docs/tutorials/best_practices/scenes_versus_scripts.rst:148 msgid "" "On the downside, it also means having to use largely imperative programming." msgstr "" #: ../../docs/tutorials/best_practices/scenes_versus_scripts.rst:151 msgid "Performance of Script vs PackedScene" msgstr "" #: ../../docs/tutorials/best_practices/scenes_versus_scripts.rst:153 msgid "" "One last aspect to consider when choosing scenes and scripts is execution " "speed." msgstr "" #: ../../docs/tutorials/best_practices/scenes_versus_scripts.rst:155 msgid "" "As the size of objects increases, the scripts' necessary size to create and " "initialize them grows much larger. Creating node hierarchies demonstrates " "this. Each Node's logic could be several hundred lines of code in length." msgstr "" #: ../../docs/tutorials/best_practices/scenes_versus_scripts.rst:159 msgid "" "The code example below creates a new ``Node``, changes its name, assigns a " "script to it, sets its future parent as its owner so it gets saved to disk " "along with it, and finally adds it as a child of the ``Main`` node:" msgstr "" #: ../../docs/tutorials/best_practices/scenes_versus_scripts.rst:195 msgid "" "Script code like this is much slower than engine-side C++ code. Each " "instruction makes a call to the scripting API which leads to many " "\"lookups\" on the back-end to find the logic to execute." msgstr "" #: ../../docs/tutorials/best_practices/scenes_versus_scripts.rst:199 msgid "" "Scenes help to avoid this performance issue. :ref:`PackedScene " "`, the base type that scenes inherit from, defines " "resources that use serialized data to create objects. The engine can process " "scenes in batches on the back-end and provide much better performance than " "scripts." msgstr "" #: ../../docs/tutorials/best_practices/scenes_versus_scripts.rst:207 msgid "In the end, the best approach is to consider the following:" msgstr "" #: ../../docs/tutorials/best_practices/scenes_versus_scripts.rst:209 msgid "" "If one wishes to create a basic tool that is going to be re-used in several " "different projects and which people of all skill levels will likely use " "(including those who don't label themselves as \"programmers\"), then " "chances are that it should probably be a script, likely one with a custom " "name/icon." msgstr "" #: ../../docs/tutorials/best_practices/scenes_versus_scripts.rst:214 msgid "" "If one wishes to create a concept that is particular to their game, then it " "should always be a scene. Scenes are easier to track/edit and provide more " "security than scripts." msgstr "" #: ../../docs/tutorials/best_practices/scenes_versus_scripts.rst:218 msgid "" "If one would like to give a name to a scene, then they can still sort of do " "this in 3.1 by declaring a script class and giving it a scene as a constant. " "The script becomes, in effect, a namespace:" msgstr "" #: ../../docs/tutorials/best_practices/autoloads_versus_internal_nodes.rst:4 msgid "Autoloads versus regular nodes" msgstr "" #: ../../docs/tutorials/best_practices/autoloads_versus_internal_nodes.rst:6 msgid "" "Godot offers a feature to automatically load nodes at the root of your " "project, allowing you to access them globally, that can fulfill the role of " "a Singleton: :ref:`doc_singletons_autoload`. These auto-loaded nodes are not " "freed when you change the scene from code with :ref:`SceneTree.change_scene " "`." msgstr "" #: ../../docs/tutorials/best_practices/autoloads_versus_internal_nodes.rst:11 msgid "" "In this guide, you will learn when to use the Autoload feature, and " "techniques you can use to avoid it." msgstr "" #: ../../docs/tutorials/best_practices/autoloads_versus_internal_nodes.rst:15 msgid "The cutting audio issue" msgstr "" #: ../../docs/tutorials/best_practices/autoloads_versus_internal_nodes.rst:17 msgid "" "Other engines can encourage the use of creating manager classes, singletons " "that organize a lot of functionality into a globally accessible object. " "Godot offers many ways to avoid global state thanks to the node tree and " "signals." msgstr "" #: ../../docs/tutorials/best_practices/autoloads_versus_internal_nodes.rst:21 msgid "" "For example, let's say we are building a platformer and want to collect " "coins that play a sound effect. There's a node for that: the :ref:" "`AudioStreamPlayer `. But if we call the " "``AudioStreamPlayer`` while it is already playing a sound, the new sound " "interrupts the first." msgstr "" #: ../../docs/tutorials/best_practices/autoloads_versus_internal_nodes.rst:26 msgid "" "A solution is to code a global, auto-loaded sound manager class. It " "generates a pool of ``AudioStreamPlayer`` nodes that cycle through as each " "new request for sound effects comes in. Say we call that class ``Sound``, " "you can use it from anywhere in your project by calling ``Sound." "play(\"coin_pickup.ogg\")``. This solves the problem in the short term but " "causes more problems:" msgstr "" #: ../../docs/tutorials/best_practices/autoloads_versus_internal_nodes.rst:32 msgid "" "**Global state**: one object is now responsible for all objects' data. If " "the ``Sound`` class has errors or doesn't have an AudioStreamPlayer " "available, all the nodes calling it can break." msgstr "" #: ../../docs/tutorials/best_practices/autoloads_versus_internal_nodes.rst:36 msgid "" "**Global access**: now that any object can call ``Sound.play(sound_path)`` " "from anywhere, there's no longer an easy way to find the source of a bug." msgstr "" #: ../../docs/tutorials/best_practices/autoloads_versus_internal_nodes.rst:39 msgid "" "**Global resource allocation**: with a pool of ``AudioStreamPlayer`` nodes " "stored from the start, you can either have too few and face bugs, or too " "many and use more memory than you need." msgstr "" #: ../../docs/tutorials/best_practices/autoloads_versus_internal_nodes.rst:45 msgid "" "About global access, the problem is that Any code anywhere could pass wrong " "data to the ``Sound`` autoload in our example. As a result, the domain to " "explore to fix the bug spans the entire project." msgstr "" #: ../../docs/tutorials/best_practices/autoloads_versus_internal_nodes.rst:49 msgid "" "When you keep code inside a scene, only one or two scripts may be involved " "in audio." msgstr "" #: ../../docs/tutorials/best_practices/autoloads_versus_internal_nodes.rst:52 msgid "" "Contrast this with each scene keeping as many ``AudioStreamPlayer`` nodes as " "it needs within itself and all these problems go away:" msgstr "" #: ../../docs/tutorials/best_practices/autoloads_versus_internal_nodes.rst:55 msgid "" "Each scene manages its own state information. If there is a problem with the " "data, it will only cause issues in that one scene." msgstr "" #: ../../docs/tutorials/best_practices/autoloads_versus_internal_nodes.rst:58 msgid "" "Each scene accesses only its own nodes. Now, if there is a bug, it's easy to " "find which node is at fault." msgstr "" #: ../../docs/tutorials/best_practices/autoloads_versus_internal_nodes.rst:61 msgid "Each scene allocates exactly the amount of resources it needs." msgstr "" #: ../../docs/tutorials/best_practices/autoloads_versus_internal_nodes.rst:64 msgid "Managing shared functionality or data" msgstr "" #: ../../docs/tutorials/best_practices/autoloads_versus_internal_nodes.rst:66 msgid "" "Another reason to use an Autoload can be that you want to reuse the same " "method or data across many scenes." msgstr "" #: ../../docs/tutorials/best_practices/autoloads_versus_internal_nodes.rst:69 msgid "" "In the case of functions, you can create a new type of ``Node`` that " "provides that feature for an individual scene using the :ref:`class_name " "` keyword in GDScript." msgstr "" #: ../../docs/tutorials/best_practices/autoloads_versus_internal_nodes.rst:73 msgid "When it comes to data, you can either:" msgstr "" #: ../../docs/tutorials/best_practices/autoloads_versus_internal_nodes.rst:75 msgid "" "Create a new type of :ref:`Resource ` to share the data." msgstr "" #: ../../docs/tutorials/best_practices/autoloads_versus_internal_nodes.rst:77 msgid "" "Store the data in an object to which each node has access, for example using " "the ``owner`` property to access the scene's root node." msgstr "" #: ../../docs/tutorials/best_practices/autoloads_versus_internal_nodes.rst:81 msgid "When you should use an Autoload" msgstr "" #: ../../docs/tutorials/best_practices/autoloads_versus_internal_nodes.rst:83 msgid "Auto-loaded nodes can simplify your code in some cases:" msgstr "" #: ../../docs/tutorials/best_practices/autoloads_versus_internal_nodes.rst:85 msgid "" "**Static Data**: if you need data that is exclusive to one class, like a " "database, then an autoload can be a good tool. There is no scripting API in " "Godot to create and manage static data otherwise." msgstr "" #: ../../docs/tutorials/best_practices/autoloads_versus_internal_nodes.rst:89 msgid "" "**Static functions**: creating a library of functions that only return " "values." msgstr "" #: ../../docs/tutorials/best_practices/autoloads_versus_internal_nodes.rst:91 msgid "" "**Systems with a wide scope**: If the singleton is managing its own " "information and not invading the data of other objects, then it's a great " "way to create systems that handle broad-scoped tasks. For example, a quest " "or a dialogue system." msgstr "" #: ../../docs/tutorials/best_practices/autoloads_versus_internal_nodes.rst:96 msgid "" "Until Godot 3.1, another use was just for convenience: autoloads have a " "global variable for their name generated in GDScript, allowing you to call " "them from any script file in your project. But now, you can use the " "``class_name`` keyword instead to get auto-completion for a type in your " "entire project." msgstr "" #: ../../docs/tutorials/best_practices/autoloads_versus_internal_nodes.rst:103 msgid "" "Autoload is not exactly a Singleton. Nothing prevents you from instantiating " "copies of an auto-loaded node. It is only a tool that makes a node load " "automatically as a child of the root of your scene tree, regardless of your " "game's node structure or which scene you run, e.g. by pressing :kbd:`F6` key." msgstr "" #: ../../docs/tutorials/best_practices/autoloads_versus_internal_nodes.rst:108 msgid "" "As a result, you can get the auto-loaded node, for example an autoload " "called ``Sound``, by calling ``get_node(\"/root/Sound\")``." msgstr "" #: ../../docs/tutorials/best_practices/node_alternatives.rst:4 msgid "When and how to avoid using nodes for everything" msgstr "" #: ../../docs/tutorials/best_practices/node_alternatives.rst:7 msgid "" "Nodes are cheap to produce, but even they have their limits. A project may " "have tens of thousands of nodes all doing things. The more complex their " "behavior though, the larger the strain each one adds to a project's " "performance." msgstr "" #: ../../docs/tutorials/best_practices/node_alternatives.rst:12 msgid "" "Godot provides more lightweight objects for creating APIs which nodes use. " "Be sure to keep these in mind as options when designing how you wish to " "build your project's features." msgstr "" #: ../../docs/tutorials/best_practices/node_alternatives.rst:16 msgid "" ":ref:`Object `: The ultimate lightweight object, the original " "Object must use manual memory management. With that said, it isn't too " "difficult to create one's own custom data structures, even node structures, " "that are also lighter than the :ref:`Node ` class." msgstr "" #: ../../docs/tutorials/best_practices/node_alternatives.rst:21 msgid "" "**Example:** See the :ref:`Tree ` node. It supports a high level " "of customization for a table of content with an arbitrary number of rows and " "columns. The data that it uses to generate its visualization though is " "actually a tree of :ref:`TreeItem ` Objects." msgstr "" #: ../../docs/tutorials/best_practices/node_alternatives.rst:26 msgid "" "**Advantages:** Simplifying one's API to smaller scoped objects helps " "improve its accessibility and improve iteration time. Rather than working " "with the entire Node library, one creates an abbreviated set of Objects from " "which a node can generate and manage the appropriate sub-nodes." msgstr "" #: ../../docs/tutorials/best_practices/node_alternatives.rst:31 msgid "" "One should be careful when handling them. One can store an Object into a " "variable, but these references can become invalid without warning. For " "example, if the object's creator decides to delete it out of nowhere, this " "would trigger an error state when one next accesses it." msgstr "" #: ../../docs/tutorials/best_practices/node_alternatives.rst:36 msgid "" ":ref:`Reference `: Only a little more complex than Object. " "They track references to themselves, only deleting loaded memory when no " "further references to themselves exist. These are useful in the majority of " "cases where one needs data in a custom class." msgstr "" #: ../../docs/tutorials/best_practices/node_alternatives.rst:41 msgid "" "**Example:** See the :ref:`File ` object. It functions just like " "a regular Object except that one need not delete it themselves." msgstr "" #: ../../docs/tutorials/best_practices/node_alternatives.rst:44 msgid "**Advantages:** same as the Object." msgstr "" #: ../../docs/tutorials/best_practices/node_alternatives.rst:46 msgid "" ":ref:`Resource `: Only slightly more complex than Reference. " "They have the innate ability to serialize/deserialize (i.e. save and load) " "their object properties to/from Godot resource files." msgstr "" #: ../../docs/tutorials/best_practices/node_alternatives.rst:50 msgid "" "**Example:** Scripts, PackedScene (for scene files), and other types like " "each of the :ref:`AudioEffect ` classes. Each of these " "can be save and loaded, therefore they extend from Resource." msgstr "" #: ../../docs/tutorials/best_practices/node_alternatives.rst:54 msgid "" "**Advantages:** Much has :ref:`already been said ` on :ref:" "`Resource `'s advantages over traditional data storage " "methods. In the context of using Resources over Nodes though, their main " "advantage is in Inspector-compatibility. While nearly as lightweight as " "Object/Reference, they can still display and export properties in the " "Inspector. This allows them to fulfill a purpose much like sub-Nodes on the " "usability front, but also improve performance if one plans to have many such " "Resources/Nodes in their scenes." msgstr "" #: ../../docs/tutorials/best_practices/godot_interfaces.rst:4 msgid "Godot interfaces" msgstr "" #: ../../docs/tutorials/best_practices/godot_interfaces.rst:6 msgid "" "Often one needs scripts that rely on other objects for features. There are 2 " "parts to this process:" msgstr "" #: ../../docs/tutorials/best_practices/godot_interfaces.rst:9 msgid "Acquiring a reference to the object that presumably has the features." msgstr "" #: ../../docs/tutorials/best_practices/godot_interfaces.rst:11 msgid "Accessing the data or logic from the object." msgstr "" #: ../../docs/tutorials/best_practices/godot_interfaces.rst:13 msgid "The rest of this tutorial outlines the various ways of doing all this." msgstr "" #: ../../docs/tutorials/best_practices/godot_interfaces.rst:16 msgid "Acquiring object references" msgstr "" #: ../../docs/tutorials/best_practices/godot_interfaces.rst:18 msgid "" "For all :ref:`Object `\\s, the most basic way of referencing " "them is to get a reference to an existing object from another acquired " "instance." msgstr "" #: ../../docs/tutorials/best_practices/godot_interfaces.rst:32 msgid "" "The same principle applies for :ref:`Reference ` objects. " "While users often access :ref:`Node ` and :ref:`Resource " "` this way, alternative measures are available." msgstr "" #: ../../docs/tutorials/best_practices/godot_interfaces.rst:36 msgid "" "Instead of property or method access, one can get Resources by load access." msgstr "" #: ../../docs/tutorials/best_practices/godot_interfaces.rst:115 msgid "Note the following:" msgstr "" #: ../../docs/tutorials/best_practices/godot_interfaces.rst:117 msgid "There are many ways in which a language can load such resources." msgstr "" #: ../../docs/tutorials/best_practices/godot_interfaces.rst:119 msgid "" "When designing how objects will access data, don't forget that one can pass " "resources around as references as well." msgstr "" #: ../../docs/tutorials/best_practices/godot_interfaces.rst:122 msgid "" "Keep in mind that loading a resource fetches the cached resource instance " "maintained by the engine. To get a new object, one must :ref:`duplicate " "` an existing reference or instantiate one " "from scratch with ``new()``." msgstr "" #: ../../docs/tutorials/best_practices/godot_interfaces.rst:127 msgid "Nodes likewise have an alternative access point: the SceneTree." msgstr "" #: ../../docs/tutorials/best_practices/godot_interfaces.rst:245 msgid "Accessing data or logic from an object" msgstr "" #: ../../docs/tutorials/best_practices/godot_interfaces.rst:247 msgid "" "Godot's scripting API is duck-typed. This means that if a script executes an " "operation, Godot doesn't validate that it supports the operation by " "**type**. It instead checks that the object **implements** the individual " "method." msgstr "" #: ../../docs/tutorials/best_practices/godot_interfaces.rst:251 msgid "" "For example, the :ref:`CanvasItem ` class has a " "``visible`` property. All properties exposed to the scripting API are in " "fact a setter and getter pair bound to a name. If one tried to access :ref:" "`CanvasItem.visible `, then Godot would " "do the following checks, in order:" msgstr "" #: ../../docs/tutorials/best_practices/godot_interfaces.rst:257 msgid "" "If the object has a script attached, it will attempt to set the property " "through the script. This leaves open the opportunity for scripts to override " "a property defined on a base object by overriding the setter method for the " "property." msgstr "" #: ../../docs/tutorials/best_practices/godot_interfaces.rst:262 msgid "" "If the script does not have the property, it performs a HashMap lookup in " "the ClassDB for the \"visible\" property against the CanvasItem class and " "all of its inherited types. If found, it will call the bound setter or " "getter. For more information about HashMaps, see the :ref:`data preferences " "` docs." msgstr "" #: ../../docs/tutorials/best_practices/godot_interfaces.rst:268 msgid "" "If not found, it does an explicit check to see if the user wants to access " "the \"script\" or \"meta\" properties." msgstr "" #: ../../docs/tutorials/best_practices/godot_interfaces.rst:271 msgid "" "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." msgstr "" #: ../../docs/tutorials/best_practices/godot_interfaces.rst:276 msgid "" "Note that this happens even for non-legal symbol names such as in the case " "of :ref:`TileSet `'s \"1/tile_name\" property. This refers to " "the name of the tile with ID 1, i.e. :ref:`TileSet.tile_get_name(1) " "`." msgstr "" #: ../../docs/tutorials/best_practices/godot_interfaces.rst:281 msgid "" "As a result, this duck-typed system can locate a property either in the " "script, the object's class, or any class that object inherits, but only for " "things which extend Object." msgstr "" #: ../../docs/tutorials/best_practices/godot_interfaces.rst:285 msgid "" "Godot provides a variety of options for performing runtime checks on these " "accesses:" msgstr "" #: ../../docs/tutorials/best_practices/godot_interfaces.rst:288 msgid "" "A duck-typed property access. These will property check (as described " "above). If the operation isn't supported by the object, execution will halt." msgstr "" #: ../../docs/tutorials/best_practices/godot_interfaces.rst:316 msgid "" "A method check. In the case of :ref:`CanvasItem.visible " "`, one can access the methods, " "``set_visible`` and ``is_visible`` like any other method." msgstr "" #: ../../docs/tutorials/best_practices/godot_interfaces.rst:454 msgid "" "Outsource the access to a :ref:`FuncRef `. These may be " "useful in cases where one needs the max level of freedom from dependencies. " "In this case, one relies on an external context to setup the method." msgstr "" #: ../../docs/tutorials/best_practices/godot_interfaces.rst:513 msgid "" "These strategies contribute to Godot's flexible design. Between them, users " "have a breadth of tools to meet their specific needs." msgstr "" #: ../../docs/tutorials/best_practices/godot_notifications.rst:4 msgid "Godot notifications" msgstr "" #: ../../docs/tutorials/best_practices/godot_notifications.rst:6 msgid "" "Every Object in Godot implements a :ref:`_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 :ref:`CanvasItem ` " "to \"draw\", it will call ``_notification(NOTIFICATION_DRAW)``." msgstr "" #: ../../docs/tutorials/best_practices/godot_notifications.rst:13 msgid "" "Some of these notifications, like draw, are useful to override in scripts. " "So much so that Godot exposes many of them with dedicated functions:" msgstr "" #: ../../docs/tutorials/best_practices/godot_notifications.rst:16 msgid "``_ready()`` : NOTIFICATION_READY" msgstr "" #: ../../docs/tutorials/best_practices/godot_notifications.rst:18 msgid "``_enter_tree()`` : NOTIFICATION_ENTER_TREE" msgstr "" #: ../../docs/tutorials/best_practices/godot_notifications.rst:20 msgid "``_exit_tree()`` : NOTIFICATION_EXIT_TREE" msgstr "" #: ../../docs/tutorials/best_practices/godot_notifications.rst:22 msgid "``_process(delta)`` : NOTIFICATION_PROCESS" msgstr "" #: ../../docs/tutorials/best_practices/godot_notifications.rst:24 msgid "``_physics_process(delta)`` : NOTIFICATION_PHYSICS_PROCESS" msgstr "" #: ../../docs/tutorials/best_practices/godot_notifications.rst:26 msgid "``_draw()`` : NOTIFICATION_DRAW" msgstr "" #: ../../docs/tutorials/best_practices/godot_notifications.rst:28 msgid "" "What users might *not* realize is that notifications exist for types other " "than Node alone:" msgstr "" #: ../../docs/tutorials/best_practices/godot_notifications.rst:31 msgid "" ":ref:`Object::NOTIFICATION_POSTINITIALIZE " "`: a callback that " "triggers during object initialization. Not accessible to scripts." msgstr "" #: ../../docs/tutorials/best_practices/godot_notifications.rst:34 msgid "" ":ref:`Object::NOTIFICATION_PREDELETE " "`: a callback that triggers " "before the engine deletes an Object, i.e. a 'destructor'." msgstr "" #: ../../docs/tutorials/best_practices/godot_notifications.rst:38 msgid "" ":ref:`MainLoop::NOTIFICATION_WM_MOUSE_ENTER " "`: a callback that " "triggers when the mouse enters the window in the operating system that " "displays the game content." msgstr "" #: ../../docs/tutorials/best_practices/godot_notifications.rst:42 msgid "" "And many of the callbacks that *do* exist in Nodes don't have any dedicated " "methods, but are still quite useful." msgstr "" #: ../../docs/tutorials/best_practices/godot_notifications.rst:45 msgid "" ":ref:`Node::NOTIFICATION_PARENTED " "`: a callback that triggers " "anytime one adds a child node to another node." msgstr "" #: ../../docs/tutorials/best_practices/godot_notifications.rst:48 msgid "" ":ref:`Node::NOTIFICATION_UNPARENTED " "`: a callback that triggers " "anytime one removes a child node from another node." msgstr "" #: ../../docs/tutorials/best_practices/godot_notifications.rst:52 msgid "" ":ref:`Popup::NOTIFICATION_POST_POPUP " "`: a callback that triggers " "after a Popup node completes any ``popup*`` method. Note the difference from " "its ``about_to_show`` signal which triggers *before* its appearance." msgstr "" #: ../../docs/tutorials/best_practices/godot_notifications.rst:57 msgid "" "One can access all these custom notifications from the universal " "``_notification`` method." msgstr "" #: ../../docs/tutorials/best_practices/godot_notifications.rst:61 msgid "" "Methods in the documentation labeled as \"virtual\" are also intended to be " "overridden by scripts." msgstr "" #: ../../docs/tutorials/best_practices/godot_notifications.rst:64 msgid "" "A classic example is the :ref:`_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." msgstr "" #: ../../docs/tutorials/best_practices/godot_notifications.rst:69 msgid "" "So, in which situation should one use each of these notifications or virtual " "functions?" msgstr "" #: ../../docs/tutorials/best_practices/godot_notifications.rst:73 msgid "_process vs. _physics_process vs. \\*_input" msgstr "" #: ../../docs/tutorials/best_practices/godot_notifications.rst:75 msgid "" "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 " "the evaluations to update. If they don't need to execute every frame, then " "implementing a Timer-yield-timeout loop is another option." msgstr "" #: ../../docs/tutorials/best_practices/godot_notifications.rst:93 msgid "" "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." msgstr "" #: ../../docs/tutorials/best_practices/godot_notifications.rst:98 msgid "" "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 default). In contrast, ``*_input`` callbacks will trigger only on frames " "in which the engine has actually detected the input." msgstr "" #: ../../docs/tutorials/best_practices/godot_notifications.rst:104 msgid "" "One can check for input actions within the input callbacks just the same. If " "one wants to use delta time, one can fetch it from the related deltatime " "methods as needed." msgstr "" #: ../../docs/tutorials/best_practices/godot_notifications.rst:152 msgid "_init vs. initialization vs. export" msgstr "" #: ../../docs/tutorials/best_practices/godot_notifications.rst:154 msgid "" "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." msgstr "" #: ../../docs/tutorials/best_practices/godot_notifications.rst:159 msgid "" "Scripts have three types of property assignments that can occur during " "instantiation:" msgstr "" #: ../../docs/tutorials/best_practices/godot_notifications.rst:206 msgid "" "When instantiating a scene, property values will set up according to the " "following sequence:" msgstr "" #: ../../docs/tutorials/best_practices/godot_notifications.rst:209 msgid "" "**Initial value assignment:** instantiation will assign either the " "initialization value or the init assignment value. Init assignments take " "priority over initialization values." msgstr "" #: ../../docs/tutorials/best_practices/godot_notifications.rst:213 msgid "" "**Exported value assignment:** If instancing from a scene rather than a " "script, Godot will assign the exported value to replace the initial value " "defined in the script." msgstr "" #: ../../docs/tutorials/best_practices/godot_notifications.rst:217 msgid "" "As a result, instantiating a script versus a scene will affect both the " "initialization *and* the number of times the engine calls the setter." msgstr "" #: ../../docs/tutorials/best_practices/godot_notifications.rst:221 msgid "_ready vs. _enter_tree vs. NOTIFICATION_PARENTED" msgstr "" #: ../../docs/tutorials/best_practices/godot_notifications.rst:223 msgid "" "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 " "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." msgstr "" #: ../../docs/tutorials/best_practices/godot_notifications.rst:230 msgid "" "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." msgstr "" #: ../../docs/tutorials/best_practices/godot_notifications.rst:235 msgid "" "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 " "can use the :ref:`PARENTED ` " "notification. For example, here is a snippet that connects a node's method " "to a custom signal on the parent node without failing. Useful on data-" "centric nodes that one might create at runtime." msgstr "" #: ../../docs/tutorials/best_practices/data_preferences.rst:4 msgid "Data preferences" msgstr "" #: ../../docs/tutorials/best_practices/data_preferences.rst:6 msgid "" "Ever wondered whether one should approach problem X with data structure Y or " "Z? This article covers a variety of topics related to these dilemmas." msgstr "" #: ../../docs/tutorials/best_practices/data_preferences.rst:11 msgid "" "This article makes references to \"[something]-time\" operations. This " "terminology comes from algorithm analysis' `Big O Notation `_." msgstr "" #: ../../docs/tutorials/best_practices/data_preferences.rst:15 msgid "" "Long-story short, it describes the worst-case scenario of runtime length. In " "laymen's terms:" msgstr "" #: ../../docs/tutorials/best_practices/data_preferences.rst:18 msgid "" "\"As the size of a problem domain increases, the runtime length of the " "algorithm...\"" msgstr "" #: ../../docs/tutorials/best_practices/data_preferences.rst:21 msgid "Constant-time, ``O(1)``: \"...does not increase.\"" msgstr "" #: ../../docs/tutorials/best_practices/data_preferences.rst:22 msgid "Logarithmic-time, ``O(log n)``: \"...increases at a slow rate.\"" msgstr "" #: ../../docs/tutorials/best_practices/data_preferences.rst:23 msgid "Linear-time, ``O(n)``: \"...increases at the same rate.\"" msgstr "" #: ../../docs/tutorials/best_practices/data_preferences.rst:24 msgid "Etc." msgstr "" #: ../../docs/tutorials/best_practices/data_preferences.rst:26 msgid "" "Imagine if one had to process 3 million data points within a single frame. " "It would be impossible to craft the feature with a linear-time algorithm " "since the sheer size of the data would increase the runtime far beyond the " "time allotted. In comparison, using a constant-time algorithm could handle " "the operation without issue." msgstr "" #: ../../docs/tutorials/best_practices/data_preferences.rst:32 msgid "" "By and large, developers want to avoid engaging in linear-time operations as " "much as possible. But, if one keeps the scale of a linear-time operation " "small, and if one does not need to perform the operation often, then it may " "be acceptable. Balancing these requirements and choosing the right " "algorithm / data structure for the job is part of what makes programmers' " "skills valuable." msgstr "" #: ../../docs/tutorials/best_practices/data_preferences.rst:40 msgid "Array vs. Dictionary vs. Object" msgstr "" #: ../../docs/tutorials/best_practices/data_preferences.rst:42 msgid "" "Godot stores all variables in the scripting API in the `Variant `_ class. " "Variants can store Variant-compatible data structures such as :ref:`Array " "` and :ref:`Dictionary ` as well as :ref:" "`Object ` s." msgstr "" #: ../../docs/tutorials/best_practices/data_preferences.rst:48 msgid "" "Godot implements Array as a ``Vector``. The engine stores the Array " "contents in a contiguous section of memory, i.e. they are in a row adjacent " "to each other." msgstr "" #: ../../docs/tutorials/best_practices/data_preferences.rst:53 msgid "" "For those unfamiliar with C++, a Vector is the name of the array object in " "traditional C++ libraries. It is a \"templated\" type, meaning that its " "records can only contain a particular type (denoted by angled brackets). So, " "for example, a :ref:`PoolStringArray ` would be " "something like a ``Vector``." msgstr "" #: ../../docs/tutorials/best_practices/data_preferences.rst:60 msgid "Contiguous memory stores imply the following operation performance:" msgstr "" #: ../../docs/tutorials/best_practices/data_preferences.rst:62 msgid "**Iterate:** Fastest. Great for loops." msgstr "" #: ../../docs/tutorials/best_practices/data_preferences.rst:64 msgid "Op: All it does is increment a counter to get to the next record." msgstr "" #: ../../docs/tutorials/best_practices/data_preferences.rst:66 msgid "**Insert, Erase, Move:** Position-dependent. Generally slow." msgstr "" #: ../../docs/tutorials/best_practices/data_preferences.rst:68 msgid "" "Op: Adding/removing/moving content involves moving the adjacent records over " "(to make room / fill space)." msgstr "" #: ../../docs/tutorials/best_practices/data_preferences.rst:71 msgid "Fast add/remove *from the end*." msgstr "" #: ../../docs/tutorials/best_practices/data_preferences.rst:73 msgid "Slow add/remove *from an arbitrary position*." msgstr "" #: ../../docs/tutorials/best_practices/data_preferences.rst:75 msgid "Slowest add/remove *from the front*." msgstr "" #: ../../docs/tutorials/best_practices/data_preferences.rst:77 msgid "If doing many inserts/removals *from the front*, then..." msgstr "" #: ../../docs/tutorials/best_practices/data_preferences.rst:79 msgid "invert the array." msgstr "" #: ../../docs/tutorials/best_practices/data_preferences.rst:81 msgid "do a loop which executes the Array changes *at the end*." msgstr "" #: ../../docs/tutorials/best_practices/data_preferences.rst:83 msgid "re-invert the array." msgstr "" #: ../../docs/tutorials/best_practices/data_preferences.rst:85 msgid "" "This makes only 2 copies of the array (still constant time, but slow) versus " "copying roughly 1/2 of the array, on average, N times (linear time)." msgstr "" #: ../../docs/tutorials/best_practices/data_preferences.rst:88 msgid "" "**Get, Set:** Fastest *by position*. E.g. can request 0th, 2nd, 10th record, " "etc. but cannot specify which record you want." msgstr "" #: ../../docs/tutorials/best_practices/data_preferences.rst:91 msgid "Op: 1 addition operation from array start position up to desired index." msgstr "" #: ../../docs/tutorials/best_practices/data_preferences.rst:93 msgid "**Find:** Slowest. Identifies the index/position of a value." msgstr "" #: ../../docs/tutorials/best_practices/data_preferences.rst:95 msgid "" "Op: Must iterate through array and compare values until one finds a match." msgstr "" #: ../../docs/tutorials/best_practices/data_preferences.rst:97 msgid "" "Performance is also dependent on whether one needs an exhaustive search." msgstr "" #: ../../docs/tutorials/best_practices/data_preferences.rst:100 msgid "" "If kept ordered, custom search operations can bring it to logarithmic time " "(relatively fast). Laymen users won't be comfortable with this though. Done " "by re-sorting the Array after every edit and writing an ordered-aware search " "algorithm." msgstr "" #: ../../docs/tutorials/best_practices/data_preferences.rst:105 msgid "" "Godot implements Dictionary as an ``OrderedHashMap``. The " "engine stores a small array (initialized to 2^3 or 8 records) of key-value " "pairs. When one attempts to access a value, they provide it a key. It then " "*hashes* the key, i.e. converts it into a number. The \"hash\" is used to " "calculate the index into the array. As an array, the OHM then has a quick " "lookup within the \"table\" of keys mapped to values. When the HashMap " "becomes too full, it increases to the next power of 2 (so, 16 records, then " "32, etc.) and rebuilds the structure." msgstr "" #: ../../docs/tutorials/best_practices/data_preferences.rst:113 msgid "" "Hashes are to reduce the chance of a key collision. If one occurs, the table " "must recalculate another index for the value that takes the previous " "position into account. In all, this results in constant-time access to all " "records at the expense of memory and some minor operational efficiency." msgstr "" #: ../../docs/tutorials/best_practices/data_preferences.rst:118 msgid "Hashing every key an arbitrary number of times." msgstr "" #: ../../docs/tutorials/best_practices/data_preferences.rst:120 msgid "" "Hash operations are constant-time, so even if an algorithm must do more than " "one, as long as the number of hash calculations doesn't become too dependent " "on the density of the table, things will stay fast. Which leads to..." msgstr "" #: ../../docs/tutorials/best_practices/data_preferences.rst:125 msgid "Maintaining an ever-growing size for the table." msgstr "" #: ../../docs/tutorials/best_practices/data_preferences.rst:127 msgid "" "HashMaps maintain gaps of unused memory interspersed in the table on purpose " "to reduce hash collisions and maintain the speed of accesses. This is why it " "constantly increases in size quadratically by powers of 2." msgstr "" #: ../../docs/tutorials/best_practices/data_preferences.rst:132 msgid "" "As one might be able to tell, Dictionaries specialize in tasks that Arrays " "do not. An overview of their operational details is as follows:" msgstr "" #: ../../docs/tutorials/best_practices/data_preferences.rst:135 msgid "**Iterate:** Fast." msgstr "" #: ../../docs/tutorials/best_practices/data_preferences.rst:137 msgid "" "Op: Iterate over the map's internal vector of hashes. Return each key. " "Afterwards, users then use the key to jump to and return the desired value." msgstr "" #: ../../docs/tutorials/best_practices/data_preferences.rst:141 msgid "**Insert, Erase, Move:** Fastest." msgstr "" #: ../../docs/tutorials/best_practices/data_preferences.rst:143 msgid "" "Op: Hash the given key. Do 1 addition operation to look up the appropriate " "value (array start + offset). Move is two of these (one insert, one erase). " "The map must do some maintenance to preserve its capabilities:" msgstr "" #: ../../docs/tutorials/best_practices/data_preferences.rst:148 msgid "update ordered List of records." msgstr "" #: ../../docs/tutorials/best_practices/data_preferences.rst:150 msgid "determine if table density mandates a need to expand table capacity." msgstr "" #: ../../docs/tutorials/best_practices/data_preferences.rst:152 msgid "" "The Dictionary remembers in what order users inserted its keys. This enables " "it to execute reliable iterations." msgstr "" #: ../../docs/tutorials/best_practices/data_preferences.rst:155 msgid "**Get, Set:** Fastest. Same as a lookup *by key*." msgstr "" #: ../../docs/tutorials/best_practices/data_preferences.rst:157 msgid "Op: Same as insert/erase/move." msgstr "" #: ../../docs/tutorials/best_practices/data_preferences.rst:159 msgid "**Find:** Slowest. Identifies the key of a value." msgstr "" #: ../../docs/tutorials/best_practices/data_preferences.rst:161 msgid "" "Op: Must iterate through records and compare the value until a match is " "found." msgstr "" #: ../../docs/tutorials/best_practices/data_preferences.rst:164 msgid "" "Note that Godot does not provide this feature out-of-the-box (because they " "aren't meant for this task)." msgstr "" #: ../../docs/tutorials/best_practices/data_preferences.rst:167 msgid "" "Godot implements Objects as stupid, but dynamic containers of data content. " "Objects query data sources when posed questions. For example, to answer the " "question, \"do you have a property called, 'position'?\", it might ask its :" "ref:`script ` or the :ref:`ClassDB `. One can " "find more information about what objects are and how they work in the :ref:" "`doc_what_are_godot_classes` article." msgstr "" #: ../../docs/tutorials/best_practices/data_preferences.rst:174 msgid "" "The important detail here is the complexity of the Object's task. Every time " "it performs one of these multi-source queries, it runs through *several* " "iteration loops and HashMap lookups. What's more, the queries are linear-" "time operations dependent on the Object's inheritance hierarchy size. If the " "class the Object queries (its current class) doesn't find anything, the " "request defers to the next base class, all the way up until the original " "Object class. While these are each fast operations in isolation, the fact " "that it must make so many checks is what makes them slower than both of the " "alternatives for looking up data." msgstr "" #: ../../docs/tutorials/best_practices/data_preferences.rst:186 msgid "" "When developers mention how slow the scripting API is, it is this chain of " "queries they refer to. Compared to compiled C++ code where the application " "knows exactly where to go to find anything, it is inevitable that scripting " "API operations will take much longer. They must locate the source of any " "relevant data before they can attempt to access it." msgstr "" #: ../../docs/tutorials/best_practices/data_preferences.rst:192 msgid "" "The reason GDScript is slow is because every operation it performs passes " "through this system." msgstr "" #: ../../docs/tutorials/best_practices/data_preferences.rst:195 msgid "" "C# can process some content at higher speeds via more optimized bytecode. " "But, if the C# script calls into an engine class' content or if the script " "tries to access something external to it, it will go through this pipeline." msgstr "" #: ../../docs/tutorials/best_practices/data_preferences.rst:200 msgid "" "NativeScript C++ goes even further and keeps everything internal by default. " "Calls into external structures will go through the scripting API. In " "NativeScript C++, registering methods to expose them to the scripting API is " "a manual task. It is at this point that external, non-C++ classes will use " "the API to locate them." msgstr "" #: ../../docs/tutorials/best_practices/data_preferences.rst:206 msgid "" "So, assuming one extends from Reference to create a data structure, like an " "Array or Dictionary, why choose an Object over the other two options?" msgstr "" #: ../../docs/tutorials/best_practices/data_preferences.rst:209 msgid "" "**Control:** With objects comes the ability to create more sophisticated " "structures. One can layer abstractions over the data to ensure the external " "API doesn't change in response to internal data structure changes. What's " "more, Objects can have signals, allowing for reactive behavior." msgstr "" #: ../../docs/tutorials/best_practices/data_preferences.rst:214 msgid "" "**Clarity:** Objects are a reliable data source when it comes to the data " "that scripts and engine classes define for them. Properties may not hold the " "values one expects, but one doesn't need to worry about whether the property " "exists in the first place." msgstr "" #: ../../docs/tutorials/best_practices/data_preferences.rst:219 msgid "" "**Convenience:** If one already has a similar data structure in mind, then " "extending from an existing class makes the task of building the data " "structure much easier. In comparison, Arrays and Dictionaries don't fulfill " "all use cases one might have." msgstr "" #: ../../docs/tutorials/best_practices/data_preferences.rst:224 msgid "" "Objects also give users the opportunity to create even more specialized data " "structures. With it, one can design their own List, Binary Search Tree, " "Heap, Splay Tree, Graph, Disjoint Set, and any host of other options." msgstr "" #: ../../docs/tutorials/best_practices/data_preferences.rst:228 msgid "" "\"Why not use Node for tree structures?\" one might ask. Well, the Node " "class contains things that won't be relevant to one's custom data structure. " "As such, it can be helpful to construct one's own node type when building " "tree structures." msgstr "" #: ../../docs/tutorials/best_practices/data_preferences.rst:276 msgid "" "From here, one can then create their own structures with specific features, " "limited only by their imagination." msgstr "" #: ../../docs/tutorials/best_practices/data_preferences.rst:280 msgid "Enumerations: int vs. string" msgstr "" #: ../../docs/tutorials/best_practices/data_preferences.rst:282 msgid "" "Most languages offer an enumeration type option. GDScript is no different, " "but unlike most other languages, it allows one to use either integers or " "strings for the enum values (the latter only when using the ``export`` " "keyword in GDScript). The question then arises, \"which should one use?\"" msgstr "" #: ../../docs/tutorials/best_practices/data_preferences.rst:287 msgid "" "The short answer is, \"whichever you are more comfortable with.\" This is a " "feature specific to GDScript and not Godot scripting in general; The " "languages prioritizes usability over performance." msgstr "" #: ../../docs/tutorials/best_practices/data_preferences.rst:291 msgid "" "On a technical level, integer comparisons (constant-time) will happen faster " "than string comparisons (linear-time). If one wants to keep up other " "languages' conventions though, then one should use integers." msgstr "" #: ../../docs/tutorials/best_practices/data_preferences.rst:295 msgid "" "The primary issue with using integers comes up when one wants to *print* an " "enum value. As integers, attempting to print MY_ENUM will print ``5`` or " "what-have-you, rather than something like ``\"MyEnum\"``. To print an " "integer enum, one would have to write a Dictionary that maps the " "corresponding string value for each enum." msgstr "" #: ../../docs/tutorials/best_practices/data_preferences.rst:301 msgid "" "If the primary purpose of using an enum is for printing values and one " "wishes to group them together as related concepts, then it makes sense to " "use them as strings. That way, a separate data structure to execute on the " "printing is unnecessary." msgstr "" #: ../../docs/tutorials/best_practices/data_preferences.rst:307 msgid "" "AnimatedTexture vs. AnimatedSprite vs. AnimationPlayer vs. AnimationTree" msgstr "" #: ../../docs/tutorials/best_practices/data_preferences.rst:309 msgid "" "Under what circumstances should one use each of Godot's animation classes? " "The answer may not be immediately clear to new Godot users." msgstr "" #: ../../docs/tutorials/best_practices/data_preferences.rst:312 msgid "" ":ref:`AnimatedTexture ` is a texture that the engine " "draws as an animated loop rather than a static image. Users can manipulate..." msgstr "" #: ../../docs/tutorials/best_practices/data_preferences.rst:316 msgid "the rate at which it moves across each section of the texture (fps)." msgstr "" #: ../../docs/tutorials/best_practices/data_preferences.rst:318 msgid "the number of regions contained within the texture (frames)." msgstr "" #: ../../docs/tutorials/best_practices/data_preferences.rst:320 msgid "" "Godot's :ref:`VisualServer ` then draws the regions in " "sequence at the prescribed rate. The good news is that this involves no " "extra logic on the part of the engine. The bad news is that users have very " "little control." msgstr "" #: ../../docs/tutorials/best_practices/data_preferences.rst:325 msgid "" "Also note that AnimatedTexture is a :ref:`Resource ` unlike " "the other :ref:`Node ` objects discussed here. One might create " "a :ref:`Sprite ` node that uses AnimatedTexture as its " "texture. Or (something the others can't do) one could add AnimatedTextures " "as tiles in a :ref:`TileSet ` and integrate it with a :ref:" "`TileMap ` for many auto-animating backgrounds that all " "render in a single batched draw call." msgstr "" #: ../../docs/tutorials/best_practices/data_preferences.rst:333 msgid "" "The AnimatedSprite node, in combination with the :ref:`SpriteFrames " "` resource, allows one to create a variety of animation " "sequences through spritesheets, flip between animations, and control their " "speed, regional offset, and orientation. This makes them well-suited to " "controlling 2D frame-based animations." msgstr "" #: ../../docs/tutorials/best_practices/data_preferences.rst:339 msgid "" "If one needs trigger other effects in relation to animation changes (for " "example, create particle effects, call functions, or manipulate other " "peripheral elements besides the frame-based animation), then will need to " "use an :ref:`AnimationPlayer ` node in conjunction " "with the AnimatedSprite." msgstr "" #: ../../docs/tutorials/best_practices/data_preferences.rst:345 msgid "" "AnimationPlayers are also the tool one will need to use if they wish to " "design more complex 2D animation systems, such as..." msgstr "" #: ../../docs/tutorials/best_practices/data_preferences.rst:348 msgid "**Cut-Out animations:** editing sprites' transforms at runtime." msgstr "" #: ../../docs/tutorials/best_practices/data_preferences.rst:350 msgid "" "**2D Mesh animations:** defining a region for the sprite's texture and " "rigging a skeleton to it. Then one animates the bones which stretch and bend " "the texture in proportion to the bones' relationships to each other." msgstr "" #: ../../docs/tutorials/best_practices/data_preferences.rst:355 msgid "A mix of the above." msgstr "" #: ../../docs/tutorials/best_practices/data_preferences.rst:357 msgid "" "While one needs an AnimationPlayer to design each of the individual " "animation sequences for a game, it can also be useful to combine animations " "for blending, i.e. enabling smooth transitions between these animations. " "There may also be a hierarchical structure between animations that one plans " "out for their object. These are the cases where the :ref:`AnimationTree " "` shines. One can find an in-depth guide on using the " "AnimationTree :ref:`here `." msgstr "" #: ../../docs/tutorials/best_practices/logic_preferences.rst:4 msgid "Logic preferences" msgstr "" #: ../../docs/tutorials/best_practices/logic_preferences.rst:6 msgid "" "Ever wondered whether one should approach problem X with strategy Y or Z? " "This article covers a variety of topics related to these dilemmas." msgstr "" #: ../../docs/tutorials/best_practices/logic_preferences.rst:10 msgid "Loading vs. preloading" msgstr "" #: ../../docs/tutorials/best_practices/logic_preferences.rst:12 msgid "" "In GDScript, there exists the global :ref:`preload " "` method. It loads resources as early as " "possible to front-load the \"loading\" operations and avoid loading " "resources while in the middle of performance-sensitive code." msgstr "" #: ../../docs/tutorials/best_practices/logic_preferences.rst:17 msgid "" "Its counterpart, the :ref:`load ` method, loads " "a resource only when it reaches the load statement. That is, it will load a " "resource in-place which can cause slowdowns when it occurs in the middle of " "sensitive processes. The ``load`` function is also an alias for :ref:" "`ResourceLoader.load(path) ` which is " "accessible to *all* scripting languages." msgstr "" #: ../../docs/tutorials/best_practices/logic_preferences.rst:24 msgid "" "So, when exactly does preloading occur versus loading, and when should one " "use either? Let's see an example:" msgstr "" #: ../../docs/tutorials/best_practices/logic_preferences.rst:88 msgid "" "Preloading allows the script to handle all the loading the moment one loads " "the script. Preloading is useful, but there are also times when one doesn't " "wish for it. To distinguish these situations, there are a few things one can " "consider:" msgstr "" #: ../../docs/tutorials/best_practices/logic_preferences.rst:93 msgid "" "If one cannot determine when the script might load, then preloading a " "resource, especially a scene or script, could result in further loads one " "does not expect. This could lead to unintentional, variable-length load " "times on top of the original script's load operations." msgstr "" #: ../../docs/tutorials/best_practices/logic_preferences.rst:98 msgid "" "If something else could replace the value (like a scene's exported " "initialization), then preloading the value has no meaning. This point isn't " "a significant factor if one intends to always create the script on its own." msgstr "" #: ../../docs/tutorials/best_practices/logic_preferences.rst:102 msgid "" "If one wishes only to 'import' another class resource (script or scene), " "then using a preloaded constant is often the best course of action. However, " "in exceptional cases, one may wish not to do this:" msgstr "" #: ../../docs/tutorials/best_practices/logic_preferences.rst:106 msgid "" "If the 'imported' class is liable to change, then it should be a property " "instead, initialized either using an ``export`` or a ``load`` (and perhaps " "not even initialized until later)." msgstr "" #: ../../docs/tutorials/best_practices/logic_preferences.rst:110 msgid "" "If the script requires a great many dependencies, and one does not wish to " "consume so much memory, then one may wish to, load and unload various " "dependencies at runtime as circumstances change. If one preloads resources " "into constants, then the only way to unload these resources would be to " "unload the entire script. If they are instead loaded properties, then one " "can set them to ``null`` and remove all references to the resource entirely " "(which, as a :ref:`Reference `-extending type, will cause " "the resources to delete themselves from memory)." msgstr "" #: ../../docs/tutorials/best_practices/logic_preferences.rst:121 msgid "Large levels: static vs. dynamic" msgstr "" #: ../../docs/tutorials/best_practices/logic_preferences.rst:123 msgid "" "If one is creating a large level, which circumstances are most appropriate? " "Should they create the level as one static space? Or should they load the " "level in pieces and shift the world's content as needed?" msgstr "" #: ../../docs/tutorials/best_practices/logic_preferences.rst:127 msgid "" "Well, the simple answer is , \"when the performance requires it.\" The " "dilemma associated with the two options is one of the age-old programming " "choices: does one optimize memory over speed, or vice versa?" msgstr "" #: ../../docs/tutorials/best_practices/logic_preferences.rst:131 msgid "" "The naive answer is to use a static level that loads everything at once. " "But, depending on the project, this could consume a large amount of memory. " "Wasting users' RAM leads to programs running slow or outright crashing from " "everything else the computer tries to do at the same time." msgstr "" #: ../../docs/tutorials/best_practices/logic_preferences.rst:136 msgid "" "No matter what, one should break larger scenes into smaller ones (to aid in " "reusability of assets). Developers can then design a node that manages the " "creation/loading and deletion/unloading of resources and nodes in real-time. " "Games with large and varied environments or procedurally generated elements " "often implement these strategies to avoid wasting memory." msgstr "" #: ../../docs/tutorials/best_practices/logic_preferences.rst:142 msgid "" "On the flip side, coding a dynamic system is more complex, i.e. uses more " "programmed logic, which results in opportunities for errors and bugs. If one " "isn't careful, they can develop a system that bloats the technical debt of " "the application." msgstr "" #: ../../docs/tutorials/best_practices/logic_preferences.rst:147 msgid "As such, the best options would be..." msgstr "" #: ../../docs/tutorials/best_practices/logic_preferences.rst:149 msgid "To use a static level for smaller games." msgstr "" #: ../../docs/tutorials/best_practices/logic_preferences.rst:151 msgid "" "If one has the time/resources on a medium/large game, create a library or " "plugin that can code the management of nodes and resources. If refined over " "time, so as to improve usability and stability, then it could evolve into a " "reliable tool across projects." msgstr "" #: ../../docs/tutorials/best_practices/logic_preferences.rst:156 msgid "" "Code the dynamic logic for a medium/large game because one has the coding " "skills, but not the time or resources to refine the code (game's gotta get " "done). Could potentially refactor later to outsource the code into a plugin." msgstr "" #: ../../docs/tutorials/best_practices/logic_preferences.rst:161 msgid "" "For an example of the various ways one can swap scenes around at runtime, " "please see the :ref:`\"Change scenes manually\" " "` documentation." msgstr "" #: ../../docs/tutorials/best_practices/project_organization.rst:4 msgid "Project organization" msgstr "" #: ../../docs/tutorials/best_practices/project_organization.rst:9 msgid "" "Since Godot has no restrictions on project structure or filesystem usage, " "organizing files when learning the engine can seem challenging. This " "tutorial suggests a workflow which should be a good starting point. We will " "also cover using version control with Godot." msgstr "" #: ../../docs/tutorials/best_practices/project_organization.rst:15 msgid "Organization" msgstr "" #: ../../docs/tutorials/best_practices/project_organization.rst:17 msgid "" "Godot is scene-based in nature, and uses the filesystem as-is, without " "metadata or an asset database." msgstr "" #: ../../docs/tutorials/best_practices/project_organization.rst:20 msgid "" "Unlike other engines, many resources are contained within the scene itself, " "so the amount of files in the filesystem is considerably lower." msgstr "" #: ../../docs/tutorials/best_practices/project_organization.rst:23 msgid "" "Considering that, the most common approach is to group assets as close to " "scenes as possible; when a project grows, it makes it more maintainable." msgstr "" #: ../../docs/tutorials/best_practices/project_organization.rst:27 msgid "" "As an example, one can usually place into a single folder their basic " "assets, such as sprite images, 3D model meshes, materials, and music, etc. " "They can then use a separate folder to store built levels that use them." msgstr "" #: ../../docs/tutorials/best_practices/project_organization.rst:48 msgid "Style guide" msgstr "" #: ../../docs/tutorials/best_practices/project_organization.rst:50 msgid "" "For consistency across projects, we recommend following these guidelines:" msgstr "" #: ../../docs/tutorials/best_practices/project_organization.rst:52 msgid "" "Use **snake_case** for folder and file names (with the exception of C# " "scripts). This sidesteps case sensitivity issues that can crop up after " "exporting a project on Windows. C# scripts are an exception to this rule, as " "the convention is to name them after the class name which should be in " "PascalCase." msgstr "" #: ../../docs/tutorials/best_practices/project_organization.rst:57 msgid "" "Use **PascalCase** for node names, as this matches built-in node casing." msgstr "" #: ../../docs/tutorials/best_practices/project_organization.rst:58 msgid "" "In general, keep third-party resources in a top-level ``addons/`` folder, " "even if they aren't editor plugins. This makes it easier to track which " "files are third-party. There are some exceptions to this rule; for instance, " "if you use third-party game assets for a character, it makes more sense to " "include them within the same folder as the character scenes and scripts." msgstr "" #: ../../docs/tutorials/best_practices/project_organization.rst:65 msgid "Importing" msgstr "" #: ../../docs/tutorials/best_practices/project_organization.rst:67 msgid "" "Godot versions prior to 3.0 did the import process from files outside the " "project. While this can be useful in large projects, it resulted in an " "organization hassle for most developers." msgstr "" #: ../../docs/tutorials/best_practices/project_organization.rst:71 msgid "" "Because of this, assets are now transparently imported from within the " "project folder." msgstr "" #: ../../docs/tutorials/best_practices/project_organization.rst:75 msgid "Ignoring specific folders" msgstr "" #: ../../docs/tutorials/best_practices/project_organization.rst:77 msgid "" "To prevent Godot from importing files contained in a specific folder, create " "an empty file called ``.gdignore`` in the folder (the leading ``.`` is " "required). This can be useful to speed up the initial project importing." msgstr "" #: ../../docs/tutorials/best_practices/project_organization.rst:83 msgid "" "To create a file whose name starts with a dot on Windows, you can use a text " "editor such as Notepad++ or use the following command in a command prompt: " "``type nul > .gdignore``" msgstr "" #: ../../docs/tutorials/best_practices/project_organization.rst:87 msgid "" "Once the folder is ignored, resources in that folder can't be loaded anymore " "using the ``load()`` and ``preload()`` methods. Ignoring a folder will also " "automatically hide it from the FileSystem dock, which can be useful to " "reduce clutter." msgstr "" #: ../../docs/tutorials/best_practices/project_organization.rst:91 msgid "" "Note that the ``.gdignore`` file's contents are ignored, which is why the " "file should be empty. It does not support patterns like ``.gitignore`` files " "do." msgstr "" #: ../../docs/tutorials/best_practices/project_organization.rst:97 msgid "Case sensitivity" msgstr "" #: ../../docs/tutorials/best_practices/project_organization.rst:99 msgid "" "Windows and recent macOS versions use case-insensitive filesystems by " "default, whereas Linux distributions use a case-sensitive filesystem by " "default. This can cause issues after exporting a project, since Godot's PCK " "virtual filesystem is case-sensitive. To avoid this, it's recommended to " "stick to ``snake_case`` naming for all files in the project (and lowercase " "characters in general)." msgstr "" #: ../../docs/tutorials/best_practices/project_organization.rst:108 msgid "" "You can break this rule when style guides say otherwise (such as the C# " "style guide). Still, be consistent to avoid mistakes." msgstr "" #: ../../docs/tutorials/best_practices/project_organization.rst:111 msgid "" "On Windows 10, to further avoid mistakes related to case sensitivity, you " "can also make the project folder case-sensitive. After enabling the Windows " "Subsystem for Linux feature, run the following command in a PowerShell " "window::" msgstr "" #: ../../docs/tutorials/best_practices/project_organization.rst:121 msgid "" "If you haven't enabled the Windows Subsystem for Linux, you can enter the " "following line in a PowerShell window *running as Administrator* then reboot " "when asked::" msgstr "" #: ../../docs/tutorials/best_practices/version_control_systems.rst:4 msgid "Version Control Systems" msgstr "" #: ../../docs/tutorials/best_practices/version_control_systems.rst:9 msgid "" "Godot aims to be VCS friendly and generate mostly readable and mergeable " "files. Godot also supports the use of version control systems in the editor " "itself. However, VCS in the editor requires a plugin for the specific VCS " "you are using. VCS can be setup or shut down in the editor under **Project > " "Version Control**." msgstr "" #: ../../docs/tutorials/best_practices/version_control_systems.rst:17 msgid "Official Git plugin" msgstr "" #: ../../docs/tutorials/best_practices/version_control_systems.rst:19 msgid "" "Using Git from inside the editor is supported with an official plugin. You " "can find the latest releases `here `__. Documentation on how to use the Git plugin can be found " "`here `__." msgstr "" #: ../../docs/tutorials/best_practices/version_control_systems.rst:26 msgid "Files to exclude from VCS" msgstr "" #: ../../docs/tutorials/best_practices/version_control_systems.rst:28 msgid "There are some folders Godot creates you should have your VCS ignore:" msgstr "" #: ../../docs/tutorials/best_practices/version_control_systems.rst:30 msgid "" "``.import/``: This folder stores all the files it imports automatically " "based on your source assets and their import flags." msgstr "" #: ../../docs/tutorials/best_practices/version_control_systems.rst:32 msgid "" "``*.translation``: These files are binary imported translations generated " "from CSV files." msgstr "" #: ../../docs/tutorials/best_practices/version_control_systems.rst:33 msgid "" "``export_presets.cfg``: This file contains all the export presets for the " "project, including sensitive information such as Android keystore " "credentials." msgstr "" #: ../../docs/tutorials/best_practices/version_control_systems.rst:35 msgid "" "``.mono/``: This folder stores automatically-generated Mono files. It only " "exists in projects that use the Mono version of Godot." msgstr "" #: ../../docs/tutorials/best_practices/version_control_systems.rst:39 msgid "Working with Git on Windows" msgstr "" #: ../../docs/tutorials/best_practices/version_control_systems.rst:41 msgid "" "Most Git for Windows clients are configured with the ``core.autocrlf`` set " "to ``true``. This can lead to files unnecessarily being marked as modified " "by Git due to their line endings being converted automatically. It is better " "to set this option as::" msgstr "" #: ../../docs/tutorials/editor/index.rst:2 msgid "Editor manual" msgstr "" #: ../../docs/tutorials/editor/index.rst:4 msgid "" "In this section, we cover the Godot editor in general, from its interface to " "using it with the command line. We cover some specific editors' interface in " "other sections where appropriate. For example, the :ref:`animation editor " "`." msgstr "" #: ../../docs/tutorials/editor/command_line_tutorial.rst:4 msgid "Command line tutorial" msgstr "" #: ../../docs/tutorials/editor/command_line_tutorial.rst:8 msgid "" "Some developers like using the command line extensively. Godot is designed " "to be friendly to them, so here are the steps for working entirely from the " "command line. Given the engine relies on almost no external libraries, " "initialization times are pretty fast, making it suitable for this workflow." msgstr "" #: ../../docs/tutorials/editor/command_line_tutorial.rst:16 msgid "" "On Windows and Linux, you can run a Godot binary in a terminal by specifying " "its relative or absolute path." msgstr "" #: ../../docs/tutorials/editor/command_line_tutorial.rst:19 msgid "" "On macOS, the process is different due to Godot being contained within an ``." "app`` bundle (which is a *folder*, not a file). To run a Godot binary from a " "terminal on macOS, you have to ``cd`` to the folder where the Godot " "application bundle is located, then run ``Godot.app/Contents/MacOS/Godot`` " "followed by any command line arguments. If you've renamed the application " "bundle from ``Godot`` to another name, make sure to edit this command line " "accordingly." msgstr "" #: ../../docs/tutorials/editor/command_line_tutorial.rst:28 msgid "Command line reference" msgstr "" #: ../../docs/tutorials/editor/command_line_tutorial.rst:30 msgid "**General options**" msgstr "" #: ../../docs/tutorials/editor/command_line_tutorial.rst:33 #: ../../docs/tutorials/editor/command_line_tutorial.rst:47 #: ../../docs/tutorials/editor/command_line_tutorial.rst:75 #: ../../docs/tutorials/editor/command_line_tutorial.rst:103 #: ../../docs/tutorials/editor/command_line_tutorial.rst:133 #: ../../docs/tutorials/ui/bbcode_in_richtextlabel.rst:53 #: ../../docs/development/cpp/configuring_an_ide/qt_creator.rst:59 msgid "Command" msgstr "Command" #: ../../docs/tutorials/editor/command_line_tutorial.rst:35 msgid "``-h``, ``--help``, ``/?``" msgstr "" #: ../../docs/tutorials/editor/command_line_tutorial.rst:35 msgid "Display the list of command line options." msgstr "" #: ../../docs/tutorials/editor/command_line_tutorial.rst:37 msgid "``--version``" msgstr "" #: ../../docs/tutorials/editor/command_line_tutorial.rst:37 msgid "Display the version string." msgstr "" #: ../../docs/tutorials/editor/command_line_tutorial.rst:39 msgid "``-v``, ``--verbose``" msgstr "" #: ../../docs/tutorials/editor/command_line_tutorial.rst:39 msgid "Use verbose stdout mode." msgstr "" #: ../../docs/tutorials/editor/command_line_tutorial.rst:41 msgid "``--quiet``" msgstr "" #: ../../docs/tutorials/editor/command_line_tutorial.rst:41 msgid "Quiet mode, silences stdout messages. Errors are still displayed." msgstr "" #: ../../docs/tutorials/editor/command_line_tutorial.rst:44 msgid "**Run options**" msgstr "" #: ../../docs/tutorials/editor/command_line_tutorial.rst:49 msgid "``-e``, ``--editor``" msgstr "" #: ../../docs/tutorials/editor/command_line_tutorial.rst:49 msgid "" "Start the editor instead of running the scene (:ref:`tools " "` must be enabled)." msgstr "" #: ../../docs/tutorials/editor/command_line_tutorial.rst:51 msgid "``-p``, ``--project-manager``" msgstr "" #: ../../docs/tutorials/editor/command_line_tutorial.rst:51 msgid "" "Start the project manager, even if a project is auto-detected (:ref:`tools " "` must be enabled)." msgstr "" #: ../../docs/tutorials/editor/command_line_tutorial.rst:53 msgid "``-q``, ``--quit``" msgstr "" #: ../../docs/tutorials/editor/command_line_tutorial.rst:53 msgid "Quit after the first iteration." msgstr "" #: ../../docs/tutorials/editor/command_line_tutorial.rst:55 msgid "``-l ``, ``--language ``" msgstr "" #: ../../docs/tutorials/editor/command_line_tutorial.rst:55 msgid "" "Use a specific locale ( being a two-letter code). See :ref:" "`doc_locales` for more details." msgstr "" #: ../../docs/tutorials/editor/command_line_tutorial.rst:57 msgid "``--path ``" msgstr "" #: ../../docs/tutorials/editor/command_line_tutorial.rst:57 msgid "Path to a project ( must contain a 'project.godot' file)." msgstr "" #: ../../docs/tutorials/editor/command_line_tutorial.rst:59 msgid "``-u``, ``--upwards``" msgstr "" #: ../../docs/tutorials/editor/command_line_tutorial.rst:59 msgid "Scan folders upwards for 'project.godot' file." msgstr "" #: ../../docs/tutorials/editor/command_line_tutorial.rst:61 msgid "``--main-pack ``" msgstr "" #: ../../docs/tutorials/editor/command_line_tutorial.rst:61 msgid "Path to a pack (.pck) file to load." msgstr "" #: ../../docs/tutorials/editor/command_line_tutorial.rst:63 msgid "``--render-thread ``" msgstr "" #: ../../docs/tutorials/editor/command_line_tutorial.rst:63 msgid "" "Render thread mode ('unsafe', 'safe', 'separate'). See :ref:`Thread Model " "` for more " "details." msgstr "" #: ../../docs/tutorials/editor/command_line_tutorial.rst:65 msgid "``--remote-fs
``" msgstr "" #: ../../docs/tutorials/editor/command_line_tutorial.rst:65 msgid "Remote filesystem (``[:]`` address)." msgstr "" #: ../../docs/tutorials/editor/command_line_tutorial.rst:67 msgid "``--audio-driver ``" msgstr "" #: ../../docs/tutorials/editor/command_line_tutorial.rst:67 msgid "" "Audio driver. Use ``--help`` first to display the list of available drivers." msgstr "" #: ../../docs/tutorials/editor/command_line_tutorial.rst:69 msgid "``--video-driver ``" msgstr "" #: ../../docs/tutorials/editor/command_line_tutorial.rst:69 msgid "" "Video driver. Use ``--help`` first to display the list of available drivers." msgstr "" #: ../../docs/tutorials/editor/command_line_tutorial.rst:72 msgid "**Display options**" msgstr "" #: ../../docs/tutorials/editor/command_line_tutorial.rst:77 msgid "``-f``, ``--fullscreen``" msgstr "" #: ../../docs/tutorials/editor/command_line_tutorial.rst:77 msgid "Request fullscreen mode." msgstr "" #: ../../docs/tutorials/editor/command_line_tutorial.rst:79 msgid "``-m``, ``--maximized``" msgstr "" #: ../../docs/tutorials/editor/command_line_tutorial.rst:79 msgid "Request a maximized window." msgstr "" #: ../../docs/tutorials/editor/command_line_tutorial.rst:81 msgid "``-w``, ``--windowed``" msgstr "" #: ../../docs/tutorials/editor/command_line_tutorial.rst:81 msgid "Request windowed mode." msgstr "" #: ../../docs/tutorials/editor/command_line_tutorial.rst:83 msgid "``-t``, ``--always-on-top``" msgstr "" #: ../../docs/tutorials/editor/command_line_tutorial.rst:83 msgid "Request an always-on-top window." msgstr "" #: ../../docs/tutorials/editor/command_line_tutorial.rst:85 msgid "``--resolution x``" msgstr "" #: ../../docs/tutorials/editor/command_line_tutorial.rst:85 msgid "Request window resolution." msgstr "" #: ../../docs/tutorials/editor/command_line_tutorial.rst:87 msgid "``--position ,``" msgstr "" #: ../../docs/tutorials/editor/command_line_tutorial.rst:87 msgid "Request window position." msgstr "" #: ../../docs/tutorials/editor/command_line_tutorial.rst:89 msgid "``--low-dpi``" msgstr "" #: ../../docs/tutorials/editor/command_line_tutorial.rst:89 msgid "Force low-DPI mode (macOS and Windows only)." msgstr "" #: ../../docs/tutorials/editor/command_line_tutorial.rst:91 msgid "``--no-window``" msgstr "" #: ../../docs/tutorials/editor/command_line_tutorial.rst:91 msgid "Run with invisible window. Useful together with ``--script``." msgstr "" #: ../../docs/tutorials/editor/command_line_tutorial.rst:94 msgid "**Debug options**" msgstr "" #: ../../docs/tutorials/editor/command_line_tutorial.rst:98 msgid "" "Debug options are only available in the editor and debug export templates " "(they require ``debug`` or ``release_debug`` build targets, see :ref:" "`doc_introduction_to_the_buildsystem_target` for more details)." msgstr "" #: ../../docs/tutorials/editor/command_line_tutorial.rst:105 msgid "``-d``, ``--debug``" msgstr "" #: ../../docs/tutorials/editor/command_line_tutorial.rst:105 msgid "Debug (local stdout debugger)." msgstr "" #: ../../docs/tutorials/editor/command_line_tutorial.rst:107 msgid "``-b``, ``--breakpoints``" msgstr "" #: ../../docs/tutorials/editor/command_line_tutorial.rst:107 msgid "" "Breakpoint list as source::line comma-separated pairs, no spaces (use %%20 " "instead)." msgstr "" #: ../../docs/tutorials/editor/command_line_tutorial.rst:109 msgid "``--profiling``" msgstr "" #: ../../docs/tutorials/editor/command_line_tutorial.rst:109 msgid "Enable profiling in the script debugger." msgstr "" #: ../../docs/tutorials/editor/command_line_tutorial.rst:111 msgid "``--remote-debug
``" msgstr "" #: ../../docs/tutorials/editor/command_line_tutorial.rst:111 msgid "Remote debug (``:`` address)." msgstr "" #: ../../docs/tutorials/editor/command_line_tutorial.rst:113 msgid "``--debug-collisions``" msgstr "" #: ../../docs/tutorials/editor/command_line_tutorial.rst:113 msgid "Show collision shapes when running the scene." msgstr "" #: ../../docs/tutorials/editor/command_line_tutorial.rst:115 msgid "``--debug-navigation``" msgstr "" #: ../../docs/tutorials/editor/command_line_tutorial.rst:115 msgid "Show navigation polygons when running the scene." msgstr "" #: ../../docs/tutorials/editor/command_line_tutorial.rst:117 msgid "``--frame-delay ``" msgstr "" #: ../../docs/tutorials/editor/command_line_tutorial.rst:117 msgid "Simulate high CPU load (delay each frame by milliseconds)." msgstr "" #: ../../docs/tutorials/editor/command_line_tutorial.rst:119 msgid "``--time-scale ``" msgstr "" #: ../../docs/tutorials/editor/command_line_tutorial.rst:119 msgid "Force time scale (higher values are faster, 1.0 is normal speed)." msgstr "" #: ../../docs/tutorials/editor/command_line_tutorial.rst:121 msgid "``--disable-render-loop``" msgstr "" #: ../../docs/tutorials/editor/command_line_tutorial.rst:121 msgid "" "Disable render loop so rendering only occurs when called explicitly from " "script." msgstr "" #: ../../docs/tutorials/editor/command_line_tutorial.rst:123 msgid "``--disable-crash-handler``" msgstr "" #: ../../docs/tutorials/editor/command_line_tutorial.rst:123 msgid "Disable crash handler when supported by the platform code." msgstr "" #: ../../docs/tutorials/editor/command_line_tutorial.rst:125 msgid "``--fixed-fps ``" msgstr "" #: ../../docs/tutorials/editor/command_line_tutorial.rst:125 msgid "" "Force a fixed number of frames per second. This setting disables real-time " "synchronization." msgstr "" #: ../../docs/tutorials/editor/command_line_tutorial.rst:127 msgid "``--print-fps``" msgstr "" #: ../../docs/tutorials/editor/command_line_tutorial.rst:127 msgid "Print the frames per second to the stdout." msgstr "" #: ../../docs/tutorials/editor/command_line_tutorial.rst:130 msgid "**Standalone tools**" msgstr "" #: ../../docs/tutorials/editor/command_line_tutorial.rst:135 msgid "``-s