mirror of
https://github.com/godotengine/godot-docs.git
synced 2026-01-05 22:09:56 +03:00
This allows users to leave comments on pages that don't have `:allow_comments: False` somewhere in the page's source. Both manual and class reference pages can receive comments. Index pages cannot have comments, as discussion should occur on "leaf" pages. GitHub Discussions is used as a backend on the same repository. This means that Discussions *must* be enabled on godotengine/godot-docs before this commit is merged to `master`. Users can choose to use the "Custom" watch mode if they don't want to get notifications for discussion updates, but still get notifications for issue and pull request updates. User comments are intended to be used for the following purposes: - Add a clarification or correct something in the documentation, without having to open a pull request. Contributors are encouraged to take a look at discussions from time to time, and see if there's information worth incorporating in the pages themselves. Don't forget to reply to the comment when doing so :) - Mention a workaround for a common issue. - Link to useful third-party resources that are relevant to the current page, such as tutorials or add-ons. User comments should *not* be used for technical support. Other community platforms should be used for that. Page-to-discussion matching is done using the `pagename` Sphinx variable, which is independent of the Godot version and documentation language. Being independent of the Godot version allows keeping old comments when the Godot version changes, while also allowing users from `/stable` and `/4.1` to "see" each other in discussions. See https://giscus.app for more information.
80 lines
2.4 KiB
ReStructuredText
80 lines
2.4 KiB
ReStructuredText
:allow_comments: False
|
|
|
|
.. _doc_your_first_2d_game:
|
|
|
|
Your first 2D game
|
|
==================
|
|
|
|
In this step-by-step tutorial series, you will create your first complete 2D
|
|
game with Godot. By the end of the series, you will have a simple yet complete
|
|
game of your own, like the image below.
|
|
|
|
|image0|
|
|
|
|
You will learn how the Godot editor works, how to structure a project, and build
|
|
a 2D game.
|
|
|
|
.. note:: This project is an introduction to the Godot engine. It assumes that
|
|
you have some programming experience already. If you're new to
|
|
programming entirely, you should start here: :ref:`doc_scripting`.
|
|
|
|
The game is called "Dodge the Creeps!". Your character must move and avoid the
|
|
enemies for as long as possible.
|
|
|
|
You will learn to:
|
|
|
|
- Create a complete 2D game with the Godot editor.
|
|
- Structure a simple game project.
|
|
- Move the player character and change its sprite.
|
|
- Spawn random enemies.
|
|
- Count the score.
|
|
|
|
And more.
|
|
|
|
You'll find another series where you'll create a similar game but in 3D. We
|
|
recommend you to start with this one, though.
|
|
|
|
**Why start with 2D?**
|
|
|
|
If you are new to game development or unfamiliar with Godot, we recommend
|
|
starting with 2D games. This will allow you to become comfortable with both
|
|
before tackling 3D games, which tend to be more complicated.
|
|
|
|
You can find a completed version of this project at this location:
|
|
|
|
- https://github.com/godotengine/godot-demo-projects/tree/master/2d/dodge_the_creeps
|
|
|
|
Prerequisites
|
|
-------------
|
|
|
|
This step-by-step tutorial is intended for beginners who followed the complete
|
|
:ref:`Getting Started <toc-learn-step_by_step>`.
|
|
|
|
If you're an experienced programmer, you can find the complete demo's source
|
|
code here: `Dodge the Creeps source code
|
|
<https://github.com/godotengine/godot-demo-projects/tree/master/2d/dodge_the_creeps>`__.
|
|
|
|
We prepared some game assets you'll need to download so we can jump straight to
|
|
the code.
|
|
|
|
You can download them by clicking the link below.
|
|
|
|
`dodge_the_creeps_2d_assets.zip <https://github.com/godotengine/godot-docs-project-starters/releases/download/latest-4.x/dodge_the_creeps_2d_assets.zip>`_.
|
|
|
|
Contents
|
|
--------
|
|
|
|
.. toctree::
|
|
:maxdepth: 1
|
|
:name: toc-learn-first_2d_game
|
|
|
|
01.project_setup
|
|
02.player_scene
|
|
03.coding_the_player
|
|
04.creating_the_enemy
|
|
05.the_main_game_scene
|
|
06.heads_up_display
|
|
07.finishing-up
|
|
|
|
.. |image0| image:: img/dodge_preview.gif
|