faq.rst 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426
  1. .. meta::
  2. :keywords: FAQ
  3. .. _doc_faq:
  4. Frequently asked questions
  5. ==========================
  6. What can I do with Godot? How much does it cost? What are the license terms?
  7. ----------------------------------------------------------------------------
  8. Godot is `Free and Open-Source Software <https://en.wikipedia.org/wiki/Free_and_open-source_software>`_ available under the `OSI-approved <https://opensource.org/licenses/MIT>`_ MIT license. This means it is free as in "free speech" as well as in "free beer."
  9. In short:
  10. * You are free to download and use Godot for any purpose, personal, non-profit, commercial, or otherwise.
  11. * You are free to modify, distribute, redistribute, and remix Godot to your heart's content, for any reason, both non-commercially and commercially.
  12. All the contents of this accompanying documentation are published under
  13. the permissive Creative Commons Attribution 3.0 (`CC-BY 3.0 <https://creativecommons.org/licenses/by/3.0/>`_) license, with attribution
  14. to "Juan Linietsky, Ariel Manzur and the Godot Engine community."
  15. Logos and icons are generally under the same Creative Commons license. Note
  16. that some third-party libraries included with Godot's source code may have
  17. different licenses.
  18. For full details, look at the `COPYRIGHT.txt <https://github.com/godotengine/godot/blob/master/COPYRIGHT.txt>`_ as well
  19. as the `LICENSE.txt <https://github.com/godotengine/godot/blob/master/LICENSE.txt>`_ and `LOGO_LICENSE.txt <https://github.com/godotengine/godot/blob/master/LOGO_LICENSE.md>`_ files
  20. in the Godot repository.
  21. Also, see `the license page on the Godot website <https://godotengine.org/license>`_.
  22. Which platforms are supported by Godot?
  23. ---------------------------------------
  24. **For the editor:**
  25. * Windows
  26. * macOS
  27. * X11 (Linux, \*BSD)
  28. **For exporting your games:**
  29. * Windows (and UWP)
  30. * macOS
  31. * X11 (Linux, \*BSD)
  32. * Android
  33. * iOS
  34. * Web
  35. Both 32- and 64-bit binaries are supported where it makes sense, with 64
  36. being the default.
  37. Some users also report building and using Godot successfully on ARM-based
  38. systems with Linux, like the Raspberry Pi.
  39. Additionally, there is some unofficial third-party work being done on building
  40. for some consoles. However, none of this is included in the default build
  41. scripts or export templates at this time.
  42. For more on this, see the sections on :ref:`exporting <toc-learn-workflow-export>`
  43. and :ref:`compiling Godot yourself <toc-devel-compiling>`.
  44. Which programming languages are supported in Godot?
  45. ---------------------------------------------------
  46. The officially supported languages for Godot are GDScript, Visual Scripting,
  47. C#, and C++. See the subcategories for each language in the
  48. :ref:`scripting <toc-learn-scripting>` section.
  49. If you are just starting out with either Godot or game development in general,
  50. GDScript is the recommended language to learn and use since it is native to Godot.
  51. While scripting languages tend to be less performant than lower-level languages in
  52. the long run, for prototyping, developing Minimum Viable Products (MVPs), and
  53. focusing on Time-To-Market (TTM), GDScript will provide a fast, friendly, and capable
  54. way of developing your games.
  55. Note that C# support is still relatively new, and as such, you may encounter some
  56. issues along the way. Our friendly and hard-working development community is always
  57. ready to tackle new problems as they arise, but since this is an open-source project,
  58. we recommend that you first do some due diligence yourself. Searching through
  59. discussions on `open issues <https://github.com/godotengine/godot/issues>`_ is a
  60. great way to start your troubleshooting.
  61. As for new languages, support is possible via third parties using the GDNative /
  62. NativeScript / PluginScript facilities. (See the question about plugins below.)
  63. Work is currently underway, for example, on unofficial bindings for Godot
  64. to `Python <https://github.com/touilleMan/godot-python>`_ and `Nim <https://github.com/pragmagic/godot-nim>`_.
  65. .. _doc_faq_what_is_gdscript:
  66. What is GDScript and why should I use it?
  67. -----------------------------------------
  68. GDScript is Godot's integrated scripting language. It was built from the ground
  69. up to maximize Godot's potential in the least amount of code, affording both novice
  70. and expert developers alike to capitalize on Godot's strengths as fast as possible.
  71. If you've ever written anything in a language like Python before then you'll feel
  72. right at home. For examples, history, and a complete overview of the power GDScript
  73. offers you, check out the :ref:`GDScript scripting guide <doc_gdscript>`.
  74. There are several reasons to use GDScript--especially when you are prototyping, in
  75. alpha/beta stages of your project, or are not creating the next AAA title--but the
  76. most salient reason is the overall **reduction of complexity.**
  77. The original intent of creating a tightly integrated, custom scripting language for
  78. Godot was two-fold: first, it reduces the amount of time necessary to get up and running
  79. with Godot, giving developers a rapid way of exposing themselves to the engine with a
  80. focus on productivity; second, it reduces the overall burden of maintenance, attenuates
  81. the dimensionality of issues, and allows the developers of the engine to focus on squashing
  82. bugs and improving features related to the engine core--rather than spending a lot of time
  83. trying to get a small set of incremental features working across a large set of languages.
  84. Since Godot is an open-source project, it was imperative from the start to prioritize a
  85. more integrated and seamless experience over attracting additional users by supporting
  86. more familiar programming languages--especially when supporting those more familiar
  87. languages would result in a worse experience. We understand if you would rather use
  88. another language in Godot (see the list of supported options above). That being said, if
  89. you haven't given GDScript a try, try it for **three days**. Just like Godot,
  90. once you see how powerful it is and rapid your development becomes, we think GDScript
  91. will grow on you.
  92. More information about getting comfortable with GDScript or dynamically typed
  93. languages can be found in the :ref:`doc_gdscript_more_efficiently` tutorial.
  94. What were the motivations behind creating GDScript?
  95. ---------------------------------------------------
  96. In the early days, the engine used the `Lua <https://www.lua.org>`__
  97. scripting language. Lua is fast, but creating bindings to an object
  98. oriented system (by using fallbacks) was complex and slow and took an
  99. enormous amount of code. After some experiments with
  100. `Python <https://www.python.org>`__, it also proved difficult to embed.
  101. The main reasons for creating a custom scripting language for Godot were:
  102. 1. Poor threading support in most script VMs, and Godot uses threads
  103. (Lua, Python, Squirrel, JavaScript, ActionScript, etc.).
  104. 2. Poor class-extending support in most script VMs, and adapting to
  105. the way Godot works is highly inefficient (Lua, Python, JavaScript).
  106. 3. Many existing languages have horrible interfaces for binding to C++, resulting in large amount of
  107. code, bugs, bottlenecks, and general inefficiency (Lua, Python,
  108. Squirrel, JavaScript, etc.) We wanted to focus on a great engine, not a great amount of integrations.
  109. 4. No native vector types (vector3, matrix4, etc.), resulting in highly
  110. reduced performance when using custom types (Lua, Python, Squirrel,
  111. JavaScript, ActionScript, etc.).
  112. 5. Garbage collector results in stalls or unnecessarily large memory
  113. usage (Lua, Python, JavaScript, ActionScript, etc.).
  114. 6. Difficulty to integrate with the code editor for providing code
  115. completion, live editing, etc. (all of them). This is well-supported
  116. by GDScript.
  117. GDScript was designed to curtail the issues above, and more.
  118. What type of 3D model formats does Godot support?
  119. -------------------------------------------------
  120. Godot supports Collada via the `OpenCollada <https://github.com/KhronosGroup/OpenCOLLADA/wiki/OpenCOLLADA-Tools>`_ exporter (Maya, 3DSMax).
  121. If you are using Blender, take a look at our own `Better Collada Exporter <https://godotengine.org/download>`_.
  122. As of Godot 3.0, glTF is supported.
  123. FBX is supported via the Open Asset Import library. However, FBX is proprietary
  124. so we recommend using other formats listed above, if suitable for your workflow.
  125. Will [insert closed SDK such as FMOD, GameWorks, etc.] be supported in Godot?
  126. -----------------------------------------------------------------------------
  127. The aim of Godot is to create a free and open-source MIT-licensed engine that
  128. is modular and extendable. There are no plans for the core engine development
  129. community to support any third-party, closed-source/proprietary SDKs, as integrating
  130. with these would go against Godot's ethos.
  131. That said, because Godot is open-source and modular, nothing prevents you or
  132. anyone else interested in adding those libraries as a module and shipping your
  133. game with them--as either open- or closed-source.
  134. To see how support for your SDK of choice could still be provided, look at the
  135. Plugins question below.
  136. If you know of a third-party SDK that is not supported by Godot but that offers
  137. free and open-source integration, consider starting the integration work yourself.
  138. Godot is not owned by one person; it belongs to the community, and it grows along
  139. with ambitious community contributors like you.
  140. Why does Godot use Vulkan or OpenGL instead of Direct3D?
  141. --------------------------------------------------------
  142. Godot aims for cross-platform compatibility and open standards first and
  143. foremost. OpenGL and Vulkan are the technologies that are both open and
  144. available (nearly) on all platforms. Thanks to this design decision, a project
  145. developed with Godot on Windows will run out of the box on Linux, macOS, and
  146. more.
  147. Since Godot only has a few people working on its renderer, we would prefer
  148. having fewer rendering backends to maintain. On top of that, using a single API
  149. on all platforms allows for greater consistency with fewer platform-specific
  150. issues.
  151. In the long term, we may develop a Direct3D 12 renderer for Godot (mainly for
  152. the Xbox's purposes), but Vulkan and OpenGL will remain the default rendering
  153. backends on all platforms, including Windows.
  154. Why does Godot aim to keep its core feature set small?
  155. ------------------------------------------------------
  156. Godot intentionally does not include features that can be implemented by add-ons
  157. unless they are used very often. One example of this would be advanced
  158. artificial intelligence functionality.
  159. There are several reasons for this:
  160. - **Code maintenance and surface for bugs.** Every time we accept new code in
  161. the Godot repository, existing contributors often take the reponsibility of
  162. maintaining it. Some contributors don't always stick around after getting
  163. their code merged, which can make it difficult for us to maintain the code in
  164. question. This can lead to poorly maintained features with bugs that are never
  165. fixed. On top of that, the "API surface" that needs to be tested and checked
  166. for regressions keeps increasing over time.
  167. - **Ease of contribution.** By keeping the codebase small and tidy, it can remain
  168. fast and easy to compile from source. This makes it easier for new
  169. contributors to get started with Godot, without requiring them to purchase
  170. high-end hardware.
  171. - **Keeping the binary size small for the editor.** Not everyone has a fast Internet
  172. connection. Ensuring that everyone can download the Godot editor, extract it
  173. and run it in less than 5 minutes makes Godot more accessible to developers in
  174. all countries.
  175. - **Keeping the binary size small for export templates.** This directly impacts the
  176. size of projects exported with Godot. On mobile and web platforms, keeping
  177. file sizes low is primordial to ensure fast installation and loading on
  178. underpowered devices. Again, there are many countries where high-speed
  179. Internet is not readily available. To add to this, strict data usage caps are
  180. often in effect in those countries.
  181. For all the reasons above, we have to be selective of what we can accept as core
  182. functionality in Godot. This is why we are aiming to move some core
  183. functionality to officially supported add-ons in future versions of Godot. In
  184. terms of binary size, this also has the advance of making you pay only for what
  185. you actually use in your project. (In the meantime, you can
  186. :ref:`compile custom export templates with unused features disabled <doc_optimizing_for_size>`
  187. to optimize the distribution size of your project.)
  188. How should assets be created to handle multiple resolutions and aspect ratios?
  189. ------------------------------------------------------------------------------
  190. This question pops up often and it's probably thanks to the misunderstanding
  191. created by Apple when they originally doubled the resolution of their devices.
  192. It made people think that having the same assets in different resolutions was a
  193. good idea, so many continued towards that path. That originally worked to a
  194. point and only for Apple devices, but then several Android and Apple devices
  195. with different resolutions and aspect ratios were created, with a very wide
  196. range of sizes and DPIs.
  197. The most common and proper way to achieve this is to, instead, use a single
  198. base resolution for the game and only handle different screen aspect ratios.
  199. This is mostly needed for 2D, as in 3D it's just a matter of Camera XFov or YFov.
  200. 1. Choose a single base resolution for your game. Even if there are
  201. devices that go up to 2K and devices that go down to 400p, regular
  202. hardware scaling in your device will take care of this at little or
  203. no performance cost. Most common choices are either near 1080p
  204. (1920x1080) or 720p (1280x720). Keep in mind the higher the
  205. resolution, the larger your assets, the more memory they will take
  206. and the longer the time it will take for loading.
  207. 2. Use the stretch options in Godot; 2D stretching while keeping aspect
  208. ratios works best. Check the :ref:`doc_multiple_resolutions` tutorial
  209. on how to achieve this.
  210. 3. Determine a minimum resolution and then decide if you want your game
  211. to stretch vertically or horizontally for different aspect ratios, or
  212. if there is one aspect ratio and you want black bars to appear
  213. instead. This is also explained in :ref:`doc_multiple_resolutions`.
  214. 4. For user interfaces, use the :ref:`anchoring <doc_size_and_anchors>`
  215. to determine where controls should stay and move. If UIs are more
  216. complex, consider learning about Containers.
  217. And that's it! Your game should work in multiple resolutions.
  218. If there is a desire to make your game also work on ancient
  219. devices with tiny screens (fewer than 300 pixels in width), you can use
  220. the export option to shrink images, and set that build to be used for
  221. certain screen sizes in the App Store or Google Play.
  222. How can I extend Godot?
  223. -----------------------
  224. For extending Godot, like creating Godot Editor plugins or adding support
  225. for additional languages, take a look at :ref:`EditorPlugins <doc_making_plugins>`
  226. and tool scripts.
  227. Also, see the official blog posts on these topics:
  228. * `A look at the GDNative architecture <https://godotengine.org/article/look-gdnative-architecture>`_
  229. * `GDNative is here! <https://godotengine.org/article/dlscript-here>`_
  230. You can also take a look at the GDScript implementation, the Godot modules,
  231. as well as the `unofficial Python support <https://github.com/touilleMan/godot-python>`_ for Godot.
  232. This would be a good starting point to see how another third-party library
  233. integrates with Godot.
  234. I would like to contribute! How can I get started?
  235. --------------------------------------------------
  236. Awesome! As an open-source project, Godot thrives off of the innovation and
  237. ambition of developers like you.
  238. The first place to get started is in the `issues <https://github.com/godotengine/godot/issues>`_.
  239. Find an issue that resonates with you, then proceed to the `How to Contribute <https://github.com/godotengine/godot/blob/master/CONTRIBUTING.md#contributing-pull-requests>`_
  240. guide to learn how to fork, modify, and submit a Pull Request (PR) with your changes.
  241. I have a great idea for Godot. How can I share it?
  242. --------------------------------------------------
  243. It might be tempting to want to bring ideas to Godot, like ones that
  244. result in massive core changes, some sort of mimicry of what another
  245. game engine does, or alternative workflows that you'd like built into
  246. the editor. These are great, and we are thankful to have such motivated
  247. people want to contribute, but Godot's focus is and always will be the
  248. core functionality as outlined in the `Roadmap <https://github.com/godotengine/godot-roadmap/blob/master/ROADMAP.md>`_,
  249. `squashing bugs and addressing issues <https://github.com/godotengine/godot/issues>`_,
  250. and conversations between Godot community members.
  251. Most developers in the Godot community will be more interested to learn
  252. about things like:
  253. - Your experience using the software and the problems you have (we
  254. care about this much more than ideas on how to improve it).
  255. - The features you would like to see implemented because you need them
  256. for your project.
  257. - The concepts that were difficult to understand while learning the software.
  258. - The parts of your workflow you would like to see optimized.
  259. - Parts where you missed clear tutorials or where the documentation wasn't clear.
  260. Please don't feel like your ideas for Godot are unwelcome. Instead,
  261. try to reformulate them as a problem first, so developers and the community
  262. have a functional foundation to ground your ideas on.
  263. A good way to approach sharing your ideas and problems with the community
  264. is as a set of user stories. Explain what you are trying to do, what behavior
  265. you expect to happen, and then what behavior actually happened. Framing problems
  266. and ideas this way will help the whole community stay focused on improving
  267. developer experiences as a whole.
  268. Bonus points for bringing screenshots, concrete numbers, test cases, or example
  269. projects (if applicable).
  270. Is it possible to use Godot as a library?
  271. -----------------------------------------
  272. Godot is meant to be used with its editor. We recommend you give it a try, as it
  273. will most likely save you time in the long term. There are no plans to make
  274. Godot usable as a library, as it would make the rest of the engine more
  275. convoluted and difficult to use for casual users.
  276. If you want to use a rendering library, look into using an established rendering
  277. engine instead. Keep in mind rendering engines usually have smaller communities
  278. compared to Godot. This will make it more difficult to find answers to your
  279. questions.
  280. Why does Godot not use STL (Standard Template Library)
  281. ------------------------------------------------------
  282. Like many other libraries (Qt as an example), Godot does not make use of
  283. STL. We believe STL is a great general purpose library, but we had special
  284. requirements for Godot.
  285. * STL templates create very large symbols, which results in huge debug binaries. We use few templates with very short names instead.
  286. * 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.
  287. * Our containers have memory tracking built-in, which helps better track memory usage.
  288. * For large arrays, we use pooled memory, which can be mapped to either a preallocated buffer or virtual memory.
  289. * We use our custom String type, as the one provided by STL is too basic and lacks proper internationalization support.
  290. Why does Godot not use exceptions?
  291. ----------------------------------
  292. We believe games should not crash, no matter what. If an unexpected
  293. situation happens, Godot will print an error (which can be traced even to
  294. script), but then it will try to recover as gracefully as possible and keep
  295. going.
  296. Additionally, exceptions significantly increase binary size for the
  297. executable.
  298. Why does Godot not enforce RTTI?
  299. --------------------------------
  300. Godot provides its own type-casting system, which can optionally use RTTI
  301. internally. Disabling RTTI in Godot means considerably smaller binary sizes can
  302. be achieved, at a little performance cost.
  303. Why does Godot not force users to implement DoD (Data oriented Design)?
  304. -----------------------------------------------------------------------
  305. While Godot internally for a lot of the heavy performance tasks attempts
  306. to use cache coherency as well as possible, we believe most users don't
  307. really need to be forced to use DoD practices.
  308. DoD is mostly a cache coherency optimization that can only gain you
  309. significant performance improvements when dealing with dozens of
  310. thousands of objects (which are processed every frame with little
  311. modification). As in, if you are moving a few hundred sprites or enemies
  312. per frame, DoD won't help you, and you should consider a different approach
  313. to optimization.
  314. The vast majority of games do not need this and Godot provides handy helpers
  315. to do the job for most cases when you do.
  316. If a game that really needs to process such large amount of objects is
  317. needed, our recommendation is to use C++ and GDNative for the high
  318. performance parts and GDScript (or C#) for the rest of the game.
  319. How can I support Godot development or contribute?
  320. --------------------------------------------------
  321. See :ref:`doc_ways_to_contribute`.
  322. Who is working on Godot? How can I contact you?
  323. -----------------------------------------------
  324. See the corresponding page on the `Godot website <https://godotengine.org/contact>`_.