{"id":16556739,"url":"https://github.com/xxrjun/battle-royale","last_synced_at":"2025-04-04T21:26:56.295Z","repository":{"id":211719196,"uuid":"727050480","full_name":"xxrjun/battle-royale","owner":"xxrjun","description":"Others Fear, I Greed. Assembly Game","archived":false,"fork":false,"pushed_at":"2023-12-17T21:24:49.000Z","size":163649,"stargazers_count":1,"open_issues_count":3,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-10T06:13:02.406Z","etag":null,"topics":["assembly","battle-royale","masm32","ncu","x86-assembly"],"latest_commit_sha":null,"homepage":"","language":"Assembly","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/xxrjun.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-12-04T04:35:30.000Z","updated_at":"2024-03-14T11:47:40.000Z","dependencies_parsed_at":"2024-12-18T01:38:36.785Z","dependency_job_id":null,"html_url":"https://github.com/xxrjun/battle-royale","commit_stats":null,"previous_names":["xxrjun/nine-mens-morris","xxrjun/battle-royale"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xxrjun%2Fbattle-royale","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xxrjun%2Fbattle-royale/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xxrjun%2Fbattle-royale/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xxrjun%2Fbattle-royale/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/xxrjun","download_url":"https://codeload.github.com/xxrjun/battle-royale/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247251037,"owners_count":20908448,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["assembly","battle-royale","masm32","ncu","x86-assembly"],"created_at":"2024-10-11T20:05:38.006Z","updated_at":"2025-04-04T21:26:51.284Z","avatar_url":"https://github.com/xxrjun.png","language":"Assembly","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003ca name=\"readme-top\"\u003e\u003c/a\u003e\n\n\u003c!-- PROJECT SHIELDS --\u003e\n\u003c!--\n*** I'm using markdown \"reference style\" links for readability.\n*** Reference links are enclosed in brackets [ ] instead of parentheses ( ).\n*** See the bottom of this document for the declaration of the reference variables\n*** for contributors-url, forks-url, etc. This is an optional, concise syntax you may use.\n*** https://www.markdownguide.org/basic-syntax/#reference-style-links\n--\u003e\n[![Contributors][contributors-shield]][contributors-url]\n[![Forks][forks-shield]][forks-url]\n[![Stargazers][stars-shield]][stars-url]\n\u003c!-- [![MIT License][license-shield]][license-url] --\u003e\n\n# Battle Royale\n\n\u003e MIS 109403019 鄒翔宇, MIS 109403021 傅珩洵\n\n\u003c!-- 中英版文件 --\u003e\n\u003c!-- @TODO --\u003e\n\u003c!-- [English](./README.md) | [中文](./README_zh.md) --\u003e\n\n\u003cbr /\u003e\n\u003cdiv align=\"center\"\u003e\n  \u003ca href=\"https://github.com/xxrjun/battle-royale\"\u003e\n    \u003cimg src=\"./assets/docs/banner.png\" alt=\"Logo\" width=\"800\"\u003e\n  \u003c/a\u003e\n\n  \u003ch3 align=\"center\"\u003eBattle Royale Game\u003c/h3\u003e\n\n  \u003cp align=\"center\"\u003e\n     NCU Assembly | Fall 2023 | Final Project\n    \u003cbr /\u003e\n    \u003ca href=\"./docs/development.adoc\"\u003e\u003cstrong\u003eExplore the devlopement docs »\u003c/strong\u003e\u003c/a\u003e\n    \u003cbr /\u003e\n    \u003cbr /\u003e\n    \u003c!-- \u003ca href=\"\"\u003eView Demo\u003c/a\u003e --\u003e\n  \u003c/p\u003e\n\u003c/div\u003e\n\n\n## 目錄\n- [目錄](#目錄)\n- [遊戲規則](#遊戲規則)\n  - [基本資訊](#基本資訊)\n  - [角色設定](#角色設定)\n  - [遊戲結束條件](#遊戲結束條件)\n  - [道具系統](#道具系統)\n- [開始遊戲](#開始遊戲)\n  - [下載專案](#下載專案)\n  - [直接執行](#直接執行)\n  - [使用 Makefile 進行編譯](#使用-makefile-進行編譯)\n- [遊戲流程](#遊戲流程)\n- [專案架構](#專案架構)\n  - [目錄結構](#目錄結構)\n  - [程式架構](#程式架構)\n- [開發工具](#開發工具)\n  - [程式開發](#程式開發)\n  - [影音素材](#影音素材)\n- [貢獻者](#貢獻者)\n\n## 遊戲規則\n\n\u003e *Note: 斜線表示之數值會依據遊戲體驗進行調整*\n\n### 基本資訊\n\n- **遊戲模式**：單人遊戲（未來會考慮加入雙人模式）\n- **玩家目標**：獲得高分，分數會隨著時間持續累加，存活越久分數會越高。\n\n### 角色設定\n\n  \u003ctable border=\"1\"\u003e\n      \u003ctr\u003e\n          \u003cth\u003e角色\u003c/th\u003e\n          \u003cth\u003e描述\u003c/th\u003e\n          \u003cth\u003e外觀\u003c/th\u003e\n      \u003c/tr\u003e\n      \u003ctr\u003e\n          \u003ctd\u003e倖存者\u003c/td\u003e\n          \u003ctd\u003e玩家操控的角色。單人遊戲時使用 \u003cb\u003eWASD\u003c/b\u003e 鍵控制。\u003cbr/\u003e倖存者的目標是躲避殭屍，避免觸碰到殭屍導致死亡。\u003c/td\u003e\n          \u003ctd\u003e\u003cimg src=\"./assets/docs/player1.png\" alt=\"survivor\" width=\"70\"\u003e\u003c/td\u003e\n      \u003c/tr\u003e\n      \u003ctr\u003e\n          \u003ctd\u003e殭屍\u003c/td\u003e\n          \u003ctd\u003e皆由電腦控制，遊戲開始時有一隻，每隔 \u003ci\u003e10\u003c/i\u003e 秒會從固定位置增加一隻，\u003cbr/\u003e最多增加到 \u003ci\u003e15\u003c/i\u003e 隻。每隻殭屍速度不一且隨機，殭屍會持續往倖存者的位置移動。\u003c/td\u003e\n          \u003ctd\u003e\u003cimg src=\"./assets/docs/zombie.png\" alt=\"zombie\" width=\"70\"\u003e\u003c/td\u003e\n      \u003c/tr\u003e\n  \u003c/table\u003e\n\n\n### 遊戲結束條件\n\n\u003e GG! Next life!\n\n倖存者被殭屍觸碰到，便會死亡，遊戲結束。\n\n### 道具系統\n\n\u003e 遊戲過程中，每 *7.5* 秒，會隨機生成類的以下其中一個道具，玩家可以拾取道具獲得暫時的增益效果\n\n\u003ctable border=\"1\"\u003e\n    \u003ctr\u003e\n        \u003cth\u003e道具\u003c/th\u003e\n        \u003cth\u003e描述\u003c/th\u003e\n        \u003cth\u003e外觀\u003c/th\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n        \u003ctd\u003e閃電\u003c/td\u003e\n        \u003ctd\u003e玩家移動加速 \u003ci\u003e3\u003c/i\u003e 秒\u003c/td\u003e\n        \u003ctd\u003e\u003cimg src=\"./assets/docs/gadgetLighting.png\" alt=\"Lignting\" width=\"100\" height=\"100\"\u003e\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n        \u003ctd\u003e冰凍\u003c/td\u003e\n        \u003ctd\u003e所有殭屍暫停移動 \u003ci\u003e3\u003c/i\u003e 秒\u003c/td\u003e\n        \u003ctd\u003e\u003cimg src=\"./assets/docs/gadgetIce.png\" alt=\"Ice\" width=\"100\" height=\"100\"\u003e\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n        \u003ctd\u003e無敵\u003c/td\u003e\n        \u003ctd\u003e玩家觸碰到殭屍不會結束遊戲，持續 \u003ci\u003e3\u003c/i\u003e 秒\u003c/td\u003e\n        \u003ctd\u003e\u003cimg src=\"./assets/docs/gadgetStar.png\" alt=\"Invincible\" width=\"100\" height=\"100\"\u003e\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n        \u003ctd\u003e鈔票\u003c/td\u003e\n        \u003ctd\u003e分數累加速度加快 \u003ci\u003e3\u003c/i\u003e 秒\u003c/td\u003e\n        \u003ctd\u003e\u003cimg src=\"./assets/docs/gadgetMoney.png\" alt=\"Money\" width=\"100\" height=\"100\"\u003e\u003c/td\u003e\n    \u003c/tr\u003e\n\u003c/table\u003e\n\n\n## 開始遊戲\n\n### 下載專案\n\n```bash\ngit clone git@github.com:xxrjun/battle-royale.git\n# or\ngit clone https://github.com/xxrjun/battle-royale.git\n```\n\n### 直接執行\n\n```bash\ncd battle-royale/bin\nbattle_royale.exe \n# or\n./battle_royale.exe\n```\n\n也可以打開資料夾找到 `battle_royale.exe` 並執行\n\n\u003cdiv align=\"center\"\u003e\n  \u003cimg align=\"center\" src=\"./assets/docs/favicon.png\" alt=\"battle_royale.exe\" width=\"120\" \u003e\n\u003c/div\u003e\n\n### 使用 Makefile 進行編譯\n\n\u003e 需要安裝 [MASM32](https://www.masm32.com/index.htm)\n\n```bash\nmake # or make all\n```\n\n\n## 遊戲流程\n\n\u003cdiv align=\"center\"\u003e\n  \u003cimg align=\"center\" src=\"./assets/docs/流程圖.png\" alt=\"遊戲流程\" width=\"800\" \u003e\n\u003c/div\u003e\n\u003cbr\u003e\n\n## 專案架構\n\n### 目錄結構\n\n```bash\nbattle-royale/\n│\n├── src/                    # 源代碼目錄\n│   └── battle_royale.asm   # 主程式\n│\n├── bin/                    # 編譯後的二進制文件和可執行文件\n│   └── battle_royle.exe    # 可執行文件\n│\n├── docs/                   # 文件目錄\n│   └── development.md      # 開發相關文檔\n│\n├── assets/                 # 資源文件，如圖像、音效等\n│   ├── docs/               # 文件用圖像 \n│   ├── images/             # 遊戲用圖像\n│   └── sounds/             # 遊戲用音效\n│\n├── Makefile                # 編譯腳本\n├── README.md               # 專案說明文件\n└── .gitignore              # Git忽略文件配置\n```\n\n### 程式架構\n\n\u003cdiv align=\"center\"\u003e\n  \u003cimg align=\"center\" src=\"./assets/docs/專案架構圖.png\" alt=\"程式架構\" width=\"800\" \u003e\n\u003c/div\u003e\n\u003cbr\u003e\n\n- **WinMain**: 程序的主入口點。負責初始化應用程序並進入消息循環。\n- **WndProc**: 處理窗口消息的過程。\n- **TopXY**: 計算窗口在屏幕上的位置。\n- **generateRandomNum**: 生成範圍內的隨機數。\n- **initGameplay**: 初始化遊戲的主要變數。\n- **paintBackground**: 繪製遊戲背景。\n- **paintScoreBar**: 繪製分數條。\n- **paintPlayer**: 繪製玩家角色。\n- **paintZombie**: 繪製所有殭屍。\n- **playSound**: 播放聲音。\n- **paintGadget**: 繪製遊戲中的道具。\n- **updateScrenn**: 更新遊戲畫面。\n- **updatePlayerPosition**: 更新玩家位置。\n- **activateZombie**: 激活一隻新的殭屍。\n- **updateZombiePositions**: 更新所有殭屍的位置。\n- **checkZombieCollision**: 檢查殭屍與玩家之間的碰撞。\n- **checkGadgetCollision**: 檢查道具與玩家之間的碰撞。\n- **checkBuffEffect**: 檢查道具效果。\n- **ThreadProc**: 遊戲主循環的線程過程。\n\n\n## 開發工具\n\n### 程式開發\n\n- [MASM32 SDK](https://www.masm32.com/index.htm) - 工具集，包含 assembler、editor、linker 等工具\n  - Assembler: `ml.exe` 用於將組合語言源代碼轉換成機器代碼。\n  - Linker: `link.exe` 用於將組譯器產生的對象檔案連結成可執行檔案。\n- [Visual Studio Code](https://code.visualstudio.com/), [MASM Editor](https://www.masm32.com/) - 編輯器，用於編寫組合語言程式碼\n- [ChatGPT](https://chat.openai.com/) with GPT4.0 - 協作工具，詢問程式碼、開發問題等\n- [draw.io](https://app.diagrams.net/) - 繪圖工具，用於繪製專案架構、流程圖\n\n### 影音素材\n\n- [DALL·E](https://openai.com/dall-e-3) - 圖片生成工具，用於製作遊戲素材\n- [Mixkit](https://mixkit.co/free-sound-effects/game/) - 遊戲音效素材\n- [Cyberpunk Computer Game | IDRA by Alex-Productions](https://www.chosic.com/download-audio/31973/) - 背景音樂\n\n\u003e Credit for Music: Music promoted by [Chosic](https://www.chosic.com/free-music/all/), [Creative Commons CC BY 3.0](https://creativecommons.org/licenses/by/3.0/)\n \n\n## 貢獻者\n\n\u003ctable\u003e\n  \u003ctr\u003e\n \u003ctd align=\"center\"\u003e\u003ca href=\"https://github.com/xxrjun\"\u003e\u003cimg src=\"https://avatars.githubusercontent.com/u/40348319?v=4\" width=\"100px;\" alt=\"\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003exxrjun\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr/\u003e\u003c/td\u003e\n  \n \u003ctd align=\"center\"\u003e\u003ca href=\"https://github.com/FuHarrison\"\u003e\u003cimg src=\"https://avatars.githubusercontent.com/u/92322412?v=4\" width=\"100px;\" alt=\"\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eFuHarrison\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr/\u003e\u003c/td\u003e\n\u003c/table\u003e\n\n[contributors-shield]: https://img.shields.io/github/contributors/xxrjun/battle-royale.svg?style=for-the-badge\n[contributors-url]: https://github.com/xxrjun/battle-royale/graphs/contributors\n[forks-shield]: https://img.shields.io/github/forks/xxrjun/battle-royale.svg?style=for-the-badge\n[forks-url]: https://github.com/xxrjun/battle-royale/network/members\n[stars-shield]: https://img.shields.io/github/stars/xxrjun/battle-royale.svg?style=for-the-badge\n[stars-url]: https://github.com/xxrjun/battle-royale/stargazers\n\u003c!-- [license-shield]: https://img.shields.io/github/license/xxrjun/battle-royale.svg?style=for-the-badge\n[license-url]: https://github.com/xxrjun/battle-royale/blob/master/LICENSE.txt --\u003e","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxxrjun%2Fbattle-royale","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fxxrjun%2Fbattle-royale","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxxrjun%2Fbattle-royale/lists"}