User prompt
Skor 100 ə çatası vaxt bir çıxış qapısı açılsın və oyun bitsin
User prompt
Skor 100 olanda başaq bir səhifə gəlib kutlama olsun oyunu qazandınız deyə
User prompt
Divarı engelleri sil yerinə meteorite elə və meteorite formasında olsun və quite sözünədə assets elə ↪💡 Consider importing and using the following plugins: @upit/tween.v1
User prompt
Engellere tam çarpan zaman ölmeliyim
User prompt
Engelleri azca çok az kiçilt ↪💡 Consider importing and using the following plugins: @upit/tween.v1
User prompt
Engelleri atm yap eğri olmasın düm düz
User prompt
Tüm arkaplanı deyiş ve gökyüzü ve gece gibi yap
User prompt
Gökyüzü ve gece gibi olsun
User prompt
Arkaplanı deyiş
User prompt
Start ve quit yazısını arala azca uzaklaştır
User prompt
Engelleri geniş ve azca uzun yapsana pls
User prompt
Duvarlar rastgele düşsün
User prompt
Delete ball pattern
User prompt
En çok nerede durarsak engeller oraya düşsün
User prompt
Top en üste gitdiğinde sonsuza kadar gitmesin
User prompt
Start yazısını 4 bucaklı yap
User prompt
Yazı tam düz olsun
User prompt
Start yazısını çok büyük yap
User prompt
Start sözünüassest olarak al
User prompt
O menüde top hareket etmesin top aşağı düşmesin
User prompt
O ekranda top hareketsiz kalsın yanlız starta basanda hareket etsin
User prompt
Ayrı bir hoşgeldin menüsü ve start-a bastıkta oyun o zaman başlasın
User prompt
Girişde start ve quit sözü olsun ve kaliteyi güzelleştir
User prompt
Top yanlız sağ ve sola gitsin
User prompt
Biraz daha
/****
* Plugins
****/
var tween = LK.import("@upit/tween.v1");
/****
* Classes
****/
var Obstacle = Container.expand(function () {
var self = Container.call(this);
// Create obstacle graphics
var obstacleGraphics = self.attachAsset('obstacle', {
anchorX: 0.5,
anchorY: 0.5
});
// Movement properties
self.speed = 5;
self.direction = 1; // 1 for down, -1 for up
self.lastIntersecting = false;
self.update = function () {
// Move obstacle down only
self.y += self.speed;
// Remove obstacle if it goes off screen
if (self.y > 2732) {
self.destroy();
}
};
return self;
});
var SoccerBall = Container.expand(function () {
var self = Container.call(this);
// Create ball graphics
var ballBase = self.attachAsset('ball', {
anchorX: 0.5,
anchorY: 0.5
});
var ballPattern = self.attachAsset('ballPattern', {
anchorX: 0.5,
anchorY: 0.5,
scaleX: 0.7,
scaleY: 0.7
});
// Physics properties
self.velocityY = 0;
self.velocityX = 0;
self.gravity = 0.6;
self.bounceDamping = 0.8;
self.tapForce = -18;
self.maxVelocityY = 25;
self.maxVelocityX = 8;
// Game state
self.isGrounded = false;
self.lastY = 0;
self.update = function () {
// Store last position
self.lastY = self.y;
// No gravity - ball only moves horizontally
// Limit horizontal velocity only
if (self.velocityX > self.maxVelocityX) {
self.velocityX = self.maxVelocityX;
}
if (self.velocityX < -self.maxVelocityX) {
self.velocityX = -self.maxVelocityX;
}
// Update position - only horizontal movement
self.x += self.velocityX;
// Screen boundaries - only left/right walls
var ballRadius = 60;
// Left/right wall bouncing
if (self.x - ballRadius <= 0) {
self.x = ballRadius;
self.velocityX = Math.abs(self.velocityX) * self.bounceDamping;
LK.getSound('bounce').play();
} else if (self.x + ballRadius >= 2048) {
self.x = 2048 - ballRadius;
self.velocityX = -Math.abs(self.velocityX) * self.bounceDamping;
LK.getSound('bounce').play();
}
// Add slight rotation for visual effect
ballBase.rotation += self.velocityX * 0.02;
ballPattern.rotation += self.velocityX * 0.02;
};
self.applyTapForce = function (tapX) {
// Apply horizontal force based on tap position
var screenCenter = 1024; // Screen width / 2
var horizontalForce = 6;
if (tapX > screenCenter) {
// Tap on right side - move right
self.velocityX += horizontalForce;
} else {
// Tap on left side - move left
self.velocityX -= horizontalForce;
}
// Visual feedback
tween(self, {
scaleX: 1.2,
scaleY: 1.2
}, {
duration: 100
});
tween(self, {
scaleX: 1.0,
scaleY: 1.0
}, {
duration: 200
});
LK.getSound('tap').play();
// Increase score
score++;
updateScore();
// Increase difficulty
increaseDifficulty();
};
return self;
});
/****
* Initialize Game
****/
var game = new LK.Game({
backgroundColor: 0x2E7D32
});
/****
* Game Code
****/
// Game variables
var ball;
var score = 0;
var baseGravity = 0.6;
var baseTapForce = -18;
var gameStarted = false;
var obstacles = [];
var obstacleSpawnTimer = 0;
var obstacleSpawnInterval = 180; // Spawn every 3 seconds at 60fps
// UI elements
var scoreTxt = new Text2('0', {
size: 120,
fill: 0xFFFFFF
});
scoreTxt.anchor.set(0.5, 0);
LK.gui.top.addChild(scoreTxt);
var instructionTxt = new Text2('TAP TO KEEP THE BALL UP!', {
size: 80,
fill: 0xFFFFFF
});
instructionTxt.anchor.set(0.5, 0.5);
instructionTxt.x = 1024;
instructionTxt.y = 400;
game.addChild(instructionTxt);
// Add field elements
var centerLine = LK.getAsset('fieldLine', {
anchorX: 0.5,
anchorY: 0.5
});
centerLine.x = 1024;
centerLine.y = 1366;
game.addChild(centerLine);
var centerCircleOutline = LK.getAsset('centerCircle', {
anchorX: 0.5,
anchorY: 0.5
});
centerCircleOutline.x = 1024;
centerCircleOutline.y = 1366;
centerCircleOutline.alpha = 0.3;
game.addChild(centerCircleOutline);
var topGoalArea = LK.getAsset('goalArea', {
anchorX: 0.5,
anchorY: 0.5
});
topGoalArea.x = 1024;
topGoalArea.y = 100;
topGoalArea.alpha = 0.2;
game.addChild(topGoalArea);
var bottomGoalArea = LK.getAsset('goalArea', {
anchorX: 0.5,
anchorY: 0.5
});
bottomGoalArea.x = 1024;
bottomGoalArea.y = 2632;
bottomGoalArea.alpha = 0.2;
game.addChild(bottomGoalArea);
// Initialize ball
ball = game.addChild(new SoccerBall());
ball.x = 1024;
ball.y = 1000;
function updateScore() {
scoreTxt.setText(score.toString());
}
function increaseDifficulty() {
// Slightly increase gravity and reduce tap effectiveness as score increases
var difficultyMultiplier = Math.min(1 + score * 0.01, 1.5);
ball.gravity = baseGravity * difficultyMultiplier;
ball.tapForce = baseTapForce * (1 / Math.sqrt(difficultyMultiplier));
}
function gameOver() {
LK.showGameOver();
}
function startGame() {
if (!gameStarted) {
gameStarted = true;
instructionTxt.visible = false;
ball.applyTapForce(1024);
// Clear any existing obstacles
for (var i = 0; i < obstacles.length; i++) {
obstacles[i].destroy();
}
obstacles = [];
obstacleSpawnTimer = 0;
}
}
// Event handlers
game.down = function (x, y, obj) {
if (!gameStarted) {
startGame();
} else {
ball.applyTapForce(x);
}
};
game.update = function () {
// Game loop handled by ball's update method
if (gameStarted) {
// Spawn obstacles
obstacleSpawnTimer++;
if (obstacleSpawnTimer >= obstacleSpawnInterval) {
obstacleSpawnTimer = 0;
var obstacle = new Obstacle();
obstacle.x = Math.random() * 1800 + 124; // Random X position with margins
obstacle.y = -50; // Start from top of screen
obstacles.push(obstacle);
game.addChild(obstacle);
}
// Check collision with obstacles
for (var i = obstacles.length - 1; i >= 0; i--) {
var obstacle = obstacles[i];
var currentIntersecting = ball.intersects(obstacle);
if (!obstacle.lastIntersecting && currentIntersecting) {
// Collision detected - game over
ball.isGrounded = true;
gameOver();
break;
}
obstacle.lastIntersecting = currentIntersecting;
}
// Remove obstacles that are too old (optional cleanup)
if (obstacles.length > 6) {
var oldObstacle = obstacles.shift();
oldObstacle.destroy();
}
}
};
// Initial score display
updateScore(); ===================================================================
--- original.js
+++ change.js
@@ -53,24 +53,19 @@
self.lastY = 0;
self.update = function () {
// Store last position
self.lastY = self.y;
- // Apply gravity
- self.velocityY += self.gravity;
- // Limit velocities
- if (self.velocityY > self.maxVelocityY) {
- self.velocityY = self.maxVelocityY;
- }
+ // No gravity - ball only moves horizontally
+ // Limit horizontal velocity only
if (self.velocityX > self.maxVelocityX) {
self.velocityX = self.maxVelocityX;
}
if (self.velocityX < -self.maxVelocityX) {
self.velocityX = -self.maxVelocityX;
}
- // Update position
+ // Update position - only horizontal movement
self.x += self.velocityX;
- self.y += self.velocityY;
- // Screen boundaries
+ // Screen boundaries - only left/right walls
var ballRadius = 60;
// Left/right wall bouncing
if (self.x - ballRadius <= 0) {
self.x = ballRadius;
@@ -80,52 +75,42 @@
self.x = 2048 - ballRadius;
self.velocityX = -Math.abs(self.velocityX) * self.bounceDamping;
LK.getSound('bounce').play();
}
- // Ground collision detection
- if (self.y + ballRadius >= 2732) {
- if (!self.isGrounded) {
- self.isGrounded = true;
- gameOver();
- }
- }
// Add slight rotation for visual effect
ballBase.rotation += self.velocityX * 0.02;
ballPattern.rotation += self.velocityX * 0.02;
};
self.applyTapForce = function (tapX) {
- if (!self.isGrounded) {
- self.velocityY = self.tapForce;
- // Apply horizontal force based on tap position
- var screenCenter = 1024; // Screen width / 2
- var horizontalForce = 6;
- if (tapX > screenCenter) {
- // Tap on right side - move right
- self.velocityX += horizontalForce;
- } else {
- // Tap on left side - move left
- self.velocityX -= horizontalForce;
- }
- // Visual feedback
- tween(self, {
- scaleX: 1.2,
- scaleY: 1.2
- }, {
- duration: 100
- });
- tween(self, {
- scaleX: 1.0,
- scaleY: 1.0
- }, {
- duration: 200
- });
- LK.getSound('tap').play();
- // Increase score
- score++;
- updateScore();
- // Increase difficulty
- increaseDifficulty();
+ // Apply horizontal force based on tap position
+ var screenCenter = 1024; // Screen width / 2
+ var horizontalForce = 6;
+ if (tapX > screenCenter) {
+ // Tap on right side - move right
+ self.velocityX += horizontalForce;
+ } else {
+ // Tap on left side - move left
+ self.velocityX -= horizontalForce;
}
+ // Visual feedback
+ tween(self, {
+ scaleX: 1.2,
+ scaleY: 1.2
+ }, {
+ duration: 100
+ });
+ tween(self, {
+ scaleX: 1.0,
+ scaleY: 1.0
+ }, {
+ duration: 200
+ });
+ LK.getSound('tap').play();
+ // Increase score
+ score++;
+ updateScore();
+ // Increase difficulty
+ increaseDifficulty();
};
return self;
});
Anything . No background. Transparent background. Blank background. No shadows. 2d. In-Game asset. flat
A rocket . No background. Transparent background. Blank background. No shadows. 2d. In-Game asset. flat
Thunder logo. No background. Transparent background. Blank background. No shadows. 2d. In-Game asset. flat
A sign . No background. Transparent background. Blank background. No shadows. 2d. In-Game asset. flat
Robotic door metal exit door. No background. Transparent background. Blank background. No shadows. 2d. In-Game asset. flat
A stone. No background. Transparent background. Blank background. No shadows. 2d. In-Game asset. flat