vs26625 / platformer_3x

Apache License 2.0
0 stars 0 forks source link

COMPLETE-Make the monkey have an animation for the game-level end #14

Closed vs26625 closed 5 months ago

vs26625 commented 6 months ago

A suggestion from Mr. Mortenson gave us this idea or suggestion for the game level end. He said that we should add an animation that plays when the monkey gets to the tree. This way the people know what happen when the game ends as currently the same tube animation plays when the monkey gets to the tree. So, we actually never know what happens to the monkey and his tree. We will change this by adding the following:

  1. Adding an Animation for the monkey when he gets to the tree
  2. Creating a better ending page, and create smoother transitions for the ending of the game etc.

The files : Congratulations, OneStar and TwoStar We replaced these files and therefore made a more meaningful transition screens. image

I also plan on increasing the speed that the animation comes in which we found in the file called: Gamesetup.js // Hills Game Level defintion... const hillsGameObjects = [ // GameObject(s), the order is important to z-index... { name: 'mountains', id: 'background', class: BackgroundMountains, data: this.assets.backgrounds.mountains }, { name: 'clouds', id: 'background', class: BackgroundClouds, data: this.assets.backgrounds.clouds }, { name: 'hills', id: 'background', class: BackgroundHills, data: this.assets.backgrounds.hills }, { name: 'grass', id: 'platform', class: Platform, data: this.assets.platforms.grass }, { name: 'blocks', id: 'jumpPlatform', class: BlockPlatform, data: this.assets.platforms.block, xPercentage: 0.2, yPercentage: 0.85 }, { name: 'blocks', id: 'jumpPlatform', class: BlockPlatform, data: this.assets.platforms.block, xPercentage: 0.2368, yPercentage: 0.85 }, { name: 'blocks', id: 'jumpPlatform', class: BlockPlatform, data: this.assets.platforms.block, xPercentage: 0.2736, yPercentage: 0.85 }, { name: 'blocks', id: 'jumpPlatform', class: BlockPlatform, data: this.assets.platforms.block, xPercentage: 0.6, yPercentage: 1 }, { name: 'itemBlock', id: 'jumpPlatform', class: JumpPlatform, data: this.assets.platforms.itemBlock, xPercentage: 0.4, yPercentage: 0.65 }, //item block is a platform { name: 'goomba', id: 'goomba', class: Goomba, data: this.assets.enemies.goomba, xPercentage: 0.3, yPercentage: 1, minPosition: 0.05}, { name: 'goomba', id: 'goomba', class: Goomba, data: this.assets.enemies.goomba, xPercentage: 0.5, yPercentage: 1, minPosition: 0.3 }, { name: 'mushroom', id: 'mushroom', class: Mushroom, data: this.assets.enemies.mushroom, xPercentage: 0.09}, { name: 'mushroom', id: 'mushroom', class: Mushroom, data: this.assets.enemies.mushroom, xPercentage: 0.49}, { name: 'goombaSpecial', id: 'goomba', class: Goomba, data: this.assets.enemies.goomba, xPercentage: 0.75, yPercentage: 1, minPosition: 0.5 }, //this special name is used for random event 2 to make sure that only one of the Goombas ends the random event { name: 'coin', id: 'coin', class: Coin, data: this.assets.obstacles.coin, xPercentage: 0.1908, yPercentage: 0.75 }, { name: 'coin', id: 'coin', class: Coin, data: this.assets.obstacles.coin, xPercentage: 0.2242, yPercentage: 0.75 }, { name: 'coin', id: 'coin', class: Coin, data: this.assets.obstacles.coin, xPercentage: 0.2575, yPercentage: 0.75 }, { name: 'coin', id: 'coin', class: Coin, data: this.assets.obstacles.coin, xPercentage: 0.5898, yPercentage: 0.900 }, { name: 'mario', id: 'player', class: Player, data: this.assets.players.mario }, { name: 'tube', id: 'tube', class: Tube, data: this.assets.obstacles.tube }, { name: 'loading', id: 'background', class: BackgroundTransitions, data: this.assets.backgrounds.loading }, ]; // Hills Game Level added to the GameEnv ... new GameLevel( {tag: "hills", callback: this.playerOffScreenCallBack, objects: hillsGameObjects } );

    // Avenida Game Level definition...
    const avenidaGameObjects = [
    // GameObject(s), the order is important to z-index...
    { name: 'avenida', id: 'background', class: Background, data: this.assets.backgrounds.avenida },
    { name: 'grass', id: 'platform', class: Platform, data: this.assets.platforms.grass },
    { name: 'blocks', id: 'jumpPlatform', class: BlockPlatform, data: this.assets.platforms.block, xPercentage: 0.2, yPercentage: 0.85 },
    { name: 'blocks', id: 'jumpPlatform', class: BlockPlatform, data: this.assets.platforms.block, xPercentage: 0.2368, yPercentage: 0.85 },
    { name: 'blocks', id: 'jumpPlatform', class: BlockPlatform, data: this.assets.platforms.block, xPercentage: 0.5, yPercentage: 0.85 },
    { name: 'blocks', id: 'jumpPlatform', class: BlockPlatform, data: this.assets.platforms.block, xPercentage: 0.5368, yPercentage: 0.85 },
    { name: 'goomba', id: 'goomba', class: Goomba, data: this.assets.enemies.goomba, xPercentage: 0.3, minPosition: 0.05},
    { name: 'goomba', id: 'goomba', class: Goomba, data: this.assets.enemies.goomba, xPercentage:  0.5, minPosition: 0.3 },
    { name: 'mushroom', id: 'mushroom', class: Mushroom, data: this.assets.enemies.mushroom, xPercentage: 0.09},
    { name: 'goombaSpecial', id: 'goomba', class: Goomba, data: this.assets.enemies.goomba, xPercentage:  0.75, minPosition: 0.5 }, //this special name is used for random event 2 to make sure that only one of the Goombas ends the random event
    { name: 'flyingGoomba', id: 'flyingGoomba', class: FlyingGoomba, data: this.assets.enemies.flyingGoomba, xPercentage:  0.5, minPosition:  0.05},
    { name: 'flyingGoomba', id: 'flyingGoomba', class: FlyingGoomba, data: this.assets.enemies.flyingGoomba, xPercentage:  0.9, minPosition: 0.5},
    { name: 'lopez', id: 'player', class: Player, data: this.assets.players.lopez },
    { name: 'tube', id: 'tube', class: Tube, data: this.assets.obstacles.tube },
    { name: 'complete', id: 'background', class: BackgroundTransitions,  data: this.assets.backgrounds.complete },
    ];
    // Avenida Game Level added to the GameEnv ...
    new GameLevel( {tag: "avenida", callback: this.playerOffScreenCallBack, objects: avenidaGameObjects } );

    // Space Game Level definition...
    const spaceGameObjects = [
      // GameObject(s), the order is important to z-index...
      { name: 'space', id: 'background', class: Background, data: this.assets.backgrounds.space },
      { name: 'grass', id: 'platform', class: Platform, data: this.assets.platforms.grass },
      { name: 'blocks', id: 'jumpPlatform', class: BlockPlatform, data: this.assets.platforms.alien, xPercentage: 0.2, yPercentage: 0.85 },
      { name: 'blocks', id: 'jumpPlatform', class: BlockPlatform, data: this.assets.platforms.alien, xPercentage: 0.2368, yPercentage: 0.85 },
      { name: 'blocks', id: 'jumpPlatform', class: BlockPlatform, data: this.assets.platforms.alien, xPercentage: 0.5, yPercentage: 0.85 },
      { name: 'blocks', id: 'jumpPlatform', class: BlockPlatform, data: this.assets.platforms.alien, xPercentage: 0.5368, yPercentage: 0.85 },
      { name: 'blocks', id: 'jumpPlatform', class: BlockPlatform, data: this.assets.platforms.alien, xPercentage: 0.4, yPercentage: 1 },
      { name: 'blocks', id: 'jumpPlatform', class: BlockPlatform, data: this.assets.platforms.alien, xPercentage: 0.4, yPercentage: 0.9 },
      { name: 'blocks', id: 'jumpPlatform', class: BlockPlatform, data: this.assets.platforms.alien, xPercentage: 0.4, yPercentage: 0.8 },
      { name: 'blocks', id: 'jumpPlatform', class: BlockPlatform, data: this.assets.platforms.alien, xPercentage: 0.4, yPercentage: 0.7 },
      { name: 'blocks', id: 'jumpPlatform', class: BlockPlatform, data: this.assets.platforms.alien, xPercentage: 0.4, yPercentage: 0.6 },
      { name: 'goomba', id: 'goomba', class: Goomba, data: this.assets.enemies.goomba, xPercentage: 0.3, minPosition: 0.05},
      { name: 'goomba', id: 'goomba', class: Goomba, data: this.assets.enemies.goomba, xPercentage:  0.5, minPosition: 0.3 },
      { name: 'goombaSpecial', id: 'goomba', class: Goomba, data: this.assets.enemies.goomba, xPercentage:  0.75, minPosition: 0.5 }, //this special name is used for random event 2 to make sure that only one of the Goombas ends the random event
      { name: 'flyingGoomba', id: 'flyingGoomba', class: FlyingGoomba, data: this.assets.enemies.flyingGoomba, xPercentage:  0.5, minPosition:  0.05},
      { name: 'flyingGoomba', id: 'flyingGoomba', class: FlyingGoomba, data: this.assets.enemies.flyingGoomba, xPercentage:  0.9, minPosition: 0.5},
      { name: 'monkey', id: 'player', class: Player, data: this.assets.players.monkey },
      { name: 'tree', id: 'tree', class: Tree, data: this.assets.obstacles.tree },
      { name: 'end', id: 'background', class: BackgroundTransitions,  data: this.assets.backgrounds.end },
    ];

Scroll Down For Images that replace the game level complete transitions. Issue by: Pranav Santhosh and Derek Kang

SanPranav commented 5 months ago

Leve 1 complete Image image Level 2 Complete Image image Level 3 Complete Image image