Forráskód Böngészése

Move the GDScript history to the FAQ, reference it in GDScript basics

Hugo Locurcio 5 éve
szülő
commit
62725b30f1
2 módosított fájl, 20 hozzáadás és 36 törlés
  1. 15 7
      about/faq.rst
  2. 5 29
      getting_started/scripting/gdscript/gdscript_basics.rst

+ 15 - 7
about/faq.rst

@@ -87,6 +87,8 @@ NativeScript / PluginScript facilities. (See the question about plugins below.)
 Work is currently underway, for example, on unofficial bindings for Godot
 to `Python <https://github.com/touilleMan/godot-python>`_ and `Nim <https://github.com/pragmagic/godot-nim>`_.
 
+.. _doc_faq_what_is_gdscript:
+
 What is GDScript and why should I use it?
 -----------------------------------------
 
@@ -124,25 +126,31 @@ languages can be found in the :ref:`doc_gdscript_more_efficiently` tutorial.
 What were the motivations behind creating GDScript?
 ---------------------------------------------------
 
+In the early days, the engine used the `Lua <https://www.lua.org>`__
+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 <https://www.python.org>`__, it also proved difficult to embed.
+
 The main reasons for creating a custom scripting language for Godot were:
 
-1. Poor thread support in most script VMs, and Godot uses threads
-   (Lua, Python, Squirrel, JS, AS, etc.).
+1. Poor threading support in most script VMs, and Godot uses threads
+   (Lua, Python, Squirrel, JavaScript, ActionScript, etc.).
 2. Poor class-extending support in most script VMs, and adapting to
-   the way Godot works is highly inefficient (Lua, Python, JS).
+   the way Godot works is highly inefficient (Lua, Python, JavaScript).
 3. Many existing languages have horrible interfaces for binding to C++, resulting in large amount of
    code, bugs, bottlenecks, and general inefficiency (Lua, Python,
-   Squirrel, JS, etc.) We wanted to focus on a great engine, not a great amount of integrations.
+   Squirrel, JavaScript, etc.) We wanted to focus on a great engine, not a great amount of integrations.
 4. No native vector types (vector3, matrix4, etc.), resulting in highly
    reduced performance when using custom types (Lua, Python, Squirrel,
-   JS, AS, etc.).
+   JavaScript, ActionScript, etc.).
 5. Garbage collector results in stalls or unnecessarily large memory
-   usage (Lua, Python, JS, AS, etc.).
+   usage (Lua, Python, JavaScript, ActionScript, etc.).
 6. Difficulty to integrate with the code editor for providing code
    completion, live editing, etc. (all of them). This is well
    supported by GDScript.
 
-GDScript was designed to curtail the issues above and more.
+GDScript was designed to curtail the issues above, and more.
 
 What type of 3D model formats does Godot support?
 -------------------------------------------------

+ 5 - 29
getting_started/scripting/gdscript/gdscript_basics.rst

@@ -16,34 +16,10 @@ flexibility for content creation and integration.
 History
 ~~~~~~~
 
-In the early days, the engine used the `Lua <https://www.lua.org>`__
-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 <https://www.python.org>`__, it also proved difficult to embed.
-
-The last third party scripting language that was used for shipped games
-was `Squirrel <http://squirrel-lang.org>`__, but it was dropped as well.
-At that point, it became evident that a custom scripting language could
-more optimally make use of Godot's particular architecture:
-
--  Godot embeds scripts in nodes. Most languages are not designed with
-   this in mind.
--  Godot uses several built-in data types for 2D and 3D math. Script
-   languages do not provide this, and binding them is inefficient.
--  Godot uses threads heavily for lifting and initializing data from the
-   net or disk. Script interpreters for common languages are not
-   friendly to this.
--  Godot already has a memory management model for resources, most
-   script languages provide their own, which results in duplicate
-   effort and bugs.
--  Binding code is always messy and results in several failure points,
-   unexpected bugs and generally low maintainability.
-
-The result of these considerations is *GDScript*. The language and
-interpreter for GDScript ended up being smaller than the binding code itself
-for Lua and Squirrel, while having equal functionality. With time, having a
-built-in language has proven to be a huge advantage.
+.. note::
+
+    Documentation about GDScript's history has been moved to the
+    :ref:`Frequently Asked Questions <doc_faq_what_is_gdscript>`.
 
 Example of GDScript
 ~~~~~~~~~~~~~~~~~~~
@@ -1436,7 +1412,7 @@ Our ``BattleLog`` node receives each element in the binds array as an extra argu
     func _on_Character_health_changed(old_value, new_value, character_name):
         if not new_value <= old_value:
             return
-            
+
         var damage = old_value - new_value
         label.text += character_name + " took " + str(damage) + " damage."