Godot Engine – Multi-platform 2D and 3D game engine
Go to file
Manuel Moos d5abd4eb75 Add hysteresis to physics timestep count per frame
Add new class _TimerSync to manage timestep calculations.
The new class handles the decisions about simulation progression
previously handled by main::iteration(). It is fed the current timer
ticks and determines how many physics updates are to be run and what
the delta argument to the _process() functions should be.

The new class tries to keep the number of physics updates per frame as
constant as possible from frame to frame. Ideally, it would be N steps
every render frame, but even with perfectly regular rendering, the
general case is that N or N+1 steps are required per frame, for some
fixed N. The best guess for N is stored in typical_physics_steps.

When determining the number of steps to take, no restrictions are
imposed between the choice of typical_physics_steps and
typical_physics_steps+1 steps. Should more or less steps than that be
required, the accumulated remaining time (as before, stored in
time_accum) needs to surpass its boundaries by some minimal threshold.
Once surpassed, typical_physics_steps is updated to allow the new step
count for future updates.

Care is taken that the modified calculation of the number of physics
steps is not observable from game code that only checks the delta
parameters to the _process and _physics_process functions; in addition
to modifying the number of steps, the _process argument is modified as
well to stay in expected bounds. Extra care is taken that the accumulated
steps still sum up to roughly the real elapsed time, up to a maximum
tolerated difference.

To allow the hysteresis code to work correctly on higher refresh
monitors, the number of typical physics steps is not only recorded and
kept consistent for single render frames, but for groups of them.
Currently, up to 12 frames are grouped that way.

The engine parameter physics_jitter_fix controls both the maximum
tolerated difference between wall clock time and summed up _process
arguments and the threshold for changing typical_physics_steps. It is
given in units of the real physics frame slice 1/physics_fps. Set
physics_jitter_fix to 0 to disable the effects of the new code here.
It starts to be effective against the random physics jitter at around
0.02 to 0.05. at values greater than 1 it starts having ill effects on
the engine's ability to react sensibly to dropped frames and framerate
changes.
2018-04-09 22:27:29 +02:00
core Add hysteresis to physics timestep count per frame 2018-04-09 22:27:29 +02:00
doc Merge pull request #18083 from Noshyaar/tutorial 2018-04-09 22:15:38 +02:00
drivers Merge pull request #16503 from Chaosus/particlesfix 2018-04-08 18:15:32 -03:00
editor Merge pull request #16473 from ianb96/move_tab 2018-04-09 21:45:06 +02:00
main Add hysteresis to physics timestep count per frame 2018-04-09 22:27:29 +02:00
misc Added the "GLES2" option for the video-driver in the terminal help. 2018-03-25 23:23:53 -03:00
modules Merge pull request #18081 from AndreaCatania/arcle 2018-04-09 22:04:25 +02:00
platform Fix custom cursor when it's hidden 2018-04-09 10:28:20 -03:00
scene Merge pull request #18080 from Alexander-Alekseev/fix_rigidbody_config_warning 2018-04-09 22:01:13 +02:00
servers Merge pull request #17151 from ShyRed/disabled_shapes_2d 2018-04-08 11:16:55 -03:00
thirdparty MbedTLS PR 1453 (fix UWP build) 2018-04-03 20:13:55 +02:00
.appveyor.yml Add GDnative wrapper lib on CI build 2018-01-04 20:32:12 +01:00
.clang-format Style: Apply clang-format to Java files 2017-12-10 01:16:07 +01:00
.editorconfig Enforce insert_final_newline in the editorconfig. 2018-02-16 19:44:47 +01:00
.gitattributes Add .xml to .gitattributes 2017-10-13 21:29:26 +11:00
.gitignore Added Geany/geany_plugins files to the ".gitignore". 2018-01-07 14:14:32 -02:00
.mailmap Disable colored output and progress bar when building outside of a TTY 2018-01-13 17:56:41 +01:00
.travis.yml Deleting OpenSSL module and library 2018-02-14 01:26:34 +01:00
AUTHORS.md Update AUTHORS and DONORS list 2018-04-06 21:36:50 +02:00
CHANGELOG.md Add a project changelog 2018-02-22 18:25:40 +01:00
compat.py Fix build with Python 3 on Windows 2017-10-29 19:27:12 +01:00
CONTRIBUTING.md fix some typos 2017-11-28 16:18:22 +01:00
COPYRIGHT.txt Remove OpenSSL license, add Mbed TLS 2018-02-14 08:13:08 +01:00
DONORS.md Update AUTHORS and DONORS list 2018-04-06 21:36:50 +02:00
icon.png Use new Godot icon consistently everywhere 2017-05-17 19:53:59 +02:00
icon.svg Use new Godot icon consistently everywhere 2017-05-17 19:53:59 +02:00
ISSUE_TEMPLATE.md Issue template: Remove checkbox and reword some comments 2018-01-05 10:58:04 +01:00
LICENSE.txt Update copyright statements to 2018 2018-01-01 14:40:47 +01:00
LOGO_LICENSE.md Improve documentation of thirdparty code snippets 2017-05-07 11:42:37 +02:00
logo.png Use new Godot icon consistently everywhere 2017-05-17 19:53:59 +02:00
logo.svg Use new Godot icon consistently everywhere 2017-05-17 19:53:59 +02:00
methods.py Refactor JavaScript platform build script 2018-03-26 19:46:56 +02:00
README.md README: Use HTTPS URL for image. (#17851) 2018-03-30 22:11:52 +02:00
SConstruct Refactor JavaScript platform build script 2018-03-26 19:46:56 +02:00
version.py Bump version to 3.1-dev 2018-01-30 00:19:24 +01:00

Godot Engine logo

Godot Engine

Homepage: https://godotengine.org

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, Mac OSX, Windows) as well as mobile (Android, iOS) and web-based (HTML5) platforms.

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

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 developers, the best way is to join the #godotengine IRC channel on Freenode.

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 within the engine.

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 info.

Travis Build Status AppVeyor Build Status Code Triagers Badge