本帖最后由 蚊子 于 2020-8-6 12:17 编辑
Frequently asked questionsWhat can I do with Godot? How much does it cost? What are the license terms?
经常问的问题我可以用Godot做什么?它要多少钱?许可条款是什么?Godot is Free and Open-Source Software available under the OSI-approved MIT license. This means it is free as in "free speech" as well as in "free beer."
Godot是经OSI批准的 MIT许可证提供的免费和开源软件。这意味着它是免费的,如“言论自由”和“免费啤酒”一样。 In short:简而言之: - You are free to download and use Godot for any purpose, personal, non-profit, commercial, or otherwise.您可以出于个人,
非营利,商业或其他目的免费下载和使用Godot。 - You are free to modify, distribute, redistribute, and remix Godot to your heart's content, for any reason, both non-commercially and commercially.
无论出于非商业目的还是商业原因,您都可以自由地将Godot修改,分发,重新分发和重新混合到您的内心。
All the contents of this accompanying documentation are published under the permissive Creative Commons Attribution 3.0 (CC-BY 3.0) license, with attribution to "Juan Linietsky, Ariel Manzur and the Godot Engine community."
随附文档的所有内容均根据许可的知识共享署名3.0(CC-BY 3.0)许可发布,并注明“ Juan Linietsky,Ariel Manzur和Godot Engine社区”。 Logos and icons are generally under the same Creative Commons license. Note that some third-party libraries included with Godot's source code may have different licenses.
徽标和图标通常在同一知识共享许可下。请注意,Godot的源代码附带的某些第三方库可能具有不同的许可证。 For full details, look at the COPYRIGHT.txt as well as the LICENSE.txt and LOGO_LICENSE.txt files in the Godot repository.
有关完整的详细信息,请查看Godot存储库中的COPYRIGHT.txt以及LICENSE.txt和LOGO_LICENSE.txt文件。 Also, see the license page on the Godot website.
另外,请参阅Godot网站上的许可页面。
Which platforms are supported by Godot?
Godot支持哪些平台For the editor:
对于编辑者: - Windows
- macOS
- X11 (Linux, *BSD)
For exporting your games:
导出游戏: - Windows (and UWP)
- macOS
- X11 (Linux, *BSD)
- Android
- iOS
- Web
Both 32- and 64-bit binaries are supported where it makes sense, with 64 being the default.
合理地支持32位和64位二进制文件,默认为64位。 Some users also report building and using Godot successfully on ARM-based systems with Linux, like the Raspberry Pi.
一些用户还报告说,在具有Linux的基于ARM的系统(例如Raspberry Pi)上成功构建和使用Godot。 Additionally, there is some unofficial third-party work being done on building for some consoles. However, none of this is included in the default build scripts or export templates at this time.
此外,在为某些控制台进行构建时,还进行了一些非正式的第三方工作。但是,此时,默认构建脚本或导出模板中都不包含所有这些。 For more on this, see the sections on exporting and compiling Godot yourself.
有关更多信息,请参阅有关自己导出 和编译Godot的部分。
Which programming languages are supported in Godot?
Godot支持哪些编程语言?The officially supported languages for Godot are GDScript, Visual Scripting, C#, and C++. See the subcategories for each language in the scripting section.
Godot官方支持的语言是GDScript,Visual Scripting,C#和C ++。请在脚本部分中查看每种语言的子类别 。 If you are just starting out with either Godot or game development in general, GDScript is the recommended language to learn and use since it is native to Godot. While scripting languages tend to be less performant than lower-level languages in the long run, for prototyping, developing Minimum Viable Products (MVPs), and focusing on Time-To-Market (TTM), GDScript will provide a fast, friendly, and capable way of developing your games.
如果您只是刚开始使用Godot或进行游戏开发,那么GDScript是Godot的母语,因此是推荐学习和使用的语言。从长远来看,脚本语言的性能往往不如低级语言,但对于原型设计,开发最小可行产品(MVP)以及着重于产品上市时间(TTM)而言,GDScript将提供快速,友好且实用的功能。开发游戏的有效方法。 Note that C# support is still relatively new, and as such, you may encounter some issues along the way. Our friendly and hard-working development community is always ready to tackle new problems as they arise, but since this is an open-source project, we recommend that you first do some due diligence yourself. Searching through discussions on open issues is a great way to start your troubleshooting.
请注意,C#支持仍是相对较新的,因此,在此过程中可能会遇到一些问题。我们友好而努力的开发社区随时准备解决新问题,但是由于这是一个开源项目,因此我们建议您首先自己进行尽职调查。搜索有关未解决问题的讨论是开始进行故障排除的好方法。 As for new languages, support is possible via third parties using the GDNative / NativeScript / PluginScript facilities. (See the question about plugins below.) Work is currently underway, for example, on unofficial bindings for Godot to Python and Nim.
对于新语言,可以使用GDNative / NativeScript / PluginScript工具通过第三方提供支持。(请参阅下面有关插件的问题。)例如,正在进行有关Godot与Python和Nim的非正式绑定的工作。
What is GDScript and why should I use it?什么是GDScript,为什么要使用它?GDScript is Godot's integrated scripting language. It was built from the ground up to maximize Godot's potential in the least amount of code, affording both novice and expert developers alike to capitalize on Godot's strengths as fast as possible. If you've ever written anything in a language like Python before then you'll feel right at home. For examples, history, and a complete overview of the power GDScript offers you, check out the GDScript scripting guide.
GDScript是Godot的集成脚本语言。它是从头开始构建的,旨在以最少的代码最大程度地发挥Godot的潜力,使新手和专家开发人员都可以尽快利用Godot的优势。如果您曾经用Python这样的语言编写过任何东西,那么您会感到宾至如归。有关示例,历史记录以及GDScript为您提供的强大功能的完整概述,请查阅GDScript脚本指南。 There are several reasons to use GDScript--especially when you are prototyping, in alpha/beta stages of your project, or are not creating the next AAA title--but the most salient reason is the overall reduction of complexity.
使用GDScript的原因有很多-特别是在原型设计,项目的alpha / beta阶段或未创建下一个AAA标题时-但最明显的原因是总体上降低了复杂性。 The original intent of creating a tightly integrated, custom scripting language for Godot was two-fold: first, it reduces the amount of time necessary to get up and running with Godot, giving developers a rapid way of exposing themselves to the engine with a focus on productivity; second, it reduces the overall burden of maintenance, attenuates the dimensionality of issues, and allows the developers of the engine to focus on squashing bugs and improving features related to the engine core--rather than spending a lot of time trying to get a small set of incremental features working across a large set of languages.
为Godot创建紧密集成的自定义脚本语言的初衷是双重的:首先,它减少了启动和运行Godot所需的时间,从而为开发人员提供了一种快速专注于引擎的方法。关于生产力;其次,它减少了总体维护负担,减轻了问题的严重性,并使引擎的开发人员能够专注于解决错误并改善与引擎核心相关的功能,而不必花费大量时间来尝试解决问题。跨多种语言工作的一组增量功能。 Since Godot is an open-source project, it was imperative from the start to prioritize a more integrated and seamless experience over attracting additional users by supporting more familiar programming languages--especially when supporting those more familiar languages would result in a worse experience. We understand if you would rather use another language in Godot (see the list of supported options above). That being said, if you haven't given GDScript a try, try it for three days. Just like Godot, once you see how powerful it is and rapid your development becomes, we think GDScript will grow on you.
由于Godot是一个开源项目,因此从一开始就必须优先考虑更集成和无缝的体验,而不是通过支持更熟悉的编程语言来吸引更多用户-特别是在支持那些更熟悉的语言会导致更糟糕的体验时。我们了解您是否愿意在Godot中使用其他语言(请参阅上面支持的选项列表)。话虽如此,如果您没有尝试GDScript,请尝试三天。就像Godot一样,一旦您看到它强大而迅速的发展,我们就会认为GDScript将对您有所帮助。 More information about getting comfortable with GDScript or dynamically typed languages can be found in the GDScript: An introduction to dynamic languages tutorial.
有关适应GDScript或动态类型的语言的更多信息,请参见GDScript:动态语言简介教程。
What were the motivations behind creating GDScript?创建GDScript的动机是什么?In the early days, the engine used the Lua scripting language. Lua is fast, but creating bindings to an object oriented system (by using fallbacks) was complex and slow and took an enormous amount of code. After some experiments with Python, it also proved difficult to embed.
在早期,引擎使用[color=var(--link-color-visited)]Lua 脚本语言。Lua很快,但是创建到面向对象系统的绑定(通过使用后备)很复杂且很慢,并且花费了大量代码。经过使用[color=var(--link-color-visited)]Python的一些实验之后 ,它也被证明很难嵌入。 The main reasons for creating a custom scripting language for Godot were:
为Godot创建自定义脚本语言的主要原因是: - Poor threading support in most script VMs, and Godot uses threads (Lua, Python, Squirrel, JavaScript, ActionScript, etc.).
大多数脚本VM中的线程支持差,并且Godot使用线程(Lua,Python,Squirrel,JavaScript,ActionScript等)。 - Poor class-extending support in most script VMs, and adapting to the way Godot works is highly inefficient (Lua, Python, JavaScript).
大多数脚本VM中对类扩展的支持都很差,并且无法适应Godot的工作方式(Lua,Python,JavaScript)非常低效。 - Many existing languages have horrible interfaces for binding to C++, resulting in large amount of code, bugs, bottlenecks, and general inefficiency (Lua, Python, Squirrel, JavaScript, etc.) We wanted to focus on a great engine, not a great amount of integrations.
许多现有的语言都具有绑定到C ++的可怕接口,从而导致大量代码,错误,瓶颈和一般效率低下的问题(Lua,Python,Squirrel,JavaScript等)。我们希望专注于出色的引擎,而不是大量集成。 - No native vector types (vector3, matrix4, etc.), resulting in highly reduced performance when using custom types (Lua, Python, Squirrel, JavaScript, ActionScript, etc.).
没有本机向量类型(vector3,matrix4等),导致使用自定义类型(Lua,Python,Squirrel,JavaScript,ActionScript等)时的性能大大降低。 - Garbage collector results in stalls or unnecessarily large memory usage (Lua, Python, JavaScript, ActionScript, etc.).
垃圾收集器会导致停顿或不必要地占用大量内存(Lua,Python,JavaScript,ActionScript等)。 - Difficulty to integrate with the code editor for providing code completion, live editing, etc. (all of them). This is well-supported by GDScript.
难以与代码编辑器集成以提供代码完成,实时编辑等(所有这些)。GDScript对此提供了很好的支持。
GDScript was designed to curtail the issues above, and more.
GDScript旨在减少上述问题,甚至更多。
What type of 3D model formats does Godot support?
Godot支持哪种类型的3D模型格式?Godot supports Collada via the OpenCollada exporter (Maya, 3DSMax). If you are using Blender, take a look at our own Better Collada Exporter.
Godot通过[color=var(--link-color-visited)]OpenCollada导出器(Maya,3DSMax)支持Collada 。如果您使用的是Blender,请查看我们自己的[color=var(--link-color-visited)]Better Collada Exporter。 As of Godot 3.0, glTF is supported.
从Godot 3.0开始,支持glTF。 FBX is supported via the Open Asset Import library. However, FBX is proprietary so we recommend using other formats listed above, if suitable for your workflow.
通过开放资产导入库支持FBX。但是,FBX是专有的,因此,如果适合您的工作流程,我们建议使用上面列出的其他格式。
Will [insert closed SDK such as FMOD, GameWorks, etc.] be supported in Godot?
Godot是否将支持[插入封闭的SDK,例如FMOD,GameWorks等]?The aim of Godot is to create a free and open-source MIT-licensed engine that is modular and extendable. There are no plans for the core engine development community to support any third-party, closed-source/proprietary SDKs, as integrating with these would go against Godot's ethos.
Godot的目标是创建一个模块化的可扩展的免费开放源代码的MIT许可引擎。核心引擎开发社区尚无计划支持任何第三方,封闭源/专有的SDK,因为与它们集成会违反Godot的精神。 That said, because Godot is open-source and modular, nothing prevents you or anyone else interested in adding those libraries as a module and shipping your game with them--as either open- or closed-source.
就是说,由于Godot是开放源代码和模块化的,因此您或任何有兴趣将这些库添加为模块并随其附带发行您的游戏的人,无论是开放源代码还是封闭源代码,都无法阻止。 To see how support for your SDK of choice could still be provided, look at the Plugins question below.
要查看仍如何提供对所选SDK的支持,请查看下面的插件问题。 If you know of a third-party SDK that is not supported by Godot but that offers free and open-source integration, consider starting the integration work yourself. Godot is not owned by one person; it belongs to the community, and it grows along with ambitious community contributors like you.
如果您知道Godot不支持的第三方SDK,但是它提供了免费和开源的集成,请考虑自己开始集成工作。Godot不是一个人所有;它属于社区,并且与像您一样的雄心勃勃的社区贡献者一起成长。
How should assets be created to handle multiple resolutions and aspect ratios?
应该如何创建资产以处理多种分辨率和宽高比?This question pops up often and it's probably thanks to the misunderstanding created by Apple when they originally doubled the resolution of their devices. It made people think that having the same assets in different resolutions was a good idea, so many continued towards that path. That originally worked to a point and only for Apple devices, but then several Android and Apple devices with different resolutions and aspect ratios were created, with a very wide range of sizes and DPIs.
这个问题经常出现,这可能是由于苹果最初将设备分辨率翻倍时造成的误解。人们认为在不同的决议中拥有相同的资产是一个好主意,因此许多人继续朝着这条道路前进。最初只适用于Apple设备,但是后来创建了具有不同分辨率和宽高比的几款Android和Apple设备,具有各种尺寸和DPI。 The most common and proper way to achieve this is to, instead, use a single base resolution for the game and only handle different screen aspect ratios. This is mostly needed for 2D, as in 3D it's just a matter of Camera XFov or YFov.
实现此目的的最常见,最正确的方法是,对游戏使用单一的基本分辨率,并且仅处理不同的屏幕纵横比。这对于2D来说是最需要的,因为在3D中,这只是Camera XFov或YFov的问题 - Choose a single base resolution for your game. Even if there are devices that go up to 2K and devices that go down to 400p, regular hardware scaling in your device will take care of this at little or no performance cost. Most common choices are either near 1080p (1920x1080) or 720p (1280x720). Keep in mind the higher the resolution, the larger your assets, the more memory they will take and the longer the time it will take for loading.
为您的游戏选择一个基本分辨率。即使有些设备的速度达到2K,而设备的速度下降到400p,设备中的常规硬件扩展也可以以很少或根本没有性能成本的代价来解决这一问题。最常见的选择是接近1080p(1920x1080)或720p(1280x720)。请记住,分辨率越高,资产越大,它们将占用的内存越多,并且加载时间就越长。 - Use the stretch options in Godot; 2D stretching while keeping aspect ratios works best. Check the Multiple resolutions tutorial on how to achieve this.
在Godot中使用拉伸选项;在保持纵横比的同时进行2D拉伸效果最佳。查看有关如何实现此目标的“ 多分辨率”教程。 - Determine a minimum resolution and then decide if you want your game to stretch vertically or horizontally for different aspect ratios, or if there is one aspect ratio and you want black bars to appear instead. This is also explained in Multiple resolutions.
确定最低分辨率,然后确定是要针对不同的纵横比垂直或水平拉伸游戏,还是要有一个纵横比并希望显示黑条。多种分辨率中也对此进行了说明。 - For user interfaces, use the anchoring to determine where controls should stay and move. If UIs are more complex, consider learning about Containers.
对于用户界面,请使用锚点 确定控件应保留和移动的位置。如果用户界面较为复杂,请考虑学习有关容器的知识。
And that's it! Your game should work in multiple resolutions.
就是这样!您的游戏应在多种分辨率下工作。 If there is a desire to make your game also work on ancient devices with tiny screens (fewer than 300 pixels in width), you can use the export option to shrink images, and set that build to be used for certain screen sizes in the App Store or Google Play.
如果希望您的游戏也能在具有小屏幕(宽度小于300像素)的古老设备上运行,则可以使用导出选项来缩小图像,并在应用程序中将生成的图像设置为用于某些屏幕尺寸商店或Google Play。
How can I extend Godot?如何扩展Godot?For extending Godot, like creating Godot Editor plugins or adding support for additional languages, take a look at EditorPlugins and tool scripts.
要扩展Godot,例如创建Godot Editor插件或添加对其他语言的支持,请查看EditorPlugins 和工具脚本。 Also, see the official blog posts on these topics:另外,请参阅有关这些主题的官方博客文章: You can also take a look at the GDScript implementation, the Godot modules, as well as the unofficial Python support for Godot. This would be a good starting point to see how another third-party library integrates with Godot.
您还可以查看GDScript实现,Godot模块以及对Godot 的非官方Python支持。这将是了解另一个第三方库如何与Godot集成的良好起点。
I would like to contribute! How can I get started?我想贡献!我该如何开始?Awesome! As an open-source project, Godot thrives off of the innovation and ambition of developers like you.
太棒了!作为一个开源项目,Godot摆脱了像您这样的开发人员的创新和野心 The first place to get started is in the issues. Find an issue that resonates with you, then proceed to the How to Contribute guide to learn how to fork, modify, and submit a Pull Request (PR) with your changes.
首先要解决的是问题。找到引起您共鸣的问题,然后继续阅读《如何贡献》 指南,以了解如何对您的更改进行派生,修改和提交“拉取请求”(PR)。
I have a great idea for Godot. How can I share it?
我对Godot有个好主意。我该如何分享?It might be tempting to want to bring ideas to Godot, like ones that result in massive core changes, some sort of mimicry of what another game engine does, or alternative workflows that you'd like built into the editor. These are great, and we are thankful to have such motivated people want to contribute, but Godot's focus is and always will be the core functionality as outlined in the Roadmap, squashing bugs and addressing issues, and conversations between Godot community members.
想要将想法带入Godot可能很诱人,例如那些导致大量核心更改的想法,对其他游戏引擎的模仿,或者您希望在编辑器中内置的替代工作流。这些都是伟大的,我们很感激有这样的上进心的人想参与,但戈多的重点是而且将永远是相同的核心功能在列出路线图, 挤压错误和解决问题,而戈多社区成员之间的对话。 Most developers in the Godot community will be more interested to learn about things like:
Godot社区中的大多数开发人员将对以下方面的知识更加感兴趣: - Your experience using the software and the problems you have (we care about this much more than ideas on how to improve it).
您使用该软件的经验以及遇到的问题(我们不仅仅在意于如何改进它,而是在乎于此)。 - The features you would like to see implemented because you need them for your project.
您希望看到的功能已实现,因为您的项目需要它们。 - The concepts that were difficult to understand while learning the software.
学习软件时难以理解的概念。 - The parts of your workflow you would like to see optimized.
您希望看到的工作流程部分已优化。 - Parts where you missed clear tutorials or where the documentation wasn't clear.
您错过了清晰的教程或文档不清楚的部分。
Please don't feel like your ideas for Godot are unwelcome. Instead, try to reformulate them as a problem first, so developers and the community have a functional foundation to ground your ideas on.
请不要觉得您对Godot的想法不受欢迎。相反,请尝试首先将它们重新定义为问题,以便开发人员和社区具有功能基础,可将您的想法作为基础。 A good way to approach sharing your ideas and problems with the community is as a set of user stories. Explain what you are trying to do, what behavior you expect to happen, and then what behavior actually happened. Framing problems and ideas this way will help the whole community stay focused on improving developer experiences as a whole.
与社区共享您的想法和问题的一种好方法是作为一组用户故事。说明您要做什么,您预期会发生什么行为,然后实际发生什么行为。通过这种方式解决问题和想法将有助于整个社区专注于改善整体开发人员的体验。 Bonus points for bringing screenshots, concrete numbers, test cases, or example projects (if applicable).
带来截图,具体数字,测试用例或示例项目(如果适用)的加分点。
Is it possible to use Godot as a library?可以将Godot用作图书馆吗?Godot is meant to be used with its editor. We recommend you give it a try, as it will most likely save you time in the long term. There are no plans to make Godot usable as a library, as it would make the rest of the engine more convoluted and difficult to use for casual users.
Godot旨在与其编辑器一起使用。我们建议您尝试一下,因为从长远来看,它很可能会节省您的时间。目前尚无计划使Godot可用作库,因为这会使引擎的其余部分更加混乱,难以为临时用户使用。 If you want to use a rendering library, look into using an established rendering engine instead. Keep in mind rendering engines usually have smaller communities compared to Godot. This will make it more difficult to find answers to your questions.
如果要使用渲染库,请考虑使用已建立的渲染引擎。请记住,与Godot相比,渲染引擎通常具有较小的社区。这将使查找问题的答案变得更加困难。
Why does Godot not use STL (Standard Template Library)
为什么Godot不使用STL(标准模板库)Like many other libraries (Qt as an example), Godot does not make use of STL. We believe STL is a great general purpose library, but we had special requirements for Godot.
像许多其他库一样(以Qt为例),Godot不使用STL。我们认为STL是一个很棒的通用库,但是我们对Godot有特殊要求。 - STL templates create very large symbols, which results in huge debug binaries. We use few templates with very short names instead.
STL模板创建非常大的符号,这会导致庞大的调试二进制文件。我们使用一些名称非常短的模板来代替。 - Most of our containers cater to special needs, like Vector, which uses copy on write and we use to pass data around, or the RID system, which requires O(1) access time for performance. Likewise, our hash map implementations are designed to integrate seamlessly with internal engine types.
我们的大多数容器都满足特殊的需求,例如Vector(使用写时复制并用于传递数据)或RID系统(需要O(1)访问时间来提高性能)。同样,我们的哈希映射实现旨在与内部引擎类型无缝集成。 - Our containers have memory tracking built-in, which helps better track memory usage.
我们的容器具有内置的内存跟踪功能,有助于更好地跟踪内存使用情况。 - For large arrays, we use pooled memory, which can be mapped to either a preallocated buffer or virtual memory.
对于大型阵列,我们使用池化内存,可以将其映射到预分配的缓冲区或虚拟内存。 - We use our custom String type, as the one provided by STL is too basic and lacks proper internationalization support.
我们使用自定义的String类型,因为STL提供的类型太基本,并且缺乏适当的国际化支持。
Why does Godot not use exceptions?为什么Godot不使用exceptions?We believe games should not crash, no matter what. If an unexpected situation happens, Godot will print an error (which can be traced even to script), but then it will try to recover as gracefully as possible and keep going.
我们认为游戏无论如何都不会崩溃。如果发生意外情况,Godot将打印错误(甚至可以追溯到脚本),但是它将尝试尽可能优雅地恢复并继续运行。 Additionally, exceptions significantly increase binary size for the executable.
此外,异常会大大增加可执行文件的二进制大小。
Why does Godot not enforce RTTI?为什么Godot不执行RTTI?Godot provides its own type-casting system, which can optionally use RTTI internally. Disabling RTTI in Godot means considerably smaller binary sizes can be achieved, at a little performance cost.
Godot提供了自己的类型转换系统,可以选择在内部使用RTTI。在Godot中禁用RTTI意味着可以以较小的性能成本实现更小的二进制大小。
Why does Godot not force users to implement DoD (Data oriented Design)?
为什么Godot不强迫用户实施DoD(面向数据的设计)While Godot internally for a lot of the heavy performance tasks attempts to use cache coherency as well as possible, we believe most users don't really need to be forced to use DoD practices.
虽然Godot在内部执行许多繁重的性能任务时会尽可能尝试使用缓存一致性,但我们认为实际上并不需要强迫大多数用户使用DoD做法。 DoD is mostly a cache coherency optimization that can only gain you significant performance improvements when dealing with dozens of thousands of objects (which are processed every frame with little modification). As in, if you are moving a few hundred sprites or enemies per frame, DoD won't help you, and you should consider a different approach to optimization.
DoD主要是缓存一致性优化,在处理成千上万个对象(几乎不做任何修改就可以处理每个帧)时,只能获得显着的性能改进。例如,如果您每帧移动几百个精灵或敌人,DoD将无济于事,您应该考虑使用其他优化方法。 The vast majority of games do not need this and Godot provides handy helpers to do the job for most cases when you do.
绝大多数游戏都不需要这样做,而Godot在大多数情况下都会为您提供方便的助手来完成这项工作。 If a game that really needs to process such large amount of objects is needed, our recommendation is to use C++ and GDNative for the high performance parts and GDScript (or C#) for the rest of the game.
如果确实需要处理大量对象的游戏,我们的建议是对高性能部件使用C ++和GDNative,对于其余部分使用GDScript(或C#)。
How can I support Godot development or contribute?
我如何支持Godot的发展或做出贡献?See Ways to contribute.
Who is working on Godot? How can I contact you?
谁在研究Godot?我该如何联系您?See the corresponding page on the Godot website.
|