User prompt
size 2 ye geçmek için gereken puan 100 olsun ve her bir sonraki boyuta geçmek için gereken puanı ikiye katlayarak ekle yani size 3 için 300 olmalı size 4 için 700 olmalı size 5 için 1500 olmalı score 3000 olunca oyunu kazanalım
User prompt
smallfish çıkma olasılığını arttır hugefish ve large fish çıkma olasılığını %30 azalt
User prompt
tekrar azalt
User prompt
balıkşarın sıklığını %20 azalt tekrar
User prompt
balıkşarın sıklığını %20 azalt
User prompt
salyangoz her 100 puanda yeni boyuta geçiş yapsın ↪💡 Consider importing and using the following plugins: @upit/tween.v1
User prompt
score 1000 olunca kazanalım
User prompt
skor 500 olunca kazanalım
User prompt
balık spawnlanma oranı küçük balıktan büyük balığa doğru azalsın
User prompt
okyanus “Feeding Game” veya “Growth Game” gibi genişlesin
User prompt
okyanus küçülmeyecek genişleyecek yani biz nesneleri daha küçük görücez ama bakış açımız genişleyecek ↪💡 Consider importing and using the following plugins: @upit/tween.v1
User prompt
okyanus her küçüldğünde bizde o alanın dışına çıkabilelim balıklar da çıksın
User prompt
okyanusun küçülmesi lazım
User prompt
okyanus büyüdükten sonra o alana girebilelim ve orada da balıklar spawn olmaya başlasın
User prompt
okyanus büyümesin küçülsün ve daha çok balık görebilelim
User prompt
biz her bir boyut büyüdüğümüzde okyanus da genişlesin
Code edit (1 edits merged)
Please save this source code
User prompt
Ocean Hunter: Grow and Devour
Initial prompt
yedikçe büyüdüğümüz okyanusta geçen bir oyun karakterimiz ahtapot ve kendinden küçük balıkları yiyor yedikçe belli bir puanda büyüyerek daha büyük balıkları yiyebiliyor
/****
* Plugins
****/
var tween = LK.import("@upit/tween.v1");
/****
* Classes
****/
var Fish = Container.expand(function (fishType) {
var self = Container.call(this);
self.fishType = fishType || 'smallFish';
self.fishSize = 1;
if (self.fishType === 'smallFish') {
self.fishSize = 1;
} else if (self.fishType === 'mediumFish') {
self.fishSize = 2;
} else if (self.fishType === 'largeFish') {
self.fishSize = 3;
} else if (self.fishType === 'hugeFish') {
self.fishSize = 4;
}
var fishGraphics = self.attachAsset(self.fishType, {
anchorX: 0.5,
anchorY: 0.5
});
self.speedX = (Math.random() - 0.5) * 3;
self.speedY = (Math.random() - 0.5) * 3;
self.update = function () {
self.x += self.speedX;
self.y += self.speedY;
// Calculate current ocean bounds based on game scale
var currentWidth = 2048 * (game.scaleX || 1);
var currentHeight = 2732 * (game.scaleY || 1);
// Bounce off edges
if (self.x < 0 || self.x > currentWidth) {
self.speedX *= -1;
}
if (self.y < 0 || self.y > currentHeight) {
self.speedY *= -1;
}
// Keep within bounds
self.x = Math.max(0, Math.min(currentWidth, self.x));
self.y = Math.max(0, Math.min(currentHeight, self.y));
};
return self;
});
var Octopus = Container.expand(function () {
var self = Container.call(this);
self.octopusSize = 1;
self.growthPoints = 0;
self.pointsToGrow = 50;
var octopusGraphics = self.attachAsset('octopus', {
anchorX: 0.5,
anchorY: 0.5
});
self.grow = function () {
self.octopusSize++;
self.growthPoints = 0;
self.pointsToGrow += 30;
// Scale up the octopus
var newScale = 1 + (self.octopusSize - 1) * 0.3;
tween(octopusGraphics, {
scaleX: newScale,
scaleY: newScale
}, {
duration: 500
});
// Contract the ocean by scaling the entire game world smaller
var oceanContraction = 0.9; // 10% contraction each growth
tween(game, {
scaleX: game.scaleX * oceanContraction,
scaleY: game.scaleY * oceanContraction
}, {
duration: 1000
});
LK.getSound('grow').play();
};
self.canEat = function (fish) {
return self.octopusSize >= fish.fishSize;
};
return self;
});
/****
* Initialize Game
****/
var game = new LK.Game({
backgroundColor: 0x006994
});
/****
* Game Code
****/
// Initialize game scale for ocean expansion
game.scaleX = 1;
game.scaleY = 1;
var octopus = game.addChild(new Octopus());
octopus.x = 1024;
octopus.y = 1366;
var fish = [];
var fishTypes = ['smallFish', 'mediumFish', 'largeFish', 'hugeFish'];
// Create initial fish
for (var i = 0; i < 25; i++) {
var currentWidth = 2048 * (game.scaleX || 1);
var currentHeight = 2732 * (game.scaleY || 1);
var fishType = fishTypes[Math.floor(Math.random() * fishTypes.length)];
var newFish = new Fish(fishType);
newFish.x = Math.random() * currentWidth;
newFish.y = Math.random() * currentHeight;
fish.push(newFish);
game.addChild(newFish);
}
var scoreTxt = new Text2('Score: 0', {
size: 80,
fill: 0xFFFFFF
});
scoreTxt.anchor.set(0.5, 0);
LK.gui.top.addChild(scoreTxt);
var sizeTxt = new Text2('Size: 1', {
size: 60,
fill: 0xFFFFFF
});
sizeTxt.anchor.set(0, 0);
sizeTxt.x = 150;
sizeTxt.y = 100;
LK.gui.topLeft.addChild(sizeTxt);
var dragNode = null;
function handleMove(x, y, obj) {
if (dragNode) {
dragNode.x = x;
dragNode.y = y;
// Calculate current ocean bounds based on game scale
var currentWidth = 2048 * (game.scaleX || 1);
var currentHeight = 2732 * (game.scaleY || 1);
// Keep octopus within bounds
dragNode.x = Math.max(40, Math.min(currentWidth - 40, dragNode.x));
dragNode.y = Math.max(40, Math.min(currentHeight - 40, dragNode.y));
}
}
game.move = handleMove;
game.down = function (x, y, obj) {
dragNode = octopus;
handleMove(x, y, obj);
};
game.up = function (x, y, obj) {
dragNode = null;
};
game.update = function () {
// Check collisions between octopus and fish
for (var i = fish.length - 1; i >= 0; i--) {
var currentFish = fish[i];
if (octopus.intersects(currentFish)) {
if (octopus.canEat(currentFish)) {
// Eat the fish
var points = currentFish.fishSize * 10;
LK.setScore(LK.getScore() + points);
octopus.growthPoints += points;
LK.getSound('eat').play();
// Remove fish
currentFish.destroy();
fish.splice(i, 1);
// Check if octopus should grow
if (octopus.growthPoints >= octopus.pointsToGrow) {
octopus.grow();
sizeTxt.setText('Size: ' + octopus.octopusSize);
}
// Spawn 2 new fish within contracted ocean bounds
for (var j = 0; j < 2; j++) {
var currentWidth = 2048 * (game.scaleX || 1);
var currentHeight = 2732 * (game.scaleY || 1);
var fishType = fishTypes[Math.floor(Math.random() * fishTypes.length)];
var newFish = new Fish(fishType);
newFish.x = Math.random() * currentWidth;
newFish.y = Math.random() * currentHeight;
fish.push(newFish);
game.addChild(newFish);
}
} else {
// Game over - touched larger fish
LK.effects.flashScreen(0xff0000, 1000);
LK.showGameOver();
return;
}
}
}
// Update score display
scoreTxt.setText('Score: ' + LK.getScore());
// Win condition - reach size 5
if (octopus.octopusSize >= 5) {
LK.showYouWin();
}
}; ===================================================================
--- original.js
+++ change.js
@@ -64,13 +64,13 @@
scaleY: newScale
}, {
duration: 500
});
- // Expand the ocean by scaling the entire game world
- var oceanExpansion = 1.1; // 10% expansion each growth
+ // Contract the ocean by scaling the entire game world smaller
+ var oceanContraction = 0.9; // 10% contraction each growth
tween(game, {
- scaleX: game.scaleX * oceanExpansion,
- scaleY: game.scaleY * oceanExpansion
+ scaleX: game.scaleX * oceanContraction,
+ scaleY: game.scaleY * oceanContraction
}, {
duration: 1000
});
LK.getSound('grow').play();
@@ -99,9 +99,9 @@
octopus.y = 1366;
var fish = [];
var fishTypes = ['smallFish', 'mediumFish', 'largeFish', 'hugeFish'];
// Create initial fish
-for (var i = 0; i < 15; i++) {
+for (var i = 0; i < 25; i++) {
var currentWidth = 2048 * (game.scaleX || 1);
var currentHeight = 2732 * (game.scaleY || 1);
var fishType = fishTypes[Math.floor(Math.random() * fishTypes.length)];
var newFish = new Fish(fishType);
@@ -163,17 +163,19 @@
if (octopus.growthPoints >= octopus.pointsToGrow) {
octopus.grow();
sizeTxt.setText('Size: ' + octopus.octopusSize);
}
- // Spawn new fish within expanded ocean bounds
- var currentWidth = 2048 * (game.scaleX || 1);
- var currentHeight = 2732 * (game.scaleY || 1);
- var fishType = fishTypes[Math.floor(Math.random() * fishTypes.length)];
- var newFish = new Fish(fishType);
- newFish.x = Math.random() * currentWidth;
- newFish.y = Math.random() * currentHeight;
- fish.push(newFish);
- game.addChild(newFish);
+ // Spawn 2 new fish within contracted ocean bounds
+ for (var j = 0; j < 2; j++) {
+ var currentWidth = 2048 * (game.scaleX || 1);
+ var currentHeight = 2732 * (game.scaleY || 1);
+ var fishType = fishTypes[Math.floor(Math.random() * fishTypes.length)];
+ var newFish = new Fish(fishType);
+ newFish.x = Math.random() * currentWidth;
+ newFish.y = Math.random() * currentHeight;
+ fish.push(newFish);
+ game.addChild(newFish);
+ }
} else {
// Game over - touched larger fish
LK.effects.flashScreen(0xff0000, 1000);
LK.showGameOver();
tatlı balık görseli. No background. Transparent background. Blank background. No shadows. 2d. In-Game asset. flat
kırmızı renk tatlı balık görseli. No background. Transparent background. Blank background. No shadows. 2d. In-Game asset. flat
yeşil renk tatlı balık görseli. No background. Transparent background. Blank background. No shadows. 2d. In-Game asset. flat
kalamar görseli. No background. Transparent background. Blank background. No shadows. 2d. In-Game asset. flat
okyanusun derinlikleri okyanusun üstü görünmesin renk geçişleri olabilir. 2d oyun içi asset balık olmasın
mürekkep balığı. In-Game asset. 2d. High contrast. No shadows
coin image üzerinde balık işareti olan bir madeni para altın renkte. In-Game asset. 2d. High contrast. No shadows
korkunç bir deniz canavarı. In-Game asset. 2d. High contrast. No shadows
tatlı ahtapot mor