faq.rst 8.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193
  1. .. _doc_faq:
  2. Frequently asked questions
  3. ==========================
  4. GDScript? Why your own scripting language? Why not Lua, Javascript, C#, etc.?
  5. -----------------------------------------------------------------------------
  6. The short answer is, we'd rather a programmer does the small effort to
  7. learn GDScript so he or she later has a seamless experience, than
  8. attracting him or her with a familiar programming language that results
  9. in a worse experience. We are OK if you would rather not give Godot a
  10. chance because of this, but we strongly encourage you to try it and see
  11. the benefits yourself.
  12. The official languages for Godot are GDScript and C++.
  13. GDScript is designed to integrate from the ground to the way Godot
  14. works, more than any other language, and is very simple and easy to
  15. learn. Takes at most a day or two to get comfortable and it's very easy
  16. to see the benefits once you do. Please do the effort to learn
  17. GDScript, you will not regret it.
  18. Godot C++ API is also efficient and easy to use (the entire Godot
  19. editor is made with this API), and an excellent tool to optimize parts
  20. of a project, but trying to use it instead of GDScript for an entire
  21. game is, in most cases, a waste of time.
  22. Yes, for more than a decade we tried in the past integrating several
  23. VMs (and even shipped games using them), such as Python, Squirrel and
  24. Lua (in fact we authored tolua++ in the past, one of the most popular
  25. C++ binders). None of them worked as well as GDScript does now.
  26. More information about getting comfortable with GDScript or dynamically
  27. typed languages can be found in the :ref:`doc_gdscript_more_efficiently`
  28. tutorial.
  29. For the more technically versed, proceed to the next item.
  30. I don't believe you. What are the technical reasons for the item above?
  31. -----------------------------------------------------------------------
  32. The main reasons are:
  33. 1. No good thread support in most script VMs, and Godot uses threads
  34. (Lua, Python, Squirrel, JS, AS, etc.)
  35. 2. No good class extending support in most script VMs, and adapting to
  36. the way Godot works is highly inefficient (Lua, Python, JS)
  37. 3. Horrible interface for binding to C++, results in large amount of
  38. code, bugs, bottlenecks and general inefficiency (Lua, Python,
  39. Squirrel, JS, etc.)
  40. 4. No native vector types (vector3,matrix4,etc.), resulting in highly
  41. reduced performance when using custom types (Lua, Python, Squirrel,
  42. JS, AS, etc.)
  43. 5. Garbage collector results in stalls or unnecessarily large memory
  44. usage (Lua, Python, JS, AS, etc.)
  45. 6. Difficulty to integrate with the code editor for providing code
  46. completion, live editing, etc. (all of them). This is very well
  47. supported by GDScript.
  48. GDScript was designed to solve the issues above, and performs very well
  49. in all the above scenarios. Please learn GDScript, and enjoy from a
  50. very smooth integration of scripting with the game engine (yes, it's a
  51. rare but very enjoyable situation when things just work). It's worth
  52. it, give it a try!
  53. Why is FBX not supported for import?
  54. ------------------------------------
  55. FBX SDK has a very `restrictive license <http://www.blender.org/bf/Autodesk_FBX_License.rtf>`_,
  56. that is incompatible with the `open license <http://opensource.org/licenses/MIT>`_
  57. provided by Godot.
  58. That said, Godot's Collada support is really good, please use the
  59. `OpenCollada <https://github.com/KhronosGroup/OpenCOLLADA/wiki/OpenCOLLADA-Tools>`_
  60. exporter for maximum compatibility if you are using Maya or 3DS Max.
  61. If you are use Blender, take a look at our own
  62. `Better Collada Exporter <https://godotengine.org/download>`_.
  63. Will [Insert closed SDK such as PhysX, GameWorks, etc.] be supported in Godot?
  64. ------------------------------------------------------------------------------
  65. No, the aim of Godot is to create a complete open source engine
  66. licensed under MIT, so you have complete control about over single
  67. piece of it. Open versions of functionality or features from such SDKs
  68. may be eventually added though.
  69. That said, because it is open source, and modular, nothing prevents you
  70. or anyone else interested into adding those libraries as a module and
  71. ship your game using them, as either open or closed source. Everything
  72. is allowed.
  73. How should assets be created to handle multiple resolutions and aspect ratios?
  74. ------------------------------------------------------------------------------
  75. This question pops up often and it's probably thanks to the
  76. misunderstanding created by Apple when they originally doubled the
  77. resolution of their devices. It made people think that having the same
  78. assets in different resolutions was a good idea, so many continued
  79. towards that path. That originally worked to a point and only for
  80. Apple devices, but then several Android and Apple devices with
  81. different resolutions and aspect ratios were created, with a very
  82. wide range of sizes an DPIs.
  83. The most common and proper way to this is to, instead, is to use a
  84. single base resolution for the game and only handle different screen
  85. aspects. This is mostly needed for 2D, as in 3D it's just a matter of
  86. Cameara XFov or YFov.
  87. 1. Choose a single base resolution for your game. Even if there are
  88. devices that go up to 2K and devices that go down to 400p, regular
  89. hardware scaling in your device will take care of this at little or
  90. no performance cost. Most common choices are either near 1080p
  91. (1920x1080) or 720p (1280x720). Keep in mind the higher the
  92. resolution, the larger your assets, the more memory they will take
  93. and the longer the time it will take for loading.
  94. 2. Use the stretch options in Godot, 2D stretching with keeping aspect
  95. works best. Check the :ref:`doc_multiple_resolutions` tutorial
  96. on how to achieve this.
  97. 3. Determine a minimum resolution and then decide if you want your game
  98. to stretch vertically or horizontally for different aspect ratios, or
  99. whether there is a minimum one and you want black bars to appear
  100. instead. This is also explained in the previous step.
  101. 4. For user interfaces, use the :ref:`anchoring <doc_size_and_anchors>`
  102. to determine where controls should stay and move. If UIs are more
  103. complex, consider learning about Containers.
  104. And that's it! Your game should work in multiple resolutions.
  105. If there really is a desire to make your game also work on ancient
  106. devices with tiny screens (less than 300 pixels in width), you can use
  107. the :ref:`export option <doc_exporting_images>` to shrink
  108. images, and set that build to be used for certain screen sizes in the
  109. App Store or Google Play.
  110. I have a great idea that will make Godot better, What do you think?
  111. -------------------------------------------------------------------
  112. Your idea will most certainly be ignored. Examples of stuff that is
  113. ignored by the developers:
  114. - Let's do this because it will make Godot better
  115. - Let's do this in Godot because another game engine does it
  116. - Let's remove this because I think it's not needed
  117. - Let's remove clutter and bloat and make Godot look nicer
  118. - Let's add an alternative workflow for people who prefer it
  119. Developers are always willing to talk to you and listen to your feedback
  120. very openly, to an extent rarely seen in open source projects, but they
  121. will care mostly about real issues you have while using Godot, not ideas
  122. solely based on personal belief. Developers are interested in (for
  123. example):
  124. - Your experience using the software and the problems you have, (we
  125. care about this much more than ideas on how to improve it)
  126. - The features you would like to see implemented because you need them
  127. for your project.
  128. - The concepts that were difficult to understand in order to learn the
  129. software.
  130. - The parts of your workflow you would like to see optimized.
  131. Once one of the above points is stated, we can work together on a
  132. solution and this is where your ideas and suggestions are most valuable
  133. and welcome, they need to be in context of a real issue.
  134. As such, please don't feel that your ideas for Godot are unwelcome.
  135. Instead, try to reformulate them as a problem first, so developers and
  136. the community have a base ground to discuss first.
  137. Examples of how NOT to state problems generally are like this:
  138. - Certain feature is ugly
  139. - Certain workflow is slow
  140. - Certain feature needs optimization
  141. - Certain aspect of the UI looks cluttered
  142. Associating something with an adjective will not get you much attention
  143. and developers will most likely not understand you. Instead, try to
  144. reformulate your problem as a story such as:
  145. - I try to move objects around but always end up picking the wrong one
  146. - I tried to make a game like Battlefield but I'm not managing to
  147. understand how to get lighting to look the same.
  148. - I always forget which script I was editing, and it takes me too many
  149. steps to go back to it.
  150. This will allow you to convey what you are thinking much better and set
  151. a common ground for discussion. Please try your best to state your
  152. problems as stories to the developers and the community, before
  153. discussing any idea.