mirror of
https://github.com/stan220/godot-docs.git
synced 2026-09-08 18:29:11 +00:00
Add outros and transition text at the end of first_2d_game lessons
This commit is contained in:
@@ -3,6 +3,9 @@
|
||||
Creating the player scene
|
||||
=========================
|
||||
|
||||
With the project settings in place, we can start working on the
|
||||
player-controlled character.
|
||||
|
||||
The first scene will define the ``Player`` object. One of the benefits of
|
||||
creating a separate Player scene is that we can test it separately, even before
|
||||
we've created other parts of the game.
|
||||
@@ -91,3 +94,7 @@ When you're finished, your ``Player`` scene should look like this:
|
||||
.. image:: img/player_scene_nodes.png
|
||||
|
||||
Make sure to save the scene again after these changes.
|
||||
|
||||
In the next part, we'll add a script to the player node to move and animate it.
|
||||
Then, we'll set up collision detection to know when the player got hit by
|
||||
something.
|
||||
|
||||
@@ -389,3 +389,5 @@ starting a new game.
|
||||
Show();
|
||||
GetNode<CollisionShape2D>("CollisionShape2D").Disabled = false;
|
||||
}
|
||||
|
||||
With the player working, we'll work on the enemy in the next lesson.
|
||||
|
||||
@@ -134,3 +134,7 @@ add this code:
|
||||
}
|
||||
|
||||
This completes the `Mob` scene.
|
||||
|
||||
With the player and enemies ready, in the next part, we'll bring them together
|
||||
in a new scene. We'll make enemies spawn randomly around the game board and move
|
||||
forward, turning our project into a playable game.
|
||||
|
||||
@@ -283,3 +283,6 @@ player disappear when hit by a mob.
|
||||
|
||||
When you're sure everything is working, remove the call to ``new_game()`` from
|
||||
``_ready()``.
|
||||
|
||||
What's our game lacking? Some user interface. In the next lesson, we'll add a
|
||||
title screen and display the player's score.
|
||||
|
||||
@@ -304,3 +304,6 @@ the ``new_game()`` function in ``Main``:
|
||||
|
||||
The ``call_group()`` function calls the named function on every node in a
|
||||
group - in this case we are telling every mob to delete itself.
|
||||
|
||||
The game's mostly done at this point. In the next and last part, we'll polish it
|
||||
a bit by adding a background, looping music, and some keyboard shortcuts.
|
||||
|
||||
@@ -56,3 +56,17 @@ spacebar.
|
||||
|
||||
Now when the start button appears, you can either click it or press :kbd:`Space`
|
||||
to start the game.
|
||||
|
||||
And with that, you completed your first 2D game in Godot.
|
||||
|
||||
.. image:: img/dodge_preview.gif
|
||||
|
||||
You got to make a player-controlled character, enemies that spawn randomly
|
||||
around the game board, count the score, implement a game over and replay, user
|
||||
interface, sounds, and more. Congratulations!
|
||||
|
||||
There's still much to learn, but you can take a moment to appreciate what you
|
||||
achieved.
|
||||
|
||||
And when you're ready, you can move on to :ref:`doc_your_first_3d_game` to learn
|
||||
to create a complete 3D game from scratch, in Godot.
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
.. _doc_your_first_3d_game:
|
||||
|
||||
Your first 3D game
|
||||
==================
|
||||
|
||||
|
||||
Reference in New Issue
Block a user