From e0deb730ecb969a11d930c14a89a9b20708c434a Mon Sep 17 00:00:00 2001 From: Thomas Lavocat Date: Mon, 3 Apr 2023 09:33:50 +0200 Subject: [PATCH] princesse lactose: premier commit MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit La princesse, saute, se déplace et s'amuse comme une folle. Les collisions ne marchent pas totalement bien. Ça s'améliorera au fil du temps. Grâce à git, les choses vont s'améliorer. --- maps/map.json | 1 + maps/map2.json | 1 + maps/mondenuages_0_0.json | 1 + ms/main.ms | 101 +++++ ms/princess_accel_dyn_obsolete.ms | 462 ++++++++++++++++++++ ms/princess_accel_static.ms | 559 +++++++++++++++++++++++++ sprites/flag.png | Bin 0 -> 112 bytes sprites/grimpables.png | Bin 0 -> 1819 bytes sprites/icon.png | Bin 0 -> 232 bytes sprites/items.png | Bin 0 -> 459 bytes sprites/mastersystem.png | Bin 0 -> 5981 bytes sprites/plateformes.png | Bin 0 -> 2878 bytes sprites/princess.png | Bin 0 -> 1332 bytes sprites/princess_falling.png | Bin 0 -> 621 bytes sprites/princess_falling_direction.png | Bin 0 -> 632 bytes sprites/princess_jumping.png | Bin 0 -> 647 bytes sprites/princess_jumping_impulsion.png | Bin 0 -> 911 bytes sprites/princess_wall_stick.png | Bin 0 -> 1499 bytes sprites/test.png | Bin 0 -> 3485 bytes 19 files changed, 1125 insertions(+) create mode 100644 maps/map.json create mode 100644 maps/map2.json create mode 100644 maps/mondenuages_0_0.json create mode 100644 ms/main.ms create mode 100644 ms/princess_accel_dyn_obsolete.ms create mode 100644 ms/princess_accel_static.ms create mode 100644 sprites/flag.png create mode 100644 sprites/grimpables.png create mode 100644 sprites/icon.png create mode 100644 sprites/items.png create mode 100644 sprites/mastersystem.png create mode 100644 sprites/plateformes.png create mode 100644 sprites/princess.png create mode 100644 sprites/princess_falling.png create mode 100644 sprites/princess_falling_direction.png create mode 100644 sprites/princess_jumping.png create mode 100644 sprites/princess_jumping_impulsion.png create mode 100644 sprites/princess_wall_stick.png create mode 100644 sprites/test.png diff --git a/maps/map.json b/maps/map.json new file mode 100644 index 0000000..81e4d22 --- /dev/null +++ b/maps/map.json @@ -0,0 +1 @@ +{"width":12,"height":16,"block_width":16,"block_height":16,"sprites":[0],"data":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]} \ No newline at end of file diff --git a/maps/map2.json b/maps/map2.json new file mode 100644 index 0000000..ba63c90 --- /dev/null +++ b/maps/map2.json @@ -0,0 +1 @@ +{"width":90,"height":80,"block_width":8,"block_height":8,"sprites":[0,"plateformes:4,2","plateformes:5,2","plateformes:6,2","plateformes:7,2","plateformes:8,2","plateformes:4,10","plateformes:4,4","plateformes:5,4","plateformes:6,4","plateformes:1,14","plateformes:7,11","plateformes:8,6","plateformes:2,4","plateformes:3,4","plateformes:7,4","plateformes:8,4","plateformes:9,4","plateformes:10,4","plateformes:11,4","plateformes:2,3","plateformes:3,3","plateformes:4,3","plateformes:5,3","plateformes:6,3","plateformes:7,3","plateformes:8,3","plateformes:9,3","plateformes:10,3","plateformes:11,3","plateformes:2,2","plateformes:3,2","plateformes:9,2","plateformes:10,2","plateformes:11,2","plateformes:0,8","plateformes:1,8","plateformes:8,10"],"data":[1,2,3,4,5,1,2,3,4,5,5,5,5,1,2,3,4,5,5,1,2,3,4,5,1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,37,37,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,11,11,0,0,0,0,0,0,0,11,11,11,0,0,0,0,0,0,0,0,0,0,0,37,37,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,37,37,37,0,0,0,0,37,37,37,37,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,11,11,0,0,0,0,0,0,0,0,0,11,0,0,0,0,0,0,0,0,0,0,0,37,37,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,37,37,37,0,0,0,0,37,37,37,37,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,11,11,0,0,0,0,0,0,0,0,0,11,0,0,0,0,0,0,0,0,0,0,0,37,37,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,37,37,37,0,0,0,0,37,37,37,37,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,11,11,0,0,0,0,0,0,0,0,0,11,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,0,0,37,37,37,37,37,37,37,37,0,0,0,37,37,37,0,0,0,0,37,37,37,37,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,11,11,0,0,0,0,0,0,0,0,0,11,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,0,0,37,37,37,37,37,37,37,37,0,0,0,37,37,37,0,0,0,0,37,37,37,37,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,11,11,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,37,37,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,37,37,37,37,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,11,11,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,37,37,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,37,37,37,37,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,11,11,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,37,37,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,37,37,37,37,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,11,11,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,37,37,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,37,37,37,37,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,11,11,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,11,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,11]} \ No newline at end of file diff --git a/maps/mondenuages_0_0.json b/maps/mondenuages_0_0.json new file mode 100644 index 0000000..d34cb51 --- /dev/null +++ b/maps/mondenuages_0_0.json @@ -0,0 +1 @@ +{"width":24,"height":16,"block_width":16,"block_height":16,"sprites":[0,"plateformes:1,3","plateformes:2,3","grimpables:1,3","plateformes:7,4","plateformes:9,3","plateformes:10,3","plateformes:15,3","plateformes:1,1","plateformes:3,1","plateformes:4,2","grimpables:1,2","plateformes:15,5","grimpables:1,1","plateformes:4,4","plateformes:0,7","plateformes:6,4","plateformes:12,4","grimpables:1,0","plateformes:3,3","plateformes:4,3","plateformes:5,3","plateformes:9,1","grimpables:0,3","grimpables:0,2","plateformes:2,2","plateformes:5,1","plateformes:4,1","plateformes:14,3","plateformes:0,4","plateformes:11,3","plateformes:12,3","flag","plateformes:13,3","grimpables:0,1","plateformes:9,4","plateformes:10,4","plateformes:11,4","plateformes:13,4","plateformes:15,4","grimpables:0,0"],"data":[0,0,0,0,1,2,3,3,3,3,3,4,5,6,7,0,0,0,0,0,0,0,5,6,8,9,9,4,9,10,11,11,3,3,3,3,0,0,0,0,0,0,0,0,0,0,0,0,12,0,0,3,0,10,13,11,11,11,11,14,0,0,0,0,0,0,0,15,16,0,0,0,17,0,7,11,0,10,18,18,18,18,19,20,21,0,0,0,0,0,0,22,23,0,0,0,17,0,17,3,0,10,2,1,2,19,10,20,20,0,0,0,0,0,0,0,24,0,0,0,17,0,17,3,0,25,25,25,10,10,10,20,20,21,0,0,0,0,0,0,24,0,0,0,17,0,17,11,0,4,9,15,26,26,16,27,27,26,0,0,0,0,0,0,24,0,0,0,17,0,17,3,0,3,0,0,0,0,0,0,0,5,7,0,0,0,0,0,24,0,0,0,17,0,17,3,0,11,0,0,0,0,0,0,0,0,0,5,7,0,0,0,24,0,0,0,17,0,17,3,0,13,0,0,0,0,0,0,0,0,0,0,0,5,28,7,24,0,0,0,17,0,17,3,0,13,0,0,0,0,0,0,0,0,0,0,0,0,0,0,24,0,0,0,17,0,17,11,0,29,0,0,0,0,0,0,0,0,0,0,0,0,0,0,24,0,0,0,17,0,17,13,0,0,0,0,0,0,0,0,0,0,0,0,29,5,6,7,24,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5,6,30,31,7,32,0,0,0,24,0,0,0,0,0,0,0,0,0,5,6,30,31,33,7,0,0,0,0,0,0,0,0,34,0,0,0,0,0,0,5,6,7,35,36,37,17,38,39,0,0,0,0,0,0,0,0,40,5,5,6]} \ No newline at end of file diff --git a/ms/main.ms b/ms/main.ms new file mode 100644 index 0000000..2cd71c9 --- /dev/null +++ b/ms/main.ms @@ -0,0 +1,101 @@ +init = function() + played_map = "map2" + mapw = + maph = + + princess = new Princess(0, 10, played_map) + prev_time = system.time() + prevx = 0 + prevy = 0 +end + + + +update = function() + if not maps[played_map].ready then + return + end + now = system.time() + timedelta = now - prev_time + + + princess.update_me() + + //---------------------------------------------------------------------------- + // + // Gestion des inputs + + wants_jump = keyboard.SPACE or gamepad.A + stop_jump = keyboard.release.SPACE or gamepad.release.A + wants_left = keyboard.LEFT or gamepad.LEFT_STICK_LEFT + wants_climb = keyboard.UP or gamepad.LEFT_STICK_UP + wants_right = keyboard.RIGHT or gamepad.LEFT_STICK_RIGHT + wants_crouch = keyboard.DOWN or gamepad.LEFT_STICK_DOWN + wants_run = keyboard.SHIFT_LEFT or gamepad.X + wants_dash = keyboard.ALT_LEFT or gamepad.RT + + // Sauter n'est possible que si l'on est pas déjà en train de sauter et que + // la princesse a les pieds au sol + /* + if (wants_jump and not princess_states.contains(JUMPING) and + (on_ground or on_climbable)) then + princess_states.push(JUMPING) + end + */ + if wants_right then + princess.go_right() + else + princess.stop_going_right() + end + + if wants_left then + princess.go_left() + else + princess.stop_going_left() + end + + if wants_jump then + princess.do_jump() + end + if stop_jump then + princess.stop_jump() + end + + /* + if wants_run and not princess_states.contains(RUNNING) then + princess_states.push(RUNNING) + end + if not wants_run then + princess_states.removeElement(RUNNING) + end + + can_climbe = (on_climbable or heads_on_climbable) + if wants_climb and not princess_states.contains(CLIMBING) and can_climbe then + princess_states.push(CLIMBING) + end + if not wants_climb or not can_climbe then + princess_states.removeElement(CLIMBING) + end + + if wants_crouch and not princess_states.contains(CLIMBING_DOWN) and can_climbe then + princess_states.push(CLIMBING_DOWN) + end + if not wants_crouch or not can_climbe then + princess_states.removeElement(CLIMBING_DOWN) + end + */ + + prev_time = now + +end + +draw = function() + screen.fillRect(0,0,screen.width,screen.height,"rgb(171,255,255)") + screen.drawMap(played_map, + princess.xoffset, + princess.yoffset, + princess.map.width*princess.map.block_width, + princess.map.height*princess.map.block_height) + + princess.draw_me() +end \ No newline at end of file diff --git a/ms/princess_accel_dyn_obsolete.ms b/ms/princess_accel_dyn_obsolete.ms new file mode 100644 index 0000000..291b03f --- /dev/null +++ b/ms/princess_accel_dyn_obsolete.ms @@ -0,0 +1,462 @@ +PrincessOld = class + // globals + LEFT = 0 + RIGHT= 1 + + // taille de la princess + X_SIZE = 7.68 + Y_SIZE = 16 + + // états + IDLING = 0 + WALKING_R = 1 + WALKING_L = 2 + JUMPING = 3 + CROUCHING = 4 + FARTING = 5 + DASHING = 6 + FALLING = 7 + RUNNING = 8 + CLIMBING_UP = 9 + CLIMBING_DOWN = 10 + PRESSING_WALL = 11 + + // Définitions statiques + ONE_METER = 16 //nombre de pixels par mètre + // accélérations + WALK_ACCEL = 6 // exrimé en m/s/s + FLIGHT_WALK_ACCEL = 3 + RUN_ACCEL = 9 // exprimé en m/s/s + FLIGHT_RUN_ACCEL = 6 + AIR_CONTROL_DIVIDER = 2.4 // diviseur pour limiter le contrôle de trajectoire en l'air + GRAVITY = 1.5 // exprimé en m/s/s + JUMP_ACCEL = 5 + + //frictions + GROUND_FRICTION = 0.3 // coefficient de friction du sol + GROUND_X_DIV = 10 + AIR_FRICTION = 0.3 //coefficient de friction dans l'air + WALL_FRICTION = 0.3 + + // Quand la princesse est en friction sur le mur + // de combien est-elle propulsée du côté opposé + // lorsqu'elle saute à ce moment là + WALL_KICK = 4 + JUMP_KICK = 8 + + // Nombre d'inréments composant un saut + JUMPING_COUNTER = 7 + // Nombre d'incrément à rajouter lorsque la touche de saut est maintenue + JUMPING_COUNTER_REFILL = 2 + // Tous les combien d'incréments rajouter un refill sur le compteur + JUMPING_KEY_COUNTER_THRESHOLD = 3 + + + constructor = function(x, y, map_name) + this.x = x + this.y = y -10 // décaler le srpite car sinon 0,0 est en son centre + this.map = maps[map_name] + this.states = [] + + this.x_speed = 0 + this.y_speed = 0 + + this.x_accel = 0 + this.y_accel = 0 + this.last_direction = RIGHT + + this.xoffset=0 + this.yoffset=0 + + // jumping states + this.jumping_counter = 0 // compte le nombre d'étape à faire pour sauter + // compte le nombre de frames dans le saut, utilisé pour savoir + // si le bouton a été enfoncé longtemps ou non + this.jump_key_counter = 0 + // mis à 1 si le saut à démarré avec un kick pour pouvoir + // rajouter un peu de kick en cours de saut si la touche de saut + // est maintenue. + this.jump_started_wall_kick = 0 + end + + + + x_in_map = function(x) + /* + transforme une coordonée x avec une référence au centre de la carte + en une coordonnée où le point de référence est en bas à gauche de la carte + */ + map_half_width = (this.map.width/2)*this.map.block_width + return x+map_half_width-this.xoffset + end + + x_to_block = function(x_in_map) + // Transforme une coordonée x en numéro de block correspondant + return floor(x_in_map / this.map.block_width) + end + + mapx_to_x = function(mapx) + return mapx-((this.map.width/2)* this.map.block_width)+this.xoffset + end + + y_in_map = function(y) + /* + transforme une coordonée y avec une référence au centre de la carte + en une coordonnée où le point de référence est en bas à gauche de la carte + */ + map_half_height = (this.map.height/2)* this.map.block_height + return y+map_half_height-this.yoffset + end + + mapy_to_y = function(mapy) + return mapy-((this.map.height/2)* this.map.block_height)+this.yoffset + end + + y_to_block = function(y_in_map) + // Transforme une coordonée y en numéro de block correspondant + return floor(y_in_map / this.map.block_height) + end + + get_touching = function(name, x, y) + /* + Renvoie les coordonées en unité block du block pointé aux coordonnées du personnage. + */ + block_x = x_to_block(x_in_map(x)) + block_y = y_to_block(y_in_map(y)) + + block = map.get(block_x,block_y) + if block != 0 then + if block.startsWith(name) then + return [block_x, block_y] + else + return [-1, -1] + end + end + return [-1, -1] + end + + feet_on_ground = function() + // renvoie vrai si le block sous les pieds de la princesse est une plateforme + return get_touching("plateformes", this.x, this.y-Y_SIZE/2-1)[0] > -1 + end + + touch_wall = function() + // renvoie vrai si le block sous les pieds de la princesse est une plateforme + return get_touching("plateformes", this.x-X_SIZE/2-1, this.y)[0] > -1 or + get_touching("plateformes", this.x+X_SIZE/2+1, this.y)[0] > -1 + end + + head_on_ceiling = function() + // renvoie vrai si le block au dessus de la tête de la princesse est une plateforme + return get_touching("plateformes", this.x, this.y+Y_SIZE/2)[0] > -1 + end + + walk = function(timedelta) + /* + Met le personnage en mouvemment à gauche ou à droite + timedelta, nombre de milisecondes depuis le dernier appel + */ + accel = 0 + + if this.states.contains(WALKING_L) or this.states.contains(WALKING_R) then + accel = WALK_ACCEL + if this.states.contains(RUNNING) then + accel = RUN_ACCEL + end + // si le personnage n'est pas au sol, diviser l'accélération latérale + if not feet_on_ground() then + accel = FLIGHT_WALK_ACCEL + if this.states.contains(RUNNING) then + accel = FLIGHT_RUN_ACCEL + end + end + end + + + // Inverser le vecteur de déplacement si l'on va à gauche + if this.states.contains(WALKING_L) then + accel = accel * -1 + end + + td_in_s = timedelta /1000 + + this.x_accel = this.x_accel + accel*td_in_s + end + + gravity = function(timedelta) + /* + Applique la gravité au personnage + timedelta, nombre de milisecondes depuis le dernier appel + */ + if not this.feet_on_ground() then + td_in_s = timedelta /1000 + this.y_accel = this.y_accel - GRAVITY*td_in_s + end + end + + jump = function(timedelta) + if this.states.contains(JUMPING) then + // initialiser les variables du saut + if this.jumping_counter == 0 then + this.jump_started_wall_kick = 0 + this.jumping_counter = JUMPING_COUNTER + end + + // si l'utilisateur appuie longtemps sur la touche espace, alors sauter un peu plus loni + if this.jump_key_counter > 0 and this.jump_key_counter % JUMPING_KEY_COUNTER_THRESHOLD == 0 then + this.jumping_counter += JUMPING_COUNTER_REFILL + + // besoin d'étendre le kick de départ si le saut a été initié contre un mur + // la valeur à rajouter est plus petite que le kick de départ + if this.jump_started_wall_kick then + if this.states.contains(WALKING_L) then + this.x_speed = WALL_KICK/2 + end + if this.states.contains(WALKING_R) then + this.x_speed = -WALL_KICK/2 + end + end + end + + // Donner un petit kick pour le wall jump + if this.states.contains(PRESSING_WALL) then + this.jump_started_wall_kick = 1 + if this.states.contains(WALKING_L) then + this.x_speed = WALL_KICK + end + if this.states.contains(WALKING_R) then + this.x_speed = -WALL_KICK + end + end + + // calculer l'accélération + //td_in_s = timedelta /1000 + //this.y_accel = this.y_accel + JUMP_ACCEL * td_in_s + this.y_speed = JUMP_KICK * (this.jumping_counter/JUMPING_COUNTER) + + // traiter la fin du saut + this.jumping_counter -=1 + if this.jumping_counter == 0 then + this.states.removeElement(JUMPING) + return + end + end + end + + + move = function() + /* + Cette fonction applique les accélérations calculées à ce tour sur la princesse et les applique + */ + // calculer la friction qui s'oppose au déplacement + // c'est grâce à la friction que le personnage atteindra sa vélocité maximum + // et freinera losqu'il n'aura plus d'accélération + // La quantité de friction s'applique au sol et en l'air et elle augmente avec le carré de la vitesse + // il en resulte un vecteur opposé au déplacement qui vient contrer celui ci. + + x_friction = AIR_FRICTION + if this.feet_on_ground() then + x_friction += GROUND_FRICTION + end + + x_friction = pow(this.x_speed * x_friction, 2) + if this.x_speed < 0 then + x_friction = x_friction * -1 + end + + this.x_speed = this.x_speed + (this.x_accel * ONE_METER) - x_friction + + + y_friction = AIR_FRICTION + + if( + this.y_speed < 0 and + touch_wall() and + (this.states.contains(WALKING_L) or this.states.contains(WALKING_R)) + )then + if not this.states.contains(PRESSING_WALL) then + this.states.push(PRESSING_WALL) + end + y_friction += WALL_FRICTION + else + this.states.removeElement(PRESSING_WALL) + end + + y_friction = pow(this.y_speed * y_friction, 2) + + if this.y_speed < 0 then + y_friction = y_friction * -1 + end + + + befiore_speed = this.y_speed + + this.y_speed = this.y_speed + (this.y_accel * ONE_METER) - y_friction + + + + signx = 1 + signy = 1 + // gérer la collision sur x + if this.x_speed > 0 then + x_add = X_SIZE/2 + else + x_add = -X_SIZE/2 + signx = -1 + end + if this.y_speed > 0 then + y_add = Y_SIZE/2 + else + y_add = -Y_SIZE/2 + signy = -1 + end + + // éviter de glisser trop longtemps quand la force de friction est trop faible pour arrêter le personnage + if abs(this.x_speed) < WALK_ACCEL/GROUND_X_DIV then + this.x_speed = 0 + end + + + // déplace la princesse uniquement de la distance totale si elle à la place de le faire + futur_x = this.x + this.x_speed + touching = get_touching("plateformes", futur_x + x_add, this.y + -Y_SIZE/2) + if touching[0] > -1 then + // Si la princesse va toucher son collisioneur, alors la placer au bord de l'élément + if this.x_speed > 0 then + colisioner_x = touching[0]+1 + colisioner_left_border = mapx_to_x(colisioner_x * this.map.block_width - this.map.block_width) + futur_x = floor(colisioner_left_border - X_SIZE/2) + elsif this.x_speed < 0 then + colisioner_x = touching[0] + colisioner_left_border = mapx_to_x(colisioner_x * this.map.block_width + this.map.block_width) + futur_x = ceil(colisioner_left_border + X_SIZE/2) + end + this.x_speed = 0 //arrêt brutal + end + + dispx = abs(futur_x - this.x) + this.xoffset -= dispx*signx + + futur_y = this.y + this.y_speed + touching = get_touching("plateformes", this.x + x_add, futur_y + y_add) + if touching[1] > -1 then + // Si la princesse va toucher son collisioneur, alors la placer au bord de l'élément + if this.y_speed > 0 then + colisioner_y = touching[1] + colisioner_bottom_border = mapy_to_y(colisioner_y * this.map.block_height) + futur_y = floor(colisioner_bottom_border - Y_SIZE/2) + elsif this.y_speed < 0 then + colisioner_y = touching[1] + colisioner_top_border = mapy_to_y(colisioner_y * this.map.block_height + this.map.block_height) + futur_y = ceil(colisioner_top_border + Y_SIZE/2) + end + this.y_speed = 0 //arrêt brutal + end + + dispy = abs(futur_y - this.y) + this.yoffset -= dispy*signy + + // remise à zéro de l'accélération + this.x_accel = 0 + this.y_accel = 0 + + + + end + + update_me = function(timedelta) + walk(timedelta) + jump(timedelta) + gravity(timedelta) + + move() + end + + draw_me = function() + /* + Dessine la Princesse à l'écran + */ + + + if this.last_direction == LEFT then + screen.setDrawScale(-1,1) + end + if this.states.contains(JUMPING) or this.states.contains(FALLING) then + screen.drawSprite( + "princess.1", + this.x, + this.y, + X_SIZE, + Y_SIZE) + elsif states.contains(WALKING_L) then + screen.drawSprite( + "princess", + this.x, + this.y, + X_SIZE, + Y_SIZE) + elsif states.contains(WALKING_R) then + screen.drawSprite( + "princess", + this.x, + this.y, + X_SIZE, + Y_SIZE) + else + screen.drawSprite( + "princess.0", + this.x, + this.y, + X_SIZE, + Y_SIZE) + end + + if this.last_direction == LEFT then + screen.setDrawScale(1,1) + end + end + + go_right = function() + this.last_direction = RIGHT + if not this.states.contains(WALKING_R) then + this.states.push(WALKING_R) + end + + end + + stop_going_right = function() + this.states.removeElement(WALKING_R) + end + + go_left = function() + this.last_direction = LEFT + if not this.states.contains(WALKING_L) then + this.states.push(WALKING_L) + end + end + + stop_going_left = function() + this.states.removeElement(WALKING_L) + end + + do_jump = function() + // Un nouveau saut est déclenché uniquement si le cycle d'un saut + // précédent n'est pas fini. + // Pour terminer, la princesse doit avoir touché le sol ou être accrochée au mur + // mais l'utilisateur doit également avoir relâché la touche saut + if not this.states.contains(JUMPING) and this.jump_key_counter == 0 then + if (feet_on_ground() or this.states.contains(PRESSING_WALL)) then + this.states.push(JUMPING) + end + // lorsqu'un saut est démarré, mettre à zéro le compteur de frames + this.jump_key_counter = 0 + else + // dans tous les cas incrémenter le compteur de frames + this.jump_key_counter += 1 + end + end + + stop_jump = function() + this.jump_key_counter = 0 + end +end \ No newline at end of file diff --git a/ms/princess_accel_static.ms b/ms/princess_accel_static.ms new file mode 100644 index 0000000..bc38898 --- /dev/null +++ b/ms/princess_accel_static.ms @@ -0,0 +1,559 @@ +// TODO régler les collisions!!!! + +Princess = class + // globals + LEFT = 0 + RIGHT= 1 + + // taille de la princess + X_SIZE = 12 + Y_SIZE = 23 + + // états + IDLING = 0 + WALKING_R = 1 + WALKING_L = 2 + JUMPING = 3 + CROUCHING = 4 + FARTING = 5 + DASHING = 6 + FALLING = 7 + RUNNING = 8 + CLIMBING_UP = 9 + CLIMBING_DOWN = 10 + PRESSING_WALL = 11 + JUMP_KICKING = 12 + + X_SPEED_TABLE = [0, 0.2, 0.4, 0.6, 1, 1.6, 2.4, 3] + X_SPEED_DECEL = [0, 0.2, 0.6, 1.6, 3] + X_SPEED_AIR_DECEL =[0, 0.2, 0.6, 0.8, 0.9, 0.9, 1, + 1.1, 1.1, 1.1, 1.2, 1.2, 1.2, + 1.2, 1.2, 1.3, 1.4, 1.5, 1.6, + 1.8, 1.9, 3] + FALL_SPEED_TABLE = [0, 0.4, 0.8, 1.2, 1.6, 2, 2.4, 2.8, 3, 4, ] + JUMP_SPEED_TABLE = [0, 0.4, 0.8, 1.2, 1.6, 2, 2.4, 2.8, 3, 3, 4, 5] + KICK_SPEED_TABLE = [0, 0.2, 0.4, 0.6, 1, 1.6, 2.4, 3] + + + // Nombre d'inréments composant un saut + JUMPING_COUNTER = 20 + // Nombre d'incrément à rajouter lorsque la touche de saut est maintenue + JUMPING_COUNTER_REFILL = 2 + // Tous les combien d'incréments rajouter un refill sur le compteur + JUMPING_KEY_COUNTER_THRESHOLD = 3 + + COYOTE_LENGTH = 20 + + + constructor = function(x, y, map_name) + this.x = x + this.y = y -10 // décaler le srpite car sinon 0,0 est en son centre + this.map = maps[map_name] + this.states = [] + + this.x_speed = 0 + this.y_speed = 0 + + this.x_accel = 0 + this.y_accel = 0 + this.last_direction = RIGHT + + this.xoffset=0 + this.yoffset=0 + + // jumping states + this.jumping_counter = 0 // compte le nombre d'étape à faire pour sauter + // compte le nombre de frames dans le saut, utilisé pour savoir + // si le bouton a été enfoncé longtemps ou non + this.jump_key_counter = 0 + // mis à 1 si le saut à démarré avec un kick pour pouvoir + // rajouter un peu de kick en cours de saut si la touche de saut + // est maintenue. + this.jump_started_wall_kick = 0 + this.jump + + this.coyote = [] + this.coyote_pressing = [] + end + + + x_in_map = function(x) + /* + transforme une coordonée x avec une référence au centre de la carte + en une coordonnée où le point de référence est en bas à gauche de la carte + */ + map_half_width = (this.map.width/2)*this.map.block_width + return x+map_half_width-this.xoffset + end + + x_to_block = function(x_in_map) + // Transforme une coordonée x en numéro de block correspondant + return floor(x_in_map / this.map.block_width) + end + + mapx_to_x = function(mapx) + return mapx-((this.map.width/2)* this.map.block_width)+this.xoffset + end + + y_in_map = function(y) + /* + transforme une coordonée y avec une référence au centre de la carte + en une coordonnée où le point de référence est en bas à gauche de la carte + */ + map_half_height = (this.map.height/2)* this.map.block_height + return y+map_half_height-this.yoffset + end + + mapy_to_y = function(mapy) + return mapy-((this.map.height/2)* this.map.block_height)+this.yoffset + end + + y_to_block = function(y_in_map) + // Transforme une coordonée y en numéro de block correspondant + return floor(y_in_map / this.map.block_height) + end + + get_touching = function(name, x, y) + /* + Renvoie les coordonées en unité block du block pointé aux coordonnées du personnage. + */ + block_x = x_to_block(x_in_map(x)) + block_y = y_to_block(y_in_map(y)) + + block = map.get(block_x,block_y) + if block != 0 then + if block.startsWith(name) then + return [block_x, block_y] + else + return [-1, -1] + end + end + return [-1, -1] + end + + feet_on_ground = function() + // renvoie vrai si le block sous les pieds de la princesse est une plateforme + return get_touching("plateformes", this.x, this.y-Y_SIZE/2-1)[0] > -1 + end + + futur_feet_on_ground = function(x) + // renvoie vrai si le block sous les pieds de la princesse est une plateforme + return get_touching("plateformes", x, this.y-Y_SIZE/2-1)[0] > -1 + end + + coyote_touch = function() + return coyote[0] + end + coyote_pressing_touch = function() + return coyote_pressing[0] + end + + touch_wall = function() + // renvoie vrai si le block sous les pieds de la princesse est une plateforme + return get_touching("plateformes", this.x-X_SIZE/2-1, this.y)[0] > -1 or + get_touching("plateformes", this.x+X_SIZE/2+1, this.y)[0] > -1 + end + + head_on_ceiling = function() + // renvoie vrai si le block au dessus de la tête de la princesse est une plateforme + return get_touching("plateformes", this.x, this.y+Y_SIZE/2)[0] > -1 + end + + get_speed_table = function(table, index) + speed_table_len = table.length + if index < speed_table_len then + return table[index] + else + return table[speed_table_len-1] + end + end + + walk = function(timedelta) + if this.states.contains(JUMP_KICKING) then + return + print("can't walk") + end + + if this.states.contains(WALKING_L) or this.states.contains(WALKING_R) then + table = X_SPEED_TABLE + this.walking_step = min(table.length, this.walking_step+1) + else + if feet_on_ground() then + table = X_SPEED_DECEL + this.start_air_decel = 0 + if this.walking_step >= X_SPEED_DECEL.length -1 then + this.walking_step = X_SPEED_DECEL.length -1 + end + else + table = X_SPEED_AIR_DECEL + if this.start_air_decel == 0 then + if this.walking_step >= X_SPEED_DECEL.length -1 then + this.walking_step = X_SPEED_AIR_DECEL.length -1 + end + this.start_air_decel = 1 + end + end + if this.walking_step >= 0 then + if this.walking_step > table.length-1 then + this.walking_step = table.length-1 + end + this.walking_step-=1 + end + end + if this.walking_step >= 0 then + this.x_speed = get_speed_table(table, this.walking_step) + if this.last_direction == LEFT then + this.x_speed *= -1 + end + end + if abs(x_speed) > 0 then + print(x_speed) + end + end + + gravity = function(timedelta) + if( + not feet_on_ground() and + touch_wall() and + not this.states.contains(JUMPING) and + (this.states.contains(WALKING_L) or this.states.contains(WALKING_R)) + )then + if not this.states.contains(PRESSING_WALL) then + this.states.push(PRESSING_WALL) + print("pressing wall") + end + else + if this.states.contains(PRESSING_WALL) then + this.states.removeElement(PRESSING_WALL) + print("stop pressing wall") + end + end + + max_speed = FALL_SPEED_TABLE.length + if this.states.contains(PRESSING_WALL) then + max_speed = 4 + end + + if this.feet_on_ground() or this.states.contains(JUMPING) then + this.falling_step = -1 + this.states.removeElement(FALLING) + else + if not this.states.contains(JUMPING) then + this.falling_step = min(max_speed, this.falling_step+=1) + if not this.states.contains(FALLING) then + this.states.push(FALLING) + end + end + end + + if this.falling_step >= 0 then + this.y_speed = - get_speed_table(FALL_SPEED_TABLE, this.falling_step) + end + end + + jump = function(timedelta) + if this.states.contains(JUMPING) then + // initialiser les variables du saut + if this.jumping_counter == 0 then + this.jump_started_wall_kick = 0 + this.jumping_counter = JUMP_SPEED_TABLE.length + this.kick_counter = KICK_SPEED_TABLE.length -1 + + // Donner un petit kick pour le wall jump + if this.states.contains(PRESSING_WALL) then + if not this.states.contains(JUMP_KICKING) then + print("jump kicking") + this.states.push(JUMP_KICKING) + end + end + end + // si l'utilisateur appuie longtemps sur la touche espace, alors sauter un peu plus loni + if this.jump_key_counter > 0 and this.jump_key_counter % JUMPING_KEY_COUNTER_THRESHOLD == 0 then + this.jumping_counter += JUMPING_COUNTER_REFILL + + if this.states.contains(JUMP_KICKING) then + this.kick_counter += JUMPING_COUNTER_REFILL + end + end + + if this.states.contains(JUMP_KICKING) then + this.x_speed = get_speed_table(KICK_SPEED_TABLE, this.kick_counter) + if this.last_direction == RIGHT then + this.x_speed *= -1 + end + this.kick_counter -=1 + print("kick "+this.x_speed) + + if this.kick_counter <= 0 then + this.states.removeElement(JUMP_KICKING) + this.walking_step=0 + end + end + + this.y_speed = get_speed_table(JUMP_SPEED_TABLE, this.jumping_counter) + + this.jumping_counter -= 1 + if this.jumping_counter == 0 then + this.states.removeElement(JUMPING) + print("jump cycle done") + end + end + end + + next_collision_x = function(futur_x, y, right, left) + ret_futur_x = futur_x + for i=(y - Y_SIZE/2) to (y + Y_SIZE/2) by 8 + point = get_touching("plateformes", futur_x, i) + hypothesis = -1 + + if point[0] > 0 then + if right then + colisioner_x = point[0]+1 + colisioner_left_border = mapx_to_x(colisioner_x * this.map.block_width - this.map.block_width) + hypothesis = floor(colisioner_left_border - X_SIZE/2) + elsif left then + colisioner_x = point[0] + colisioner_left_border = mapx_to_x(colisioner_x * this.map.block_width + this.map.block_width) + hypothesis = ceil(colisioner_left_border + X_SIZE/2) + end + end + if hypothesis != -1 and abs(hypothesis) < abs(ret_futur_x) then + ret_futur_x = hypothesis + end + end + return ret_futur_x + end + + next_collision_y = function(x, futur_y, top, bottom) + ret_futur_y = futur_y + for i=(x - X_SIZE/2) to (x + X_SIZE/2) by 4 + point = get_touching("plateformes", i, futur_y) + hypothesis = -1 + + if point[0] > 0 then + if top then + colisioner_y = point[1] + colisioner_bottom_border = mapy_to_y(colisioner_y * this.map.block_height) + futur_y = floor(colisioner_bottom_border - Y_SIZE/2) + elsif bottom then + colisioner_y = point[1] + colisioner_top_border = mapy_to_y(colisioner_y * this.map.block_height + this.map.block_height) + hypothesis = ceil(colisioner_top_border + Y_SIZE/2) + end + end + if hypothesis != -1 and abs(hypothesis) < abs(ret_futur_y) then + ret_futur_y = hypothesis + end + end + return ret_futur_y + end + + + move = function() + signx = 1 + signy = 1 + + // gérer la collision sur x + if this.x_speed > 0 then + x_add = X_SIZE/2 + else + x_add = -X_SIZE/2 + signx = -1 + end + if this.y_speed > 0 then + y_add = Y_SIZE/2 + else + y_add = -Y_SIZE/2 + signy = -1 + end + + // déplace la princesse uniquement de la distance totale si elle à la place de le faire + futur_x = this.x + this.x_speed + if abs(this.x_speed) !=0 then + futur_x_with_collision = next_collision_x(futur_x+x_add, this.y, this.x_speed > 0, this.x_speed < 0) + if futur_x_with_collision != futur_x+x_add then + futur_x = futur_x_with_collision + this.x_speed = 0 + end + end + + dispx = abs(futur_x - this.x) + this.xoffset -= dispx*signx + + + futur_y = this.y + this.y_speed + touching = get_touching("plateformes", this.x + x_add, futur_y + y_add) + if touching[1] > -1 then + // Si la princesse va toucher son collisioneur, alors la placer au bord de l'élément + if this.y_speed > 0 then + colisioner_y = touching[1] + colisioner_bottom_border = mapy_to_y(colisioner_y * this.map.block_height) + futur_y = floor(colisioner_bottom_border - Y_SIZE/2) + elsif this.y_speed < 0 then + colisioner_y = touching[1] + colisioner_top_border = mapy_to_y(colisioner_y * this.map.block_height + this.map.block_height) + futur_y = ceil(colisioner_top_border + Y_SIZE/2) + end + cancel_jump() + this.y_speed = 0 //arrêt brutal + end + + dispy = abs(futur_y - this.y) + this.yoffset -= dispy*signy + + // remise à zéro de l'accélération + this.x_accel = 0 + this.y_accel = 0 + + + + end + + update_me = function(timedelta) + coyote.push(feet_on_ground()) + coyote_pressing.push(this.states.contains(PRESSING_WALL)) + + walk(timedelta) + jump(timedelta) + gravity(timedelta) + move() + + if coyote.length > COYOTE_LENGTH then + coyote.removeAt(0) + end + if coyote_pressing.length > COYOTE_LENGTH then + coyote_pressing.removeAt(0) + end + end + + draw_me = function() + + + reverse = (not this.states.contains(PRESSING_WALL) and this.last_direction == LEFT) or (this.states.contains(PRESSING_WALL) and this.last_direction == RIGHT) + if reverse then + screen.setDrawScale(-1,1) + end + if this.states.contains(JUMPING) and not this.states.contains(PRESSING_WALL) then + if this.jumping_counter <= JUMP_SPEED_TABLE.length-1 and this.jumping_counter >= JUMP_SPEED_TABLE.length-3 then + screen.drawSprite( + "princess_jumping_impulsion", + this.x, + this.y, + X_SIZE, + Y_SIZE) + else + screen.drawSprite( + "princess_jumping", + this.x, + this.y, + X_SIZE, + Y_SIZE) + end + elsif this.states.contains(FALLING) and not this.states.contains(PRESSING_WALL) then + if states.contains(WALKING_L) or states.contains(WALKING_R) then + screen.drawSprite( + "princess_falling_direction", + this.x, + this.y, + X_SIZE, + Y_SIZE) + else + screen.drawSprite( + "princess_falling", + this.x, + this.y, + X_SIZE, + Y_SIZE) + end + elsif this.states.contains(PRESSING_WALL) then + screen.drawSprite( + "princess_wall_stick", + this.x, + this.y, + X_SIZE, + Y_SIZE) + elsif states.contains(WALKING_L) and not this.states.contains(FALLING) then + screen.drawSprite( + "princess", + this.x, + this.y, + X_SIZE, + Y_SIZE) + elsif states.contains(WALKING_R) and not this.states.contains(FALLING)then + screen.drawSprite( + "princess", + this.x, + this.y, + X_SIZE, + Y_SIZE) + else + screen.drawSprite( + "princess.0", + this.x, + this.y, + X_SIZE, + Y_SIZE) + end + + if reverse then + screen.setDrawScale(1,1) + end + end + + go_right = function() + this.last_direction = RIGHT + if not this.states.contains(WALKING_R) then + print("right") + this.states.push(WALKING_R) + this.walking_step = this.kick_counter + //this.kick_counter = -1 + end + + end + + stop_going_right = function() + this.states.removeElement(WALKING_R) + end + + go_left = function() + this.last_direction = LEFT + if not this.states.contains(WALKING_L) then + print("left") + this.states.push(WALKING_L) + this.walking_step = this.kick_counter + //this.kick_counter = -1 + end + end + + stop_going_left = function() + this.states.removeElement(WALKING_L) + end + + do_jump = function() + // Un nouveau saut est déclenché uniquement si le cycle d'un saut + // précédent n'est pas fini. + // Pour terminer, la princesse doit avoir touché le sol ou être accrochée au mur + // mais l'utilisateur doit également avoir relâché la touche saut + if not this.states.contains(JUMPING) and this.jump_key_counter == 0 then + if (feet_on_ground() or this.states.contains(PRESSING_WALL) or coyote_touch() or coyote_pressing_touch()) then + this.states.push(JUMPING) + print("jump") + end + else + this.jump_key_counter += 1 + end + end + + stop_jump = function() + print("stop jump") + this.jump_key_counter = 0 + end + + cancel_jump = function() + print("cancel jump") + this.jumping_counter = 0 + this.states.removeElement(JUMPING) + this.kick_counter = 0 + this.states.removeElement(JUMP_KICKING) + end +end \ No newline at end of file diff --git a/sprites/flag.png b/sprites/flag.png new file mode 100644 index 0000000000000000000000000000000000000000..b9bac5f1015ddb214ebc2bf4815b23fcfa0e4233 GIT binary patch literal 112 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`=AJH&Ar}70DGLM)f>z8=yu#3y zD9iRg-1uKQ2e+fAT91R{my%{6^QKU4ZriW*ih)X3$nCPNHnlm&1!u&YD?6rT`Ykl_qeD-JW<9r`aH5EM- z1VPleUhX>(1SOfA!j+g~j zc_$ykZ*3b4Lmmq`iphh^ig!%Q()$du@@q={4N$q8WS=-&2z4x8R*%W%V-_vZu9%h{ z5wO%|AotM)HImrw8s|laGa`@iV{?rs;0Vw`;~ekY(oedc**co4UuJMIwD+C7IIu4j zV3k;-Qd`UJC$Wa*Gpb(5s5QV$KuDJ0<@GAXi{`}pw!AHML1~s~t+`XFn#Us9N04o~ zP5m5+Y0m7+Ohu_J^j#r@zNUQ|bl~97@bs8Rj;|T2eM)K|Ze-s@_v76OWj)E@AnwNs zzqKqq_@3pt|7L?EG(PlviVO%iKPFX?#+IU z`AxIf;Y!w?fwwbz5W=EgMwOqbIG;V$FPO3m#Uorf(~zzQQfHh##JOj&+q zxIvI5I7h45y9h+$LDzesK{=Zn3y-Au4sBfQS~L?vTjSg7pag%enjbsbAbOGbz?8Dl zL4k(Y9*z4fO@39f(XAS9h{B0-Cyf}c-{A*2kJubmM*xPqV~3rz=43`A$-kG5RfM!J z=~^oJrxNG6^2FMKYEk&bYdDdE`}w=_TC?KUZ^b${VR)^wAB&#*G}+D#kNz#(p185L ztqh91TW4yh*LD{yqIWf9Sz}|@PK{fO+D9!qo zUD8&pmwj1%%{f7tzFUvB+{91a*=q7Tao&iEhS^eNA8=^9O`tTA~P?&aFpHny&_iOsIN2)F25B*~*L!mUW&h^as|Hl*#lBV<@=pDb>q}umD)( z-@SZ1zrX#XQGT0kETfKK1+!_oXD4!_M_N_0-DWx(j0=@kL(+t=mY*0*&;1H>8=t%0 z`2>!PTk_MBLiaXtLmX?PpdvFLr?{Gzvso2Vf6Sly*@j<_6( zH0x7-G!7`}jAztgd{=IpvMt7~`m~!M5PVYcD_PQ&Hfy~k&p6<=_kmVrclNHOB+vb% zAz&=*FGpF literal 0 HcmV?d00001 diff --git a/sprites/icon.png b/sprites/icon.png new file mode 100644 index 0000000000000000000000000000000000000000..c3fea5a72c88ae971b2fc99ec8a0cacc1a92790d GIT binary patch literal 232 zcmVP)Q*$9m7~%zx0q9`5+FORqTf$&rWHz!oxB2lGT?b(O`00003DExWr)$m!Jc<^B6U zH!FnjdVDTRUw(Spah-kpqZ^g#8C2K;zO84D{KdcV`+4uOr`L7(4*W805@7mJE7McQ z@Q+oxXF6lVabD90=Kphle%Wm@yZnRgfv@|2cIvrQ?t6VNzopr04=@09smFU literal 0 HcmV?d00001 diff --git a/sprites/mastersystem.png b/sprites/mastersystem.png new file mode 100644 index 0000000000000000000000000000000000000000..18eb2c92f478cd9d76b10fb649690dafcd390204 GIT binary patch literal 5981 zcmeHLXH*nhm#r=eY(TIZkSIZ#AVDNaQlUkH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9hdBv5N%G^bp$67QR#l}Ay z3J>Wus1*G=9xG&Y^1*ezfYw(5Oh+_p^Q2_Owf$~{SqP$XWGMBn2b>ylsG@`FS~bta zlfb!i`f$lqNV=ZBzQ>2j3C_KPYPKg?n*eEWS2EvCNa=1} z*ip)j30tbmAuhLIY-R5W{<0P#nLB$jz;>wW-4O=Fn>zQp+=_!Y88+E0b95njKNW*_sQ`ErK* zUEl2W!0TS}1qG1sQOTj+zTyf^g-vocIIm-L{mCMFVXy0_1RpA;)OG!2qGcv`fd$(B zsUx%*Q(8ZM`_MMBd)QA|2&m6=|LipQI>LDp=$+Q(8j_@!p;7J<5?8t}THd1GN2xaq z>0^$xD=nr|H^A+z{PX|DSull;8u+N6_er;{5I`;?eKWmkU1IEi0OorR A+5i9m literal 0 HcmV?d00001 diff --git a/sprites/plateformes.png b/sprites/plateformes.png new file mode 100644 index 0000000000000000000000000000000000000000..c79ee074adc7db36ea3583e91e04e339cf1b2902 GIT binary patch literal 2878 zcmb`Jc|4SD7suzm-Iz&g2C4Lbg+@#ptJ#jK*%1k zwWc5t09L$aA*IA~>9?w01VTpgh_$6tnAc=(V8pn|X84rn6WMQdjX=%5iGieoXeFW? zv$^K<=xoPls<$2Cal47(a2}aqi2%`#szELZcCJVm0q%wxG*}3z3yH1i;KOhn(_`v~tKT#~v#3(MnAG-VZt^i9 zH}A4rU%TkR&s)K^jS+{>Cua%boU`E6ft{WNKCTj5U=jXV@lDt|`rj$q>Kr+KPsK;o zLFV&E8OM9Wj1PjXeNje@@seE>Lal%QTEmZbNMX_F4dhZtd=2{xNO#OtF!NaV)hn13 ztwU9Uvt+^)&7$e)#OSY{M!gfvj?`DV`;3rrH;lJ(Xy1lK9^2ODw#ApVRbM~1y=gVd zw8?#M=_iI2yA(@ z@MFarxHgpDn^BaNqk4t1FL>l)crV&9p8Ci%rh18RVid}F;?tniqaFX6qhBCa zCuCIQ`*I%js*sSXsJ-H{*8g6w) zqP{&_U#3KWqbAd{v9IVGRzIXZ}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WTw2mKpw_kv zID*>076b`0DA@;WPHW99xI<7EZMb;{C?QVH5(=p}n0H)UDnzZR#*maa(MxHn+OgmY z2<=#rsdfRmQQTX}I$CETV!TjTo|lfz7xXq30#xF~?E%1gIT)^YNfxN+BLK({#<+n{ z1n!XzcEQcOv#B2Yz^l~m3tHa+!QZBb9*-5VxzA4t0gB9#IBMAPpdwNrr#0 zXH5E{9nyn59HyStRa8$cm0>smtH@0;<*3_5>)Mi2n?pRAY1diW;+mC^|1a9a2!Jkq yUw#sSEEa#fWD&I~#z!88o60Rp|F5E$bqQv|nSX*Zxq%4rIC99rx}13O%6|cXdk?Ju literal 0 HcmV?d00001 diff --git a/sprites/princess.png b/sprites/princess.png new file mode 100644 index 0000000000000000000000000000000000000000..14a7c3f11cfddd9237f97cbc62dae11a575d7bcb GIT binary patch literal 1332 zcmV-41Za|C z>%S%W^EYzZ?Sx-9UEd!odf9hf?fvSDwSxC9kQ#+8F|z<$orF#nxVSzZyzX+0$^8pZ z!7VJfm@N7{eivJ?9RU;)dkeGz+`ww?MVk>wzNSV6ISx1rph9qyxxm#lg0HW}HdC`` zvPf-#o4}*TW1HT59KT;2e!qIjTOqap3rIx@0UX>~#d(k6EKv*eKfaHX+4C2(P7Qx~?_FmFOt-fa$oDg7L z#LYSVv^H~_-c%1e7Zn321kOJO`~800;oaSdI*6!H?lw08?ob%SYsa|=ckdux14dYU z1@XeYHNCS?kQ-RZMcmpfrY*IW2Ju>a;!)#95^g7sff@0FVAiNtVs*uUW7u8Q z0xSS?d)jql;svw|z5o!iKq{}e_$=nIWo#y1oWQVMnS5kQynx%K7(7e?@XBgH%Ed*w z1w){x^>;sg;smdm@*;PE+SF}ofvJG@V2&+e&j%q8K#Dw8-ygHnc1w;76hRIF>@s$$ zz<-d4*Y4M0m3vpuXUYF&+XBN%$5_#1fw=%CjuNz^vcO$H(&DCW>MFpUI)iux@uJtI z?WAD2BQ@j%7U!h$Vi#!zxRHB4NG*t0F#=c1@d9Oc;w2FgBemoj>@#(a7d3*DKy!{) zE|9OYu&r+rrN_MUf{O87uBFt6K!!9`1PmnaZVRb z#cHy^T>vvXQy`Tpj#te^ z6i$QJPsTYl7-F8|mAiR#ahe5Q0ywuz!j4oHxC=;H z+|*571vs1&IbMsT+MHaI7b1MRU^jC1CLbe2RZ zIr9ET0$Se(@sf0)MVTO8VwbI-rN%XF9UvuyQ3H14T3n1!Yi2j6U%k(6HCkGL1>h#5 qCf82wqG1=O_zwan324BSyTD(dui0pOBvVQN0000%V*1MI+8+ijSEJ!t1(2BwLr8oy!`%aWZq&~waBIgP7pKgqK5+|KZK za^7ph4&J%cnB^}bniyY6b_EDZKe7U_dVo}kunG>?f8?{`4pUA{fK;eO z0E_lBz&=dlJbh+Yun7PaAtiT_L=;>~F7i(ZKJo{K03gkmzclrMpB=mnZ2Ydj*2!iB} zVZgu!`dR?uxYKmA=m4?DZ6{GUdxvoLVn*vFxivu2aJ3bz4nT6X6Hdy7db8^QQKC|5 zc#cq29UxY(DA7{w)f24)REe~n=#)bujT;Kz+z`sO9YX%@~i?_ z%s@<_3J}Yq^{8rq6|$M*MTfs+MrGTz)$xLH9)HI2u4bu0+HAASZL;ooiDlo!@rv6; z6UU1;yY6^teeL>uJ3}f=r=9EA+K?Js1Ehp?$IDd8G>A*3zJQck3;zdDI&-dJcf8c9 z>W-Hx5eCdQ+S2mmWOXOc>bo0KTK4YWkZQhyW`-1UQwsP7ZHhC~3s!=n00000NkvXX Hu0mjf>%JrQ literal 0 HcmV?d00001 diff --git a/sprites/princess_falling_direction.png b/sprites/princess_falling_direction.png new file mode 100644 index 0000000000000000000000000000000000000000..653eaa2c276852dff5e6903b4e4fd874e5795014 GIT binary patch literal 632 zcmV-;0*C#HP)%V*1MI+4+ijSEIcPfvGq6lCQDUV+wk*Yo!|B0&X;0(ovo4nHziwxE zot^jEu!DClH75BbA6N|lhH+*V2uzH7lJx+M!jG%~^d3QKh|miT*q`!QafdM{CP2#6 zB7i0K5nvytaT(vU9&7@@ijb1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^QY&8a&VT^;eX-)@-+_IqsTylZyt1St+svlt-5 z!7Wrs%<%Z$0lFZSY%@tgsxQmn}zWT=TI|G0U7fW>255ruvv!Tz%dN=^gE@e`UK`I{uEe2R$ z&gZv3^EtVH0I7QR7_0-MYyVly;CKL%l+#}$K^r~!r_-~3?q z^7VwnAi0ER0pbV0Jo9rgX-~n25V&`L#~@Ty2Llk$Hne+{^sFIFFlmP?o^bjr&%^+v zF{}G$68(PX+wlDBZdA)5awpI=;b(YETRX0-41W*^Ylr7vs$hEMLWM2m|rv% z2{NRr`9%aolSVVYCN*V2dTvZfjE@Sf&PGc8<8oyg$cFTbAm5^1}mgX2(ZYt1sLt>w?^r>I@iw zv}BMuT^IR9WZ5_t=MLbf3;vy$h@+;~kP3d#D+(Nf(%*EA-(xT`qwX&5#+ztgzzrOS z3X*Aj$>kzQMNIgb7_r+$H;NrE4jx*ZWs>RUmcxkqC^Df zRiF-Lb`I=VEYY=a++k<9&J`&d+~^$wAppA6gPjDBJDtOO>RdzBhScLc{<997=Gz3i(&(4=T%I@ZdkTUdHRoYfXXwK%}-&(h&m}_`&kzb?%X#&7D4tqt^AeCQ)7~}xDKMv$W{+FjXo;u0&^6<%@ l!EOdX!AsA2En=Vn_zU(e>#f3C2z>wm002ovPDHLkV1h_3t2zJx literal 0 HcmV?d00001 diff --git a/sprites/princess_wall_stick.png b/sprites/princess_wall_stick.png new file mode 100644 index 0000000000000000000000000000000000000000..84189d1350fb89211975be71dd2ac3e63d0592cf GIT binary patch literal 1499 zcmV<11tj{3P)=JU#&}eIz7$8a@GhfROZn(x4Pn2qd83QBVL< zA_Nf+DF_5+XLo1u`EGY+y!OG}%}Iz;&h~HTVek5{SzA+o)~$2+ecb<-oV8uQxBX_R zfw5zDKrD!DLFfXmMXi8~ce*`pFY#jX9|11b7Hw4jr?((GAP7l%3t|DT_(0!{!SD#l zvM4`by|&=;cni3`?p%w|9UEgHSpb)dS$wC4ahC*gHTA8S2mr1qg%v|M5CQUH78fa?%*L)Pnk^SK6Hz$f*e+5)+by;A@7$R!j)625a}40R zD%wSJ1PBw|)eixEA9``z5qV(x0E5Ax+(P|Y`!(dPWG>1M5U+B=4pADAgfTe)B}~OU zS(lG3F!1q}%IKZVcH?^iU|0?W+DSon>)fyy*ky%p9~aaB!hw@%6}|;NWb%MmL5gib zUqH4Pv`w&NF~~1SWtY@c@gi;xjoQ+tc*U$gexFtVH1ZWMOlR&Q*E|>b^MF#kplvij z6|c5r8rdJH;uX4zy@lfLixnVw?k(HSQ4G*G(rjY8NCD#XEPi{eW zK`J{ywm`^RPfn1MUmLGSv88agil&P@_s#ha4~*G;Ty+e0{?d&H;_aK;&K+DdX8$o` zK0h_)+v^IF4Df8#xy1_=4*+l1##?|_B(q)Q#0pYqLFo5n0F=~J@oHN*V5!JlM5c-tv1*fw7pytH zro>%?n&lchcZpHZ7zdV$Qd;9h-k7z7=uBP)-z@#oB^BEgRT_sjq z6p%a?;uuJS9j&%-gIxlak5q^k{uT{L09;pD04yz3&DY-YEf513LB z3w9DU4JlVOF^F*wP)I;QRU%6iO(;&rz$`t;sAbK?89 zF+V;U^Xg_oLF(&E=k^^kW^llmpP!0cl^sBt*!TC@P`tFpt1}O@#*3ULrCy{pUMwjgY?Msa%wK|~HD1I_7%Qpu zJvYi{vTD4@>Dtjiq`LEkM0UT3?hMz)jo9C|;n~NnOOY02MEZ zC@WdU;S~*itFe2hpIwm34iK+$!VWW_c%j95j#pdk^&Bs9Rt&kQ^PsTUw;J^vFDeKV zctY!y)q|Wi8a(>+JY{e_q5k^h;{l1*z-+>Xz5{_vu%>{s8EI0hY71@+$xU002ovPDHLkV1gex BtEK<| literal 0 HcmV?d00001 diff --git a/sprites/test.png b/sprites/test.png new file mode 100644 index 0000000000000000000000000000000000000000..bd69f1b78939fd2041ffff90fbcc268976713b4a GIT binary patch literal 3485 zcmV;O4Px?%P)zcn;X=A8Q8nK z-{btw`+VPObdy_7Ru2=6G)?n7vq?G~t-0cTfNkcK2DL|7cA&e-l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