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_h":300,
"score_to_pass": 10,
"good_food_count": [0,0,0],
"bad_food_count": [0,0,0],
"food_1": 3,
"food_2": 1,
"food_3": 1,
"garbage_1": 3,
"garbage_2": 1,
"garbage_3": 1
"food_2": 0,
"food_3": 0,
"garbage_1": 0,
"garbage_2": 0,
"garbage_3": 0
}

View File

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

View File

@ -1,10 +1,12 @@
{
"time_to_play": 500,
"playground_size": [
300,
300
],
"playground_size_w":350,
"playground_size_h":350,
"score_to_pass": 15,
"good_food_count": [6,0,0],
"bad_food_count": [2,0,0]
"food_1": 3,
"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,
"playground_size": [
300,
300
],
"score_to_pass": 15,
"good_food_count": [8,0,0],
"bad_food_count": [4,0,0]
"playground_size_w":400,
"playground_size_h":400,
"score_to_pass": 20,
"food_1": 8,
"food_2": 0,
"food_3": 0,
"garbage_1": 4,
"garbage_2": 0,
"garbage_3": 0
}

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -1,10 +1,13 @@
{
"time_to_play": 300,
"playground_w":100,
"playground_h":200,
"time_to_play": 600,
"playground_size_w":700,
"playground_size_h":600,
"score_to_pass": 10,
"good_food_count": [3,0,0],
"bad_food_count": [0,0,0],
"fish": 0
"food_1": 3,
"food_2": 2,
"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._frame_limit = game_params.time_to_play
self.playground.center = (WIDTH / 2, HEIGHT / 2)
self.playground.center = ((WIDTH-200) / 2, HEIGHT / 2)
# init game
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),
],
"background": [
create_image_view_data(
'bg', self.playground.x, self.playground.y,
self.playground.w, self.playground.h)
# create_image_view_data(
# 'bg', self.playground.x, self.playground.y,
# self.playground.w, self.playground.h)
]
# "audios": {}
}
@ -243,6 +243,9 @@ class EasyGame(PaiaGame):
# create_rect_view_data(
# "playground", self.playground.x, self.playground.y,
# 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 = [

View File

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