User prompt
Destroy levelText instance.
User prompt
Fix Bug: 'ReferenceError: levelText is not defined' in this line: 'levelText.setText('Lvl: ' + level);' Line Number: 48
User prompt
Add the new line to "Tap anywhere to make an explosion". In the new line write "Destroy them all"
User prompt
At the beginning, place the text in the center: "Tap anywhere to make an explosion". With the first user's touch, that text should disappear.
User prompt
Fix Bug: 'ReferenceError: levelText is not defined' in this line: 'levelText.setText('Lvl: ' + level);' Line Number: 48
User prompt
At the beginning of the game, place 'Get ready' text in the center of the screen (use the same text field that shows 'Level completed'). Below it, place the 'Start' button (can be the same as Next button)
User prompt
Fix Bug: 'ReferenceError: levelText is not defined' in this line: 'levelText.setText('Lvl: ' + level);' Line Number: 48
User prompt
Fix Bug: 'ReferenceError: levelText is not defined' in this line: 'levelText.setText('Lvl: ' + level);' Line Number: 48
User prompt
Fix Bug: 'ReferenceError: levelText is not defined' in this line: 'levelText.setText('Lvl: ' + level);' Line Number: 48
User prompt
Fix Bug: 'Uncaught ReferenceError: level is not defined' in this line: 'var levelText = new Text2('Lvl: ' + level, {' Line Number: 103
User prompt
Fix Bug: 'ReferenceError: level is not defined' in this line: 'level++;' Line Number: 47
User prompt
Fix Bug: 'ReferenceError: level is not defined' in this line: 'level++;' Line Number: 47
User prompt
Make the Next button bigger, and let it have the label 'Next Level'. Make a text field in the top center of the screen, showing level number, example: "Lvl: 1"
User prompt
When no targets are left, place a text in the center: "Level XX completed!", replace XX by the number of level just completed. Below it, place a button: 'Next'
User prompt
Fix Bug: 'Uncaught ReferenceError: enemiesLeftText is not defined' in this line: 'enemiesLeftText.anchor.set(1, 0);' Line Number: 85
User prompt
Change the 'Enemies left:' text into 'Targets left:' Each time the target is destroyed, deduct the number by 1. Number on the text field should reflect number of targets on the screen.
User prompt
Make text size 1.5 times smaller.
User prompt
Change the 'Ammunition' text into 'Touches left', make it smaller, move it to the left. To the right of it, make another text field, 'Enemies left' and update it with the current number of targets of the screen.
User prompt
In the beginning, player has 5 'touches' allowed ('Ammunition'). After each touch (generating set of 4 projeciles), the number of touches reduces by 1. Make the tex field to show 'Ammunition' in the top of the screen.
User prompt
Make projectiles 2 times smaller and two times faster. When a projectile hits one of the targets, targets explode creating 4 new projectiles (the original projectile disappears) which go into 4 directions *up, down, left, right).
User prompt
When player touches the scene, on the touch place, 4 new objects are generated. Call them projectiles. Projectiles go in four directions from the place of creation. They are 2 x faster than targets.
User prompt
Let targets have the same speed.
User prompt
Let targets move 2 x faster
User prompt
When Target leaves the scene, make it appear on the opposite side of the scene.
User prompt
Let dots (call them 'targets') go in random directions, but only vertically or horizontally
var Projectile = Container.expand(function (direction) { var self = Container.call(this); var projectileGraphics = self.createAsset('projectile', 'Projectile Graphics', .25, .25); self.speed = 16; self.direction = direction; self.move = function () { switch (self.direction) { case 'up': self.y -= self.speed; break; case 'down': self.y += self.speed; break; case 'left': self.x -= self.speed; break; case 'right': self.x += self.speed; break; } if (self.x < -self.width || self.x > 2048 || self.y < -self.height || self.y > 2732) { self.destroy(); } }; }); var Target = Container.expand(function () { var self = Container.call(this); var dotGraphics = self.createAsset('dot', 'Dot Graphics', .5, .5); self.direction = Math.random() < 0.5 ? 'horizontal' : 'vertical'; self.speed = 4; self.move = function () { if (self.direction === 'horizontal') { self.x += self.speed; if (self.x > 2048) self.x = -self.width; else if (self.x < -self.width) self.x = 2048; } else { self.y += self.speed; if (self.y > 2732) self.y = -self.height; else if (self.y < -self.height) self.y = 2732; } }; }); var NextLevelButton = Container.expand(function () { var self = Container.call(this); var nextButtonGraphics = self.createAsset('nextButton', 'Next Level', .5, .5); self.x = 2048 / 2; self.y = 2732 / 2 + 100; self.on('down', function () { self.level++; levelText.setText('Lvl: ' + level); levelCompleted = false; levelCompletedText.destroy(); self.destroy(); }); }); var Game = Container.expand(function () { var self = Container.call(this); LK.stageContainer.setBackgroundColor(0x008080); LK.on('tick', function () { for (var i = 0; i < dots.length; i++) { dots[i].move(); } for (var j = 0; j < projectiles.length; j++) { projectiles[j].move(); for (var i = 0; i < dots.length; i++) { if (projectiles[j].intersects(dots[i])) { var directions = ['up', 'down', 'left', 'right']; directions.forEach(function (direction) { var newProjectile = new Projectile(direction); newProjectile.x = dots[i].x; newProjectile.y = dots[i].y; projectiles.push(newProjectile); self.addChild(newProjectile); }); dots[i].destroy(); dots.splice(i, 1); projectiles[j].destroy(); projectiles.splice(j, 1); targetsLeftText.setText('Targets left: ' + dots.length); if (dots.length === 0 && !levelCompleted) { levelCompleted = true; var levelCompletedText = new Text2('Level ' + level + ' completed!', { size: 100, fill: '#ffffff' }); levelCompletedText.anchor.set(0.5, 0.5); levelCompletedText.x = 2048 / 2; levelCompletedText.y = 2732 / 2; self.addChild(levelCompletedText); var nextButton = new NextLevelButton(); self.addChild(nextButton); } } } } projectiles = projectiles.filter(function (projectile) { return !projectile._destroyed; }); }); var dots = []; var projectiles = []; var ammunition = 5; self.level = 1; var levelCompleted = false; var level = 1; var level = 1; var levelText = new Text2('Lvl: ' + level, { size: 100 / 1.5, fill: '#ffffff' }); levelText.anchor.set(0.5, 0); LK.gui.topCenter.addChild(levelText); var touchesLeftText = new Text2('Touches left: ' + ammunition, { size: 100 / 1.5, fill: '#ffffff' }); touchesLeftText.anchor.set(0, 0); LK.gui.topLeft.addChild(touchesLeftText); var targetsLeftText = new Text2('Targets left: ' + dots.length, { size: 100 / 1.5, fill: '#ffffff' }); targetsLeftText.anchor.set(1, 0); LK.gui.topRight.addChild(targetsLeftText); for (var i = 0; i < 5; i++) { var target = new Target(); target.x = Math.random() * 2048; target.y = Math.random() * 2732; dots.push(target); self.addChild(target); } targetsLeftText.setText('Targets left: ' + dots.length); LK.stage.on('down', function (obj) { if (ammunition > 0) { ammunition--; touchesLeftText.setText('Touches left: ' + ammunition); var event = obj.event; var pos = event.getLocalPosition(self); var directions = ['up', 'down', 'left', 'right']; directions.forEach(function (direction) { var projectile = new Projectile(direction); projectile.x = pos.x; projectile.y = pos.y; projectiles.push(projectile); self.addChild(projectile); }); } targetsLeftText.setText('Targets left: ' + dots.length); }); });
===================================================================
--- original.js
+++ change.js
@@ -100,8 +100,9 @@
var ammunition = 5;
self.level = 1;
var levelCompleted = false;
var level = 1;
+ var level = 1;
var levelText = new Text2('Lvl: ' + level, {
size: 100 / 1.5,
fill: '#ffffff'
});
Simple flat icon, 200x200pixels, one bright color square with border. No shadows, top down view, transparent background. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
Simple flat icon, 200x200pixels, one bright color circle with border. No shadows, top down view, transparent background. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
Simple flat icon, 200x200pixels, one bright color diamond with border. No shadows, top down view, transparent background. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
Simple flat icon, 200x200pixels, one bright color romb with border. No shadows, top down view, transparent background. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
Simple flat icon, 200x200pixels, one bright color smiley with border. No shadows, top down view, transparent background. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
1024x1366 pixels, totally black no more than 20 very small, barely visible, stars here and there. Simple Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
Single Game Texture, 50x50pix. In-Game asset. 2d. Blank background. High contrast. No shadows. Light green circle with border. Simple. No other objects. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.