User prompt
Move HOW TO PLAY up to the top of the tutorial box
User prompt
Enter line break after "HOW TO PLAY". Make "HOW TO PLAY" bold and bigger and center it in the tutorial box
User prompt
Make tutorial box black
User prompt
Fix Bug: 'ReferenceError: scoreTxt is not defined' in this line: 'LK.showGameOver({' Line Number: 169
User prompt
Make text fit inside the tutorial box
User prompt
Make "HOW TO PLAY" bold
User prompt
Add text to the tutorial box: "Dodge the rocks and see how long you can last!" Enter line break and display text: "Use on the screen to move left or right!"
User prompt
Add a tutorial screen to the start screen that is above the start button. Display text "HOW TO PLAY" in the box
User prompt
Move start button to the left so it is not being covered by the witch
User prompt
Move start button to the bottom of the screen
User prompt
Do not show any numbers or the counter at the top of the screen until the start button is clicked
User prompt
remove the number in the top center of the screen
User prompt
No rocks or potions should fall until the start button is clicked
User prompt
Add a start screen with a button that says START. The game only starts after you click on the start button
User prompt
When you get hit by a rock, the screen flashes red
User prompt
Start with 0 blue shield icons. When a blue potion is collected, the blue shield icon appears. When you have one blue shield, it protects you from one rock hit. So you lose the shield icon and you do not lose a heart icon.
User prompt
the message is not displaying
User prompt
When the game is over, display the text "You survived X seconds" at the top of the screen. X is how many seconds they survived according to the timer
User prompt
Display timer on the top right corner of the screen
User prompt
add a timer. When the game is over, display the text: "You survived for X seconds". X is how long their survived according to the timer
User prompt
Collecting an orange potion shouldn't make the rocks disappear. It should give you one fireball icon. Then clicking on the fireball icon, makes all onscreen rocks disappear
User prompt
the red potions add hearts but the heart counter is not working correctly
User prompt
Move the shield icon down a little so it doesn't cover the fireball
User prompt
if you have a fireball icon, when you press the space bar or tap on the fireball, the screen flashes orange and all onscreen boulders disappear
User prompt
change it so the witch moves left or right when you use the arrow keys and tap to the left or right of the witch
var BluePotion = Container.expand(function () { var self = Container.call(this); var bluePotionGraphics = self.createAsset('bluePotion', 'Shield Potion', .5, .5); self.speed = 3; self.move = function () { self.y += self.speed; }; }); var OrangePotion = Container.expand(function () { var self = Container.call(this); var orangePotionGraphics = self.createAsset('orangePotion', 'Fireball Potion', .5, .5); self.speed = 3; self.move = function () { self.y += self.speed; }; }); var RedPotion = Container.expand(function () { var self = Container.call(this); var redPotionGraphics = self.createAsset('redPotion', 'Extra Heart Potion', .5, .5); self.speed = 3; self.move = function () { self.y += self.speed; }; }); var Heart = Container.expand(function () { var self = Container.call(this); var heartGraphics = self.createAsset('heart', 'Player Life', .5, .5); }); var Rock = Container.expand(function () { var self = Container.call(this); var rockGraphics = self.createAsset('rock', 'Falling Rock', .5, .5); self.speed = 5; self.move = function () { self.y += self.speed; }; }); var Potion = Container.expand(function () { var self = Container.call(this); var potionGraphics = self.createAsset('potion', 'Boost Potion', .5, .5); self.speed = 3; self.move = function () { self.y += self.speed; }; }); var Player = Container.expand(function () { var self = Container.call(this); var playerGraphics = self.createAsset('player', 'Player Character', .5, .5); self.shield = false; self.move = function (x, y) { self.x = x; self.y = y; }; }); var Game = Container.expand(function () { var self = Container.call(this); var startTime = null; var background = self.createAsset('background', 'Game Background', 0, 0); background.width = 2048; background.height = 2732; var tutorialBox = self.createAsset('tutorialBox', 'Tutorial Box', .5, .5); tutorialBox.tint = 0x000000; tutorialBox.x = 2048 / 2; tutorialBox.y = 2732 / 2 - 200; var tutorialText = new Text2('HOW TO PLAY', { size: 70, fill: '#ffffff', fontStyle: 'bold' }); tutorialText.anchor.set(.5, -1); tutorialBox.addChild(tutorialText); var tutorialText2 = new Text2('\nDodge the rocks and see how long you can last!\nTap on the screen to move left or right!', { size: 50, fill: '#ffffff', fontStyle: 'bold' }); tutorialText2.anchor.set(.5, .5); tutorialBox.addChild(tutorialText2); var startButton = self.createAsset('startButton', 'Start Button', .5, .5); startButton.x = startButton.width; startButton.y = 2732 - startButton.height; startButton.on('down', function () { startTime = Date.now(); tutorialBox.destroy(); startButton.destroy(); self.gameStarted = true; }); var rocks = []; var potions = []; var player = self.addChild(new Player()); player.x = 2048 / 2; player.y = 2732 - player.height; var lives = 3; var hearts = []; for (var i = 0; i < lives; i++) { var heart = new Heart(); heart.x = 50 + i * 100; heart.y = 50; hearts.push(heart); LK.gui.topLeft.addChild(heart); } var fireballIcon = self.createAsset('fireballIcon', 'Fireball Icon', .5, .5); fireballIcon.x = 50; fireballIcon.y = 150; fireballIcon.visible = false; LK.gui.topLeft.addChild(fireballIcon); fireballIcon.on('down', function () { if (fireballIcon.visible) { for (var i = rocks.length - 1; i >= 0; i--) { rocks[i].destroy(); rocks.splice(i, 1); } LK.effects.flashScreen(0xFFA500, 1000); fireballIcon.visible = false; } }); var shieldIcon = self.createAsset('shieldIcon', 'Shield Icon', .5, .5); shieldIcon.x = 50; shieldIcon.y = 300; shieldIcon.visible = false; LK.gui.topLeft.addChild(shieldIcon); var scoreTxt = new Text2('0', { size: 150, fill: "#ffffff" }); scoreTxt.anchor.set(1, 0); LK.gui.topRight.addChild(scoreTxt); var dragNode = null; stage.on('keydown', function (event) { if (event.key == 'ArrowLeft') { player.move(player.x - 100, player.y); } else if (event.key == 'ArrowRight') { player.move(player.x + 100, player.y); } else if (event.key == ' ') { for (var i = rocks.length - 1; i >= 0; i--) { rocks[i].destroy(); rocks.splice(i, 1); } LK.effects.flashScreen(0xFFA500, 1000); } }); stage.on('down', function (obj) { var event = obj.event; var pos = event.getLocalPosition(self); if (pos.x < player.x) { player.move(player.x - 100, player.y); } else if (pos.x > player.x) { player.move(player.x + 100, player.y); } }); function handleMove(obj) { var event = obj.event; var pos = event.getLocalPosition(self); if (dragNode) { dragNode.move(pos.x, pos.y); } } LK.on('tick', function () { for (var a = rocks.length - 1; a >= 0; a--) { if (rocks[a]) { rocks[a].move(); if (rocks[a].y > 2732) { rocks[a].destroy(); rocks.splice(a, 1); } else if (player.intersects(rocks[a])) { rocks[a].destroy(); rocks.splice(a, 1); if (player.shield) { player.shield = false; shieldIcon.visible = false; } else { hearts[--lives].destroy(); hearts.splice(lives, 1); LK.effects.flashScreen(0xff0000, 1000); if (lives == 0) { var endTime = Date.now(); var duration = Math.floor((endTime - startTime) / 1000); LK.showGameOver({ text: 'You survived for ' + duration + ' seconds and scored ' + scoreTxt.text + ' points', position: LK.gui.topCenter }); } } } } } for (var b = potions.length - 1; b >= 0; b--) { if (potions[b]) { potions[b].move(); if (potions[b].y > 2732) { potions[b].destroy(); potions.splice(b, 1); } else if (player.intersects(potions[b])) { if (potions[b] instanceof RedPotion) { var heart = new Heart(); heart.x = 50 + hearts.length * 100; heart.y = 50; hearts.push(heart); LK.gui.topLeft.addChild(heart); lives++; } else if (potions[b] instanceof OrangePotion) { fireballIcon.visible = true; } else if (potions[b] instanceof BluePotion) { player.shield = true; shieldIcon.visible = true; } potions[b].destroy(); potions.splice(b, 1); } } } if (self.gameStarted && LK.ticks % 60 == 0) { var newRock = new Rock(); newRock.x = Math.random() * 2048; newRock.y = 0; rocks.push(newRock); self.addChild(newRock); } if (self.gameStarted && LK.ticks % 300 == 0) { var newRedPotion = new RedPotion(); newRedPotion.x = Math.random() * 2048; newRedPotion.y = 0; potions.push(newRedPotion); self.addChild(newRedPotion); } if (self.gameStarted && LK.ticks % 450 == 0) { var newOrangePotion = new OrangePotion(); newOrangePotion.x = Math.random() * 2048; newOrangePotion.y = 0; potions.push(newOrangePotion); self.addChild(newOrangePotion); } if (self.gameStarted && LK.ticks % 600 == 0) { var newBluePotion = new BluePotion(); newBluePotion.x = Math.random() * 2048; newBluePotion.y = 0; potions.push(newBluePotion); self.addChild(newBluePotion); } if (self.gameStarted) { timerTxt.setText(Math.floor((Date.now() - startTime) / 1000)); } }); });
===================================================================
--- original.js
+++ change.js
@@ -65,9 +65,9 @@
size: 70,
fill: '#ffffff',
fontStyle: 'bold'
});
- tutorialText.anchor.set(.5, 0);
+ tutorialText.anchor.set(.5, -1);
tutorialBox.addChild(tutorialText);
var tutorialText2 = new Text2('\nDodge the rocks and see how long you can last!\nTap on the screen to move left or right!', {
size: 50,
fill: '#ffffff',
Witch Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
Witch Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
Rock A big rock
blue potion a blue potion
A witch's room with a cauldron A witch's room with a cauldron
heart icon heart icon
fireball icon fireball icon, no background
blue shield blue shield no background
red potion red potion, no background
orange potion orange potion, no background
START button START button