User prompt
Show stars in front of backgeound2
User prompt
Show stars on game stars, they should be static butbhave different aizes
User prompt
Add stars behing baclground
User prompt
Secondbackground update anchor to ocupy full screen
User prompt
Backgeound2 should ocupy the whole screen and be behing background
User prompt
Add secondbackground
User prompt
Add backgound asset
User prompt
When landedlander asset is shown also show lander asset.
User prompt
When landedlander is displayed for a second, also display for that same second the lander behind it
User prompt
lander should overlap 50 pixels with platform for collision to be valid
Code edit (8 edits merged)
Please save this source code
User prompt
lander collision with platfrom should be measured 60 pixels down from the top of the platform asset.
Code edit (4 edits merged)
Please save this source code
User prompt
move thruster 30 pixels closer to the lander
Code edit (1 edits merged)
Please save this source code
User prompt
if lander intersects with either side of the platform, then its game over
User prompt
lander can only land on the top of the platform. if it touches the side of the platform, its game over
User prompt
game should get more difficult as levels progress
User prompt
when lander is destroyed by coisioning with the platform, show a new asset called, CrashedLander on top of the lander. this asset should be destroyed after one second.
User prompt
create a class called crashedlander. this asset will be displayed for one second on top of the lander, when the lander crasehs with the platform.
User prompt
when lander crashes with platform, wait one second before game ovevr
User prompt
when lander crashes, wait 1 second before showing game over message
Code edit (1 edits merged)
Please save this source code
User prompt
increase gravity 10%
User prompt
asteroids should start spawning on level 4
===================================================================
--- original.js
+++ change.js
@@ -51,17 +51,21 @@
}
// Update thruster position and visibility
thruster.x = self.x;
- thruster.y = self.y + self.height - 120; // Position thruster 30 pixels closer to the lander
+ thruster.y = self.y + self.height; // Position thruster 20 pixels closer to the lander
thruster.visible = self.isThrusting;
};
self.land = function () {
self.isLanding = true;
var landedLander = game.addChild(new LandedLander());
landedLander.x = self.x;
landedLander.y = self.y;
landedLander.destroyAfterOneSecond();
+ self.visible = true;
+ LK.setTimeout(function () {
+ self.visible = false;
+ }, 1000);
levelManager.incrementLevel();
};
self.refuel = function () {
self.fuel = 1000;
@@ -85,9 +89,9 @@
}
};
self.checkLanding = function (lander) {
if (lander.intersects(self)) {
- if (lander.speedY < 2 && lander.x > self.x - self.width / 2 + 50 && lander.x < self.x + self.width / 2 - 50) {
+ if (lander.speedY < 2 && lander.x > self.x - self.width / 2 && lander.x < self.x + self.width / 2) {
return true;
} else {
isGameOver = true;
var crashedLander = game.addChild(new CrashedLander());