Explorar o código

Write key_concepts_overview.rst

Closes #4168
Nathan Lovato %!s(int64=4) %!d(string=hai) anos
pai
achega
587667d99b

BIN=BIN
getting_started/introduction/img/key_concepts_character_nodes.png


BIN=BIN
getting_started/introduction/img/key_concepts_main_menu.png


BIN=BIN
getting_started/introduction/img/key_concepts_node_menu.png


BIN=BIN
getting_started/introduction/img/key_concepts_scene_example.png


BIN=BIN
getting_started/introduction/img/key_concepts_scene_tree.png


BIN=BIN
getting_started/introduction/img/key_concepts_signals.png


+ 5 - 0
getting_started/introduction/index.rst

@@ -1,3 +1,7 @@
+.. Intention: provide the necessary information to make the most of the getting
+   started series, answering questions like "do I want to learn Godot?", "how
+   does it look and feel?", "how does it work?", and "how do I best learn it?".
+
 Introduction
 Introduction
 ============
 ============
 
 
@@ -14,4 +18,5 @@ make the most of your time learning it.
    :name: toc-learn-introduction
    :name: toc-learn-introduction
 
 
    introduction_to_godot
    introduction_to_godot
+   key_concepts_overview
    learning_new_features
    learning_new_features

+ 99 - 0
getting_started/introduction/key_concepts_overview.rst

@@ -0,0 +1,99 @@
+.. Intention: only to introduce only a handful of key concepts and avoid a big
+   cognitive load. Readers will then be reminded of the concepts further in the
+   getting started series, reinforcing their learning.
+
+.. _doc_key_concepts_overview:
+
+Overview of Godot's key concepts
+================================
+
+Every game engine revolves around abstractions you use to build your
+applications. In Godot, a game is a **tree** of **nodes** that you group
+together into **scenes**. You can then wire these nodes so they can communicate
+using **signals**.
+
+These are the four concepts you will learn here. We're going to look at them
+briefly to give you a sense of how the engine works. In the getting started
+series, you will get to use them in practice.
+
+Scenes
+------
+
+In Godot, you break down your game in reusable scenes. A scene like a character,
+a weapon, a menu in the user interface, a single house, an entire level, or
+anything you can think of. Godot's scenes are flexible; they fill the role of
+both prefabs and scenes in some other game engines.
+
+.. image:: img/key_concepts_main_menu.png
+
+You can also nest scenes. For example, you can put your character in a level,
+and drag and drop a scene as a child of it.
+
+.. image:: img/key_concepts_scene_example.png
+
+Nodes
+-----
+
+A scene is composed of one or more **nodes**. Nodes are your game's smallest
+building block that you arrange into trees. Here's an example of a character's
+nodes.
+
+.. image:: img/key_concepts_character_nodes.png
+
+It is made of a ``KinematicBody2D`` node named "Character", a ``Sprite2D``, a
+``Camera2D``, and a ``CollisionShape2D``.
+
+.. note:: The node names end with "2D" because this is a 2D scene. Their 3D
+          counterpart have names that end with "3D".
+
+Notice how nodes and scenes look the same in the editor. When you save a tree of
+nodes as a scene, it then acts as a single node, hiding its internal structure.
+
+Godot provides an extensive library of base node types you can combine and
+extend to build more powerful ones. 2D, 3D, or user interface, you will do most
+things with these nodes.
+
+.. image:: img/key_concepts_node_menu.png
+
+The scene tree
+--------------
+
+All your game's scenes come together in the **scene tree**, literally a tree of
+scenes. And as scenes are trees of nodes, the scene tree also is a tree of
+nodes. But it's easier to think of your game in terms of scenes as they can
+represent characters, weapons, doors, or your user interface.
+
+.. image:: img/key_concepts_scene_tree.png
+
+Signals
+-------
+
+Nodes emit signals when some event occurred. This feature allows you to make
+nodes communicate without hard-wiring them in code. It gives you a lot of
+flexibility in how you structure your scenes.
+
+.. image:: img/key_concepts_signals.png
+
+.. note:: Signals are Godot's version of the *observer* pattern. You can read
+          more about the observer pattern here:
+          https://gameprogrammingpatterns.com/observer.html
+
+For example, buttons emit a signal when pressed. You can connect to this signal
+to run code in reaction to this event, like starting the game or opening a menu.
+
+Other built-in signals can tell you when two objects collided, when a character
+or monster entered a given area, and much more. You can also define new signals
+tailored to your game.
+
+Summary
+-------
+
+Nodes, scenes, the scene tree, and signals are four core concepts in Godot that
+you will manipulate all the time.
+
+Nodes are your game's smallest building block. You combine them to create scenes
+that you then combine and nest into the scene tree. You can then use signals to
+make nodes react to events in other nodes or different scene tree branches.
+
+After this short breakdown, you probably have many questions. Bear with us as
+you will get many answers throughout the getting started series.

+ 4 - 0
getting_started/introduction/learning_new_features.rst

@@ -1,3 +1,7 @@
+.. Keep this page short and sweet! We want users to read it to the end, so they
+   know where to find information, how to get help, and how to maximize chances
+   of getting answers.
+
 .. _doc_learning_new_features:
 .. _doc_learning_new_features:
 
 
 Learning new features
 Learning new features