{"id":30743229,"url":"https://github.com/peterxcli/tankman","last_synced_at":"2025-09-04T02:05:27.220Z","repository":{"id":186505728,"uuid":"649991365","full_name":"peterxcli/TankMan","owner":"peterxcli","description":null,"archived":false,"fork":false,"pushed_at":"2023-06-06T05:10:41.000Z","size":15072,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-04-28T05:14:12.295Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","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/peterxcli.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}},"created_at":"2023-06-06T05:10:38.000Z","updated_at":"2023-06-06T05:10:47.000Z","dependencies_parsed_at":null,"dependency_job_id":"c433579a-d270-46d9-a788-dcdf80299ae8","html_url":"https://github.com/peterxcli/TankMan","commit_stats":null,"previous_names":["peterxcli/tankman"],"tags_count":0,"template":false,"template_full_name":"jerrykal/TankManRL","purl":"pkg:github/peterxcli/TankMan","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/peterxcli%2FTankMan","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/peterxcli%2FTankMan/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/peterxcli%2FTankMan/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/peterxcli%2FTankMan/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/peterxcli","download_url":"https://codeload.github.com/peterxcli/TankMan/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/peterxcli%2FTankMan/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":273539317,"owners_count":25123499,"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","status":"online","status_checked_at":"2025-09-04T02:00:08.968Z","response_time":61,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":[],"created_at":"2025-09-04T02:05:26.218Z","updated_at":"2025-09-04T02:05:27.198Z","avatar_url":"https://github.com/peterxcli.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# TankMan\n## 遊戲說明\n\u003cimg src=\"https://raw.githubusercontent.com/Jesse-Jumbo/TankMan/49dc8cb825ddd8dea61936fb6d339c846fe68d6c/asset/image/TankMan.svg\" alt=\"logo\" width=\"100\"/\u003e \n\n\n[![TankMan](https://img.shields.io/github/v/tag/Jesse-Jumbo/TankMan)](https://github.com/Jesse-Jumbo/TankMan/tree/0.6.2)\n[![Python 3.9](https://img.shields.io/badge/python-3.9-blue.svg)](https://www.python.org/downloads/release/python-390/)\n[![MLGame](https://img.shields.io/badge/MLGame-10.2.5a0-\u003cCOLOR\u003e.svg)](https://pypi.org/project/mlgame/10.2.5a0/)\n[![pygame](https://img.shields.io/badge/pygame-2.0.1-\u003cCOLOR\u003e.svg)](https://github.com/pygame/pygame/releases/tag/2.0.1)\n\n\n坦克人(Tank Man)，一款經典的雙人對戰遊戲，時間內率先擊殺對手獲勝，否則以分數高者獲勝，除了擊中對手外，破壞遊戲物件，以獲得更高積分。 \n\n！注意: 場上資源恢復皆須時間，先到者得，你需要這些補充品以提供前進和射擊的燃油和子彈。\n\n![game.gif](https://raw.githubusercontent.com/Jesse-Jumbo/TankMan/main/asset/image/game.gif)\n---\n## Requirements\n- Python==3.9\n- mlgame==10.2.5a0\n- pytmx=3.31\n---\n## 更新說明\n- 0.6.0 版本之後，遊戲為 2～6人 團隊對抗遊戲\n---\n## 遊戲簡介:\n2～6位玩家進行團隊對抗賽，GreenTeam 為綠色坦克車，BlueTeam 為藍色坦克車，透過回傳遊戲指令，操控玩家與射擊砲彈，場上會有各類補給站，經過以補給該資源。\n\n---\n## 畫面說明（2.x版本）:\n\u003cimg src=\"https://raw.githubusercontent.com/Jesse-Jumbo/TankMan/main/asset/image/view_ex.png\" alt=\"view_ex.png\" width=\"1000\" height=\"600\"/\u003e \n\n---\n# 遊戲細節：\n## 啟動方式:\n- 在命令行輸入命令執行。\n---\n## 遊戲參數設定\n- 在以下命令中，`.`代表執行的遊戲專案路徑，若`.`後不輸入參數，則默認使用預設值，即`game_config.json`內參數值。\n```bash\n# MLGame.py\n# Copy and Paste to play battle game with manual\npython -m mlgame -f 120 -i ml/ml_play_manual.py -i ml/ml_play_manual.py . --green_team_num 1 --blue_team_num 1 --is_manual \"1\" --frame_limit 1000\n\n# Copy and Paste to play battle game with AI\npython -m mlgame -f 120 -i -i ml/ml_play.py -i ml/ml_play.py . --green_team_num 1 --blue_team_num 1 --frame_limit 1000\n```\n- `green_team_num`：選擇數字 1～3，以決定 綠隊 人數。\n- `blue_team_num`：選擇數字 1～3，以決定 藍隊 人數。\n- `is_manual`:  輸入 \"1\" 啟用手動模式，以讓遊戲適合手動遊玩。\n- `frame_limit`:  輸入數字 30～3000，以決定遊戲的總幀數。\n- `sound`:  輸入`on`或`off`，控制是否播放遊戲音效。\n- 如果在`mlgame`後加上`-1`，代表只執行一次遊戲。\n---\n## 遊戲操作：\n\n### 使用鍵盤\n- 角色移動：方向鍵控制 1P，WASD 鍵控制 2P 的移動和轉彎。\n- 角色射擊：1P 按下`M`鍵進行射擊，2P 按下`F`鍵進行射擊。\n- 遊戲畫面: 透過`I、K、J、L`來上下左右移動畫面；透過`O、U`來放大縮小畫面。\n- 隱藏遊戲資訊：按下`H`鍵，可隱藏畫面中的遊戲資訊。\n- 遊戲暫停：按下`P`鍵，可暫停遊戲（mlgame 10.2 後版本才有效）。\n- 遊戲暫停：遊戲 AI 回傳`PAUSED`指令，可暫停遊戲。\n\n\n### ＡＩ控制\n- 藉由遊戲資訊，在`ml`資料夾，撰寫控制遊戲角色的`.py`檔。\n- 可參考`ml_play.py`自動範例程式，撰寫自動遊玩的程式。\n- 可參考`ml_play_manual.py`手動範例程式，撰寫手動遊玩的程式。\n---\n# 遊戲玩法\n1. 團隊對抗戰 → 時間內殲滅敵對，或高分隊伍獲勝。\n## 過關條件\n1. 團隊對抗戰\n    1. 將敵隊全數擊敗。\n    2. 高過敵隊積分：\n        - 對方失去的生命 * `20`分。\n        - 每擊中一次牆壁 * `1`分。\n        - 擊破牆壁 * `5`分。\n---\n## 失敗條件\n\n1. 團隊對抗戰\n    1. 生命歸零。\n    2. 時間結束，分數較敵隊低。\n---\n## 物件設定：\n### **`Tank`**\n\n---\n1. 前進、後退速度（8 px）\n2. 轉彎角度（45度）\n3. 生命機會（3次）\n4. 燃油（100）\n5. 彈匣（10）\n---\n### **`Walls`**\n1. 生命次數（3）\n2. 透明設定（依照生命次數決定）\n---\n### **`補給站`**\n1. 燃油站\n    - 玩家經過補充 30點燃油，超過 100，則無效。\n    - 與玩家碰撞，則隨機換位置。\n\n2. 彈藥站\n    - 玩家經過補充 5顆彈藥，超過 10，則無效。\n    - 與玩家碰撞，則隨機換位置。\n\n---\n# 地圖說明\n- 寬1000 pixel；高600 pixel\n- 每格50 * 50 pixel，可放置一個物件\n\n---\n# 地圖製作\n- 地圖製作教學 [Mapping.md](https://github.com/Jesse-Jumbo/TankMan/blob/main/Mapping.md)\n\n---\n# image sours\n- [Green Tank／Blue Tank](https://linevoom.line.me/user/_dV001P0rSN_bh8zGE0q4jmdr4Fn5d-j73cLrjTc?utm_medium=windows\u0026utm_source=desktop\u0026utm_campaign=Profile)\n- [Bullet](https://linevoom.line.me/user/_dV001P0rSN_bh8zGE0q4jmdr4Fn5d-j73cLrjTc?utm_medium=windows\u0026utm_source=desktop\u0026utm_campaign=Profile)\n- [Hourglass](https://opengameart.org/content/animated-hourglass)\n- [Other Object](https://opengameart.org/content/simple-shooter-icons)\n\n# sound sours\n- [BGM](https://opengameart.org/content/commando-team-action-loop-cut)\n- [SHOOT](https://opengameart.org/content/random-low-quality-sfx)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpeterxcli%2Ftankman","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpeterxcli%2Ftankman","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpeterxcli%2Ftankman/lists"}