From e1719c87fcc3e870efe3156c83f05226d140cb54 Mon Sep 17 00:00:00 2001 From: Kylin_on_Mac Date: Tue, 14 Nov 2023 10:22:31 +0800 Subject: [PATCH 1/2] doc: update project name --- README.md | 8 ++++---- asset/{easy_game.gif => swimming-squid.gif} | Bin config.py | 4 ++-- game_config.json | 8 ++++---- game_development_tutorial.md | 2 +- main.py | 4 ++-- src/env.py | 2 +- src/game.py | 2 +- 8 files changed, 15 insertions(+), 15 deletions(-) rename asset/{easy_game.gif => swimming-squid.gif} (100%) diff --git a/README.md b/README.md index 4c0a90d..e27c639 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ -# **Easy Game** +# **Swimming Squid** 魷來魷去 -![easy_game](https://img.shields.io/github/v/tag/PAIA-Playful-AI-Arena/easy_game) +![swimming-squid](https://img.shields.io/github/v/tag/PAIA-Playful-AI-Arena/swimming-squid) [![Python 3.9](https://img.shields.io/badge/python-3.9-blue.svg)](https://www.python.org/downloads/release/python-390/) [![MLGame](https://img.shields.io/badge/MLGame->10.3.2-.svg)](https://github.com/PAIA-Playful-AI-Arena/MLGame) [![pygame](https://img.shields.io/badge/pygame-2.0.1-.svg)](https://github.com/pygame/pygame/releases/tag/2.0.1) @@ -8,7 +8,7 @@ 這是一個吃東西小遊戲,也是 PAIA 的遊戲教學範例 -![demo](https://github.com/PAIA-Playful-AI-Arena/easy_game/blob/main/asset/easy_game.gif?raw=true) +![demo](https://github.com/PAIA-Playful-AI-Arena/swimming-squid/blob/main/asset/swimming-squid.gif?raw=true) --- # 基礎介紹 @@ -21,7 +21,7 @@ ```python # main.py -game = EasyGame( +game = SwimmingSquid( level: int = 1, level_file: str = None, sound: str = "off") diff --git a/asset/easy_game.gif b/asset/swimming-squid.gif similarity index 100% rename from asset/easy_game.gif rename to asset/swimming-squid.gif diff --git a/config.py b/config.py index 2f73949..5b078d5 100644 --- a/config.py +++ b/config.py @@ -2,9 +2,9 @@ import sys from os import path sys.path.append(path.dirname(__file__)) -from src.game import EasyGame +from src.game import SwimmingSquid GAME_SETUP = { - "game": EasyGame, + "game": SwimmingSquid, # "dynamic_ml_clients":True } diff --git a/game_config.json b/game_config.json index a0d5b81..7bc8d54 100644 --- a/game_config.json +++ b/game_config.json @@ -1,11 +1,11 @@ { - "game_name": "easy_game", + "game_name": "swimming-squid", "version": "2.4a1", - "url": "https://github.com/PAIA-Playful-AI-Arena/easy_game", - "description": "這是一個吃東西小遊戲,除了讓你熟習所有基本操作,也是 PAIA 的遊戲教學範例", + "url": "https://github.com/PAIA-Playful-AI-Arena/swimming-squid", + "description": "這是一個魷魚吃東西小遊戲,除了讓你熟習所有基本操作,也是 PAIA 的遊戲教學範例", "logo": [ "./asset/logo.png", - "https://raw.githubusercontent.com/PAIA-Playful-AI-Arena/easy_game/main/asset/logo.png" + "https://raw.githubusercontent.com/PAIA-Playful-AI-Arena/swimming-squid/main/asset/logo.png" ], "user_num": { "min": 1, diff --git a/game_development_tutorial.md b/game_development_tutorial.md index 08d4848..bee2e73 100644 --- a/game_development_tutorial.md +++ b/game_development_tutorial.md @@ -1,4 +1,4 @@ -# Easy Game +# Swimming-Squid 這是一個簡單的遊戲,主要用來示範如何在PAIA 上發布一個遊戲 ![](asset/easy_game.gif) ## Game Config diff --git a/main.py b/main.py index 80df9ad..5c600e5 100644 --- a/main.py +++ b/main.py @@ -4,12 +4,12 @@ import sys sys.path.append(r"../..") from mlgame.view.view import PygameView from mlgame.game.generic import quit_or_esc -from src.game import EasyGame +from src.game import SwimmingSquid FPS = 30 if __name__ == '__main__': pygame.init() - game = EasyGame(level=1) + game = SwimmingSquid(level=1) scene_init_info_dict = game.get_scene_init_data() game_view = PygameView(scene_init_info_dict) frame_count = 0 diff --git a/src/env.py b/src/env.py index 17213fb..ea74793 100644 --- a/src/env.py +++ b/src/env.py @@ -67,7 +67,7 @@ GARBAGE02_PATH = path.join(ASSET_IMAGE_DIR, "garbage_02.png") GARBAGE03_PATH = path.join(ASSET_IMAGE_DIR, "garbage_03.png") -ASSET_IMG_URL = "https://raw.githubusercontent.com/PAIA-Playful-AI-Arena/easy_game/main/asset/img/" +ASSET_IMG_URL = "https://raw.githubusercontent.com/PAIA-Playful-AI-Arena/swimming-squid/main/asset/img/" BG_URL = ASSET_IMG_URL + "background.png" SQUID_URL = ASSET_IMG_URL + "squid.png" # Food URLs diff --git a/src/game.py b/src/game.py index 3ce88ad..b8fe906 100644 --- a/src/game.py +++ b/src/game.py @@ -29,7 +29,7 @@ def revise_ball(ball: Squid, playground: pygame.Rect): pass -class EasyGame(PaiaGame): +class SwimmingSquid(PaiaGame): """ This is a Interface of a game """ From 58c2bea3eea96eb96f1bccd1e1ce1efd3eb5bb87 Mon Sep 17 00:00:00 2001 From: Kylin_on_Mac Date: Tue, 14 Nov 2023 10:24:17 +0800 Subject: [PATCH 2/2] doc: update version --- game_config.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/game_config.json b/game_config.json index 7bc8d54..723779c 100644 --- a/game_config.json +++ b/game_config.json @@ -1,6 +1,6 @@ { "game_name": "swimming-squid", - "version": "2.4a1", + "version": "2.4a2", "url": "https://github.com/PAIA-Playful-AI-Arena/swimming-squid", "description": "這是一個魷魚吃東西小遊戲,除了讓你熟習所有基本操作,也是 PAIA 的遊戲教學範例", "logo": [