e511b3bae4
./data.js:9517054/4340 ./script.js:9517054/36643
98 lines
2.2 KiB
JavaScript
98 lines
2.2 KiB
JavaScript
// the game data
|
|
export default {
|
|
// the platforms
|
|
parts: [
|
|
// x, y, width, height, type
|
|
[100, 100, 200, 50],
|
|
[400, 50, 200, 50],
|
|
[700, 0, 50, 50],
|
|
[900, -50, 50, 50],
|
|
[1100, -100, 50, 100],
|
|
[1200, -200, 50, 50],
|
|
[1300, -300, 50, 50],
|
|
[1150, -400, 100, 50],
|
|
[800, -450, 100, 50],
|
|
[450, -500, 100, 50],
|
|
[300, -600, 50, 50],
|
|
[400, -700, 50, 50],
|
|
[300, -800, 50, 50],
|
|
[400, -900, 150, 50],
|
|
[450, -1000, 50, 50],
|
|
[450, -1100, 50, 50],
|
|
[450, -1200, 100, 50],
|
|
[700, -1300, 50, 50, "checkpoint"],
|
|
[850, -1400, 50, 50],
|
|
[1000, -1500, 50, 50],
|
|
[1400, -1400, 50, 50],
|
|
[1800, -1350, 50, 50],
|
|
[2150, -1350, 50, 50],
|
|
[2150, -1450, 50, 50],
|
|
[2150, -1550, 50, 50],
|
|
[2150, -1650, 50, 50],
|
|
[2150, -1750, 50, 50, "checkpoint"],
|
|
[2125, -1850, 100, 50],
|
|
[2100, -1950, 150, 50],
|
|
[2075, -2050, 200, 50],
|
|
[2050, -2150, 100, 50],
|
|
[2200, -2150, 100, 50],
|
|
[2150, -2250, 50, 50, "checkpoint"],
|
|
[2000, -2350, 50, 50],
|
|
[1850, -2450, 50, 50],
|
|
[1600, -2500, 50, 50],
|
|
[1350, -2550, 50, 50],
|
|
[1050, -2600, 50, 50],
|
|
[775, -2650, 50, 50],
|
|
[400, -2650, 50, 50],
|
|
[25, -2650, 50, 50],
|
|
[-350, -2650, 50, 50, "checkpoint"],
|
|
[-750, -2650, 50, 50],
|
|
[-1200, -2500, 50, 50],
|
|
[-1500, -2200, 50, 50],
|
|
[-1900, -1900, 50, 50],
|
|
[-2100, -2000, 50, 50, "final"],
|
|
],
|
|
|
|
// the player
|
|
player: {
|
|
x: 200,
|
|
y: 0,
|
|
velx: 0,
|
|
vely: 0,
|
|
savex: 200,
|
|
savey: 85,
|
|
size: 15,
|
|
canJump: false,
|
|
},
|
|
|
|
// inputs - done this way so you can press multiple keys at once
|
|
input: {
|
|
up: false,
|
|
down: false,
|
|
left: false,
|
|
right: false,
|
|
},
|
|
|
|
// colors for each thing
|
|
color: {
|
|
player: "#f92a38",
|
|
background: "#ffffff",
|
|
dots: "#f6f6f6",
|
|
platforms: "#222222",
|
|
shadow: "#dddddd",
|
|
checkpoint: "#4feab4",
|
|
active: "#52e5a5",
|
|
final: "#52e5cd",
|
|
win: "#6befd9",
|
|
},
|
|
|
|
// rendering stuff
|
|
camera: [0, 0], // camera position
|
|
size: [0, 0], // window/canvas size
|
|
anim: [0, 0, 1], // checkpoint animation details
|
|
|
|
// performance
|
|
cache: {
|
|
background: null,
|
|
dirty: true,
|
|
}
|
|
};
|