User prompt
10. bolume geldigimde tavugum gitmiyor, bu sorunu duzelt
User prompt
bir yoldan sadece 2 araba gecebilir
User prompt
arabalarkn hizina 3 ekle
User prompt
arabalarin sayisini bir tik azalt ve sadece bit tarafdan gelsinler, sol yoldan gelsinler
User prompt
arabalari bir tik azalt
User prompt
3x hizlandir
User prompt
2x hizlandir
User prompt
yavaslat
User prompt
insanlar bu oyunu oynarken arabalar daha hizli gidiyor ama ben burdan oynarken daha yavas gidiyor bu sorunu duzelt ve ordakiler de yavas olsun
User prompt
bir 5 daha azalt
User prompt
arabalarin hizini 5 azalt
User prompt
3 x hizini arttirip 2x azaltip 4 eksilt
User prompt
eger oyuncu 10/10 bilirse ekrana su yazi gelsin: "Tebrikler hepsini dogru yaptin, bir sonraki seviyeye geciyorsun" sonra da bir tik zorlu sorular gelsin onlarda da 10/10 dogru yaparsa yine ayni mesaj gelip bir tik daha zor sorular gelsin eger 3 yanlis yapilirsa basa atilsin. βͺπ‘ Consider importing and using the following plugins: @upit/storage.v1
User prompt
bring back the wrong button
User prompt
3x hizlandir
User prompt
arabalari 5x yavaslat
User prompt
arabalari eski hizina getir
User prompt
arabalarin hizini 10x dusur ve arabalar bana etki etsin su andan itibaren
User prompt
10 puan olunca bonus round acilsin ve az once anlattigim gibi olsun
User prompt
su an bana arabalar etki etmesin
User prompt
fearvenom
User prompt
ben bu oyunun kurucusu oldugum icin eger bu chate "fearvenom" yazilirsa arabalarin tavuka carpmasi ise yaramasin tavuk olmesin ve bunu durdurmak icin "fearvenom2" yazilmasi lazim olsun
User prompt
uzunlugu eskisi gibi yap bunu begenmedim
User prompt
yollarin uzunlugunu biraz kisalt
User prompt
biraz daha araba ciksin cok degil azcik
/**** * Plugins ****/ var tween = LK.import("@upit/tween.v1"); var storage = LK.import("@upit/storage.v1"); /**** * Classes ****/ var Car = Container.expand(function (direction, speed, lane) { var self = Container.call(this); var carGraphics = self.attachAsset('car', { anchorX: 0.5, anchorY: 0.5 }); self.direction = direction; // 1 for right, -1 for left self.speed = speed; self.lane = lane; // Position car based on direction if (self.direction === 1) { self.x = -60; // Start from left } else { self.x = 2048 + 60; // Start from right } self.y = 2732 - 250 - lane * 180; // Position in center of road with new spacing self.update = function () { self.x += self.speed * self.direction; // Remove car when it goes off screen if (self.direction === 1 && self.x > 2048 + 100) { self.removeFromParent = true; } else if (self.direction === -1 && self.x < -100) { self.removeFromParent = true; } }; return self; }); var Chicken = Container.expand(function () { var self = Container.call(this); var chickenGraphics = self.attachAsset('chicken', { anchorX: 0.5, anchorY: 0.5 }); self.moveStep = 100; self.isMoving = false; self.targetY = 2732 - 100; // Start near bottom self.moveForward = function () { if (self.isMoving) return; self.isMoving = true; // Calculate next valid road position var currentY = self.y; var nextRoadY = null; var roadSpacing = 180; var startY = 2732 - 250; // Find the next road position above current position for (var i = 0; i < 12; i++) { var roadY = startY - i * roadSpacing; if (roadY < currentY && roadY >= 0) { nextRoadY = roadY; break; } } // If no road found above, move to finish line if (nextRoadY === null) { nextRoadY = 50; } // Animate movement directly to next road tween(self, { y: nextRoadY }, { duration: 200, easing: tween.easeOut, onFinish: function onFinish() { self.isMoving = false; // Check if crossed a road if (self.y < 150) { // Crossed all roads, reset and increase score crossedRoad(); } } }); LK.getSound('move').play(); }; return self; }); /**** * Initialize Game ****/ var game = new LK.Game({ backgroundColor: 0x4CAF50 }); /**** * Game Code ****/ var chicken; var cars = []; var roads = []; var gameSpeed = 1; var carSpawnTimer = 0; var carSpawnRate = 25; // frames between car spawns - slightly more cars var crossedRoads = 0; var bonusMode = false; var questionAsked = false; var waitingForAnswer = false; var playerHealth = 2; // Player can take 2 hits before dying // Create score display var scoreTxt = new Text2('0', { size: 100, fill: 0xFFFFFF }); scoreTxt.anchor.set(0.5, 0.5); scoreTxt.x = 1024; // Center horizontally scoreTxt.y = 50; // Position at the top end of roads game.addChild(scoreTxt); // Create bonus question UI elements var questionTxt = new Text2('Bonus puan denemek ister misin?', { size: 60, fill: 0xFFFFFF }); questionTxt.anchor.set(0.5, 0.5); questionTxt.x = 1024; questionTxt.y = 1366; questionTxt.visible = false; game.addChild(questionTxt); var bonusBtn = new Text2('BONUS', { size: 50, fill: 0x00FF00 }); bonusBtn.anchor.set(0.5, 0.5); bonusBtn.x = 850; bonusBtn.y = 1500; bonusBtn.visible = false; game.addChild(bonusBtn); var continueBtn = new Text2('DEVAM ET', { size: 50, fill: 0x0080FF }); continueBtn.anchor.set(0.5, 0.5); continueBtn.x = 1200; continueBtn.y = 1500; continueBtn.visible = false; game.addChild(continueBtn); // Functions to show/hide bonus question function showBonusQuestion() { questionTxt.visible = true; bonusBtn.visible = true; continueBtn.visible = true; waitingForAnswer = true; } function hideBonusQuestion() { questionTxt.visible = false; bonusBtn.visible = false; continueBtn.visible = false; waitingForAnswer = false; } function startBonusMode() { bonusMode = true; hideBonusQuestion(); // Make cars faster and remove slow cars carSpawnRate = 15; // More frequent spawns gameSpeed = 2; // Faster overall speed } function continueNormalMode() { hideBonusQuestion(); // Continue with normal settings } // Initialize score from storage var currentTotalScore = storage.totalScore || 0; LK.setScore(currentTotalScore); scoreTxt.setText(currentTotalScore.toString()); // Create roads function createRoads() { // Create roads starting from a gap above starting position var startY = 2732 - 250; // Start roads with gap from starting position var totalRoads = 12; // Extended roads further var roadSpacing = 180; // More uniform spacing between roads for (var i = 0; i < totalRoads; i++) { var roadY = startY - i * roadSpacing; if (roadY >= 0) { var road = LK.getAsset('road', { anchorX: 0.5, anchorY: 0.5, x: 1024, y: roadY }); roads.push(road); game.addChild(road); // Add road lines at the edges of roads for better visual separation var roadLineTop = LK.getAsset('roadLine', { anchorX: 0.5, anchorY: 0.5, x: 1024, y: roadY - 75 }); game.addChild(roadLineTop); var roadLineBottom = LK.getAsset('roadLine', { anchorX: 0.5, anchorY: 0.5, x: 1024, y: roadY + 75 }); game.addChild(roadLineBottom); } } } // Create chicken function createChicken() { chicken = game.addChild(new Chicken()); chicken.x = 1024; // Center horizontally chicken.y = 2732 - 100; // Start near bottom } // Spawn a car function spawnCar() { var lane = Math.floor(Math.random() * roads.length); var direction = Math.random() > 0.5 ? 1 : -1; // All cars have fixed 30x speed var baseSpeed = 30; var speed = baseSpeed * gameSpeed; var car = new Car(direction, speed, lane); cars.push(car); game.addChild(car); } // Check collisions function checkCollisions() { for (var i = 0; i < cars.length; i++) { var car = cars[i]; if (chicken.intersects(car)) { if (bonusMode) { // In bonus mode, any collision ends bonus mode but doesn't decrease score LK.getSound('hit').play(); LK.effects.flashScreen(0xff4444, 500); bonusMode = false; questionAsked = false; // Reset game settings to normal gameSpeed = 1; carSpawnRate = 25; // Reset chicken position and health chicken.y = 2732 - 100; crossedRoads = 0; playerHealth = 2; // Reset health return; } else { // Reduce health on any car collision playerHealth--; if (playerHealth > 0) { // First hit - injury, player survives LK.getSound('hit').play(); // Create injury effect - flash red and shake LK.effects.flashScreen(0xff4444, 300); tween(chicken, { x: chicken.x + 20 }, { duration: 50, easing: tween.easeOut, onFinish: function onFinish() { tween(chicken, { x: chicken.x - 40 }, { duration: 100, easing: tween.easeInOut, onFinish: function onFinish() { tween(chicken, { x: chicken.x + 20 }, { duration: 50, easing: tween.easeIn }); } }); } }); } else { // Second hit - death, game over and reset score LK.getSound('dead').play(); LK.effects.flashScreen(0xff0000, 500); // Reset score to 0 storage.totalScore = 0; LK.setScore(0); scoreTxt.setText('0'); // Reset health for next game playerHealth = 2; LK.setTimeout(function () { LK.showGameOver(); }, 500); return; } // Remove the car after collision car.removeFromParent = true; } } } } // Handle successful road crossing function crossedRoad() { crossedRoads++; var totalScore = storage.totalScore || 0; if (bonusMode) { // In bonus mode, successful completion gives 10 bonus points totalScore += 10; storage.totalScore = totalScore; LK.setScore(totalScore); scoreTxt.setText(totalScore.toString()); // Flash screen gold for bonus completion LK.effects.flashScreen(0xffd700, 1000); // End bonus mode and reset bonusMode = false; questionAsked = false; chicken.y = 2732 - 100; crossedRoads = 0; gameSpeed = 1; carSpawnRate = 25; return; } // Check if completed all roads (reached the end) if (chicken.y <= 50) { // Completed all roads - give 1 point and reset to start totalScore += 1; storage.totalScore = totalScore; LK.setScore(totalScore); scoreTxt.setText(totalScore.toString()); // Reset chicken position to starting position when score increases chicken.y = 2732 - 100; crossedRoads = 0; playerHealth = 2; // Reset health on successful completion // Check if reached 10 points and haven't asked bonus question yet if (totalScore >= 10 && !questionAsked) { questionAsked = true; showBonusQuestion(); // Flash screen gold for completion LK.effects.flashScreen(0xffd700, 500); return; // Don't reset yet, wait for user choice } // Flash screen gold for completion LK.effects.flashScreen(0xffd700, 500); // Reset to beginning gameSpeed = 1; carSpawnRate = 18; } else { // Normal road crossing - move forward chicken.y = 2732 - 100; // Increase difficulty gameSpeed += 0.1; if (carSpawnRate > 30) { carSpawnRate -= 2; } // Flash screen green for success LK.effects.flashScreen(0x00ff00, 300); } } // Initialize game elements createRoads(); createChicken(); // Game controls game.down = function (x, y, obj) { if (waitingForAnswer) { // Check if clicked on bonus button if (x >= 750 && x <= 950 && y >= 1450 && y <= 1550) { startBonusMode(); // Reset chicken position for bonus mode chicken.y = 2732 - 100; crossedRoads = 0; return; } // Check if clicked on continue button if (x >= 1100 && x <= 1300 && y >= 1450 && y <= 1550) { continueNormalMode(); // Reset chicken position for normal mode chicken.y = 2732 - 100; crossedRoads = 0; return; } } if (chicken && !chicken.isMoving && !waitingForAnswer) { chicken.moveForward(); } }; // Main game loop game.update = function () { // Spawn cars carSpawnTimer++; if (carSpawnTimer >= carSpawnRate) { spawnCar(); carSpawnTimer = 0; } // Clean up cars that are off screen for (var i = cars.length - 1; i >= 0; i--) { var car = cars[i]; if (car.removeFromParent) { car.destroy(); cars.splice(i, 1); } } // Check collisions checkCollisions(); };
/****
* Plugins
****/
var tween = LK.import("@upit/tween.v1");
var storage = LK.import("@upit/storage.v1");
/****
* Classes
****/
var Car = Container.expand(function (direction, speed, lane) {
var self = Container.call(this);
var carGraphics = self.attachAsset('car', {
anchorX: 0.5,
anchorY: 0.5
});
self.direction = direction; // 1 for right, -1 for left
self.speed = speed;
self.lane = lane;
// Position car based on direction
if (self.direction === 1) {
self.x = -60; // Start from left
} else {
self.x = 2048 + 60; // Start from right
}
self.y = 2732 - 250 - lane * 180; // Position in center of road with new spacing
self.update = function () {
self.x += self.speed * self.direction;
// Remove car when it goes off screen
if (self.direction === 1 && self.x > 2048 + 100) {
self.removeFromParent = true;
} else if (self.direction === -1 && self.x < -100) {
self.removeFromParent = true;
}
};
return self;
});
var Chicken = Container.expand(function () {
var self = Container.call(this);
var chickenGraphics = self.attachAsset('chicken', {
anchorX: 0.5,
anchorY: 0.5
});
self.moveStep = 100;
self.isMoving = false;
self.targetY = 2732 - 100; // Start near bottom
self.moveForward = function () {
if (self.isMoving) return;
self.isMoving = true;
// Calculate next valid road position
var currentY = self.y;
var nextRoadY = null;
var roadSpacing = 180;
var startY = 2732 - 250;
// Find the next road position above current position
for (var i = 0; i < 12; i++) {
var roadY = startY - i * roadSpacing;
if (roadY < currentY && roadY >= 0) {
nextRoadY = roadY;
break;
}
}
// If no road found above, move to finish line
if (nextRoadY === null) {
nextRoadY = 50;
}
// Animate movement directly to next road
tween(self, {
y: nextRoadY
}, {
duration: 200,
easing: tween.easeOut,
onFinish: function onFinish() {
self.isMoving = false;
// Check if crossed a road
if (self.y < 150) {
// Crossed all roads, reset and increase score
crossedRoad();
}
}
});
LK.getSound('move').play();
};
return self;
});
/****
* Initialize Game
****/
var game = new LK.Game({
backgroundColor: 0x4CAF50
});
/****
* Game Code
****/
var chicken;
var cars = [];
var roads = [];
var gameSpeed = 1;
var carSpawnTimer = 0;
var carSpawnRate = 25; // frames between car spawns - slightly more cars
var crossedRoads = 0;
var bonusMode = false;
var questionAsked = false;
var waitingForAnswer = false;
var playerHealth = 2; // Player can take 2 hits before dying
// Create score display
var scoreTxt = new Text2('0', {
size: 100,
fill: 0xFFFFFF
});
scoreTxt.anchor.set(0.5, 0.5);
scoreTxt.x = 1024; // Center horizontally
scoreTxt.y = 50; // Position at the top end of roads
game.addChild(scoreTxt);
// Create bonus question UI elements
var questionTxt = new Text2('Bonus puan denemek ister misin?', {
size: 60,
fill: 0xFFFFFF
});
questionTxt.anchor.set(0.5, 0.5);
questionTxt.x = 1024;
questionTxt.y = 1366;
questionTxt.visible = false;
game.addChild(questionTxt);
var bonusBtn = new Text2('BONUS', {
size: 50,
fill: 0x00FF00
});
bonusBtn.anchor.set(0.5, 0.5);
bonusBtn.x = 850;
bonusBtn.y = 1500;
bonusBtn.visible = false;
game.addChild(bonusBtn);
var continueBtn = new Text2('DEVAM ET', {
size: 50,
fill: 0x0080FF
});
continueBtn.anchor.set(0.5, 0.5);
continueBtn.x = 1200;
continueBtn.y = 1500;
continueBtn.visible = false;
game.addChild(continueBtn);
// Functions to show/hide bonus question
function showBonusQuestion() {
questionTxt.visible = true;
bonusBtn.visible = true;
continueBtn.visible = true;
waitingForAnswer = true;
}
function hideBonusQuestion() {
questionTxt.visible = false;
bonusBtn.visible = false;
continueBtn.visible = false;
waitingForAnswer = false;
}
function startBonusMode() {
bonusMode = true;
hideBonusQuestion();
// Make cars faster and remove slow cars
carSpawnRate = 15; // More frequent spawns
gameSpeed = 2; // Faster overall speed
}
function continueNormalMode() {
hideBonusQuestion();
// Continue with normal settings
}
// Initialize score from storage
var currentTotalScore = storage.totalScore || 0;
LK.setScore(currentTotalScore);
scoreTxt.setText(currentTotalScore.toString());
// Create roads
function createRoads() {
// Create roads starting from a gap above starting position
var startY = 2732 - 250; // Start roads with gap from starting position
var totalRoads = 12; // Extended roads further
var roadSpacing = 180; // More uniform spacing between roads
for (var i = 0; i < totalRoads; i++) {
var roadY = startY - i * roadSpacing;
if (roadY >= 0) {
var road = LK.getAsset('road', {
anchorX: 0.5,
anchorY: 0.5,
x: 1024,
y: roadY
});
roads.push(road);
game.addChild(road);
// Add road lines at the edges of roads for better visual separation
var roadLineTop = LK.getAsset('roadLine', {
anchorX: 0.5,
anchorY: 0.5,
x: 1024,
y: roadY - 75
});
game.addChild(roadLineTop);
var roadLineBottom = LK.getAsset('roadLine', {
anchorX: 0.5,
anchorY: 0.5,
x: 1024,
y: roadY + 75
});
game.addChild(roadLineBottom);
}
}
}
// Create chicken
function createChicken() {
chicken = game.addChild(new Chicken());
chicken.x = 1024; // Center horizontally
chicken.y = 2732 - 100; // Start near bottom
}
// Spawn a car
function spawnCar() {
var lane = Math.floor(Math.random() * roads.length);
var direction = Math.random() > 0.5 ? 1 : -1;
// All cars have fixed 30x speed
var baseSpeed = 30;
var speed = baseSpeed * gameSpeed;
var car = new Car(direction, speed, lane);
cars.push(car);
game.addChild(car);
}
// Check collisions
function checkCollisions() {
for (var i = 0; i < cars.length; i++) {
var car = cars[i];
if (chicken.intersects(car)) {
if (bonusMode) {
// In bonus mode, any collision ends bonus mode but doesn't decrease score
LK.getSound('hit').play();
LK.effects.flashScreen(0xff4444, 500);
bonusMode = false;
questionAsked = false;
// Reset game settings to normal
gameSpeed = 1;
carSpawnRate = 25;
// Reset chicken position and health
chicken.y = 2732 - 100;
crossedRoads = 0;
playerHealth = 2; // Reset health
return;
} else {
// Reduce health on any car collision
playerHealth--;
if (playerHealth > 0) {
// First hit - injury, player survives
LK.getSound('hit').play();
// Create injury effect - flash red and shake
LK.effects.flashScreen(0xff4444, 300);
tween(chicken, {
x: chicken.x + 20
}, {
duration: 50,
easing: tween.easeOut,
onFinish: function onFinish() {
tween(chicken, {
x: chicken.x - 40
}, {
duration: 100,
easing: tween.easeInOut,
onFinish: function onFinish() {
tween(chicken, {
x: chicken.x + 20
}, {
duration: 50,
easing: tween.easeIn
});
}
});
}
});
} else {
// Second hit - death, game over and reset score
LK.getSound('dead').play();
LK.effects.flashScreen(0xff0000, 500);
// Reset score to 0
storage.totalScore = 0;
LK.setScore(0);
scoreTxt.setText('0');
// Reset health for next game
playerHealth = 2;
LK.setTimeout(function () {
LK.showGameOver();
}, 500);
return;
}
// Remove the car after collision
car.removeFromParent = true;
}
}
}
}
// Handle successful road crossing
function crossedRoad() {
crossedRoads++;
var totalScore = storage.totalScore || 0;
if (bonusMode) {
// In bonus mode, successful completion gives 10 bonus points
totalScore += 10;
storage.totalScore = totalScore;
LK.setScore(totalScore);
scoreTxt.setText(totalScore.toString());
// Flash screen gold for bonus completion
LK.effects.flashScreen(0xffd700, 1000);
// End bonus mode and reset
bonusMode = false;
questionAsked = false;
chicken.y = 2732 - 100;
crossedRoads = 0;
gameSpeed = 1;
carSpawnRate = 25;
return;
}
// Check if completed all roads (reached the end)
if (chicken.y <= 50) {
// Completed all roads - give 1 point and reset to start
totalScore += 1;
storage.totalScore = totalScore;
LK.setScore(totalScore);
scoreTxt.setText(totalScore.toString());
// Reset chicken position to starting position when score increases
chicken.y = 2732 - 100;
crossedRoads = 0;
playerHealth = 2; // Reset health on successful completion
// Check if reached 10 points and haven't asked bonus question yet
if (totalScore >= 10 && !questionAsked) {
questionAsked = true;
showBonusQuestion();
// Flash screen gold for completion
LK.effects.flashScreen(0xffd700, 500);
return; // Don't reset yet, wait for user choice
}
// Flash screen gold for completion
LK.effects.flashScreen(0xffd700, 500);
// Reset to beginning
gameSpeed = 1;
carSpawnRate = 18;
} else {
// Normal road crossing - move forward
chicken.y = 2732 - 100;
// Increase difficulty
gameSpeed += 0.1;
if (carSpawnRate > 30) {
carSpawnRate -= 2;
}
// Flash screen green for success
LK.effects.flashScreen(0x00ff00, 300);
}
}
// Initialize game elements
createRoads();
createChicken();
// Game controls
game.down = function (x, y, obj) {
if (waitingForAnswer) {
// Check if clicked on bonus button
if (x >= 750 && x <= 950 && y >= 1450 && y <= 1550) {
startBonusMode();
// Reset chicken position for bonus mode
chicken.y = 2732 - 100;
crossedRoads = 0;
return;
}
// Check if clicked on continue button
if (x >= 1100 && x <= 1300 && y >= 1450 && y <= 1550) {
continueNormalMode();
// Reset chicken position for normal mode
chicken.y = 2732 - 100;
crossedRoads = 0;
return;
}
}
if (chicken && !chicken.isMoving && !waitingForAnswer) {
chicken.moveForward();
}
};
// Main game loop
game.update = function () {
// Spawn cars
carSpawnTimer++;
if (carSpawnTimer >= carSpawnRate) {
spawnCar();
carSpawnTimer = 0;
}
// Clean up cars that are off screen
for (var i = cars.length - 1; i >= 0; i--) {
var car = cars[i];
if (car.removeFromParent) {
car.destroy();
cars.splice(i, 1);
}
}
// Check collisions
checkCollisions();
};
Fullscreen modern App Store landscape banner, 16:9, high definition, for a game titled "Chicken Cross - Road Rush" and with the description "Guide a chicken across busy roads filled with speeding cars. Time your movements carefully to avoid traffic and cross safely in this classic arcade-style challenge.". No text on banner!