Code edit (1 edits merged)
Please save this source code
User prompt
it only goes down once then even though i stack more blocks it doesnt go down anymore. i think it is because you only go down when it intersects with baseBlock. fix that
Code edit (4 edits merged)
Please save this source code
User prompt
the issue persists. it still doesnt slide down after first time. please fix that
User prompt
for the effect of going up. slide base block and the blocks stacked upon it to down everytime a block makes contact
User prompt
make the blocks drop faster
User prompt
remove the code where it removes block when exceedes 5.
User prompt
when you align it perfectly make a sound
User prompt
when base block slides down, the blockes stacked on it doesnt go down with it. it just hangs in air. fix that please
Code edit (4 edits merged)
Please save this source code
User prompt
instead of blocks going down maybe just base block should go down and the blocks stacked will follow
Code edit (1 edits merged)
Please save this source code
User prompt
add base block to the 5 condition so it pushes down too because it prevents other go down.
User prompt
they just weridly cramp together. last block is not pushed to out ot screen due to base block. so please make sure base block goes down too.
User prompt
okay they dont slide out of the scene due to base block. can you fix it
User prompt
instead of removing the last block when exceedes 5 maybe just slide them out of the scene
User prompt
removing block when exceedes 5 doesnt work right. the block diseapears but then it comes back.
User prompt
when i drop a block from a crane, new block is apearing immediately which is not good. you should add an animation where crane gets that new block delayed, maybe it can take it from somewhere ↪💡 Consider importing and using the following plugins: @upit/tween.v1
User prompt
when i drop a block there should be an animation where crane brings another block from outside of the scene
User prompt
increase swinging range meaning wiggling block should be more at the bottom
User prompt
increase the range and increase length of the rope
User prompt
when faulty alignment is close to right it does rotate and fall to right but when it is vice versa it still rotates and falls to right.
User prompt
use base_block asset for base block also make it bigger.
User prompt
maybe it should spin or something change rotation and trajectory when the block falls due to wrong alignment before game over.
User prompt
maybe it should spin or something change rotation and trajectory.
===================================================================
--- original.js
+++ change.js
@@ -150,24 +150,27 @@
if (currentBlock) {
currentBlock.update();
}
checkCollisions();
- // Check if the number of blocks exceeds 5 and remove the bottom block
+ // Check if the number of blocks exceeds 5 and slide out the bottom block
if (blocks.length > 5) {
var fallingBlocks = blocks.filter(function (block) {
return block.falling;
});
if (fallingBlocks.length === 0) {
var bottomBlock = blocks.shift();
- game.removeChild(bottomBlock);
+ // Slide out the bottom block
+ bottomBlock.x += 10;
// Apply gravity to the remaining blocks
for (var i = 0; i < blocks.length; i++) {
if (!blocks[i].falling) {
blocks[i].falling = true;
}
}
- // Destroy the bottom block to prevent it from coming back
- bottomBlock.destroy();
+ // Destroy the bottom block when it is out of the scene
+ if (bottomBlock.x > 2048 + bottomBlock.width) {
+ bottomBlock.destroy();
+ }
}
}
};
// Event listener for dropping blocks