Skip to content

Commit

Permalink
added levels
Browse files Browse the repository at this point in the history
  • Loading branch information
rnickles committed Aug 15, 2024
1 parent e5969a2 commit 8d225ad
Showing 1 changed file with 95 additions and 1 deletion.
96 changes: 95 additions & 1 deletion game/levels.js
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,93 @@ function initLevel12(engine, gameState) {
new BouncyPlatform(500, 400, 500, 300, engine);
new Goal(100, 100, engine, gameState);
}
function initLevel13(engine, gameState) {
gameState.dropCoords = [200, 600];
new Goal(700, 100, engine, gameState);
}
function initLevel14(engine, gameState) {
gameState.dropCoords = [700, 100];
new BouncyPlatform(200, 600, 300, 700, engine);
new Goal(500, 400, engine, gameState);
new BadPlatform(450, 350, 550, 350, engine);
new BadPlatform(450, 350, 450, 500, engine);
new BadPlatform(550, 350, 550, 500, engine);
}
function initLevel15(engine, gameState) {
gameState.dropCoords = [100, 100];
new Goal(700, 700, engine, gameState);
new BadPlatform(0, 200, 600, 200, engine);
new BadPlatform(700, 200, 1000, 200, engine);
new BadPlatform(0, 300, 300, 300, engine);
new BadPlatform(400, 300, 1000, 300, engine);
new BadPlatform(0, 400, 700, 400, engine);
new BadPlatform(800, 400, 1000, 400, engine);
new BadPlatform(0, 500, 200, 500, engine);
new BadPlatform(300, 500, 1000, 500, engine);
new BadPlatform(0, 600, 500, 600, engine);
new BadPlatform(600, 600, 1000, 600, engine);
}
function initLevel16(engine, gameState) {
gameState.dropCoords = [100, 100];
new Goal(700, 700, engine, gameState);
new BadPlatform(200, 0, 200, 200, engine);
new BadPlatform(200, 300, 200, 1000, engine);
new BadPlatform(300, 0, 300, 300, engine);
new BadPlatform(300, 400, 300, 1000, engine);
new BadPlatform(400, 0, 400, 400, engine);
new BadPlatform(400, 500, 400, 1000, engine);
new BadPlatform(500, 0, 500, 500, engine);
new BadPlatform(500, 600, 500, 1000, engine);
}
function initLevel17(engine, gameState) {
gameState.dropCoords = [700, 100];
new Goal(100, 400, engine, gameState);
new BadPlatform(500, 0, 500, 100, engine);
new BadPlatform(500, 200, 500, 1000, engine);
new BadPlatform(200, 0, 200, 200, engine);
new BadPlatform(200, 300, 200, 1000, engine);
new BadPlatform(300, 0, 300, 300, engine);
new BadPlatform(300, 400, 300, 1000, engine);
new BadPlatform(400, 0, 400, 400, engine);
new BadPlatform(400, 600, 400, 1000, engine);
}
function initLevel18(engine, gameState) {
gameState.dropCoords = [700, 100];
new Goal(150, 100, engine, gameState);
new BadPlatform(250, 0, 250, 400, engine);
new BadPlatform(250, 400, 500, 400, engine);
new BadPlatform(50, 0, 50, 400, engine);
}
function initLevel19(engine, gameState) {
gameState.dropCoords = [400, 100];
new Goal(400, 700, engine, gameState);
// left side
new BadPlatform(0, 200, 350, 200, engine);
new BadPlatform(350, 200, 250, 300, engine);
new BadPlatform(250, 300, 350, 400, engine);
new BadPlatform(350, 400, 250, 500, engine);
// right side
new BadPlatform(500, 200, 1000, 200, engine);
new BadPlatform(500, 200, 400, 300, engine);
new BadPlatform(400, 300, 500, 400, engine);
new BadPlatform(500, 400, 400, 500, engine);
}
function initLevel20(engine, gameState) {
gameState.dropCoords = [600, 100];
new BadPlatform(150, 200, 800, 200, engine);
new BadPlatform(150, 200, 150, 400, engine);
new BadPlatform(150, 500, 150, 600, engine);
new BadPlatform(150, 600, 800, 600 ,engine);
new BadPlatform(800, 600, 800, 200, engine);

new BadPlatform(250, 300, 450, 300, engine);
new BadPlatform(550, 300, 700, 300, engine);
new BadPlatform(250, 300, 250, 500, engine);
new BadPlatform(250, 500, 700, 500, engine);
new BadPlatform(700, 500, 700, 300, engine);

new Goal(350, 450, engine);
}
// Return a list of level intialializers; 1st item is null since there is no level 0
// They all accept the same exact argumets: engine and gameState.
export function getLevelInitializers() {
Expand All @@ -123,6 +209,14 @@ export function getLevelInitializers() {
initLevel9,
initLevel10,
initLevel11,
initLevel12
initLevel12,
initLevel13,
initLevel14,
initLevel15,
initLevel16,
initLevel17,
initLevel18,
initLevel19,
initLevel20
];
}

0 comments on commit 8d225ad

Please sign in to comment.