# 入門遊戲模板 - 第三人稱射擊遊戲

<figure><img src="/files/YuKbsFSNXnPaqpZWZZOT" alt=""><figcaption></figcaption></figure>

為了加速您的開發,我們已經創建了一個小型擊遊遊戲範例。這個項目可以作為您自己遊戲的起點,或者作為學習如何構建射擊遊戲項目的一種方式。&#x20;

{% embed url="<https://github.com/hologyengine/starter-third-person-shooter>" %}

以下部分將解釋如何設置該項目。

## 下載射擊遊戲項目

假設您已經安裝了 Git,您可以在terminal中運行以下命令來下載項目。如果您還沒有安裝 Git,您可以從這裡下載 <https://git-scm.com/download/> 。&#x20;

```
git clone https://github.com/hologyengine/starter-third-person-shooter.git
cd starter-third-person-shooter
npm ci
```

## 運行項目

項目下載完成後,在項目目錄中運行以下命令。這應該會將遊戲作為網站運行,您可以通過在瀏覽器中打開 <http://localhost:5173/> 來查看。&#x20;

```
npm run dev
```

## 在Hology編輯器中打開項目

在編輯器的啟動器中, 點擊"打開現有項目/Open an existing project"。導航到項目文件夾。

<figure><img src="/files/2k4IhiS4pgxK40TVwFoE" alt=""><figcaption></figcaption></figure>

為確保您選擇了正確的文件夾,您看到的文件夾應該包含以下文件夾：

<figure><img src="/files/cYjeFYBJTWUCcTfCi6y7" alt=""><figcaption></figcaption></figure>

## 從這裡開始

查看代碼庫,了解角色和組件是如何製作的。當閱讀文檔中的其他主題時,您可以參考回這個項目,看看這些功能在實踐中是如何使用的。

### 繼續建立在這個項目上

現在您已經有了創建遊戲的基本碼庫構建塊。唯一的限制是您的想像力。 以下是一些您可以嘗試構建的想法點子：

* **有限彈藥系統：**&#x8FFD;踪玩家擁有的彈藥量。在玩家UI中顯示這一點,並在玩家沒有更多彈藥時阻止其射擊。創建一個帶有觸發體積的彈藥箱角色,讓玩家通過跑過它們來拾取彈藥。
* **添加您自己的3D模型：**&#x66FF;換場景中的角色模型和其他3D模型。
* **敵人：**&#x751F;成由 AI 控制的敵人角色,這些敵人會向玩家射擊。做一個角色健康系統組件來追踪每個角色的健康狀況。


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.hology.app/zh-tw/getting-started/ru-men-you-xi-mu-ban-di-san-ren-cheng-she-ji-you-xi.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
