User prompt
Bet ve Cashout texitini 50pixel yukarı taşı
User prompt
dexrise vayabi560.com text size by 2x
User prompt
vayabi560.com textini 3 size büyüt ve 300 pixel aşağı taşı
User prompt
Sol üste bolt yazı tipiyle vayabi560.com yaz.
User prompt
Cashout: textini 20px yukarı taşı
User prompt
BET ve Cashout Text boyutunu 2x artır ve butonun center konumuna tekrar yerşeleştir.
User prompt
Kutu açılım hızını doğal olarak multiplier artış hızını 1 saniyeye düşür. ↪💡 Consider importing and using the following plugins: @upit/tween.v1
User prompt
Vay Lucky Oceon textini sil
User prompt
VayLucy Ocean oyun adı için asetlere oyun logosu ekle
User prompt
Bet ve Cashout butınunu 50px aşağı taşı
User prompt
Select bet amount and start metinini iki dilde yaz: Bahis tutarını seç ve oyuna başla. Kırmızı balon balığı açılmadan cashout yap ve kazan.
User prompt
bet amount control buttonlarını Bet butonun altına taşı
User prompt
Bahis tutarını +, -, max, min, %25, %50, %75 olarak set etmemi sağla buton ile seçtir.
User prompt
Balance ekle ve kullanınıcının bahislerini balance ile takip et ↪💡 Consider importing and using the following plugins: @upit/storage.v1
User prompt
Oyunun adı Vay Lucy Ocean ç Oyun adını değiştir ve aseetlere oyun logo alanı ekle
User prompt
Bacground görünürlüğünğ %10 aazalt
User prompt
Bacgrounun opositesini %70 düşür
User prompt
Gridin başlangıç notktasını 100px yukarı kaldır.
User prompt
✅ Move grid 200px top bet and cashout buttons to prevent overlap
User prompt
Gridi, Cet ve cashout butonunun 100inc yukarısına yerleştir. kutu ve buton çakışıyor hatayı düzelt.
User prompt
Grid değiştiğinde grid alanını büyüt. 3 grid opsiyonunda da kutular 300*300 boyununda kalmalı
User prompt
HATA: Kullanıcı gridi seçemiyor. Sorunu düzelt.
User prompt
Please fix the bug: 'Uncaught TypeError: Cannot set properties of undefined (setting 'fill')' in or related to this line: 'gridButtons[i].style.fill = i === currentGridIndex ? 0x00FF00 : 0xFFFFFF;' Line Number: 378
User prompt
Kullanıcı 3 grid seçeneğini sağ üst köşede görebilsin ve istediğini seçebilsin.
User prompt
5x5 7X7 9X9 grid opsiyonu ekle. Kullanıcı grid opsiyonunu bahis oncesi seçebilsin
/**** * Plugins ****/ var tween = LK.import("@upit/tween.v1"); /**** * Classes ****/ var BetButton = Container.expand(function () { var self = Container.call(this); var buttonGraphics = self.attachAsset('betButton', { anchorX: 0.5, anchorY: 0.5 }); self.betAmount = 0; self.betText = new Text2('Bet: $0', { size: 40, fill: 0xFFFFFF }); self.betText.anchor.set(0.5, 0.5); self.addChild(self.betText); self.setBetAmount = function (amount) { self.betAmount = amount; self.betText.setText('Bet: $' + amount); }; self.down = function (x, y, obj) { if (gameState === 'betting') { startGame(); } }; return self; }); var CashOutButton = Container.expand(function () { var self = Container.call(this); var buttonGraphics = self.attachAsset('cashOutButton', { anchorX: 0.5, anchorY: 0.5 }); self.cashOutText = new Text2('Cash Out: $0.00', { size: 40, fill: 0x000000 }); self.cashOutText.anchor.set(0.5, 0.5); self.addChild(self.cashOutText); self.visible = false; self.updateAmount = function (amount) { self.cashOutText.setText('Cash Out: $' + amount.toFixed(2)); }; self.down = function (x, y, obj) { if (gameState === 'playing') { cashOut(); } }; return self; }); var GameBox = Container.expand(function () { var self = Container.call(this); var boxGraphics = self.attachAsset('gameBox', { anchorX: 0.5, anchorY: 0.5 }); self.isRevealed = false; self.content = null; // 'fish' or 'seashell' self.fishType = null; // 1-5 for fish types self.reveal = function () { if (self.isRevealed) return; self.isRevealed = true; if (self.content === 'seashell') { var seashell = self.attachAsset('seashell', { anchorX: 0.5, anchorY: 0.5 }); boxGraphics.tint = 0x8B4513; } else if (self.content === 'fish') { var fishAsset = 'fish' + self.fishType; var fish = self.attachAsset(fishAsset, { anchorX: 0.5, anchorY: 0.5 }); boxGraphics.tint = 0x90EE90; // Animate fish appearing fish.alpha = 0; tween(fish, { alpha: 1 }, { duration: 500 }); } }; return self; }); /**** * Initialize Game ****/ var game = new LK.Game({ backgroundColor: 0x006994 }); /**** * Game Code ****/ // Add background var background = game.attachAsset('coralBackground', { anchorX: 0, anchorY: 0, x: 0, y: 0 }); // Game state var gameState = 'betting'; // 'betting', 'playing', 'ended' var boxes = []; var grid = []; var currentBet = 50; var currentMultiplier = 1.0; var revealedBoxes = 0; var totalSeashells = 0; var lastRevealTime = 0; var revealInterval = 3000; // 3 seconds var gameWinnings = 0; // Grid size options var gridSizes = [5, 7, 9]; var currentGridIndex = 0; var currentGridSize = 5; var totalBoxes = 25; // Multiplier progression for balanced 96% RTP var multipliers = [1.1, 1.3, 1.6, 2.0, 2.6, 3.4, 4.5, 6.0, 8.0, 10.7, 14.3, 19.1, 25.5, 34.1, 45.5]; // UI Elements var betAmounts = [10, 25, 50, 100, 250]; var currentBetIndex = 2; // Create UI var titleText = new Text2("Ocean's Gamble", { size: 80, fill: 0xFFFFFF }); titleText.anchor.set(0.5, 0); titleText.x = 1024; titleText.y = 100; game.addChild(titleText); var betButton = game.addChild(new BetButton()); betButton.x = 1024; betButton.y = 2400; betButton.setBetAmount(currentBet); var cashOutButton = game.addChild(new CashOutButton()); cashOutButton.x = 1024; cashOutButton.y = 2300; var multiplierText = new Text2('Multiplier: 1.00x', { size: 60, fill: 0xFFFFFF }); multiplierText.anchor.set(0.5, 0.5); multiplierText.x = 1024; multiplierText.y = 300; game.addChild(multiplierText); var winningsText = new Text2('Winnings: $0.00', { size: 50, fill: 0xFFFFFF }); winningsText.anchor.set(0.5, 0.5); winningsText.x = 1024; winningsText.y = 400; game.addChild(winningsText); var statusText = new Text2('Select bet amount and start!', { size: 40, fill: 0xFFFF00 }); statusText.anchor.set(0.5, 0.5); statusText.x = 1024; statusText.y = 500; game.addChild(statusText); // Grid size selection button var gridSizeText = new Text2('Grid: 5x5', { size: 50, fill: 0xFFFFFF }); gridSizeText.anchor.set(0.5, 0.5); gridSizeText.x = 1024; gridSizeText.y = 2500; game.addChild(gridSizeText); // Add logo to top right corner var logo = game.attachAsset('logo', { anchorX: 1, anchorY: 0 }); logo.x = 2048 - 50; // 50px margin from right edge logo.y = 50; // 50px margin from top edge game.addChild(logo); // Create grid with variable size function createGrid() { // Clear existing boxes for (var i = 0; i < boxes.length; i++) { if (boxes[i].parent) { boxes[i].parent.removeChild(boxes[i]); } } boxes = []; var boxSize = Math.min(150, 1200 / currentGridSize); // Adjust box size based on grid var gridWidth = (currentGridSize - 1) * boxSize; var startX = 1024 - gridWidth / 2; // Center the grid var startY = 800; for (var row = 0; row < currentGridSize; row++) { for (var col = 0; col < currentGridSize; col++) { var box = new GameBox(); box.x = startX + col * boxSize; box.y = startY + row * boxSize; // Scale box to fit box.scaleX = boxSize / 300; box.scaleY = boxSize / 300; boxes.push(box); game.addChild(box); } } totalBoxes = currentGridSize * currentGridSize; } // Initialize grid createGrid(); // Setup game content function setupGameContent() { // Random number of seashells (1-5, but scale with grid size) var maxSeashells = Math.min(Math.floor(totalBoxes * 0.2), Math.max(1, Math.floor(totalBoxes / 5))); totalSeashells = Math.floor(Math.random() * maxSeashells) + 1; // Create array of positions var positions = []; for (var i = 0; i < totalBoxes; i++) { positions.push(i); } // Shuffle positions for (var i = positions.length - 1; i > 0; i--) { var j = Math.floor(Math.random() * (i + 1)); var temp = positions[i]; positions[i] = positions[j]; positions[j] = temp; } // Place seashells for (var i = 0; i < totalSeashells; i++) { boxes[positions[i]].content = 'seashell'; } // Place fish for (var i = totalSeashells; i < totalBoxes; i++) { boxes[positions[i]].content = 'fish'; boxes[positions[i]].fishType = Math.floor(Math.random() * 5) + 1; } } function startGame() { gameState = 'playing'; currentBet = betAmounts[currentBetIndex]; currentMultiplier = 1.0; revealedBoxes = 0; lastRevealTime = Date.now(); gameWinnings = currentBet; // Reset all boxes for (var i = 0; i < boxes.length; i++) { boxes[i].isRevealed = false; boxes[i].removeChildren(); var boxGraphics = boxes[i].attachAsset('gameBox', { anchorX: 0.5, anchorY: 0.5 }); } setupGameContent(); betButton.visible = false; cashOutButton.visible = true; cashOutButton.updateAmount(gameWinnings); statusText.setText('Game started! Cash out before hitting seashell!'); LK.playMusic('underwater'); } function revealNextBox() { var unrevealedBoxes = []; for (var i = 0; i < boxes.length; i++) { if (!boxes[i].isRevealed) { unrevealedBoxes.push(i); } } if (unrevealedBoxes.length === 0) { // All boxes revealed - player wins everything cashOut(); return; } // Pick random unrevealed box var randomIndex = Math.floor(Math.random() * unrevealedBoxes.length); var boxIndex = unrevealedBoxes[randomIndex]; var box = boxes[boxIndex]; box.reveal(); revealedBoxes++; if (box.content === 'seashell') { // Game over gameState = 'ended'; statusText.setText('Seashell revealed! You lost $' + currentBet); LK.getSound('seashell').play(); LK.setTimeout(function () { resetGame(); }, 3000); } else if (box.content === 'fish') { // Increase multiplier if (revealedBoxes <= multipliers.length) { currentMultiplier = multipliers[revealedBoxes - 1]; } else { currentMultiplier *= 1.5; // Continue scaling for longer games } gameWinnings = currentBet * currentMultiplier; multiplierText.setText('Multiplier: ' + currentMultiplier.toFixed(2) + 'x'); winningsText.setText('Winnings: $' + gameWinnings.toFixed(2)); cashOutButton.updateAmount(gameWinnings); statusText.setText('Fish found! Multiplier increased!'); LK.getSound('reveal').play(); } } function cashOut() { if (gameState !== 'playing') return; gameState = 'ended'; LK.setScore(LK.getScore() + Math.floor(gameWinnings - currentBet)); statusText.setText('Cashed out! Won $' + (gameWinnings - currentBet).toFixed(2)); LK.getSound('cashout').play(); LK.setTimeout(function () { resetGame(); }, 3000); } function resetGame() { gameState = 'betting'; betButton.visible = true; cashOutButton.visible = false; statusText.setText('Select bet amount and start!'); multiplierText.setText('Multiplier: 1.00x'); winningsText.setText('Winnings: $0.00'); // Reset visual state of all boxes for (var i = 0; i < boxes.length; i++) { boxes[i].isRevealed = false; boxes[i].removeChildren(); var boxGraphics = boxes[i].attachAsset('gameBox', { anchorX: 0.5, anchorY: 0.5 }); } LK.stopMusic(); } // Handle bet amount cycling and grid size selection game.down = function (x, y, obj) { if (gameState === 'betting') { if (y > 2450) { // Grid size selection (bottom area) currentGridIndex = (currentGridIndex + 1) % gridSizes.length; currentGridSize = gridSizes[currentGridIndex]; totalBoxes = currentGridSize * currentGridSize; gridSizeText.setText('Grid: ' + currentGridSize + 'x' + currentGridSize); createGrid(); // Recreate grid with new size } else if (y > 2350) { // Cycle through bet amounts currentBetIndex = (currentBetIndex + 1) % betAmounts.length; currentBet = betAmounts[currentBetIndex]; betButton.setBetAmount(currentBet); } } }; game.update = function () { if (gameState === 'playing') { var currentTime = Date.now(); if (currentTime - lastRevealTime >= revealInterval) { revealNextBox(); lastRevealTime = currentTime; } } };
/****
* Plugins
****/
var tween = LK.import("@upit/tween.v1");
/****
* Classes
****/
var BetButton = Container.expand(function () {
var self = Container.call(this);
var buttonGraphics = self.attachAsset('betButton', {
anchorX: 0.5,
anchorY: 0.5
});
self.betAmount = 0;
self.betText = new Text2('Bet: $0', {
size: 40,
fill: 0xFFFFFF
});
self.betText.anchor.set(0.5, 0.5);
self.addChild(self.betText);
self.setBetAmount = function (amount) {
self.betAmount = amount;
self.betText.setText('Bet: $' + amount);
};
self.down = function (x, y, obj) {
if (gameState === 'betting') {
startGame();
}
};
return self;
});
var CashOutButton = Container.expand(function () {
var self = Container.call(this);
var buttonGraphics = self.attachAsset('cashOutButton', {
anchorX: 0.5,
anchorY: 0.5
});
self.cashOutText = new Text2('Cash Out: $0.00', {
size: 40,
fill: 0x000000
});
self.cashOutText.anchor.set(0.5, 0.5);
self.addChild(self.cashOutText);
self.visible = false;
self.updateAmount = function (amount) {
self.cashOutText.setText('Cash Out: $' + amount.toFixed(2));
};
self.down = function (x, y, obj) {
if (gameState === 'playing') {
cashOut();
}
};
return self;
});
var GameBox = Container.expand(function () {
var self = Container.call(this);
var boxGraphics = self.attachAsset('gameBox', {
anchorX: 0.5,
anchorY: 0.5
});
self.isRevealed = false;
self.content = null; // 'fish' or 'seashell'
self.fishType = null; // 1-5 for fish types
self.reveal = function () {
if (self.isRevealed) return;
self.isRevealed = true;
if (self.content === 'seashell') {
var seashell = self.attachAsset('seashell', {
anchorX: 0.5,
anchorY: 0.5
});
boxGraphics.tint = 0x8B4513;
} else if (self.content === 'fish') {
var fishAsset = 'fish' + self.fishType;
var fish = self.attachAsset(fishAsset, {
anchorX: 0.5,
anchorY: 0.5
});
boxGraphics.tint = 0x90EE90;
// Animate fish appearing
fish.alpha = 0;
tween(fish, {
alpha: 1
}, {
duration: 500
});
}
};
return self;
});
/****
* Initialize Game
****/
var game = new LK.Game({
backgroundColor: 0x006994
});
/****
* Game Code
****/
// Add background
var background = game.attachAsset('coralBackground', {
anchorX: 0,
anchorY: 0,
x: 0,
y: 0
});
// Game state
var gameState = 'betting'; // 'betting', 'playing', 'ended'
var boxes = [];
var grid = [];
var currentBet = 50;
var currentMultiplier = 1.0;
var revealedBoxes = 0;
var totalSeashells = 0;
var lastRevealTime = 0;
var revealInterval = 3000; // 3 seconds
var gameWinnings = 0;
// Grid size options
var gridSizes = [5, 7, 9];
var currentGridIndex = 0;
var currentGridSize = 5;
var totalBoxes = 25;
// Multiplier progression for balanced 96% RTP
var multipliers = [1.1, 1.3, 1.6, 2.0, 2.6, 3.4, 4.5, 6.0, 8.0, 10.7, 14.3, 19.1, 25.5, 34.1, 45.5];
// UI Elements
var betAmounts = [10, 25, 50, 100, 250];
var currentBetIndex = 2;
// Create UI
var titleText = new Text2("Ocean's Gamble", {
size: 80,
fill: 0xFFFFFF
});
titleText.anchor.set(0.5, 0);
titleText.x = 1024;
titleText.y = 100;
game.addChild(titleText);
var betButton = game.addChild(new BetButton());
betButton.x = 1024;
betButton.y = 2400;
betButton.setBetAmount(currentBet);
var cashOutButton = game.addChild(new CashOutButton());
cashOutButton.x = 1024;
cashOutButton.y = 2300;
var multiplierText = new Text2('Multiplier: 1.00x', {
size: 60,
fill: 0xFFFFFF
});
multiplierText.anchor.set(0.5, 0.5);
multiplierText.x = 1024;
multiplierText.y = 300;
game.addChild(multiplierText);
var winningsText = new Text2('Winnings: $0.00', {
size: 50,
fill: 0xFFFFFF
});
winningsText.anchor.set(0.5, 0.5);
winningsText.x = 1024;
winningsText.y = 400;
game.addChild(winningsText);
var statusText = new Text2('Select bet amount and start!', {
size: 40,
fill: 0xFFFF00
});
statusText.anchor.set(0.5, 0.5);
statusText.x = 1024;
statusText.y = 500;
game.addChild(statusText);
// Grid size selection button
var gridSizeText = new Text2('Grid: 5x5', {
size: 50,
fill: 0xFFFFFF
});
gridSizeText.anchor.set(0.5, 0.5);
gridSizeText.x = 1024;
gridSizeText.y = 2500;
game.addChild(gridSizeText);
// Add logo to top right corner
var logo = game.attachAsset('logo', {
anchorX: 1,
anchorY: 0
});
logo.x = 2048 - 50; // 50px margin from right edge
logo.y = 50; // 50px margin from top edge
game.addChild(logo);
// Create grid with variable size
function createGrid() {
// Clear existing boxes
for (var i = 0; i < boxes.length; i++) {
if (boxes[i].parent) {
boxes[i].parent.removeChild(boxes[i]);
}
}
boxes = [];
var boxSize = Math.min(150, 1200 / currentGridSize); // Adjust box size based on grid
var gridWidth = (currentGridSize - 1) * boxSize;
var startX = 1024 - gridWidth / 2; // Center the grid
var startY = 800;
for (var row = 0; row < currentGridSize; row++) {
for (var col = 0; col < currentGridSize; col++) {
var box = new GameBox();
box.x = startX + col * boxSize;
box.y = startY + row * boxSize;
// Scale box to fit
box.scaleX = boxSize / 300;
box.scaleY = boxSize / 300;
boxes.push(box);
game.addChild(box);
}
}
totalBoxes = currentGridSize * currentGridSize;
}
// Initialize grid
createGrid();
// Setup game content
function setupGameContent() {
// Random number of seashells (1-5, but scale with grid size)
var maxSeashells = Math.min(Math.floor(totalBoxes * 0.2), Math.max(1, Math.floor(totalBoxes / 5)));
totalSeashells = Math.floor(Math.random() * maxSeashells) + 1;
// Create array of positions
var positions = [];
for (var i = 0; i < totalBoxes; i++) {
positions.push(i);
}
// Shuffle positions
for (var i = positions.length - 1; i > 0; i--) {
var j = Math.floor(Math.random() * (i + 1));
var temp = positions[i];
positions[i] = positions[j];
positions[j] = temp;
}
// Place seashells
for (var i = 0; i < totalSeashells; i++) {
boxes[positions[i]].content = 'seashell';
}
// Place fish
for (var i = totalSeashells; i < totalBoxes; i++) {
boxes[positions[i]].content = 'fish';
boxes[positions[i]].fishType = Math.floor(Math.random() * 5) + 1;
}
}
function startGame() {
gameState = 'playing';
currentBet = betAmounts[currentBetIndex];
currentMultiplier = 1.0;
revealedBoxes = 0;
lastRevealTime = Date.now();
gameWinnings = currentBet;
// Reset all boxes
for (var i = 0; i < boxes.length; i++) {
boxes[i].isRevealed = false;
boxes[i].removeChildren();
var boxGraphics = boxes[i].attachAsset('gameBox', {
anchorX: 0.5,
anchorY: 0.5
});
}
setupGameContent();
betButton.visible = false;
cashOutButton.visible = true;
cashOutButton.updateAmount(gameWinnings);
statusText.setText('Game started! Cash out before hitting seashell!');
LK.playMusic('underwater');
}
function revealNextBox() {
var unrevealedBoxes = [];
for (var i = 0; i < boxes.length; i++) {
if (!boxes[i].isRevealed) {
unrevealedBoxes.push(i);
}
}
if (unrevealedBoxes.length === 0) {
// All boxes revealed - player wins everything
cashOut();
return;
}
// Pick random unrevealed box
var randomIndex = Math.floor(Math.random() * unrevealedBoxes.length);
var boxIndex = unrevealedBoxes[randomIndex];
var box = boxes[boxIndex];
box.reveal();
revealedBoxes++;
if (box.content === 'seashell') {
// Game over
gameState = 'ended';
statusText.setText('Seashell revealed! You lost $' + currentBet);
LK.getSound('seashell').play();
LK.setTimeout(function () {
resetGame();
}, 3000);
} else if (box.content === 'fish') {
// Increase multiplier
if (revealedBoxes <= multipliers.length) {
currentMultiplier = multipliers[revealedBoxes - 1];
} else {
currentMultiplier *= 1.5; // Continue scaling for longer games
}
gameWinnings = currentBet * currentMultiplier;
multiplierText.setText('Multiplier: ' + currentMultiplier.toFixed(2) + 'x');
winningsText.setText('Winnings: $' + gameWinnings.toFixed(2));
cashOutButton.updateAmount(gameWinnings);
statusText.setText('Fish found! Multiplier increased!');
LK.getSound('reveal').play();
}
}
function cashOut() {
if (gameState !== 'playing') return;
gameState = 'ended';
LK.setScore(LK.getScore() + Math.floor(gameWinnings - currentBet));
statusText.setText('Cashed out! Won $' + (gameWinnings - currentBet).toFixed(2));
LK.getSound('cashout').play();
LK.setTimeout(function () {
resetGame();
}, 3000);
}
function resetGame() {
gameState = 'betting';
betButton.visible = true;
cashOutButton.visible = false;
statusText.setText('Select bet amount and start!');
multiplierText.setText('Multiplier: 1.00x');
winningsText.setText('Winnings: $0.00');
// Reset visual state of all boxes
for (var i = 0; i < boxes.length; i++) {
boxes[i].isRevealed = false;
boxes[i].removeChildren();
var boxGraphics = boxes[i].attachAsset('gameBox', {
anchorX: 0.5,
anchorY: 0.5
});
}
LK.stopMusic();
}
// Handle bet amount cycling and grid size selection
game.down = function (x, y, obj) {
if (gameState === 'betting') {
if (y > 2450) {
// Grid size selection (bottom area)
currentGridIndex = (currentGridIndex + 1) % gridSizes.length;
currentGridSize = gridSizes[currentGridIndex];
totalBoxes = currentGridSize * currentGridSize;
gridSizeText.setText('Grid: ' + currentGridSize + 'x' + currentGridSize);
createGrid(); // Recreate grid with new size
} else if (y > 2350) {
// Cycle through bet amounts
currentBetIndex = (currentBetIndex + 1) % betAmounts.length;
currentBet = betAmounts[currentBetIndex];
betButton.setBetAmount(currentBet);
}
}
};
game.update = function () {
if (gameState === 'playing') {
var currentTime = Date.now();
if (currentTime - lastRevealTime >= revealInterval) {
revealNextBox();
lastRevealTime = currentTime;
}
}
};
A fantasy underwater scene in a dark deep ocean, illustrated in highly detailed fantasy art style. The background is a dark abyss with faint rays of light piercing from above, casting soft glows through the water. At the bottom of the scene, vibrant and colorful coral reefs in hues of red, purple, teal, and orange spread across the sea floor. Exotic fish swim gently among the coral. The entire scene is viewed with a cinematic wide angle. Shadows of sea creatures loom faintly in the background. The water has particles suspended, giving it a mysterious and immersive depth. Bioluminescent algae softly glow in some areas of the coral. The overall tone is mysterious yet magical. Black background base. Ideal for a 5x5 grid overlay. No text, pure environment. 4K ultra-detailed fantasy illustration.. In-Game asset. 2d. High contrast. No shadows