index.rst 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. :allow_comments: False
  2. .. _doc_your_first_2d_game:
  3. Your first 2D game
  4. ==================
  5. In this step-by-step tutorial series, you will create your first complete 2D
  6. game with Godot. By the end of the series, you will have a simple yet complete
  7. game of your own, like the image below.
  8. |image0|
  9. You will learn how the Godot editor works, how to structure a project, and build
  10. a 2D game.
  11. .. note:: This project is an introduction to the Godot engine. It assumes that
  12. you have some programming experience already. If you're new to
  13. programming entirely, you should start here: :ref:`doc_scripting`.
  14. The game is called "Dodge the Creeps!". Your character must move and avoid the
  15. enemies for as long as possible.
  16. You will learn to:
  17. - Create a complete 2D game with the Godot editor.
  18. - Structure a simple game project.
  19. - Move the player character and change its sprite.
  20. - Spawn random enemies.
  21. - Count the score.
  22. And more.
  23. You'll find another series where you'll create a similar game but in 3D. We
  24. recommend you to start with this one, though.
  25. **Why start with 2D?**
  26. If you are new to game development or unfamiliar with Godot, we recommend
  27. starting with 2D games. This will allow you to become comfortable with both
  28. before tackling 3D games, which tend to be more complicated.
  29. You can find a completed version of this project at this location:
  30. - https://github.com/godotengine/godot-demo-projects/tree/master/2d/dodge_the_creeps
  31. Prerequisites
  32. -------------
  33. This step-by-step tutorial is intended for beginners who followed the complete
  34. :ref:`Getting Started <toc-learn-step_by_step>`.
  35. If you're an experienced programmer, you can find the complete demo's source
  36. code here: `Dodge the Creeps source code
  37. <https://github.com/godotengine/godot-demo-projects/tree/master/2d/dodge_the_creeps>`__.
  38. We prepared some game assets you'll need to download so we can jump straight to
  39. the code.
  40. You can download them by clicking the link below.
  41. `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>`_.
  42. Contents
  43. --------
  44. .. toctree::
  45. :maxdepth: 1
  46. :name: toc-learn-first_2d_game
  47. 01.project_setup
  48. 02.player_scene
  49. 03.coding_the_player
  50. 04.creating_the_enemy
  51. 05.the_main_game_scene
  52. 06.heads_up_display
  53. 07.finishing-up
  54. .. |image0| image:: img/dodge_preview.gif