Skip to content

Commit

Permalink
Merge pull request #64 from vs26625/main
Browse files Browse the repository at this point in the history
Transitions Updated, and Improved
  • Loading branch information
vs26625 authored May 3, 2024
2 parents 162774e + 9ce2f56 commit a88b5b9
Show file tree
Hide file tree
Showing 15 changed files with 16 additions and 13 deletions.
29 changes: 16 additions & 13 deletions assets/js/platformer3x/GameSetup.js
Original file line number Diff line number Diff line change
Expand Up @@ -278,14 +278,18 @@ const GameSetup = {
quidditch: { src: "/images/platformer/backgrounds/quidditch2.jpg"},
space: { src: "/images/platformer/backgrounds/planet.jpg" },
castles: { src: "/images/platformer/backgrounds/castles.png" },
loading: { src: "/images/platformer/backgrounds/greenscreen.png" },
complete: { src: "/images/platformer/backgrounds/OneStar.png" },
complete2: { src: "/images/platformer/backgrounds/TwoStar.png" },
complete3: {src: "/images/platformer/backgrounds/ThreeStar.png" },
end: { src: "/images/platformer/backgrounds/Congratulations!!!.png" },
winter: {src: "/images/platformer/backgrounds/winter.png" },
snow: {src: "/images/platformer/backgrounds/snowfall.png" },
mini: { src: "/images/platformer/backgrounds/mini.png" },
},
transitions: {
loading: { src: "/images/platformer/transitions/greenscreen.png" },
hillsEnd: { src: "/images/platformer/transitions/hillsEnd.png" },
winterEnd: { src: "/images/platformer/transitions/winterEnd.png" },
greeceEnd: { src: "/images/platformer/transitions/greeceEnd.png" },
waterEnd: { src: "/images/platformer/transitions/waterEnd.png" },
quidditchEnd: { src: "/images/platformer/transitions/quidditchEnd.png" },
miniEnd: { src: "/images/platformer/transitions/miniEnd.png" },
},
players: {
mario: {
Expand Down Expand Up @@ -618,7 +622,7 @@ const GameSetup = {
{ name: 'coin', id: 'coin', class: Coin, data: this.assets.obstacles.coin, xPercentage: 0.5898, yPercentage: 0.900 },
{ name: 'mario', id: 'player', class: PlayerHills, 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 },
{ name: 'loading', id: 'background', class: BackgroundTransitions, data: this.assets.transitions.loading },
];
let hillsGameObjects = allHillsGameObjects.filter(obj => !obj.difficulties || obj.difficulties.includes(difficulty));
// Hills Game Level added to the GameEnv ...
Expand Down Expand Up @@ -682,7 +686,7 @@ const GameSetup = {
{ name: 'dragon', id: 'dragon', class: Dragon, data: this.assets.enemies.dragon, xPercentage: 0.5, minPosition: 0.05},
{ name: 'knight', id: 'player', class: PlayerGreece, data: this.assets.players.knight },
{ name: 'flag', id: 'flag', class: Flag, data: this.assets.obstacles.flag },
{ name: 'complete2', id: 'background', class: BackgroundTransitions, data: this.assets.backgrounds.complete2 },
{ name: 'hillsEnd', id: 'background', class: BackgroundTransitions, data: this.assets.transitions.hillsEnd },
];
// Greece Game Level added to the GameEnv ...
new GameLevel( {tag: "ancient greece", callback: this.playerOffScreenCallBack, objects: greeceGameObjects} );
Expand Down Expand Up @@ -760,7 +764,7 @@ const GameSetup = {
{ name: 'mario', id: 'player', class: PlayerMini, data: this.assets.players.mario },
{ name: 'tubeD', id: 'tubeD', class: Tube1, data: this.assets.obstacles.tubeD},
{ name: 'tube', id: 'tube', class: Tube, data: this.assets.obstacles.tube },
// { name: 'complete', id: 'background', class: BackgroundTransitions, data: this.assets.backgrounds.complete },
{ name: 'greeceEnd', id: 'background', class: BackgroundTransitions, data: this.assets.transitions.greeceEnd },
];
// Space Game Level added to the GameEnv ...
new GameLevel( {tag: "mini", callback: this.playerOffScreenCallBack, objects: miniGameObjects} );
Expand Down Expand Up @@ -794,7 +798,7 @@ const GameSetup = {
{ name: 'coin', id: 'coin', class: Coin, data: this.assets.obstacles.coin, xPercentage: 0.5898, yPercentage: 0.900 },
{ name: 'mario', id: 'player', class: PlayerHills, 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 },
{ name: 'miniEnd', id: 'background', class: BackgroundTransitions, data: this.assets.transitions.miniEnd },
];
let waterGameObjects = allWaterGameObjects.filter(obj => !obj.difficulties || obj.difficulties.includes(difficulty));
// Water Game Level added to the GameEnv ...
Expand All @@ -806,7 +810,6 @@ const GameSetup = {
// GameObject(s), the order is important to z-index...
{ name: 'quidditch', id: 'background', class: Background, data: this.assets.backgrounds.quidditch },
{ name: 'turf', id: 'platform', class: Platform, data: this.assets.platforms.turf },

{ name: 'blocks', id: 'jumpPlatform', class: BlockPlatform, data: this.assets.platforms.cobblestone, xPercentage: 0.1, yPercentage: 0.81 },
{ name: 'blocks', id: 'jumpPlatform', class: BlockPlatform, data: this.assets.platforms.cobblestone, xPercentage: 0.14, yPercentage: 0.81 },
{ name: 'blocks', id: 'jumpPlatform', class: BlockPlatform, data: this.assets.platforms.cobblestone, xPercentage: 0.18, yPercentage: 0.81 },
Expand Down Expand Up @@ -854,7 +857,7 @@ const GameSetup = {

{ name: 'harry', id: 'player', class: PlayerQuidditch, data: this.assets.players.harry },
{ name: 'tube', id: 'tube', class: Tube, data: this.assets.obstacles.tube },
//{ name: 'loading', id: 'background', class: BackgroundTransitions, data: this.assets.backgrounds.loading },
{ name: 'waterEnd', id: 'background', class: BackgroundTransitions, data: this.assets.transitions.waterEnd },
];

// Quidditch Game Level added to the GameEnv ...
Expand Down Expand Up @@ -894,15 +897,15 @@ const GameSetup = {
{ name: 'snowman', id: 'snowman', class: Snowman, data: this.assets.enemies.Snowman, xPercentage: 0.5, minPosition: 0.1, difficulties: ["normal", "hard", "impossible"]},
{ name: 'mario', id: 'player', class: PlayerWinter, data: this.assets.players.whitemario },
{ name: 'cabin', id: 'cabin', class: Cabin, data: this.assets.obstacles.cabin },
{ name: 'complete', id: 'background', class: BackgroundTransitions, data: this.assets.backgrounds.complete },
{ name: 'quidditchEnd', id: 'background', class: BackgroundTransitions, data: this.assets.transitions.quidditchEnd },
];
// Winter Game Level added to the GameEnv ...
new GameLevel( {tag: "winter", callback: this.playerOffScreenCallBack, objects: winterObjects} );


// Game Over Level definition...
const endGameObjects = [
{ name:'background', class: Background, id: 'background', data: this.assets.backgrounds.end}
{ name:'background', class: Background, id: 'background', data: this.assets.transitions.winterEnd}
];
// Game Over screen added to the GameEnv ...
new GameLevel( {tag: "end", callback: this.gameOverCallBack, objects: endGameObjects } );
Expand Down
Binary file removed images/platformer/backgrounds/ThreeStar.png
Binary file not shown.
Binary file removed images/platformer/backgrounds/TwoStar.png
Binary file not shown.
Binary file removed images/platformer/backgrounds/bluescreen.png
Binary file not shown.
Binary file removed images/platformer/backgrounds/completed.png
Binary file not shown.
Binary file removed images/platformer/backgrounds/loading.png
Binary file not shown.
Binary file removed images/platformer/backgrounds/testing.jpg
Binary file not shown.
Binary file removed images/platformer/obstacles/snowflakewithoutbg.png
Binary file not shown.
Binary file added images/platformer/transitions/greeceEnd.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes
Binary file added images/platformer/transitions/miniEnd.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/platformer/transitions/quidditchEnd.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/platformer/transitions/waterEnd.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit a88b5b9

Please sign in to comment.