Attention: Here be dragons

This is the latest (unstable) version of this documentation, which may document features not available in or compatible with released stable versions of Godot.

您的第一个 2D 游戏

在这个循序渐进的教程系列中,您将使用 Godot 创建您的第一个完整的 2D 游戏。在系列结束时,您将拥有一个简单而完整的游戏,如下图所示。

image0

你会学到 Godot 编辑器的用法、如何设置项目结构,以及如何构建 2D 游戏。

备注

这个项目是对 Godot 引擎的介绍,假定你已经有一些编程经验。如果你对编程完全陌生,应该从这里开始:脚本语言

这个游戏叫做“Dodge the Creeps!”。你的角色必须尽可能长时间移动并避开敌人。

你将学到:

  • 使用 Godot 编辑器创建完整的 2D 游戏。

  • 搭建简单的游戏项目。

  • 移动玩家角色并为其修改精灵。

  • 生成随机敌人。

  • 计分。

以及更多。

你可以找到另一个系列,是在 3D 中创建与此类似的游戏。不过我们推荐你从这个系列开始。

为什么从 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.

您可以在此位置找到本项目的完整版本:

先决条件

这个分步教程是为那些遵循完整的《入门》的初学者准备的。

如果你是熟练的程序员,可以在这里查看完整的演示源码:Godot demo projects

我们准备了一些你需要下载的游戏资源,以便我们可以直接跳转到代码。

您可以通过单击下面的链接下载它们。

dodge_the_creeps_2d_assets.zip.

目录