Virtualx Game Engine. Forked from Godot 3.6
Find a file
Max Hilbrunner b48cbb5da9 Fix Windows platform file access
This restores Windows platform file handling back to open files non-exlusively by default, as was the case before October 2018. (See b902a2f2a7)
Back then, while fixing warnings for MSVC, the function used for opening files was changed from _wfopen() to _wfopen_s() as suggsted by the warning C4996. ("This function may be unsafe, consider using _wfopen_s instead.")

This new function
1. did parameter validation and thus avoided some possible security issues due to nil pointers or wrongly terminated strings
2. it also changed the default file sharing for opened files from _SH_DENYNO (which was the implicit default for the previous _wfopen()) to _SH_SECURE.

_SH_DENYNO means every opened file could be opened by other calls (like is the default on other operating systems).
_SH_SECURE means if the file is opened with READ access, others can still read the same file, but if it is opened with WRITE access, others can't open it at all, not even to read.

This led to rarely occuring bugs on Windows, i.e. due to random access by Antivirus processes, or Godot/Windows not closing a file handle fast enough while trying to open it again elsewhere (i.e. project.godot, instead showing the Project manager, or saving shaders/debugging the game).

What this PR does it change the file access to a third method, _wfsopen(). This is still secure, doing parameter validation and thus avoids the warning, but it allows us to actually SET the file sharing parameter. And we set it to _SH_DENYNO, as it was implicitely before the change. (And as it currently is on all non-Windows platforms, where file sharing restrictions don't exist by default.)

Warning C4996 should really have been pointing this out. It should've been _wfsopen() all along. Let's hope this banishes those annoying, rare errors for all eternity.

Fixes #28036.
2021-08-09 14:41:38 +02:00
.github HTML5: Fix warnings and re-enable werror=yes on CI 2021-08-06 12:12:37 +02:00
core Fix action_get_events returning booleans instead of InputKey entries 2021-08-07 21:17:55 +02:00
doc Invert how global_rate_scale value works, and rename it to playback_speed_scale 2021-08-07 12:32:42 -03:00
drivers Fix Windows platform file access 2021-08-09 14:41:38 +02:00
editor Added editor dialog for easily creating shaders. 2021-08-07 21:02:13 +03:00
main [Headless] Add --headless switch (no rendering, no audio). 2021-08-03 17:45:50 +02:00
misc [Headless] Add --headless switch (no rendering, no audio). 2021-08-03 17:45:50 +02:00
modules Merge pull request #51322 from raulsntos/fix-msbuild-exception 2021-08-07 12:19:26 +02:00
platform [iOS] Use platform generated api to initialize iOS plugins 2021-08-06 23:28:37 +03:00
scene Invert how global_rate_scale value works, and rename it to playback_speed_scale 2021-08-07 12:32:42 -03:00
servers Merge pull request #51356 from Chaosus/shader_dialog 2021-08-07 21:49:23 +03:00
tests Tests: Improve coverage for File::get_csv_line() 2021-08-04 11:53:21 +02:00
thirdparty [Net] Implement lower level ENet wrappers. 2021-07-29 10:59:00 +02:00
.clang-format Style: clang-format: Disable KeepEmptyLinesAtTheStartOfBlocks 2020-05-14 16:54:55 +02:00
.clang-tidy Style: Enforce braces around if blocks and loops 2020-05-14 21:57:34 +02:00
.editorconfig Add a simple C# .editorconfig 2021-07-23 17:04:53 -04:00
.gitattributes Mark *.tza files as binary in .gitattributes for old Git versions 2020-05-12 09:49:19 +02:00
.gitignore gitignore: Ignore Kate swap files 2021-01-27 01:07:57 +03:00
.lgtm.yml Create a basic .lgtm.yml file. 2020-09-03 14:49:14 +01:00
.mailmap Update AUTHORS and DONORS list 2021-05-14 13:18:29 +02:00
AUTHORS.md Update AUTHORS and DONORS list 2021-07-13 13:15:34 +02:00
CHANGELOG.md Fixes small typos and grammar correction 2021-03-12 19:05:16 +05:30
CONTRIBUTING.md Link to Godot Contributors Chat instead of IRC 2021-03-05 22:32:48 +01:00
COPYRIGHT.txt Implement shader caching 2021-05-31 10:13:09 +02:00
DONORS.md Update AUTHORS and DONORS list 2021-07-13 13:15:34 +02:00
glsl_builders.py RenderingServer reorganization 2020-12-04 18:39:46 -03:00
icon.png Remove two very slightly displaced duplicate vertices on Gobot's face 2020-12-11 07:05:54 +01:00
icon.svg Remove two very slightly displaced duplicate vertices on Gobot's face 2020-12-11 07:05:54 +01:00
icon_outlined.png Add an outlined version of logo.png and icon.png and put it in README.md 2020-12-14 06:42:51 +01:00
icon_outlined.svg Add an outlined version of logo.png and icon.png and put it in README.md 2020-12-14 06:42:51 +01:00
LICENSE.txt Update copyright statements to 2021 2021-01-01 20:19:21 +01:00
logo.png Remove two very slightly displaced duplicate vertices on Gobot's face 2020-12-11 07:05:54 +01:00
logo.svg Remove two very slightly displaced duplicate vertices on Gobot's face 2020-12-11 07:05:54 +01:00
LOGO_LICENSE.md Relicense Godot logo from CC-BY-3.0 to CC-BY-4.0 2020-12-03 14:30:06 +01:00
logo_outlined.png Add an outlined version of logo.png and icon.png and put it in README.md 2020-12-14 06:42:51 +01:00
logo_outlined.svg Add an outlined version of logo.png and icon.png and put it in README.md 2020-12-14 06:42:51 +01:00
methods.py SCons: Add method to detect Emscripten and use it for warnings config 2021-08-06 12:12:37 +02:00
platform_methods.py Merge python EnvironmentError, IOError and WindowsError into OSError. 2020-09-02 15:58:07 +01:00
README.md Merge pull request #44359 from Riteo/logo-outline 2021-05-09 14:01:05 +02:00
SConstruct SCons: Add method to detect Emscripten and use it for warnings config 2021-08-06 12:12:37 +02:00
version.py Update copyright statements to 2021 2021-01-01 20:19:21 +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 in 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 (HTML5) 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 Software Freedom Conservancy 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 Godot Engine

Getting the engine

Binary downloads

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

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.

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

To get started contributing to the project, see the contributing guide.

Documentation and demos

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

The class reference is also accessible from the Godot editor.

The official demos are maintained in their own GitHub repository as well.

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 Total alerts on LGTM TODOs