No description
Find a file
Pedro J. Estébanez 2a03b459b9 Overhaul Resource::duplicate()
Thanks to a refactor, `Resource::duplicate_for_local_scene()` and `Resource::duplicate()` are now both users of the same, parametrized, implementation.

`Resource::duplicate()` now honors deepness in a more consistent and predictable fashion. `Resource::duplicate_deep()` is added (instead of just adding a parameter to the former, for compatibility needs).

The behavior after this change is as follows:
  - Deep (`deep=true`, formerly `subresources=true`):
    - Previously, only resources found as direct property values of the one to copy would be, recursively, duplicated.
    - Now, in addition, arrays and dictionaries are walked so the copy is truly deep, and only local subresources found across are copied.
    - Previously, subresources would be duplicated as many times as being referenced throughout the main resource.
    - Now, each subresource is only duplicated once and from that point, a referenced to that single copy is used. That's the enhanced behavior that `duplicate_for_local_scene()` already featured.
    - The behavior with respect to packed arrays is still duplication.
    - Formerly, arrays and dictionaries were recursive duplicated, with resources ignored.
    - Now, arrays and dictionaries are recursive duplicated, with resources duplicated.
    - When doing it through `duplicate_deep()`, there's a` deep_subresources_mode` parameter, with various possibilites to control if no resources are duplicated (so arrays, etc. are, but keeping referencing the originals), if only the internal ones are (resources with no non-local path, the default), or if all of them are. The default is to copy every subresource, just like `duplicate(true)`.
  - Not deep (`deep=false`, formerly `subresources=false`): <a name="resource-shallow"></a>
    - Previously, the first level of resources found as direct property values would be duplicated unconditionally. Packed arrays, arrays and dictionaries were non-recursively duplicated.
    - Now, no subresource found at any level in any form will be duplicated, but the original reference kept instead. Packed arrays, arrays and dictionaries are referenced, not duplicated at all.
    - Now, resources found as values of always-duplicate properties are duplicated, recursively or not matching what was requested for the root call.

This commit also changes what's the virtual method to override to customize the duplication (now it's the protected `_duplicate()` instead of the public `duplicate()`).
2025-05-26 10:05:25 +02:00
.github Merge pull request #99938 from Repiteo/ci/scons-flag-formatting 2025-05-16 10:28:59 -05:00
core Overhaul Resource::duplicate() 2025-05-26 10:05:25 +02:00
doc Overhaul Resource::duplicate() 2025-05-26 10:05:25 +02:00
drivers Merge pull request #106407 from DarioSamo/present-validation-error 2025-05-15 10:22:18 -05:00
editor Merge pull request #106437 from BlueCube3310/ch-remap-grow 2025-05-16 10:29:00 -05:00
main Merge pull request #105302 from KoBeWi/scenic 2025-05-13 16:22:20 -05:00
misc Allow undoredo actions to not make history unsaved 2025-05-13 02:40:31 +02:00
modules Fix GridMap scenario crash when outside tree 2025-05-15 23:49:42 +02:00
platform Merge pull request #106251 from ArchercatNEO/wayland-cursor-shape 2025-05-16 10:29:02 -05:00
scene Merge pull request #106487 from bruvzg/rtl_fix 2025-05-16 10:29:03 -05:00
servers Merge pull request #106399 from DarioSamo/fix-canvas-validation-error 2025-05-15 14:53:26 -05:00
tests Revert "Fix #100536: Control set_position resizes offsets/anchors" 2025-05-16 14:21:18 +03:00
thirdparty Merge pull request #106251 from ArchercatNEO/wayland-cursor-shape 2025-05-16 10:29:02 -05:00
.clang-format Style: Declare inline macros as attributes 2025-04-18 12:04:40 -05:00
.clang-tidy Core: Modernize C headers with C++ equivalents 2025-05-02 08:23:01 -05:00
.clangd Style: Begin integrating simple .clangd fixes 2025-03-22 13:24:35 -05:00
.editorconfig Fix .sln project generation logic for Rider to support all OS and all C++ toolchains 2025-04-08 15:40:05 +02:00
.git-blame-ignore-revs Ignore #pragma once commit 2025-03-07 17:34:15 -06:00
.gitattributes Preserve CRLF line terminators for MSVS project template 2025-05-12 13:24:23 +02:00
.gitignore Annual versions bump for the Android platform 2025-05-07 13:14:49 -04:00
.mailmap Update AUTHORS and DONORS list 2025-02-26 12:54:25 +01:00
.pre-commit-config.yaml AccessKit integration for macOS, Linux, and Windows. 2025-04-08 20:25:47 +03:00
AUTHORS.md Update AUTHORS and DONORS list 2025-02-26 12:54:25 +01:00
CHANGELOG.md Add changelog for Godot 4.4 2025-03-03 00:31:10 +01:00
CONTRIBUTING.md Update godot documentation contribution link 2024-07-20 20:51:11 -06:00
COPYRIGHT.txt Merge pull request #104462 from solidpixel/astcenc_5.3.0 2025-05-13 16:22:10 -05:00
DONORS.md Update donation link to fund.godotengine.org 2025-04-11 18:59:40 +02:00
gles3_builders.py Avoid unnecessary version_get_uniform() calls 2025-04-28 15:05:59 +02:00
glsl_builders.py SCons: Modernize shader builders 2025-03-29 11:51:54 -05:00
godot.manifest [Windows] Always use absolute UNC paths and long path aware APIs, add "long path aware" flag to the application manifest. 2024-08-28 11:15:57 +03:00
icon.png
icon.svg Style: Enforce trailing newlines on svgs 2025-02-18 11:02:45 -06:00
icon_outlined.png
icon_outlined.svg Style: Enforce trailing newlines on svgs 2025-02-18 11:02:45 -06:00
LICENSE.txt
logo.png
logo.svg Style: Enforce trailing newlines on svgs 2025-02-18 11:02:45 -06:00
LOGO_LICENSE.txt Cleanup various repository documentation files 2023-10-10 13:58:13 +02:00
logo_outlined.png
logo_outlined.svg Style: Enforce trailing newlines on svgs 2025-02-18 11:02:45 -06:00
methods.py SCU - hide SCU folders by adding "." to foldername 2025-05-11 07:02:36 +01:00
platform_methods.py Add loongarch64 support 2024-12-06 00:18:26 +08:00
pyproject.toml Pre-commit: Fix applying ruff to SCsub files 2024-12-28 10:19:46 +01:00
README.md Cleanup various repository documentation files 2023-10-10 13:58:13 +02:00
SConstruct SCons: Don't enable -Wenum-conversion for GCC < 11 2025-05-06 10:06:01 +02:00
scu_builders.py SCU - hide SCU folders by adding "." to foldername 2025-05-11 07:02:36 +01:00
version.py Bump version to 4.5-dev 2025-03-03 17:27:40 +01:00

Godot Engine

Godot Engine logo

2D and 3D cross-platform game engine

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 that users can focus on making games without having to reinvent the wheel. Games can be exported with one click to a number of platforms, including the major desktop platforms (Linux, macOS, Windows), mobile platforms (Android, iOS), as well as Web-based platforms and consoles.

Free, open source and community-driven

Godot is completely free and open source under the very permissive MIT license. No strings attached, no royalties, nothing. The 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 Godot Foundation not-for-profit.

Before being open sourced in February 2014, Godot had been developed by Juan Linietsky and Ariel Manzur (both still maintaining the project) for several years as an in-house engine, used to publish several work-for-hire titles.

Screenshot of a 3D scene in the Godot Engine editor

Getting the engine

Binary downloads

Official binaries for the Godot editor and the export templates can be found on the Godot website.

Compiling from source

See the official docs for compilation instructions for every supported platform.

Community and contributing

Godot is not only an engine but an ever-growing community of users and engine developers. The main community channels are listed on the homepage.

The best way to get in touch with the core engine developers is to join the Godot Contributors Chat.

To get started contributing to the project, see the contributing guide. This document also includes guidelines for reporting bugs.

Documentation and demos

The official documentation is hosted on Read the Docs. It is maintained by the Godot community in its own GitHub repository.

The class reference is also accessible from the Godot editor.

We also maintain official demos in their own GitHub repository as well as a list of awesome Godot community resources.

There are also a number of other learning resources provided by the community, such as text and video tutorials, demos, etc. Consult the community channels for more information.

Code Triagers Badge Translate on Weblate TODOs