Code edit (2 edits merged)
Please save this source code
User prompt
in gem code add option to randomly select graphic displayed. graphic options are gem, NewLife and 2xBonus
Code edit (1 edits merged)
Please save this source code
User prompt
when level changes adjust alien spawn so its in front of tiles and not behind
User prompt
If gold tile below gem no longer has gem above it then flip tile to target colour if gem been collected back to start colour if gem tile not been flipped
Code edit (7 edits merged)
Please save this source code
User prompt
when zbert respawns check to see if Zbert is already at spawnpoint and if so remove duplicate
User prompt
correct code so that when Zbert falls off grid stop jump from triggering a second time
Code edit (1 edits merged)
Please save this source code
User prompt
When Zbert moves up right and has no tile below him then end game
User prompt
Fix Bug: 'TypeError: self.fall is not a function' in or related to this line: 'self.fall();' Line Number: 261
User prompt
When Zbert moves up right and goes off grid then run fall routine for zbert
Code edit (1 edits merged)
Please save this source code
User prompt
When Zbert moves up right and reaches the second to last tile if zbert moves upright again then activate the fall routine
User prompt
When Zbert moves up right when Zbert lands on last tile trigger fall action
User prompt
Fix Bug: 'Uncaught ReferenceError: tileGraphics is not defined' in or related to this line: 'tileGraphics.tint = 0x000000;' Line Number: 397
User prompt
Fix Bug: 'Uncaught TypeError: tile.tint is not a function' in or related to this line: 'tile.tint(0x000000);' Line Number: 397
User prompt
Tint the centre tile of the grid black when setting up grid
Code edit (1 edits merged)
Please save this source code
User prompt
start zebert falling animation 80 lower on y
User prompt
for detection of intersect with Zbert for Alien and ball minus 150 on Y axis to compensate for Zberts offset
User prompt
add in collision detection between the Alien and zbert
Code edit (1 edits merged)
Please save this source code
User prompt
When zbert is hit make sure balls and aliens are cleared from screen
User prompt
when zebert gets hit stop stop Ball, alien and zberts movement so only one hit is registered
===================================================================
--- original.js
+++ change.js
@@ -226,9 +226,53 @@
targetY -= tileHeight - 90;
var tileBelowAfterMove = game.grid.getTileAt(targetX, targetY + tileHeight);
if (!tileBelowAfterMove) {
self.isZbertJumping = false;
- self.fall();
+ self.fall = function () {
+ var fallToY = game.height - self.height / 2;
+ var fallDuration = 4000;
+ var fallStartTime = Date.now();
+ var zbertFallTickHandler = function zbertFallTickHandler() {
+ var currentTime = Date.now();
+ var timeElapsed = currentTime - fallStartTime;
+ if (timeElapsed < fallDuration) {
+ var fallProgress = timeElapsed / fallDuration;
+ self.y = startY + 190 + (fallToY - startY) * fallProgress;
+ self.shadowGraphics.visible = false; // Hide shadow during fall
+ // Attach ZbertParachute to Zbert only if it's not already attached
+ if (!self.parachuteGraphics) {
+ self.parachuteGraphics = self.attachAsset('ZbertParachute', {
+ anchorX: 0.5,
+ anchorY: 0.5,
+ y: -self.height / 2 - 50
+ });
+ }
+ self.isFalling = true;
+ } else {
+ self.y = fallToY;
+ LK.off('tick', zbertFallTickHandler);
+ self.isZbertJumping = false;
+ self.isFalling = false;
+ self.shadowGraphics.visible = true; // Show shadow again (for the new Zbert)
+ // Remove ZbertParachute when Zbert has finished falling and reset isFalling status
+ if (self.parachuteGraphics) {
+ self.removeChild(self.parachuteGraphics);
+ self.parachuteGraphics = null;
+ self.isFalling = false;
+ }
+ reduceLife();
+ if (livesCount > 0) {
+ self.destroy();
+ var bottomTile = game.grid.tileArray[game.grid.gridSize - 1][0];
+ var newZbert = new Zbert(bottomTile.x, bottomTile.y - 150, 180, 180);
+ game.grid.addChild(newZbert);
+ } else {
+ LK.showGameOver();
+ }
+ }
+ };
+ LK.on('tick', zbertFallTickHandler);
+ };
return;
}
break;
case 'downLeft':
beautiful landscape. starry sky, pastel colours, high definition, alien world. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
beautiful landscape. starry sky, pastel colours, high definition, alien world.. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
beautiful expansive landscape. starry sky, pastel colours, high definition, alien world.. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
beautiful expansive landscape. starry sky, pastel colours, high definition, alien world.. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
A little cube person. 2 legs. back to viewer. facing 45 degrees to the right. multicoloured skin, cartoon style. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
white circle. metallic. light bevel on edge. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
Round furry, cute alien ball with big eyes. vivid colours, looking at 45 degrees to the right. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
bright 3d present with bow, vivd colours. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
Change to be vivid multicoloured cube
A simple Triangle, flat shaded, bevelled edges. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
Speech bubble with expletive word in it. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
parachute. multicoloured. cartoon style.. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
white circle with a single thin black border. flat shade. simple graphic. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
small star shape, vivid metallic blue, varying length spikes on star. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.