Code edit (4 edits merged)
Please save this source code
User prompt
make sure they can never spawn on screen, but to the right instead, and give them a minimum of 360 distance between each
User prompt
what i want is that they are randomly spared each time they get spawned, so give them an horizontal offset at the moment of the spawn
User prompt
make it so that ground obstacles dont always have the same distance between them
Code edit (2 edits merged)
Please save this source code
User prompt
make the flying obstacle be just above the ground obstacles
User prompt
put the flying obstacle at half its height
User prompt
now lets make a flying obstacle, only one at the same time on screen, it flies straight forward at a medium height
Code edit (1 edits merged)
Please save this source code
User prompt
lets make it so there can be a small offset between obstacles so they dont appear to be always at the same distance to one another, but prevent them from being too close together
User prompt
now lets make simple obstacles that appear on the ground, they must be boxes with 2 sizes, one is same than the box of the player and one is double that size, they appear infinitely and there is not more than 3 total obstacles at the same time on screen
Code edit (1 edits merged)
Please save this source code
User prompt
ground tiles still have gaps, and as the game speed increases the gaps become bigger, fix it please
User prompt
lets make it so that ground is infinitely seamless, no gaps between diferent pieces
Code edit (1 edits merged)
Please save this source code
User prompt
Dino Jump - Evolving Runner
Initial prompt
quiero hacer un juego que consista en el juego del dinosaurio de google, pero al que poco a poco le iremos añadiendo mas mecanicas, vamos a empezar por tener un suelo en el que se apoye el dinosaurio, y que pueda saltar cuando hagamos click
/****
* Classes
****/
var Dinosaur = Container.expand(function () {
var self = Container.call(this);
var dinoGraphics = self.attachAsset('dino', {
anchorX: 0.5,
anchorY: 1.0
});
self.velocityY = 0;
self.gravity = 0.8;
self.jumpPower = -18;
self.isGrounded = false;
self.groundY = 0;
self.jump = function () {
if (self.isGrounded) {
self.velocityY = self.jumpPower;
self.isGrounded = false;
LK.getSound('jump').play();
}
};
self.update = function () {
// Apply gravity
self.velocityY += self.gravity;
self.y += self.velocityY;
// Check ground collision
if (self.y >= self.groundY) {
self.y = self.groundY;
self.velocityY = 0;
self.isGrounded = true;
}
// Check if fallen off screen (game over condition)
if (self.y > 2732 + 100) {
LK.showGameOver();
}
};
return self;
});
var GroundTile = Container.expand(function () {
var self = Container.call(this);
var groundGraphics = self.attachAsset('ground', {
anchorX: 0,
anchorY: 0
});
self.update = function () {
self.x += -gameSpeed;
};
return self;
});
/****
* Initialize Game
****/
var game = new LK.Game({
backgroundColor: 0xf7f7f7
});
/****
* Game Code
****/
// Game variables
var dinosaur;
var groundTiles = [];
var groundY = 2732 - 200; // Ground level
var gameSpeed = 6;
var distanceScore = 0;
// Create score display
var scoreTxt = new Text2('0', {
size: 80,
fill: 0x333333
});
scoreTxt.anchor.set(1, 0);
LK.gui.topRight.addChild(scoreTxt);
// Create dinosaur
dinosaur = game.addChild(new Dinosaur());
dinosaur.x = 400;
dinosaur.y = groundY;
dinosaur.groundY = groundY;
// Create initial ground tiles
function createGroundTile(x) {
var tile = new GroundTile();
tile.x = x;
tile.y = groundY;
return tile;
}
// Initialize ground tiles to cover screen width plus extra for scrolling
for (var i = 0; i < 15; i++) {
var tile = game.addChild(createGroundTile(i * 200));
groundTiles.push(tile);
}
// Game input handling
game.down = function (x, y, obj) {
dinosaur.jump();
};
// Main game update loop
game.update = function () {
// Update distance score
distanceScore += gameSpeed;
var displayScore = Math.floor(distanceScore / 10);
LK.setScore(displayScore);
scoreTxt.setText(displayScore);
// Manage ground tiles
for (var i = groundTiles.length - 1; i >= 0; i--) {
var tile = groundTiles[i];
// Remove tiles that have scrolled off screen
if (tile.x < -250) {
tile.destroy();
groundTiles.splice(i, 1);
}
}
// Add new ground tiles as needed
var lastTile = groundTiles[groundTiles.length - 1];
if (lastTile && lastTile.x + 200 < 2048 + 200) {
var newTile = game.addChild(createGroundTile(lastTile.x + 200));
groundTiles.push(newTile);
}
// Gradually increase game speed for difficulty progression
if (LK.ticks % 600 === 0) {
// Every 10 seconds at 60fps
gameSpeed += 0.5;
for (var j = 0; j < groundTiles.length; j++) {
groundTiles[j].scrollSpeed = -gameSpeed;
}
}
}; ===================================================================
--- original.js
+++ change.js
@@ -41,11 +41,10 @@
var groundGraphics = self.attachAsset('ground', {
anchorX: 0,
anchorY: 0
});
- self.scrollSpeed = -6;
self.update = function () {
- self.x += self.scrollSpeed;
+ self.x += -gameSpeed;
};
return self;
});
dont crop parts of the image, show full image, give black outline
make him be flying with both wings, dont crop the image
tall rock, brown, very solid, really thick black outline
smaller rock, more rounded, really thick black outline, same brown color
white rounded cloud, really thick black outline
Simple golden coin, rounded, shiny, big black outline, funny
Same dinosaur but with wings down
Same dinosaur but legs running