User prompt
Only spawn 5 enemies
User prompt
Further increase border margin by 100px
User prompt
Add a 200px border on the level where enemies do not spawn
User prompt
Make background anchor point be .5,.5
User prompt
Add a background element to the games class at the center
User prompt
Hide the target indicator if the player is close to target location
User prompt
Move the target indicator hiding and showing into the games class. Also use the instance reference
User prompt
Hide the target indicator when the hero reaches the indicator
User prompt
The player should have a higher z index than the indicator
User prompt
Make the target indicator class draw below the player
User prompt
Set the target indicator x and y in the game class not the player class
User prompt
Add a target indicator class to the game. The target should indicate where the hero is moving to
User prompt
Make the initial target position the same as the hero spawn poaition
User prompt
If I tap the screen the hero should walk to where I tap
User prompt
Make score label font size be 80
User prompt
Don’t write score: in the score label. Simply just write the score as a number
User prompt
Fix Bug: 'ReferenceError: Can't find variable: score' in this line: 'score += 1;' Line Number: 358
User prompt
Add a separate label for score. Add this at the top center of the screen. You should get one point for killing an enemy
User prompt
Add a score to the top center of the screen, use impact with a black drop shadow
Initial prompt
There is two EnemyBulletIndicator remove the first one
var TargetIndicator = Container.expand(function () { var self = Container.call(this); var targetGraphics = XS.getAsset('target', 'Target Indicator', .5, .5); self.addChild(targetGraphics); }); var Player = Container.expand(function () { var self = Container.call(this); var playerGraphics = XS.getAsset('player', 'Player character', .5, .5); self.addChild(playerGraphics); self.targetX = 2048 / 2; self.targetY = 2732 / 2; self.speed = 5; self.move = function () { var dx = self.targetX - self.x; var dy = self.targetY - self.y; var distance = Math.sqrt(dx * dx + dy * dy); if (distance > self.speed) { self.x += dx / distance * self.speed; self.y += dy / distance * self.speed; } }; self.setTarget = function (x, y) { self.targetX = x; self.targetY = y; }; self.shoot = function () {}; }); var Enemy = Container.expand(function () { var self = Container.call(this); var enemyGraphics = XS.getAsset('enemy', 'Enemy character', .5, .5); self.addChild(enemyGraphics); self.move = function () {}; }); var Bullet = Container.expand(function () { var self = Container.call(this); var bulletGraphics = XS.getAsset('bullet', 'Bullet', .5, .5); self.addChild(bulletGraphics); self.move = function () {}; }); var Game = Container.expand(function () { var self = Container.call(this); var background = XS.getAsset('background', 'Background', .5, .5); background.x = 2048 / 2; background.y = 2732 / 2; self.addChild(background); var targetIndicator = new TargetIndicator(); targetIndicator.x = 2048 / 2; targetIndicator.y = 2732 / 2; self.addChild(targetIndicator); var player = self.addChild(new Player()); player.x = 2048 / 2; player.y = 2732 / 2; var enemies = []; for (var i = 0; i < 10; i++) { var enemy = self.addChild(new Enemy()); enemy.x = Math.random() * (2048 - 400) + 200; enemy.y = Math.random() * (2732 - 400) + 200; enemies.push(enemy); } var bullets = []; XS.on('tick', function () { player.move(0, 0); var dx = player.targetX - player.x; var dy = player.targetY - player.y; var distance = Math.sqrt(dx * dx + dy * dy); if (distance < player.speed) { targetIndicator.visible = false; } for (var i = 0; i < enemies.length; i++) { enemies[i].move(); } for (var i = 0; i < bullets.length; i++) { bullets[i].move(); } }); stage.on('down', function (obj) { var pos = obj.event.getLocalPosition(self); player.setTarget(pos.x, pos.y); targetIndicator.x = pos.x; targetIndicator.y = pos.y; targetIndicator.visible = true; }); });
===================================================================
--- original.js
+++ change.js
@@ -52,10 +52,10 @@
player.y = 2732 / 2;
var enemies = [];
for (var i = 0; i < 10; i++) {
var enemy = self.addChild(new Enemy());
- enemy.x = Math.random() * 2048;
- enemy.y = Math.random() * 2732;
+ enemy.x = Math.random() * (2048 - 400) + 200;
+ enemy.y = Math.random() * (2732 - 400) + 200;
enemies.push(enemy);
}
var bullets = [];
XS.on('tick', function () {
giant wall Pixel art, 16 bit, isometric, SNES, top-down, no background, white background, low resolution, symmetrical
Single Short round Isometric dungeon column, simple, few stones, single column, no floor, dark room, Single Game Texture. In-Game asset. 2d. Pixelart. White background. Blank background. Low detail. High contrast.
Multi color chaotic noise, primary colors Single Game Texture. In-Game asset. 2d. Pixelart. White background. Blank background. Low detail. High contrast.
Round purple magic fireball. White core Single Game Texture. In-Game asset. 2d. Pixelart. White background. Blank background. Low detail. High contrast.
enemy goblin , Pixel art, 16 bit, isometric, SNES, top-down, no background, white background, low resolution, symmetrical, seen from front. No staff.
Single fire particle Single Game Texture. In-Game asset. 2d. Pixelart. White background. Blank background. Low detail. High contrast.
https://i.imgur.com/R3ZLguO.jpg Dungeon, Empty open floor, dark, fullscreen, Single Game Texture. In-Game asset. 2d. Pixelart. White background. Blank background. high detail. High contrast. --ar 2:3
single wizard, hooded Pixel art, 16 bit, isometric, SNES, top-down, no background, white background, low resolution, symmetrical, seen from front.
round bomb. fuse on fire Single Game Texture. In-Game asset. 2d. Pixelart. White background. Blank background. Low detail. High contrast.
Multi color chaotic noise, primary colors. Rays from the center. Darker center Single Game Texture. In-Game asset. 2d. Pixelart. Low detail. High contrast.