User prompt
Can you change "Game Over" to "You Are Buck!"
User prompt
once the player reach 100 HP, they get the message "You Are Buck!"
User prompt
once the player reach 100 points, they get the message "You Are Buck!"
User prompt
have the timer in black
User prompt
Fix Bug: 'TypeError: LK.showWin is not a function' in this line: 'LK.showWin();' Line Number: 110
User prompt
Fix Bug: 'Uncaught TypeError: Cannot read properties of undefined (reading 'play')' in this line: 'LK.Audio.play('backgroundMusicMidi', true);' Line Number: 61
User prompt
Fix Bug: 'Uncaught TypeError: Cannot read properties of undefined (reading 'play')' in this line: 'LK.Audio.play('backgroundMusicMidi', true);' Line Number: 61
User prompt
Fix Bug: 'Uncaught TypeError: Cannot read properties of undefined (reading 'play')' in this line: 'LK.Audio.play('backgroundMusicMidi', true);' Line Number: 61
User prompt
add a midi file as background music
User prompt
the health points need to show the latest one
User prompt
show the number of health points
User prompt
add a timer of 3 minutes
User prompt
if the player doesnt touch the beatcolumn, he lose 50 points
User prompt
Once the player reaches 100 health points, he win the game
User prompt
the player needs to touch the beatcolumn to keep his health points
User prompt
add a floor at the bottom and the player is on it
User prompt
Update the player's health when a beat is touch the bottom of the screen
User prompt
if the beat does not touch the player, it takes out 1 hp
User prompt
the player and he has 10 HPs in total, the HP points is show on the top left with a green bar
User prompt
for each beat which doesnt explode, it takes out 1 HP to the player and he has 10 HPs in total, the HP points is show on the top left with a green bar
User prompt
for each beat exploded, it gives 100 points to the player and the total score shows up at the top right corner
User prompt
add a high score at the bottom right
User prompt
Fix Bug: 'Uncaught TypeError: LK.audio.play is not a function' in this line: 'LK.audio.play('backgroundMusic', true);' Line Number: 40
User prompt
add backgound music
User prompt
add a background image
var PlayerHealth = Container.expand(function () { var self = Container.call(this); self.hp = 10; var healthBarBackground = self.createAsset('healthBarBackground', 'Health Bar Background', 0, 0); var healthBarForeground = self.createAsset('healthBarForeground', 'Health Bar Foreground', 0, 0); healthBarForeground.tint = 0x00FF00; self.updateHealthBar = function () { healthBarForeground.scale.x = self.hp / 10; var healthText = new Text2(self.hp.toString(), { size: 50, fill: "#ffffff" }); healthText.anchor.set(0.5, 0.5); healthText.x = healthBarBackground.width / 2; healthText.y = healthBarBackground.height / 2; if (self.healthText) self.healthText.destroy(); self.healthText = healthText; self.addChild(self.healthText); }; self.updateHealthBar(); }); var BeatColumn1 = Container.expand(function () { var self = Container.call(this); var beatGraphics = self.createAsset('beatColumn1', 'Beat Graphics Column 1', .5, .5); self.speed = 5; self.move = function () { self.y += self.speed; }; }); var BeatColumn2 = Container.expand(function () { var self = Container.call(this); var beatGraphics = self.createAsset('beatColumn2', 'Beat Graphics Column 2', .5, .5); self.speed = 5; self.move = function () { self.y += self.speed; }; }); var BeatColumn3 = Container.expand(function () { var self = Container.call(this); var beatGraphics = self.createAsset('beatColumn3', 'Beat Graphics Column 3', .5, .5); self.speed = 5; self.move = function () { self.y += self.speed; }; }); var BeatColumn4 = Container.expand(function () { var self = Container.call(this); var beatGraphics = self.createAsset('beatColumn4', 'Beat Graphics Column 4', .5, .5); self.speed = 5; self.move = function () { self.y += self.speed; }; }); var Player = Container.expand(function () { var self = Container.call(this); var playerGraphics = self.createAsset('player', 'Player Graphics', .5, .5); self.dance = function () {}; }); var Game = Container.expand(function () { var self = Container.call(this); self.gameTimer = 180; self.timerText = new Text2(self.gameTimer.toString(), { size: 150, fill: "#000000" }); self.timerText.anchor.set(0.5, 0); LK.gui.topCenter.addChild(self.timerText); self.updateTimer = function () { if (self.gameTimer > 0) { self.gameTimer--; self.timerText.setText(self.gameTimer.toString()); } else { LK.showGameOver('You Are Buck!'); } }; self.timerInterval = LK.setInterval(self.updateTimer, 1000); var score = 0; var scoreTxt = new Text2(score.toString(), { size: 150, fill: "#ffffff" }); scoreTxt.anchor.set(1, 0); LK.gui.topRight.addChild(scoreTxt); var playerHealth = self.addChild(new PlayerHealth()); playerHealth.x = 10; playerHealth.y = 10; LK.gui.topLeft.addChild(playerHealth); var background = self.createAsset('background', 'Background Image', 0, 0); self.addChildAt(background, 0); var beats = []; var player = self.addChild(new Player()); player.x = 2048 / 2; var floorHeight = 100; var playerFloorOffset = player.height / 2 + floorHeight; player.y = 2732 - playerFloorOffset; var floor = self.createAsset('floor', 'Floor Graphics', 0, 1); floor.y = 2732 - floorHeight; self.addChildAt(floor, 1); LK.on('tick', function () { player.dance(); for (var a = beats.length - 1; a >= 0; a--) { var beat = beats[a]; beat.move(); if (player.intersects(beat)) { score += 100; scoreTxt.setText(score.toString()); playerHealth.hp += 1; playerHealth.updateHealthBar(); if (playerHealth.hp >= 100) { LK.showGameOver('You Are Buck!'); } else if (playerHealth.hp <= 0) { LK.showGameOver('You Are Buck!'); } if (playerHealth.hp <= 0) { LK.showGameOver(); } beat.destroy(); beats.splice(a, 1); } else if (beat.y > 2732) { score -= 50; scoreTxt.setText(score.toString()); beat.destroy(); beats.splice(a, 1); } } if (LK.ticks % 60 == 0) { var columnWidth = 2048 / 4; var columnIndex = Math.floor(Math.random() * 4); var newBeat; switch (columnIndex) { case 0: newBeat = new BeatColumn1(); break; case 1: newBeat = new BeatColumn2(); break; case 2: newBeat = new BeatColumn3(); break; case 3: newBeat = new BeatColumn4(); break; } newBeat.x = columnIndex * columnWidth + columnWidth / 2; newBeat.y = 0; beats.push(newBeat); self.addChild(newBeat); } }); stage.on('down', function (obj) { var event = obj.event; var pos = event.getLocalPosition(self); var columnWidth = 2048 / 4; var columnIndex = Math.floor(pos.x / columnWidth); player.x = columnIndex * columnWidth + columnWidth / 2; }); });
===================================================================
--- original.js
+++ change.js
@@ -69,9 +69,9 @@
if (self.gameTimer > 0) {
self.gameTimer--;
self.timerText.setText(self.gameTimer.toString());
} else {
- LK.showGameOver();
+ LK.showGameOver('You Are Buck!');
}
};
self.timerInterval = LK.setInterval(self.updateTimer, 1000);
var score = 0;
@@ -108,9 +108,9 @@
playerHealth.updateHealthBar();
if (playerHealth.hp >= 100) {
LK.showGameOver('You Are Buck!');
} else if (playerHealth.hp <= 0) {
- LK.showGameOver();
+ LK.showGameOver('You Are Buck!');
}
if (playerHealth.hp <= 0) {
LK.showGameOver();
}
a forward facing brick with the writing "Stomp" Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
a forward facing brick with the writing "Jab" Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
A Krump Dancer wearing a snapback and Timberlands shoes Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
a forward facing brick with the writing "Chest Pop" Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
a forward facing brick with the writing "Arm Swing" Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
an urban street road near a boom box Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
a concrete floor Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.