- Display the frame time in addition to FPS.
- Frame time is a more objective measurement in comparison to FPS,
but FPS is more familiar to people less acquainted with profiling.
- Rename "Game" to "Project" for the project FPS printing line.
(cherry picked from commit 157d8e4d36)
Having to rename project settings is rare, but when it does occur it can cause user confusion. In order to make compatibility more seamless this PR introduces two new GLOBAL_DEF functions,
GLOBAL_DEF_ALIAS(new_name, old_name, default)
GLOBAL_DEF_ALIAS_RST(new_name, old_name, default)
These are the same as the existing GLOBAL_DEF functions except that if the new setting is not found, it attempts to load from the old setting name. If the old setting is found, it stores it into the new setting, and then calls the regular GLOBAL_DEF functions.
More work is needed to make sure that those options actually solve users' issues, so we prefer to remove the options for 3.2.4 and revisit for a future release.
The rendering/quality/2d section of project settings is becoming considerably expanded in 3.2.4, and arguably was not the correct place for settings that were not really to do with quality.
3.2.4 is the last sensible opportunity we will have to move these settings, as the only existing one likely to break compatibility in a small way is `pixel_snap`, and given that the whole snapping area is being overhauled we can draw attention to the fact it has changed in the release notes.
Class reference is also updated and slightly improved.
`pixel_snap` is renamed to `gpu_pixel_snap` in the project settings and code to help differentiate from CPU side transform snapping.
In addition, add support for scaling and applying filter to the splash screen on Android.
One limitation of the api being used is that the splash screen aspect ratio is not maintained when it's scaled up.
- Based on C++11's `thread` and `thread_local`
- No more need to allocate-deallocate or check for null
- No pointer anymore, just a member variable
- Platform-specific implementations no longer needed (except for the few cases of non-portable functions)
- Simpler for `NO_THREADS`
- Thread ids are now the same across platforms (main is 1; others follow)
- Based on C++14's `shared_time_mutex`
- No more need to allocate-deallocate or check for null
- No pointer anymore, just a member variable
- Platform-specific implementations no longer needed
- Simpler for `NO_THREADS`
This can be used in server builds for journalctl compatibility.
(cherry picked from commit 341b9cf15a)
Fixes crash when exiting with --verbose with leaked resources
(cherry picked from commit 25c4dacb88)
This adds a new project setting (`physics/common/enable_pause_aware_picking`). It's disabled by default.
When enabled, it changes the way 2D & 3D physics picking behaves in relation to pause:
- When pause is set, every collision object that is hovered or captured (3D only) is released from that condition, getting the relevant mouse-exit callback., unless its pause mode makes it immune from pause.
- During the pause. picking only considers collision objects immune from pause, sending input events and enter/exit callbacks to them as expected.
- When pause is left, nothing happens. This is a big difference with the classic behavior, which at this point would process all the input events that have been queued against the current state of the 2D/3D world (in other words, checking them against the current position of the objects instead of those at the time of the events).
This ensures that settings like `gui/theme/custom_font` handle resource
remappings properly, as they load resources in `register_scene_types()`.
Path remaps used to be done before loading scene types in early Godot
versions (as hinted by the "Load Remaps" comment just before "Load Scene
Types") but this was broken when developing new localization features.
Fixes#17640.
(cherry picked from commit bb5dcb6892)
Happy new year to the wonderful Godot community!
2020 has been a tough year for most of us personally, but a good year for
Godot development nonetheless with a huge amount of work done towards Godot
4.0 and great improvements backported to the long-lived 3.2 branch.
We've had close to 400 contributors to engine code this year, authoring near
7,000 commit! (And that's only for the `master` branch and for the engine code,
there's a lot more when counting docs, demos and other first-party repos.)
Here's to a great year 2021 for all Godot users 🎆
(cherry picked from commit b5334d14f7)
When a project setting is not found, a warning message is printed.
This moves the default value declaration so it can be found when
the `--help` or `--version` command line arguments are used.
(cherry picked from commit 5cd37de125)
Partially revert change allowing sprite get_rect snapping to be controlled by `pixel_snap` again rather than `transform_snap` (to prevent breaking compatibility). Adds a final `use_camera_snap` project setting to allow snapping viewports as in reduz original PR.
This partially reverts #44041.
Also fix the bogus label about lack of GLES3 support being always shown...
It was meant to be behind a check but I had left it out while testing, and
forgot to put it back.
This only applies to the project manager instance, what driver is used is otherwise
still defined by the project settings for a running game/editor.
Should help users who have issues with buggy GLES3 drivers to still use the project
manager to create and edit GLES2 projects.
Export presets contains the export_path option, to specify the default
export location, but the CLI export option disregarded that, and always
required and export path to be specified.
After this commit, if the export path is not specified in the command,
the one in the preset will be used, erroring only if it's not present or
invalid.
(cherry picked from commit 032a1c5dc3)
Since exporters will save their own icon, the target platforms
don't have to support SVG to display the icon correctly.
This closes#23068.
(cherry picked from commit 0f9432f060)
The thread model option for physics (2D) and rendering (single-unsafe,
single-safe, multithread), was causing crashes/locks when set as
multithreaded and exported for a platform that does not support threads
(namely HTML5).
This commit ensures that when threads support is not available, that
option is ignored, and the equivalent of "single-unsafe" is always used
instead.
(cherry picked from commit f3c6ac1d71)
This is a revert of 9d78274e06, which was an attempt to fix#21431, but in the end it seems a different problem was the root of the issue.
Renewing focus steal allowance every time is needed on Windows.
Due to `user://` returning the current working directory when no
project is open, this caused logs to be written to `$HOME`
most of the time.
This closes#40305.
(cherry picked from commit b89dc6ae00)
- Use the `.log` file extension (recognized on Windows out of the box)
to better hint that generated files are logs. Some editors provide
dedicated syntax highlighting for those files.
- Use an underscore to separate the basename from the date and
the date from the time in log filenames. This makes the filename
easier to read.
- Keep only 5 log files by default to decrease disk usage in case
messages are spammed.
(cherry picked from commit 20af28ec06)
The Low Processor Usage Mode Sleep Usec setting is now used as a
FPS limiter rather than a constant sleep duration.
This will increase CPU/GPU usage slightly due to the higher
effective FPS, but the increase in overall smoothness is worth it.
If both Force Fps and Low Processor Usage Mode settings are enabled
in the project settings, only the setting that causes the highest
sleep duration will be retained.
This closes#11030.
(cherry picked from commit 1c28b269d8)
Since projects started from the editor or exported in debug mode
run slower than those exported in release mode, this should be
clearly presented to the user.
This partially addresses #20219.
(cherry picked from commit a9c60007a9)
This patch adds ability to include external, user-defined C++ modules
to be compiled as part of Godot via `custom_modules` build option
which can be passed to `scons`.
```
scons platform=x11 tools=yes custom_modules="../project/modules"
```
Features:
- detects all available modules under `custom_modules` directory the
same way as it does for built-in modules (not recursive);
- works with both relative and absolute paths on the filesystem;
- multiple search paths can be specified as a comma-separated list.
Module custom documentation and editor icons collection and generation
process is adapted to work with absolute paths needed by such modules.
Also fixed doctool bug mixing absolute and relative paths respectively.
Implementation details:
- `env.module_list` is a dictionary now, which holds both module name as
key and either a relative or absolute path to a module as a value.
- `methods.detect_modules` is run twice: once for built-in modules, and
second for external modules, all combined later.
- `methods.detect_modules` was not doing what it says on the tin. It is
split into `detect_modules` which collects a list of available modules
and `write_modules` which generates `register_types` sources for each.
- whether a module is built-in or external is distinguished by relative
or absolute paths respectively. `custom_modules` scons converter
ensures that the path is absolute even if relative path is supplied,
including expanding user paths and symbolic links.
- treats the parent directory as if it was Godot's base directory, so
that there's no need to change include paths in cases where custom
modules are included as dependencies in other modules.
(cherry picked from commit a96f0e98d7)
This is needed as C# may free resources from the finalizer thread during
CSharpLanguage::finish(). Previously this would result in RIDs not being freed.
This option is meant to use together with `--path` or from a project
folder. Otherwise the project manager is opened and the option triggers
a crash.
Fixes#25589.
The previous behavior relying on the provided extension was problematic
on macOS since .zip is the main extension used for the full project
export (binary + data pack).
We add a dedicated `--export-pack` command line option to define when
only the data pack should be exported. Its extension will still be
inferred from the path.
Fixes#23073.
I'm barely scratching the surface of the changes needed to make the
--export command line interface easy to use, but this should already
improve things somewhat.
- Streamline `can_export()` templates check in all platforms, checking
first for the presence of official templates, then of any defined
custom template, and reporting on the absence of any.
Shouldn't change the actual return value much which is still true if
either release or debug is usable - we might want to change that
eventually and better validate against the requested target.
- Fix discrepancy between platforms using `custom_package/debug` and
`custom_template/debug` (resp. `release`).
All now use `custom_template`, which will break compatibility for
`export_presets.cfg` with earlier projects (but is easy to fix).
- Use `can_export()` when attempting a command line export and report
the same errors that would be shown in the editor.
- Improve error reporting after a failed export attempt, handling
missing template and invalid path more gracefully.
- Cleanup of unused stuff in EditorNode around the export workflow.
- Improve --export documentation in --help a bit.
Fixes#16949 (at least many of the misunderstandings listed there).
Fixes#18470.
Happy new year to the wonderful Godot community!
We're starting a new decade with a well-established, non-profit, free
and open source game engine, and tons of further improvements in the
pipeline from hundreds of contributors.
Godot will keep getting better, and we're looking forward to all the
games that the community will keep developing and releasing with it.
It was previously mentioning only one of the two required arguments.
This also mentions that the export path is relative to the project
directory.
This partially addresses #28646.
On iOS devices without a physical home button iOS
shows a home indicator instead. This is often in the
way of the UI or the game.
Added a project setting to disable hidden home indicator.
The default value is to hide the home indicator
This change allows error messages to be printed in the editor debugger when the game fails on load, instead of displaying them in the console terminal only.
Implemented uniform API in Viewport class to override 2D and/or
3D camera.
Added buttons in 2D and 3D editor viewport toolbars that override
the running game camera transform with the editor viewport camera
transform. Implemented via remote debugger protocol and camera
override API.
Removed LiveEditFuncs function pointers from ScriptDebugger class.
Since the debugger got access to the SceneTree instance (if one
exists), there is no need to store the function pointers. The live
edit functions in SceneTree are used directly instead. Also removed
the static version of live edit functions in SceneTree for the same
reason. This reduced the SceneTree -> Debugger coupling too since
the function pointers don't need to be set from SceneTree anymore.
Moved script_debugger_remote.h/cpp from 'core/' to 'scene/debugger/'.
This is because the remote debugger is now using SceneTree directly
and 'core/' classes should not depend on 'scene/' classes.
connect_to_stream now accepts optional parameter to specify which
certificates to trust.
Implement accept_stream (SSL server) with key/cert parameters to specify
the RSA key and X509 certificate resources.