Code edit (1 edits merged)
Please save this source code
Code edit (1 edits merged)
Please save this source code
Code edit (1 edits merged)
Please save this source code
Code edit (11 edits merged)
Please save this source code
User prompt
Please fix the bug: 'TypeError: Cannot read properties of undefined (reading 'width')' in or related to this line: 'barricade.x = 2048 + spikeTrap.width;' Line Number: 454
Code edit (1 edits merged)
Please save this source code
User prompt
give all text a black outline
User prompt
the +10 signs should fly off to the left side of the screen and be destroyed after a few seconds
User prompt
show a +10 sign and play a sound effect when player picks up a collectible
User prompt
Increase score by 10 when player picks up a collectible
User prompt
add a scorelabel top center of the scree
Code edit (12 edits merged)
Please save this source code
User prompt
make a class for the dustparticle and use its update method instead of running the spread and alpha in an interval
User prompt
the dust particles should spread and go transparent before they disappear
User prompt
use a separate dustparticle asset for the dustparticles
User prompt
Please fix the bug: 'Timeout.tick error: Cannot read properties of undefined (reading 'destroy')' in or related to this line: 'particle.destroy();' Line Number: 169
User prompt
the dustparticle effect should be a small aprticle explosion looking like dust that rises from the ground on jump takeoff and landing
User prompt
make a dustparticle effect when player jumps and lands
Code edit (1 edits merged)
Please save this source code
User prompt
every five seconds, spawn a spiketrap off the right side of the screen, at groundY and bring it onto the screen at gamespeed + boostspeed
Code edit (1 edits merged)
Please save this source code
Code edit (1 edits merged)
Please save this source code
User prompt
Please fix the bug: 'Uncaught TypeError: Cannot read properties of undefined (reading 'data')' in or related to this line: 'var startX = obj.event.data.global.x;' Line Number: 236
Code edit (9 edits merged)
Please save this source code
User prompt
plese make the game.up function detect swipes in three directions, either primarily up,primarily down or primarily right
===================================================================
--- original.js
+++ change.js
@@ -2,9 +2,9 @@
* Classes
****/
/***
TODO:
- - Make a low barrier where the duck movement is neccessary.
+ - Animate tall barricade breaking apart in method breakApart().
- Pause to explain the jump, dash and duck mechanics first time corresponding obstacles appear.
- Music
- Sound effects
- Difficulty ramping.
@@ -16,19 +16,21 @@
var ArrowVolley = Container.expand(function () {
var self = Container.call(this);
//var assetTypes = ['snacks', 'snacks2', 'snacks3', 'snacks4', 'snacks5', 'snacks6', 'snacks7'];
//var randomAsset = assetTypes[Math.floor(Math.random() * assetTypes.length)];
- for (var i = 0; i < 20; i++) {
+ for (var i = 0; i < 7; i++) {
for (var j = 0; j < 17; j++) {
var t = self.attachAsset('arrow', {
anchorX: 0.5,
anchorY: 0.5,
x: i * 250,
- y: j * 125
+ y: j * 123
});
}
}
- self.speed = 10;
+ self.speed = 5;
+ self.dead = false;
+ self.passed = false;
self.update = function () {
// update logic if needed
};
});
@@ -164,8 +166,17 @@
gameSpeedBoost = 0;
}
} else if (self.ducking) {
self.actionTimer++;
+ for (var i = 0; i < 2; i++) {
+ var dustParticle = new DustParticle();
+ dustParticle.x = self.x - 150 + (Math.random() * 20 - 10);
+ dustParticle.y = self.y + self.playerWalkGraphics.height / 2 + (Math.random() * 20 - 10);
+ dustParticle.alpha = 0.8;
+ dustParticle.spreadY = Math.random() * -5;
+ dustParticle.spreadX = Math.random() * -10;
+ game.addChild(dustParticle);
+ }
//gameSpeedBoost -= 0.1;
if (self.actionTimer >= self.actionTimerMax) {
self.y = groundY;
self.ducking = false;
@@ -409,9 +420,9 @@
if (gameStarted && !gameOver) {
// Update player
player.update();
// Update score label text
- scoreLabel.setText('Score: ' + LK.getScore());
+ scoreLabel.setText('' + LK.getScore());
// Update dust particles and score signs
for (var i = game.children.length - 1; i >= 0; i--) {
var child = game.children[i];
if (child instanceof DustParticle || child instanceof ScoreSign) {
@@ -442,9 +453,9 @@
child.x = 2048 + child.width;
}
if (child.intersects(player)) {
LK.setScore(LK.getScore() + 10);
- scoreLabel.setText('Score: ' + LK.getScore());
+ scoreLabel.setText('' + LK.getScore());
// Show +10 sign
var scoreSign = new ScoreSign(10);
scoreSign.x = player.x;
scoreSign.y = player.y - 100;
@@ -464,9 +475,9 @@
if (child instanceof TallBarricade && player.dashing) {
if (!child.dead) {
child.breakApart();
LK.setScore(LK.getScore() + 50);
- scoreLabel.setText('Score: ' + LK.getScore());
+ scoreLabel.setText('' + LK.getScore());
// Show +10 sign
var scoreSign = new ScoreSign(50);
scoreSign.x = player.x;
scoreSign.y = player.y - 100;
@@ -474,8 +485,21 @@
// Play sound effect for collectible pickup
//LK.getSound('collectiblePickup').play();
child.destroy();
}
+ } else if (child instanceof ArrowVolley && player.ducking) {
+ if (!child.passed) {
+ //child.dead = true;
+ child.passed = true;
+ child.speed = 30;
+ LK.setScore(LK.getScore() + 50);
+ scoreLabel.setText('' + LK.getScore());
+ // Show +10 sign
+ var scoreSign = new ScoreSign(50);
+ scoreSign.x = player.x;
+ scoreSign.y = player.y - 100;
+ game.addChild(scoreSign);
+ }
} else {
LK.effects.flashScreen(0xff0000, 200);
gameOverAnimation();
}
A background illstration for a game, rich in style, medieval fantasy themed, of a landscape seen from a great distance, like froma mountain ridge with mountains and forests and lakes and lots of features.. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
A spritesheet with various poses for a heavily armored little dwarven warrior with an axe in various poses for use in an endless runner game. Te poses should include walking, eating, jumping, ducking low, and chargingforward. Sprites should be laid out in a rectangular grid wih blank space between them. Style should be medieval fantasy.. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
A game logo for a game called 'Endless Viking Run' using norse font on a background of a viking shield and crossed axes. Muted colors.. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.