From 2eae4a39619c6b4fef59e8bacb217cd905e68a5b Mon Sep 17 00:00:00 2001 From: Andrew Conrad Date: Sun, 28 Feb 2016 10:45:40 -0600 Subject: [PATCH] Add links and other fixes to "Simple 2D Game" --- tutorials/step_by_step/scenes_and_nodes.rst | 2 ++ tutorials/step_by_step/scripting.rst | 2 ++ tutorials/step_by_step/simple_2d_game.rst | 12 +++++------- 3 files changed, 9 insertions(+), 7 deletions(-) diff --git a/tutorials/step_by_step/scenes_and_nodes.rst b/tutorials/step_by_step/scenes_and_nodes.rst index de42beea0..331b31f5c 100644 --- a/tutorials/step_by_step/scenes_and_nodes.rst +++ b/tutorials/step_by_step/scenes_and_nodes.rst @@ -162,6 +162,8 @@ demo should finally execute: Success! +.. _doc_scenes_and_nodes-configuring_the_project: + Configuring the project ----------------------- diff --git a/tutorials/step_by_step/scripting.rst b/tutorials/step_by_step/scripting.rst index c947f4cff..b4e12835e 100644 --- a/tutorials/step_by_step/scripting.rst +++ b/tutorials/step_by_step/scripting.rst @@ -91,6 +91,8 @@ And try to make it look like this in the 2D editor, so it makes sense: Finally, save the scene, a fitting name could be "sayhello.scn" +.. _doc_scripting-adding_a_script: + Adding a script ~~~~~~~~~~~~~~~ diff --git a/tutorials/step_by_step/simple_2d_game.rst b/tutorials/step_by_step/simple_2d_game.rst index aafe9a84f..c1eafe7c0 100644 --- a/tutorials/step_by_step/simple_2d_game.rst +++ b/tutorials/step_by_step/simple_2d_game.rst @@ -20,19 +20,18 @@ Scene setup ~~~~~~~~~~~ For the sake of the old times, the game will be in 640x400 pixels -resolution. This can be configured in the Project Settings (see previous -tutorials). The default background color should be set to black: +resolution. This can be configured in the Project Settings (see :ref:`doc_scenes_and_nodes-configuring_the_project`). The default background color should be set to black: .. image:: /img/clearcolor.png Create a :ref:`class_Node2D` node for the project root. Node2D is the base type for the 2D engine. After this, add some sprites :ref:`class_Sprite` -node) and set each to the corresponding texture. The final scene layour +node) and set each to the corresponding texture. The final scene layout should look similar to this (note: the ball is in the middle!): .. image:: /img/pong_layout.png -The scene tree should, then look similar to this: +The scene tree should, then, look similar to this: .. image:: /img/pong_nodes.png @@ -64,9 +63,8 @@ should work in most cases. Script ~~~~~~ -Create a script for the root node of the scene and open it (should have -been explained in the previous tutorial!). The script will inherit -Node2D: +Create a script for the root node of the scene and open it (as explained +in :ref:`doc_scripting-adding_a_script`). The script will inherit Node2D: ::