User prompt
use two instances of path for seamless scrolling
User prompt
make a parallax effect where the path and the bushes move slowly towards the left, as new instances are spawned on the right side seamlessly
User prompt
make another asset called berrybush, and use it randomly for shrubbery
Code edit (2 edits merged)
Please save this source code
User prompt
add a bit of randomness to the shrubberies x and y positions
Code edit (9 edits merged)
Please save this source code
User prompt
make a function to place x amount of shrubberies, more or less evenly spaced
User prompt
add a few shrubberies between the background and ground
Code edit (4 edits merged)
Please save this source code
User prompt
make a path asset
Code edit (1 edits merged)
Please save this source code
User prompt
please make a fullscreen background image
Initial prompt
Endless Runner 1
===================================================================
--- original.js
+++ change.js
@@ -64,16 +64,24 @@
x: 2048 / 2,
y: 2732 / 2
});
game.addChild(background);
-// Add path image
-var path = LK.getAsset('path', {
+// Add first path image
+var path1 = LK.getAsset('path', {
anchorX: 0,
anchorY: 0,
x: 0,
y: 2732 - 400
});
-game.addChild(path);
+game.addChild(path1);
+// Add second path image
+var path2 = LK.getAsset('path', {
+ anchorX: 0,
+ anchorY: 0,
+ x: 2048,
+ y: 2732 - 400
+});
+game.addChild(path2);
// Function to place x amount of shrubberies evenly spaced
function placeShrubberies(count) {
var spacing = 2048 / (count + 1);
for (var i = 1; i <= count; i++) {
@@ -111,13 +119,18 @@
// Update game logic
game.update = function () {
// Update player
player.update();
- // Move path to the left
- path.x -= 2;
- if (path.x <= -2048) {
- path.x = 0;
+ // Move paths to the left
+ path1.x -= 2;
+ path2.x -= 2;
+ // Reset path positions for seamless scrolling
+ if (path1.x <= -2048) {
+ path1.x = path2.x + 2048;
}
+ if (path2.x <= -2048) {
+ path2.x = path1.x + 2048;
+ }
// Move shrubberies to the left
for (var i = game.children.length - 1; i >= 0; i--) {
var child = game.children[i];
if (child instanceof Shrubbery) {
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.