功能特性列表

这个页面旨在列出当前Godot引擎所支持的所有特性。

注解

这个页面列出了当前稳定版本的Godot (3.2)所支持的特性。更多的特性可以在最新的开发版本(4.0)中查阅。

功能

Platforms

可以运行编辑器以及导出的项目。

  • Windows 7 以及更新的系统版本(64位和32位)。
  • macOS 10.12 以及更新的系统版本(64位,x86, 以及ARM).
  • Linux (64-bit and 32-bit, x86 and ARM).
    • 二进制文件是静态链接的,并且如果在足够旧的基本发行版上进行编译,则可以在任何发行版上运行。
    • 官方二进制文件是在Ubuntu 14.04上编译的。

运行导出的项目:

  • 安卓4.4及以上版本。
  • iOS 10.0及更高版本。
  • 通过WebAssembly (火狐浏览器,谷歌浏览器,Edge浏览器,Opera浏览器) 的HMTL5.
  • Consoles.

Godot的目标是尽可能地独立于平台,并且可以相对轻松地移植到新平台。

编辑器

Features:

  • 场景树编辑器.
  • Script editor.
  • 支持:ref:`external script editors <doc_external_editor>`例如 Visual Studio 或者 VIM 代码。
  • GDScript debugger.
    • 尚不支持在线程中调试。
  • Performance monitoring tools.
  • Live script reloading.
  • Live scene editing.
    • 更改会在编辑器中生效并且会在关闭当前项目后保留。
  • Remote inspector.
    • 在关闭正在运行的项目后,更改不会被反映在编辑器中,也不会被保留。
  • 实时摄像机复制。
    • 移动编辑器中的摄像头,并在正在运行的项目中查看结果。
  • 使用由社区贡献的支持数十种语言的编辑器。

Plugins:

  • Editor plugins can be downloaded from the asset library to extend editor functionality.
  • 使用 GDScript 创建您自己的插件,以添加新功能或加快工作流程。
  • 从项目管理器中的资产库下载项目,然后直接导入。

2D图形

有两个渲染器可用:

  • OpenGL ES 3.0 渲染器(在桌面平台上使用 OpenGL 3.3)。
    • 高端的视觉效果。推荐在桌面平台上使用。
  • OpenGL ES 2.0 渲染器(在桌面平台上使用 OpenGL 2.1)。
    • 推荐在移动和 Web 平台上使用。

Features:

  • 精灵,多边形和线条渲染。
    • High-level tools to draw lines and polygons such as Polygon2D and Line2D.
  • AnimatedSprite as a helper for creating animated sprites.
  • 视差层。
    • 通过自动多次复制同一个图层来支持伪三维。
  • 带法线贴图的 2D 照明。
    • 硬阴影或软阴影。
  • 使用位图(位图字体)的字体呈现或使用 FreeType (动态字体) 进行栅格化。
    • 位图字体可以通过例如 BMFont 的工具被导出。
    • 动态字体支持单色字体和彩色字体。支持的格式是 TTF 和 OTF。
    • 动态字体支持具有可调整宽度和颜色的可选字体轮廓。
    • 支持字体超采样,以在更高的分辨率下保持字体的清晰度。
  • 支持自定义粒子着色器的基于GPU的粒子。
  • 基于CPU的粒子。

2维工具

  • 内置平滑和拖动边距的2D相机。
  • Path2D node to represent a path in 2D space.
    • Can be drawn in the editor or generated procedurally.
    • PathFollow2D node to make nodes follow a Path2D.
  • 2D geometry helper class.
  • Line2D node to draw textured 2D lines.

2D physics

Physics bodies:

  • Static bodies.
  • Rigid bodies.
  • Kinematic bodies.
  • Joints.
  • Areas to detect bodies entering or leaving it.

Collision detection:

  • Built-in shapes: line, box, circle, capsule.
  • Collision polygons (can be drawn manually or generated from a sprite in the editor).

3D graphics

有两个渲染器可用:

  • OpenGL ES 3.0 渲染器(在桌面平台上使用 OpenGL 3.3)。
    • 高端的视觉效果。推荐在桌面平台上使用。
    • HDR rendering with sRGB.
  • OpenGL ES 2.0 渲染器(在桌面平台上使用 OpenGL 2.1)。
    • 推荐在移动和 Web 平台上使用。
    • LDR rendering for greater compatibility.
    • Not all features are available. Features available only when using the OpenGL ES 3.0 renderer are marked GLES3 below.

Camera:

  • Perspective, orthographic and frustum-offset cameras.

Physically-based rendering:

  • Follows the Disney PBR model.
  • Uses a roughness-metallic workflow with support for ORM textures.
  • Normal mapping.
  • GLES3: Parallax/relief mapping with automatic level of detail based on distance.
  • GLES3: Sub-surface scattering and transmittance.
  • GLES3: Proximity fade (soft particles).
  • Distance fade which can use alpha blending or dithering to avoid going through the transparent pipeline.
  • Dithering can be determined on a per-pixel or per-object basis.

Real-time lighting:

  • Directional lights (sun/moon). Up to 4 per scene.
  • Omnidirectional lights.
  • Spot lights with adjustable cone angle and attenuation.

Shadow mapping:

  • DirectionalLight: Orthogonal (fastest), PSSM 2-split and 4-split. Supports blending between splits.
  • OmniLight: Dual parabolid (fast) or cubemap (slower but more accurate). Supports colored projector textures in the form of panoramas.
  • SpotLight: Single texture.

Global illumination with indirect lighting:

  • Baked lightmaps (fast, but can't be updated at run-time).
    • Lightmaps are baked on the CPU.
  • GLES3: GI probes (slower, semi-real-time). Supports reflections.

Reflections:

  • GLES3: Voxel-based reflections (when using GI probes).
  • Fast baked reflections or slow real-time reflections using ReflectionProbe. Parallax correction can optionally be enabled.
  • GLES3: Screen-space reflections.
  • Reflection techniques can be mixed together for greater accuracy.

Sky:

  • Panorama sky (using an HDRI).
  • Procedural sky.

Fog:

  • Depth fog with an adjustable attenuation curve.
  • Height fog (floor or ceiling) with adjustable attenuation.
  • Support for automatic depth fog color depending on the camera direction (to match the sun color).
  • Optional transmittance to make lights more visible in the fog.

Particles:

  • GLES3: GPU-based particles with support for custom particle shaders.
  • 基于CPU的粒子。

Post-processing:

  • Tonemapping (Linear, Reinhard, Filmic, ACES).
  • GLES3: Automatic exposure adjustments based on viewport brightness.
  • GLES3: Near and far depth of field.
  • GLES3: Screen-space ambient occlusion.
  • Glow/bloom with optional bicubic upscaling and several blend modes available: Screen, Soft Light, Add, Replace.
  • Color correction using an one-dimensional ramp.
  • Brightness, contrast and saturation adjustments.

Texture filtering:

  • Nearest, bilinear, trilinear or anisotropic filtering.

Texture compression:

  • GLES3: BPTC for high-quality compression (not supported on macOS).
  • GLES3: ETC2 (not supported on macOS).
  • ETC1 (recommended when using the GLES2 renderer).
  • GLES3: S3TC (not supported on mobile/Web platforms).

Anti-aliasing:

  • Multi-sample antialiasing (MSAA).

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.

3D tools

  • Built-in meshes: cube, cylinder/cone, (hemi)sphere, prism, plane, quad.
  • Tools for procedural geometry generation.
  • Constructive solid geometry (intended for prototyping).
  • Path3D node to represent a path in 3D space.
    • Can be drawn in the editor or generated procedurally.
    • PathFollow3D node to make nodes follow a Path3D.
  • 3D geometry helper class.

3D physics

Physics bodies:

  • Static bodies.
  • Rigid bodies.
  • Kinematic bodies.
  • Vehicle bodies (intended for arcade physics, not simulation).
  • Joints.
  • Soft bodies.
  • Ragdolls.
  • Areas to detect bodies entering or leaving it.

Collision detection:

  • Built-in shapes: cuboid, sphere, capsule, cylinder (only with Bullet physics).
  • Generate triangle collision shapes for any mesh from the editor.
  • Generate one or several convex collision shapes for any mesh from the editor.

Shaders

  • 2D: Custom vertex, fragment, and light shaders.
  • 3D: Custom vertex, fragment, light, and sky shaders.
  • Text-based shaders using a shader language inspired by GLSL <doc_shading_language>.
  • Visual shader editor.
    • Support for visual shader plugins.

编写脚本

General:

  • Object-oriented design pattern with scripts extending nodes.
  • Signals and groups for communicating between scripts.
  • Support for cross-language scripting.
  • Many 2D and 3D linear algebra data types such as vectors and transforms.

GDScript:

C#:

  • Packaged in a separate binary to keep file sizes and dependencies down.
  • Uses Mono 6.x.
    • Full support for the C# 7.0 syntax and features.
  • Supports all platforms.
  • Using an external editor is recommended to benefit from IDE functionality.

VisualScript:

GDNative (C, C++, Rust, D, ...):

  • When you need it, link to native libraries for higher performance and third-party integrations.
    • For scripting game logic, GDScript or C# are recommended if their performance is suitable.
  • Official bindings for C and C++.
    • Use any build system and language features you wish.
  • Maintained D, Kotlin, Python, Nim, and Rust bindings provided by the community.

音频

Features:

  • Mono, stereo, 5.1 and 7.1 output.
  • Non-positional and positional playback in 2D and 3D.
    • Optional Doppler effect in 2D and 3D.
  • Support for re-routable audio buses and effects.
    • Dozens of effects included.
  • Listener3D node to listen from a position different than the camera in 3D.
  • Audio input to record microphones.
  • MIDI input.
    • No support for MIDI output yet.

APIs used:

  • Windows: WASAPI.
  • macOS: CoreAudio.
  • Linux: PulseAudio or ALSA.

Import

Formats:

  • Images: See Supported image formats.
  • Audio:
    • WAV with optional IMA-ADPCM compression.
    • Ogg Vorbis.
  • 3D scenes:
    • glTF 2.0 (recommended).
    • ESCN (direct export from Blender).
    • FBX (experimental).
    • Collada (.dae).
    • Wavefront OBJ (static scenes only, can be loaded directly as a mesh).

输入

  • Input mapping system using hardcoded input events or remappable input actions.
    • Axis values can be mapped to two different actions with a configurable deadzone.
    • Use the same code to support both keyboards and gamepads.
  • Keyboard input.
  • Mouse input.
    • The mouse cursor can be visible, hidden, captured or confined within the window.
    • When captured, raw input will be used on Windows and Linux to sidestep the OS' mouse acceleration settings.
  • Gamepad input (up to 8 simulatenous controllers).
  • Pen/tablet input with pressure support.

网络

  • Low-level TCP networking using StreamPeer and TCP_Server.
  • Low-level UDP networking using PacketPeer and UDPServer.
  • Low-level HTTP requests using HTTPClient.
  • High-level HTTP requests using HTTPRequest.
    • Supports HTTPS out of the box using bundled certificates.
  • High-level multiplayer API using UDP and ENet.
    • Automatic replication using remote procedure calls (RPCs).
    • Supports unreliable, reliable and ordered transfers.
  • WebSocket client and server, available on all platforms.
  • WebRTC client and server, available on all platforms.
  • Support for UPnP to sidestep the requirement to forward ports when hosting a server behind a NAT.

国际化

  • Full support for Unicode including emoji.
  • Store localization strings using CSV or gettext.
  • Use localized strings in your project automatically in GUI elements or by using the tr() function.
  • Support for right-to-left typesetting and text shaping planned in Godot 4.0.

Windowing and OS integration

  • Move, resize, minimize, and maximize the window spawned by the project.
  • Change the window title and icon.
  • Request attention (will cause the title bar to blink on most platforms).
  • Fullscreen mode.
    • Doesn't use exclusive fullscreen, so the screen resolution can't be changed this way. Use a Viewport with a different resolution instead.
  • Borderless window (fullscreen or non-fullscreen).
  • Ability to keep the window always on top.
  • Transparent window with per-pixel transparency.
  • Global menu integration on macOS.
  • Execute commands in a blocking or non-blocking manner.
  • Open file paths and URLs using default or custom protocol handlers (if registered on the system).
  • Parse custom command line arguments.

Mobile

  • In-app purchases on Android and iOS.
  • Support for advertisements using third-party modules.

XR support (AR and VR)

  • Support for ARKit on iOS out of the box.
  • Support for the OpenXR and OpenVR APIs.
  • Popular VR headsets like the Oculus Quest and HTC Vive are supported thanks to plugins.

GUI system

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.

Nodes:

  • Buttons.
  • Checkboxes, check buttons, radio buttons.
  • Text entry using LineEdit (single line) and TextEdit (multiple lines).
  • Dropdown menus using PopupMenu and OptionButton.
  • Scrollbars.
  • Labels.
  • RichTextLabel for text formatted using BBCode.
  • Trees (can also be used to represent tables).
  • Containers (horizontal, vertical, grid, center, margin, draggable splitter, ...).
  • Controls can be rotated and scaled.

Sizing:

  • Anchors to keep GUI elements in a specific corner, edge or centered.
  • Containers to place GUI elements automatically following certain rules.
  • Scale to multiple resolutions using the 2d or viewport stretch modes.
  • Support any aspect ratio using anchors and the expand stretch aspect.

Theming:

  • Built-in theme editor.
    • Generate a theme based on the current editor theme settings.
  • Procedural vector-based theming using StyleBoxFlat.
    • Supports rounded/beveled corners, drop shadows and per-border widths.
  • Texture-based theming using StyleBoxTexture.

Godot's small distribution size can make it a suitable alternative to frameworks like Electron or Qt.

动画

  • Direct kinematics and inverse kinematics.
  • Support for animating any property with customizable interpolation.
  • Support for calling methods in animation tracks.
  • Support for playing sounds in animation tracks.
  • Support for Bézier curves in animation.

Formats

  • Scenes and resources can be saved in text-based or binary formats.
    • Text-based formats are human-readable and more friendly to version control.
    • Binary formats are faster to save/load for large scenes/resources.
  • Read and write text or binary files using File.
    • Can optionally be compressed or encrypted.
  • Read and write JSON files.
  • Read and write INI-style configuration files using ConfigFile.
    • Can (de)serialize any Godot datatype, including Vector, Color, ...
  • Read XML files using XMLParser.
  • 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.
  • Export additional PCK files that can be read by the engine to support mods and DLCs.

其他

  • Low-level access to servers which allows bypassing the scene tree's overhead when needed.
  • Command line interface for automation.
    • Export and deploy projects using continuous integration platforms.
    • Completion scripts are available for Bash, zsh and fish.
  • Support for C++ modules statically linked into the engine binary.
  • Engine and editor written in C++03.
    • Can be compiled using GCC, Clang and MSVC. MinGW is also supported.
    • 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.
    • Godot 4.0 will be written in C++17.
  • Licensed under the permissive MIT license.

参见

The roadmap 库中的文件是已被提上议程 并可能会在未来Godot发布的版本实装。