feat: update levels

This commit is contained in:
Kylin_on_Mac 2023-11-10 13:43:25 +08:00
parent ad3953c0b5
commit cdac00e42c
14 changed files with 103 additions and 82 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 417 KiB

After

Width:  |  Height:  |  Size: 3.1 MiB

View File

@ -3,13 +3,10 @@
"playground_size_w":300, "playground_size_w":300,
"playground_size_h":300, "playground_size_h":300,
"score_to_pass": 10, "score_to_pass": 10,
"good_food_count": [0,0,0],
"bad_food_count": [0,0,0],
"food_1": 3, "food_1": 3,
"food_2": 1, "food_2": 0,
"food_3": 1, "food_3": 0,
"garbage_1": 3, "garbage_1": 0,
"garbage_2": 1, "garbage_2": 0,
"garbage_3": 1 "garbage_3": 0
} }

View File

@ -1,10 +1,12 @@
{ {
"time_to_play": 300, "time_to_play": 300,
"playground_size": [ "playground_size_w":350,
200, "playground_size_h":350,
200 "score_to_pass": 10,
], "food_1": 5,
"score_to_pass": 15, "food_2": 0,
"good_food_count": [5,0,0], "food_3": 0,
"bad_food_count": [0,0,0] "garbage_1": 0,
"garbage_2": 0,
"garbage_3": 0
} }

View File

@ -1,10 +1,12 @@
{ {
"time_to_play": 500, "time_to_play": 500,
"playground_size": [ "playground_size_w":350,
300, "playground_size_h":350,
300
],
"score_to_pass": 15, "score_to_pass": 15,
"good_food_count": [6,0,0], "food_1": 3,
"bad_food_count": [2,0,0] "food_2": 0,
"food_3": 0,
"garbage_1": 3,
"garbage_2": 0,
"garbage_3": 0
} }

View File

@ -1,10 +1,12 @@
{ {
"time_to_play": 600, "time_to_play": 600,
"playground_size": [ "playground_size_w":400,
300, "playground_size_h":400,
300 "score_to_pass": 20,
], "food_1": 8,
"score_to_pass": 15, "food_2": 0,
"good_food_count": [8,0,0], "food_3": 0,
"bad_food_count": [4,0,0] "garbage_1": 4,
"garbage_2": 0,
"garbage_3": 0
} }

View File

@ -1,10 +1,12 @@
{ {
"time_to_play": 800, "time_to_play": 800,
"playground_size": [ "playground_size_w":400,
300, "playground_size_h":400,
300 "score_to_pass": 30,
], "food_1": 8,
"score_to_pass": 15, "food_2": 3,
"good_food_count": [8,3,0], "food_3": 0,
"bad_food_count": [4,0,0] "garbage_1": 3,
"garbage_2": 0,
"garbage_3": 0
} }

View File

@ -1,10 +1,12 @@
{ {
"time_to_play": 1000, "time_to_play": 1000,
"playground_size": [ "playground_size_w":400,
400, "playground_size_h":400,
400 "score_to_pass": 30,
], "food_1": 8,
"score_to_pass": 15, "food_2": 4,
"good_food_count": [8,4,0], "food_3": 0,
"bad_food_count": [5,2,0] "garbage_1": 5,
"garbage_2": 2,
"garbage_3": 0
} }

View File

@ -1,10 +1,12 @@
{ {
"time_to_play": 1000, "time_to_play": 800,
"playground_size": [ "playground_size_w":500,
400, "playground_size_h":500,
400 "score_to_pass": 30,
], "food_1": 8,
"score_to_pass": 20, "food_2": 4,
"good_food_count": [8,4,2], "food_3": 2,
"bad_food_count": [4,4,0] "garbage_1": 4,
"garbage_2": 2,
"garbage_3": 0
} }

View File

@ -1,10 +1,12 @@
{ {
"time_to_play": 1200, "time_to_play": 1200,
"playground_size": [ "playground_size_w":500,
500, "playground_size_h":500,
500 "score_to_pass": 50,
], "food_1": 6,
"score_to_pass": 20, "food_2": 4,
"good_food_count": [6,4,2], "food_3": 2,
"bad_food_count": [6,4,2] "garbage_1": 6,
"garbage_2": 4,
"garbage_3": 2
} }

View File

@ -1,10 +1,12 @@
{ {
"time_to_play": 1200, "time_to_play": 1200,
"playground_size": [ "playground_size_w":600,
600, "playground_size_h":600,
500 "score_to_pass": 50,
], "food_1": 6,
"score_to_pass": 25, "food_2": 5,
"good_food_count": [10,5,3], "food_3": 3,
"bad_food_count": [12,7,4] "garbage_1": 8,
"garbage_2": 8,
"garbage_3": 5
} }

View File

@ -1,10 +1,12 @@
{ {
"time_to_play": 1200, "time_to_play": 1200,
"playground_size": [ "playground_size_w":700,
700, "playground_size_h":600,
600 "score_to_pass": 50,
], "food_1": 12,
"score_to_pass": 25, "food_2": 8,
"good_food_count": [12,8,4], "food_3": 4,
"bad_food_count": [25,10,5] "garbage_1": 25,
"garbage_2": 10,
"garbage_3": 8
} }

View File

@ -1,10 +1,13 @@
{ {
"time_to_play": 300, "time_to_play": 600,
"playground_w":100, "playground_size_w":700,
"playground_h":200, "playground_size_h":600,
"score_to_pass": 10, "score_to_pass": 10,
"good_food_count": [3,0,0], "food_1": 3,
"bad_food_count": [0,0,0], "food_2": 2,
"fish": 0 "food_3": 2,
"garbage_1": 1,
"garbage_2": 1,
"garbage_3": 1
} }

View File

@ -75,7 +75,7 @@ class EasyGame(PaiaGame):
self._score_to_pass = game_params.score_to_pass self._score_to_pass = game_params.score_to_pass
self._frame_limit = game_params.time_to_play self._frame_limit = game_params.time_to_play
self.playground.center = (WIDTH / 2, HEIGHT / 2) self.playground.center = ((WIDTH-200) / 2, HEIGHT / 2)
# init game # init game
self.ball = Squid() self.ball = Squid()
@ -220,9 +220,9 @@ class EasyGame(PaiaGame):
create_asset_init_data("garbage03", FOOD_LV3_SIZE,FOOD_LV3_SIZE, GARBAGE03_PATH, GARBAGE03_URL), create_asset_init_data("garbage03", FOOD_LV3_SIZE,FOOD_LV3_SIZE, GARBAGE03_PATH, GARBAGE03_URL),
], ],
"background": [ "background": [
create_image_view_data( # create_image_view_data(
'bg', self.playground.x, self.playground.y, # 'bg', self.playground.x, self.playground.y,
self.playground.w, self.playground.h) # self.playground.w, self.playground.h)
] ]
# "audios": {} # "audios": {}
} }
@ -243,6 +243,9 @@ class EasyGame(PaiaGame):
# create_rect_view_data( # create_rect_view_data(
# "playground", self.playground.x, self.playground.y, # "playground", self.playground.x, self.playground.y,
# self.playground.w, self.playground.h, PG_COLOR) # self.playground.w, self.playground.h, PG_COLOR)
create_image_view_data(
'bg', self.playground.x, self.playground.y,
self.playground.w, self.playground.h)
] ]
foregrounds = [ foregrounds = [

View File

@ -38,7 +38,7 @@ class Squid(pygame.sprite.Sprite):
self.origin_image = pygame.Surface([SQUID_W, SQUID_H]) self.origin_image = pygame.Surface([SQUID_W, SQUID_H])
self.image = self.origin_image self.image = self.origin_image
self.rect = self.image.get_rect() self.rect = self.image.get_rect()
self.rect.center = (400, 300) self.rect.center = (350, 300)
self._score = 0 self._score = 0
self._vel = SQUID_VEL self._vel = SQUID_VEL
self._lv = 1 self._lv = 1