You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Web-Dev-For-Beginners/translations/tw/6-space-game/README.md

43 lines
1.9 KiB

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

<!--
CO_OP_TRANSLATOR_METADATA:
{
"original_hash": "c40a698395ee5102715f7880bba3f2e7",
"translation_date": "2025-08-23T22:51:08+00:00",
"source_file": "6-space-game/README.md",
"language_code": "tw"
}
-->
# 建造一個太空遊戲
一個用來學習更高級 JavaScript 基礎的太空遊戲
在這堂課中,你將學習如何製作自己的太空遊戲。如果你曾玩過「太空侵略者」這款遊戲,這個遊戲的概念與其相似:操控一艘太空船並射擊從上方降下的怪物。以下是完成後的遊戲樣貌:
![完成的遊戲](../../../6-space-game/images/pewpew.gif)
在這六堂課中,你將學到以下內容:
- **互動** Canvas 元素以在螢幕上繪製物件
- **理解** 笛卡爾座標系統
- **學習** Pub-Sub 模式以建立更易於維護和擴展的遊戲架構
- **運用** Async/Await 來載入遊戲資源
- **處理** 鍵盤事件
## 概述
- 理論
- [使用 JavaScript 建造遊戲的介紹](1-introduction/README.md)
- 實作
- [繪製到 Canvas](2-drawing-to-canvas/README.md)
- [在螢幕上移動元素](3-moving-elements-around/README.md)
- [碰撞檢測](4-collision-detection/README.md)
- [計分](5-keeping-score/README.md)
- [結束並重新開始遊戲](6-end-condition/README.md)
## 致謝
本遊戲使用的資源來自 https://www.kenney.nl/。
如果你對製作遊戲感興趣,這裡有一些非常棒的資源,許多是免費的,也有一些是付費的。
**免責聲明**
本文件使用 AI 翻譯服務 [Co-op Translator](https://github.com/Azure/co-op-translator) 進行翻譯。儘管我們努力確保翻譯的準確性,但請注意,自動翻譯可能包含錯誤或不準確之處。原始文件的母語版本應被視為權威來源。對於關鍵資訊,建議使用專業人工翻譯。我們對因使用此翻譯而引起的任何誤解或錯誤解釋不承擔責任。