User prompt
başlangıçtaki yeri ingilizce yap
User prompt
karakterin üstüne tıklayarak de başlangıçtaki bilgilendirmede
User prompt
oyuncuları bilgilerdendirmek için oyunun başında oyundaki özellikleri anlatsın ve arka planı değiştir
User prompt
biraz daha maceracı
User prompt
arka plana daha macerecı birşeyler koy
User prompt
arka plan çok sade
User prompt
kareleri karaktaeri sayıları büyüt
User prompt
çıkışında belirli bir sayısı olsun bu sayı 6 eğere sınırımız varken 6 atarsak ne olusa olsun oyun bitiyor
User prompt
tamam çok güzel şimdi oyuna biraz heyecan eğer 20 hamle yaptıktan sonra oyunu bitiremezsek 20 saniye geri sayım başlasın ve bu 20 saniyedede oyunu bitiremezsek kaybedelim
User prompt
tamam kararkterer tıkladığımda kart özelliğini kullanabilelim
User prompt
oyuna kartlar ekleyelim ve bunları bir kere kullanma hakkımız olsun birinci kart bombaların nerede olduğunu 10 saniyeliğine göstersin
User prompt
çıkış yazısına sınırımız olduğunda oyun bitsin ve ekrana yeniden oyna seçeneği gelsin
User prompt
Please fix the bug: 'Cannot read properties of undefined (reading 'x')' in or related to this line: 'var neighbors = getNeighbors(playerPos.x, playerPos.y);' Line Number: 159
User prompt
çıkışa sınırımız varken oyun bitsin yada
User prompt
ve eklemeyi unutmuşum eğer çıkışa sınırımız varsa zarı atalım eğer 6 gelirse oyun bitsin ve yeniden oyna seçeneği gelsin
User prompt
tamam şimdi eğer sınırımız varsa o sayıya kendisi otamatik gitsin ama o sayıdan birden fazla varsa zarın yanında oklar belirsin ve bastığımız yere gidelim ama orada zardaki sayı varsa
User prompt
hedef yosa sınırsız atma hakkımız olsun
User prompt
eğer sınırımızda o sayı varsa o sayıya tıkladığımızda karakter hareket etsşn ama zarda yazıyorsa ve çıkış nerede göster
User prompt
karelerdeki sayıları görelim
User prompt
biz sayıları görelim ve eğer sınırımızda zarda çıkan sayı yoksa zarı bir daha atma şansımız olsun
User prompt
Please fix the bug: 'Cannot set properties of undefined (setting 'fill')' in or related to this line: 'self.valueText.style.fill = "#222222";' Line Number: 99
Code edit (1 edits merged)
Please save this source code
User prompt
Zar Labirenti: Gizli Bomba Kaçışı
Initial prompt
merhaba seninle bir oyun yapacağız bu oyunda mantık basit oyunda ki amaç zekayı kullanmak öncelikle oyunda 64 karelik bir zemin olacak ve yandada bir zar her karede rastgele bir sayı olacak ama bu sayılar 1 ile 6 arsaında olacak 1 ve 6 dahil ve zardan çıkan sayı etrafımızdaki yani sınırımız olan yerde varsa oraya ilerleyeceğiz ve rastgele bir yerde ise çıkış olacak ve sayıları bularak çıkışa varmaya çalışacağız ama bazı sayılarda gizli bombalar olacak ve biz bunu gçremeyeceğiz ve eğer o sayıya gidersek patlayacağız
/**** * Plugins ****/ var tween = LK.import("@upit/tween.v1"); /**** * Classes ****/ // Dice visual var Dice = Container.expand(function () { var self = Container.call(this); self.value = 1; self.bg = self.attachAsset('diceBg', { width: diceSize, height: diceSize, color: 0xffffff, shape: 'box', anchorX: 0.5, anchorY: 0.5 }); self.text = new Text2('1', { size: 160, fill: 0x222222 }); self.text.anchor.set(0.5, 0.5); self.addChild(self.text); self.setValue = function (v) { self.value = v; self.text.setText(v + ''); }; // Animate dice roll self.rollAnim = function (finalValue, cb) { var rollTimes = 12; var i = 0; var _roll = function roll() { if (i < rollTimes) { var val = 1 + Math.floor(Math.random() * 6); self.setValue(val); i++; LK.setTimeout(_roll, 40 + i * 10); } else { self.setValue(finalValue); if (cb) cb(); } }; _roll(); }; return self; }); // GridCell: Represents a single cell in the grid var GridCell = Container.expand(function () { var self = Container.call(this); // Properties self.gridX = 0; self.gridY = 0; self.value = 1; // 1-6 self.hasBomb = false; self.isExit = false; self.isRevealed = false; // Visuals self.bg = self.attachAsset('cellBg', { width: cellSize - 8, height: cellSize - 8, color: 0xeeeeee, shape: 'box', anchorX: 0.5, anchorY: 0.5 }); self.valueText = new Text2('', { size: 100, fill: 0x222222 }); self.valueText.anchor.set(0.5, 0.5); self.addChild(self.valueText); // Reveal cell (show value, bomb, or exit) self.reveal = function () { self.isRevealed = true; if (self.isExit) { self.bg.color = 0x44bb44; self.valueText.setText('Çıkış'); self.valueText.setStyle({ fill: 0xFFFFFF }); } else if (self.hasBomb) { self.bg.color = 0xbb2222; self.valueText.setText('💣'); self.valueText.setStyle({ fill: 0xFFFFFF }); } else { self.bg.color = 0xcccccc; self.valueText.setText(self.value + ''); self.valueText.setStyle({ fill: 0x222222 }); } }; // Hide cell (for unrevealed state) self.hide = function () { self.isRevealed = false; self.bg.color = 0xeeeeee; self.valueText.setText(self.value + ''); // Always show the cell value, even when hidden }; // Highlight for possible move self.highlight = function () { self.bg.color = 0x4488ff; }; // Remove highlight self.unhighlight = function () { if (!self.isRevealed) { self.bg.color = 0xeeeeee; } else if (self.isExit) { self.bg.color = 0x44bb44; } else if (self.hasBomb) { self.bg.color = 0xbb2222; } else { self.bg.color = 0xcccccc; } }; return self; }); // Player token var PlayerToken = Container.expand(function () { var self = Container.call(this); self.token = self.attachAsset('playerToken', { width: cellSize * 0.85, height: cellSize * 0.85, color: 0x2266cc, shape: 'ellipse', anchorX: 0.5, anchorY: 0.5 }); return self; }); /**** * Initialize Game ****/ var game = new LK.Game({ backgroundColor: 0xf7f7f7 }); /**** * Game Code ****/ // Daha maceracı, fantastik bir arka plan için: mağara, ışık huzmeleri, pus ve eski harita efekti katmanları // 1. Koyu mağara tabanı var caveBg = LK.getAsset('cellBg', { width: 2048, height: 2732, color: 0x181c22, anchorX: 0, anchorY: 0, alpha: 1 }); caveBg.x = 0; caveBg.y = 0; caveBg.zIndex = -1000; game.addChild(caveBg); // 2. "Eski harita" efekti için: sarımsı, yıpranmış bir overlay var parchmentOverlay = LK.getAsset('cellBg', { width: 2048, height: 2732, color: 0xf6e7b2, anchorX: 0, anchorY: 0, alpha: 0.13 }); parchmentOverlay.x = 0; parchmentOverlay.y = 0; parchmentOverlay.zIndex = -999; game.addChild(parchmentOverlay); // 3. Mağara duvarı gölgeleri (kenarlarda koyu degrade) for (var i = 0; i < 2; i++) { var wallShadow = LK.getAsset('cellBg', { width: 400, height: 2732, color: 0x0e1014, anchorX: i === 0 ? 0 : 1, anchorY: 0, alpha: 0.32 }); wallShadow.x = i === 0 ? 0 : 2048; wallShadow.y = 0; wallShadow.zIndex = -998; game.addChild(wallShadow); } // 4. Büyük, puslu "gizemli ışık huzmeleri" (fantastik atmosfer için) for (var k = 0; k < 3; k++) { var beam = LK.getAsset('cellBg', { width: 900 + k * 400, height: 400 + k * 300, color: 0xf7e9b0, anchorX: 0.5, anchorY: 0.5, alpha: 0.13 - k * 0.03, shape: 'ellipse' }); beam.x = 1024 + (k - 1) * 420; beam.y = 600 + k * 600; beam.zIndex = -997; game.addChild(beam); } // 5. Hafif mavi-mor puslu overlay (derinlik ve soğukluk için) var mistOverlay = LK.getAsset('cellBg', { width: 2048, height: 2732, color: 0x4e5d7a, anchorX: 0, anchorY: 0, alpha: 0.18 }); mistOverlay.x = 0; mistOverlay.y = 0; mistOverlay.zIndex = -996; game.addChild(mistOverlay); // 6. Alt ve üstte yoğun pus/sis katmanları var fogTop = LK.getAsset('cellBg', { width: 2048, height: 320, color: 0xffffff, anchorX: 0, anchorY: 0, alpha: 0.10 }); fogTop.x = 0; fogTop.y = 0; fogTop.zIndex = -995; game.addChild(fogTop); var fogBottom = LK.getAsset('cellBg', { width: 2048, height: 320, color: 0xffffff, anchorX: 0, anchorY: 0, alpha: 0.10 }); fogBottom.x = 0; fogBottom.y = 2732 - 320; fogBottom.zIndex = -995; game.addChild(fogBottom); // 7. "Antik harita" hissi için: ortada hafif bir yuvarlak aydınlatma efekti var centerGlow = LK.getAsset('cellBg', { width: 1200, height: 1200, color: 0xf7e9b0, anchorX: 0.5, anchorY: 0.5, alpha: 0.08, shape: 'ellipse' }); centerGlow.x = 1024; centerGlow.y = 1200; centerGlow.zIndex = -994; game.addChild(centerGlow); // 8. Dikey degrade efekti için üstten alta yarı saydam katmanlar (daha dramatik) for (var i = 0; i < 5; i++) { var grad = LK.getAsset('cellBg', { width: 2048, height: 500, color: 0x2a3a4d, anchorX: 0, anchorY: 0, alpha: 0.10 + i * 0.05 }); grad.x = 0; grad.y = i * 420; grad.zIndex = -993; game.addChild(grad); } // No per-frame logic needed // Check if exit is adjacent and not already game over if (!gameOver && playerPos && typeof playerPos.x === "number" && typeof playerPos.y === "number") { var neighbors = getNeighbors(playerPos.x, playerPos.y); for (var i = 0; i < neighbors.length; i++) { if (neighbors[i].isExit) { // End game immediately and show replay option stopEndgameTimer(); neighbors[i].reveal(); LK.effects.flashScreen(0x44bb44, 900); gameOver = true; LK.setTimeout(function () { LK.showYouWin(); }, 900); infoText.setText('Çıkışa ulaştın!'); break; } } } var gridSize = 8; var cellSize = Math.floor(2000 / gridSize); // Increased cell size for better visibility var gridOffsetX = Math.floor((2048 - cellSize * gridSize) / 2); var gridOffsetY = 250; // Move grid up a bit to fit larger elements var diceSize = 340; // Larger dice // --- State --- var grid = []; var playerPos = { x: 0, y: 0 }; var exitPos = { x: 0, y: 0 }; var playerToken = null; var dice = null; var canRoll = true; var possibleMoves = []; var gameOver = false; var moveCount = 0; var bombCount = 10; // Number of bombs // --- Timer for endgame after 20 moves --- var moveLimit = 20; var endgameCountdown = 20; // seconds var endgameTimer = null; var endgameTimerText = null; var endgameTimerInterval = null; var endgameTimerActive = false; // --- GUI --- var infoText = new Text2('', { size: 70, fill: 0x333333 }); infoText.anchor.set(0.5, 0); LK.gui.top.addChild(infoText); // Timer text (hidden by default) endgameTimerText = new Text2('', { size: 80, fill: 0xBB2222, font: "bold", align: "center" }); endgameTimerText.anchor.set(0.5, 0); endgameTimerText.x = 2048 / 2; endgameTimerText.y = 180; endgameTimerText.visible = false; LK.gui.top.addChild(endgameTimerText); // Helper to start the 20s countdown function startEndgameTimer() { if (endgameTimerActive) return; endgameTimerActive = true; endgameCountdown = 20; endgameTimerText.visible = true; endgameTimerText.setText('Süre: 20'); endgameTimerInterval = LK.setInterval(function () { if (gameOver) { LK.clearInterval(endgameTimerInterval); endgameTimerText.visible = false; return; } endgameCountdown--; endgameTimerText.setText('Süre: ' + endgameCountdown); if (endgameCountdown <= 0) { LK.clearInterval(endgameTimerInterval); endgameTimerText.visible = false; gameOver = true; LK.effects.flashScreen(0xbb2222, 900); LK.setTimeout(function () { LK.showGameOver(); }, 900); infoText.setText('Süre bitti! Kaybettin.'); } }, 1000); } // Helper to stop the timer (on win/lose) function stopEndgameTimer() { if (endgameTimerInterval) { LK.clearInterval(endgameTimerInterval); endgameTimerInterval = null; } endgameTimerText.visible = false; endgameTimerActive = false; } // --- Functions --- // Generate grid with random values, bombs, and exit function generateGrid() { grid = []; // Place bombs var bombCells = []; while (bombCells.length < bombCount) { var bx = Math.floor(Math.random() * gridSize); var by = Math.floor(Math.random() * gridSize); if (bx === 0 && by === 0 || bombCells.some(function (b) { return b.x === bx && b.y === by; })) continue; bombCells.push({ x: bx, y: by }); } // Place exit do { exitPos.x = Math.floor(Math.random() * gridSize); exitPos.y = Math.floor(Math.random() * gridSize); } while (exitPos.x === 0 && exitPos.y === 0 || bombCells.some(function (b) { return b.x === exitPos.x && b.y === exitPos.y; })); // Build grid for (var y = 0; y < gridSize; y++) { var row = []; for (var x = 0; x < gridSize; x++) { var cell = new GridCell(); cell.gridX = x; cell.gridY = y; cell.x = gridOffsetX + x * cellSize + cellSize / 2; cell.y = gridOffsetY + y * cellSize + cellSize / 2; cell.value = 1 + Math.floor(Math.random() * 6); cell.hasBomb = bombCells.some(function (b) { return b.x === x && b.y === y; }); cell.isExit = x === exitPos.x && y === exitPos.y; if (cell.isExit) { cell.value = 6; // Exit cell always has value 6 cell.reveal(); // Always show exit cell } else { cell.hide(); } game.addChild(cell); row.push(cell); } grid.push(row); } } // Get neighbors of (x, y) function getNeighbors(x, y) { var neighbors = []; for (var dx = -1; dx <= 1; dx++) { for (var dy = -1; dy <= 1; dy++) { if (dx === 0 && dy === 0) continue; var nx = x + dx; var ny = y + dy; if (nx >= 0 && nx < gridSize && ny >= 0 && ny < gridSize) { neighbors.push(grid[ny][nx]); } } } return neighbors; } // Highlight possible moves for current dice value // --- Arrow UI for multiple moves --- var moveArrows = []; function clearMoveArrows() { for (var i = 0; i < moveArrows.length; i++) { if (moveArrows[i] && moveArrows[i].parent) { moveArrows[i].parent.removeChild(moveArrows[i]); } } moveArrows = []; } function createArrowForCell(cell, idx) { // Use a yellow box as arrow for now, can be replaced with a real arrow asset var arrow = LK.getAsset('diceTap', { width: cellSize * 0.35, height: cellSize * 0.35, color: 0xfad82b, anchorX: 0.5, anchorY: 0.5, alpha: 0.85 }); arrow.x = cell.x; arrow.y = cell.y; arrow.zIndex = 1000 + idx; arrow.down = function (x, y, obj) { if (!canRoll && !gameOver) { movePlayerTo(cell); clearMoveArrows(); } }; game.addChild(arrow); moveArrows.push(arrow); } function highlightPossibleMoves(diceValue) { possibleMoves = []; clearMoveArrows(); var neighbors = getNeighbors(playerPos.x, playerPos.y); for (var i = 0; i < neighbors.length; i++) { var cell = neighbors[i]; if (!cell.isRevealed && cell.value === diceValue) { cell.highlight(); possibleMoves.push(cell); } } // If only one possible move, auto-move if (possibleMoves.length === 1) { // Delay slightly for UX LK.setTimeout(function () { if (!canRoll && !gameOver) { movePlayerTo(possibleMoves[0]); clearMoveArrows(); } }, 350); } else if (possibleMoves.length > 1) { // Show arrows for each possible move for (var i = 0; i < possibleMoves.length; i++) { createArrowForCell(possibleMoves[i], i); } } } // Remove all highlights function clearHighlights() { for (var y = 0; y < gridSize; y++) { for (var x = 0; x < gridSize; x++) { grid[y][x].unhighlight(); // Always keep exit cell revealed if (grid[y][x].isExit) { grid[y][x].reveal(); } } } clearMoveArrows(); } // Move player to cell function movePlayerTo(cell) { playerPos.x = cell.gridX; playerPos.y = cell.gridY; moveCount++; clearMoveArrows(); tween(playerToken, { x: cell.x, y: cell.y }, { duration: 220, easing: tween.cubicOut }); cell.reveal(); // Start endgame timer after 20th move if (moveCount === moveLimit) { startEndgameTimer(); } if (cell.hasBomb) { stopEndgameTimer(); LK.effects.flashScreen(0xff0000, 900); gameOver = true; LK.setTimeout(function () { LK.showGameOver(); }, 900); infoText.setText('Bomba! Oyun bitti.'); return; } if (cell.isExit) { stopEndgameTimer(); LK.effects.flashScreen(0x44bb44, 900); gameOver = true; LK.setTimeout(function () { LK.showYouWin(); }, 900); infoText.setText('Tebrikler! Çıkışa ulaştın.'); return; } infoText.setText('Hamle: ' + moveCount); canRoll = true; clearHighlights(); // Always keep exit cell revealed grid[exitPos.y][exitPos.x].reveal(); } // Handle tap on a cell function onCellDown(x, y, obj) { if (!canRoll && !gameOver) { // If arrows are present, only allow move via arrow tap if (moveArrows.length > 0) return; // Only allow move if the tapped cell is in possibleMoves (highlighted and matches dice) for (var i = 0; i < possibleMoves.length; i++) { if (possibleMoves[i] === obj) { movePlayerTo(obj); break; } } } } // Roll the dice function rollDice() { if (!canRoll || gameOver) return; canRoll = false; var diceValue = 1 + Math.floor(Math.random() * 6); dice.rollAnim(diceValue, function () { highlightPossibleMoves(diceValue); // Check if exit is adjacent and matches dice value var exitIsPossible = false; var exitCell = null; var neighbors = getNeighbors(playerPos.x, playerPos.y); for (var i = 0; i < neighbors.length; i++) { if (neighbors[i].isExit) { exitCell = neighbors[i]; if (neighbors[i].value === diceValue) { exitIsPossible = true; break; } } } // If exit is adjacent and dice is 6, win immediately (regardless of exit cell value) if (exitCell && diceValue === 6) { stopEndgameTimer(); exitCell.reveal(); LK.effects.flashScreen(0x44bb44, 900); gameOver = true; LK.setTimeout(function () { LK.showYouWin(); }, 900); infoText.setText('6 geldi! Çıkışa ulaştın.'); return; } if (possibleMoves.length === 0 && !exitIsPossible) { // No moves and exit is not possible, allow unlimited reroll canRoll = true; infoText.setText('Hamle yok! Zar tekrar atılabilir.'); } else { infoText.setText('Hamle: ' + moveCount + ' | Zar: ' + diceValue); } }); } // --- Setup --- // Create grid, player, dice generateGrid(); // Reveal start cell playerPos.x = 0; playerPos.y = 0; grid[0][0].reveal(); // Player token playerToken = new PlayerToken(); playerToken.x = grid[0][0].x; playerToken.y = grid[0][0].y; game.addChild(playerToken); // Allow using the card by tapping the player token playerToken.down = function (x, y, obj) { if (cardRevealBombsUsed || gameOver) return; cardRevealBombsUsed = true; cardRevealBombsBtn.setText('Kullanıldı'); cardRevealBombsBtn.alpha = 0.5; showAllBombsTemporarily(); }; // Dice dice = new Dice(); dice.x = 2048 / 2; dice.y = gridOffsetY + cellSize * gridSize + diceSize / 2 + 60; game.addChild(dice); // --- Card: Reveal Bombs (single use) --- var cardRevealBombsUsed = false; var cardRevealBombsBtn = new Text2('💣 Bombaları Göster', { size: 60, fill: "#fff", font: "bold", padding: 18, align: "center", background: 0xBB2222 }); cardRevealBombsBtn.anchor.set(0.5, 0); cardRevealBombsBtn.x = 2048 / 2; cardRevealBombsBtn.y = 80; cardRevealBombsBtn.interactive = true; cardRevealBombsBtn.buttonMode = true; LK.gui.top.addChild(cardRevealBombsBtn); function showAllBombsTemporarily() { // Reveal all bombs for (var y = 0; y < gridSize; y++) { for (var x = 0; x < gridSize; x++) { var cell = grid[y][x]; if (cell.hasBomb && !cell.isRevealed) { cell.reveal(); cell._wasTempRevealed = true; } } } infoText.setText('Bombalar 10 saniye boyunca görünüyor!'); // Hide bombs again after 10 seconds LK.setTimeout(function () { for (var y = 0; y < gridSize; y++) { for (var x = 0; x < gridSize; x++) { var cell = grid[y][x]; if (cell._wasTempRevealed) { cell.hide(); cell._wasTempRevealed = false; } } } infoText.setText('Kart kullanıldı. Hamle: ' + moveCount); }, 10000); } cardRevealBombsBtn.down = function (x, y, obj) { if (cardRevealBombsUsed || gameOver) return; cardRevealBombsUsed = true; cardRevealBombsBtn.setText('Kullanıldı'); cardRevealBombsBtn.alpha = 0.5; showAllBombsTemporarily(); }; // Dice tap area (invisible, for touch) var diceTapArea = LK.getAsset('diceTap', { width: diceSize + 60, height: diceSize + 60, color: 0xffffff, shape: 'box', anchorX: 0.5, anchorY: 0.5, alpha: 0.01 }); diceTapArea.x = dice.x; diceTapArea.y = dice.y; game.addChild(diceTapArea); // Info text infoText.setText('Başlamak için zar at!'); // --- Event Handlers --- // Dice tap diceTapArea.down = function (x, y, obj) { if (canRoll && !gameOver) { rollDice(); } }; // Cell tap for (var y = 0; y < gridSize; y++) { for (var x = 0; x < gridSize; x++) { grid[y][x].down = onCellDown; } } // --- Game update (not used, but required) --- game.update = function () { // No per-frame logic needed };
===================================================================
--- original.js
+++ change.js
@@ -142,91 +142,133 @@
/****
* Game Code
****/
-// Macera dolu bir arka plan için: Derinlikli gölgeler, degrade ve puslu overlayler ekle
-// 1. Koyu gölgeli ana katman
-var shadowBg = LK.getAsset('cellBg', {
+// Daha maceracı, fantastik bir arka plan için: mağara, ışık huzmeleri, pus ve eski harita efekti katmanları
+// 1. Koyu mağara tabanı
+var caveBg = LK.getAsset('cellBg', {
width: 2048,
height: 2732,
- color: 0x1a2633,
+ color: 0x181c22,
anchorX: 0,
anchorY: 0,
alpha: 1
});
-shadowBg.x = 0;
-shadowBg.y = 0;
-shadowBg.zIndex = -1000;
-game.addChild(shadowBg);
-// 2. Hafif mavi-mor puslu overlay (macera havası için)
-var mistOverlay = LK.getAsset('cellBg', {
+caveBg.x = 0;
+caveBg.y = 0;
+caveBg.zIndex = -1000;
+game.addChild(caveBg);
+// 2. "Eski harita" efekti için: sarımsı, yıpranmış bir overlay
+var parchmentOverlay = LK.getAsset('cellBg', {
width: 2048,
height: 2732,
- color: 0x4e5d7a,
+ color: 0xf6e7b2,
anchorX: 0,
anchorY: 0,
- alpha: 0.22
+ alpha: 0.13
});
-mistOverlay.x = 0;
-mistOverlay.y = 0;
-mistOverlay.zIndex = -999;
-game.addChild(mistOverlay);
-// 3. Dikey degrade efekti için üstten alta yarı saydam katmanlar
-for (var i = 0; i < 6; i++) {
- var grad = LK.getAsset('cellBg', {
- width: 2048,
- height: 460,
- color: 0x2a3a4d,
- anchorX: 0,
+parchmentOverlay.x = 0;
+parchmentOverlay.y = 0;
+parchmentOverlay.zIndex = -999;
+game.addChild(parchmentOverlay);
+// 3. Mağara duvarı gölgeleri (kenarlarda koyu degrade)
+for (var i = 0; i < 2; i++) {
+ var wallShadow = LK.getAsset('cellBg', {
+ width: 400,
+ height: 2732,
+ color: 0x0e1014,
+ anchorX: i === 0 ? 0 : 1,
anchorY: 0,
- alpha: 0.10 + i * 0.04
+ alpha: 0.32
});
- grad.x = 0;
- grad.y = i * 420;
- grad.zIndex = -998;
- game.addChild(grad);
+ wallShadow.x = i === 0 ? 0 : 2048;
+ wallShadow.y = 0;
+ wallShadow.zIndex = -998;
+ game.addChild(wallShadow);
}
-// 4. Macera temalı "ışık huzmeleri" efekti için: büyük, yarı saydam, açık renkli elipsler
+// 4. Büyük, puslu "gizemli ışık huzmeleri" (fantastik atmosfer için)
for (var k = 0; k < 3; k++) {
var beam = LK.getAsset('cellBg', {
width: 900 + k * 400,
height: 400 + k * 300,
color: 0xf7e9b0,
anchorX: 0.5,
anchorY: 0.5,
- alpha: 0.10 - k * 0.02,
+ alpha: 0.13 - k * 0.03,
shape: 'ellipse'
});
- beam.x = 1024 + (k - 1) * 400;
- beam.y = 700 + k * 500;
+ beam.x = 1024 + (k - 1) * 420;
+ beam.y = 600 + k * 600;
beam.zIndex = -997;
game.addChild(beam);
}
-// 5. Hafif "sis" efekti için: üstte ve altta yarı saydam beyaz katmanlar
+// 5. Hafif mavi-mor puslu overlay (derinlik ve soğukluk için)
+var mistOverlay = LK.getAsset('cellBg', {
+ width: 2048,
+ height: 2732,
+ color: 0x4e5d7a,
+ anchorX: 0,
+ anchorY: 0,
+ alpha: 0.18
+});
+mistOverlay.x = 0;
+mistOverlay.y = 0;
+mistOverlay.zIndex = -996;
+game.addChild(mistOverlay);
+// 6. Alt ve üstte yoğun pus/sis katmanları
var fogTop = LK.getAsset('cellBg', {
width: 2048,
- height: 300,
+ height: 320,
color: 0xffffff,
anchorX: 0,
anchorY: 0,
- alpha: 0.08
+ alpha: 0.10
});
fogTop.x = 0;
fogTop.y = 0;
-fogTop.zIndex = -996;
+fogTop.zIndex = -995;
game.addChild(fogTop);
var fogBottom = LK.getAsset('cellBg', {
width: 2048,
- height: 300,
+ height: 320,
color: 0xffffff,
anchorX: 0,
anchorY: 0,
- alpha: 0.08
+ alpha: 0.10
});
fogBottom.x = 0;
-fogBottom.y = 2732 - 300;
-fogBottom.zIndex = -996;
+fogBottom.y = 2732 - 320;
+fogBottom.zIndex = -995;
game.addChild(fogBottom);
+// 7. "Antik harita" hissi için: ortada hafif bir yuvarlak aydınlatma efekti
+var centerGlow = LK.getAsset('cellBg', {
+ width: 1200,
+ height: 1200,
+ color: 0xf7e9b0,
+ anchorX: 0.5,
+ anchorY: 0.5,
+ alpha: 0.08,
+ shape: 'ellipse'
+});
+centerGlow.x = 1024;
+centerGlow.y = 1200;
+centerGlow.zIndex = -994;
+game.addChild(centerGlow);
+// 8. Dikey degrade efekti için üstten alta yarı saydam katmanlar (daha dramatik)
+for (var i = 0; i < 5; i++) {
+ var grad = LK.getAsset('cellBg', {
+ width: 2048,
+ height: 500,
+ color: 0x2a3a4d,
+ anchorX: 0,
+ anchorY: 0,
+ alpha: 0.10 + i * 0.05
+ });
+ grad.x = 0;
+ grad.y = i * 420;
+ grad.zIndex = -993;
+ game.addChild(grad);
+}
// No per-frame logic needed
// Check if exit is adjacent and not already game over
if (!gameOver && playerPos && typeof playerPos.x === "number" && typeof playerPos.y === "number") {
var neighbors = getNeighbors(playerPos.x, playerPos.y);
ıdk . No background. Transparent background. Blank background. No shadows. 2d. In-Game asset. flat
ıdk . No background. Transparent background. Blank background. No shadows. 2d. In-Game asset. flat
ıdk . No background. Transparent background. Blank background. No shadows. 2d. In-Game asset. flat
red and big x. No background. Transparent background. Blank background. No shadows. 2d. In-Game asset. flat