User prompt
Logoyı sağ üst köşeye taşı vayabi560.com texti 600 pixel üste ve 600 pixsel sola taşı
User prompt
Oyunun sol üst köşesine logo ekle asetlerde değiştirmemize izin ver
User prompt
Backgrounda vayabi560.com texti ekle
User prompt
Bet ve Cashout textini bolt ve Koyu Gri olarak yaz
User prompt
Roketi sağ üst kçşeye doğru uçuyor animasyonu ekle. İkili görünen roket hatasını düzelt ↪💡 Consider importing and using the following plugins: @upit/tween.v1
User prompt
Bacground sade siyah kalsın, Yıldızları sol aşağı salınımla random çıkar. ^planeti random çıkar ve sol aiağı doğru salınım yapsın. sayısı yıldızın %3 olsun. ↪💡 Consider importing and using the following plugins: @upit/tween.v1
User prompt
Bagrounda yıldık eklendiği gibi 3 gezegen daha ekle
User prompt
Bacground harketini azalt. Yıldız hareketi çok fazla ↪💡 Consider importing and using the following plugins: @upit/tween.v1
User prompt
airplane yukarı ve sağa doğru eğilimli yükselir, arkasında iz bırakır. Uçak sahneden hiçbir zaman ayrılmaz uçak yükseldikçe bacground da hareket eder ↪💡 Consider importing and using the following plugins: @upit/tween.v1
User prompt
Uçak yükseliği ve multıplier artışı orantılı çalışmıyor Multiplier artış hızını 5x azalt. Uçak yükselme hızını 10x artır. ↪💡 Consider importing and using the following plugins: @upit/tween.v1
User prompt
Multiplier ve uçak yükseliş hızını 5x yavaşlat.
Code edit (1 edits merged)
Please save this source code
User prompt
Crash Flight - Aviator Risk Game
Initial prompt
"Design a game interface and gameplay artwork inspired by Spribe's Aviator crash game. The scene should feature a minimalistic dark-themed UI with a clean dashboard. A red cartoon-styled airplane should ascend on a black runway-style slope graph. The airplane increases its altitude while a dynamic multiplier (starting from x1.00) grows in real-time. The graph should resemble a logarithmic curve, indicating exponential growth, fading from red to yellow at higher values. The UI includes: A large bold multiplier in the center (x1.00 → x100+), in bright green font (#00FF00). Two large “Bet” and “Cashout” buttons in blue (#2980b9) and red (#e74c3c) respectively. A bottom chat window with minimal UI in grayscale. Bet history panel with past crash values shown in red if below x2.00 and green above x10.00. User leaderboard panel showing avatar, bet, and cashout multiplier in a table format. Background should be a dark runway night sky with subtle stars and fading gradient. Include sound wave-like lines across the background to hint at volatility and risk. Game mechanics: The plane starts flying at x1.00. Every second, multiplier increases exponentially based on a random function (curve = 1.03^tick). The crash point is determined using a provably fair seed (visualize it as a sudden cut-off point). Player can click "Cashout" any time before crash; if they fail, they lose the bet. UI shows countdown for next round, 5s pause between rounds. Match Spribe Aviator’s tone: clean, sleek, focused on speed, excitement and risk. Use sharp fonts, low clutter, and high visual contrast. -- Style: UI/UX game screen mockup -- View: 2D flat top-down -- Color Palette: red, black, green, grey -- Resolution: ultra sharp, mobile-ready -- Include motion lines, glow effects, and a sense of real-time speed."**
/**** * Plugins ****/ var tween = LK.import("@upit/tween.v1"); /**** * Classes ****/ var Airplane = Container.expand(function () { var self = Container.call(this); var planeGraphics = self.attachAsset('airplane', { anchorX: 0.5, anchorY: 0.5 }); self.isFlying = false; self.crashed = false; self.startFlight = function () { self.isFlying = true; self.crashed = false; self.x = 200; self.y = 2400; self.rotation = -0.3; }; self.crash = function () { self.isFlying = false; self.crashed = true; // Add crash animation tween(self, { rotation: self.rotation + 1.5, scaleX: 0.5, scaleY: 0.5 }, { duration: 500, easing: tween.easeOut }); }; self.update = function () { if (self.isFlying && !self.crashed) { // Move airplane up and right along exponential curve (5x slower) var progress = (LK.ticks - gameStartTick) / 300; // seconds (60 * 5 = 300) self.x = 200 + progress * 16; // 80 / 5 = 16 self.y = 2400 - Math.pow(progress, 1.2) * 60; // 300 / 5 = 60 } }; return self; }); var GameButton = Container.expand(function (buttonType) { var self = Container.call(this); var buttonGraphics = self.attachAsset(buttonType === 'bet' ? 'button' : 'cashoutButton', { anchorX: 0.5, anchorY: 0.5 }); self.buttonType = buttonType; self.enabled = true; self.setEnabled = function (enabled) { self.enabled = enabled; self.alpha = enabled ? 1.0 : 0.5; }; self.down = function (x, y, obj) { if (!self.enabled) return; if (self.buttonType === 'bet') { placeBet(); } else if (self.buttonType === 'cashout') { cashOut(); } }; return self; }); var Star = Container.expand(function () { var self = Container.call(this); var starGraphics = self.attachAsset('star', { anchorX: 0.5, anchorY: 0.5 }); self.twinkle = function () { tween(self, { alpha: 0.3 }, { duration: 1000 + Math.random() * 2000, easing: tween.easeInOut, onFinish: function onFinish() { tween(self, { alpha: 1 }, { duration: 1000 + Math.random() * 2000, easing: tween.easeInOut, onFinish: function onFinish() { self.twinkle(); } }); } }); }; return self; }); /**** * Initialize Game ****/ var game = new LK.Game({ backgroundColor: 0x001122 }); /**** * Game Code ****/ // Game state variables var gameState = 'waiting'; // 'waiting', 'flying', 'crashed', 'countdown' var currentMultiplier = 1.00; var crashMultiplier = 0; var gameStartTick = 0; var countdownTimer = 0; var playerBet = 0; var playerCashedOut = false; var playerBalance = 1000; // Create runway var runway = game.addChild(LK.getAsset('runway', { anchorX: 0, anchorY: 1, x: 0, y: 2732 })); // Create stars background var stars = []; for (var i = 0; i < 50; i++) { var star = game.addChild(new Star()); star.x = Math.random() * 2048; star.y = Math.random() * 1500; star.twinkle(); stars.push(star); } // Create airplane var airplane = game.addChild(new Airplane()); // Create UI elements var multiplierText = new Text2('x1.00', { size: 120, fill: 0x00FF00 }); multiplierText.anchor.set(0.5, 0.5); multiplierText.x = 1024; multiplierText.y = 400; game.addChild(multiplierText); var balanceText = new Text2('Balance: $1000', { size: 60, fill: 0xFFFFFF }); balanceText.anchor.set(0, 0); balanceText.x = 50; balanceText.y = 150; game.addChild(balanceText); var betText = new Text2('Bet: $0', { size: 50, fill: 0xFFFF00 }); betText.anchor.set(0, 0); betText.x = 50; betText.y = 220; game.addChild(betText); var statusText = new Text2('Place your bet!', { size: 70, fill: 0xFFFFFF }); statusText.anchor.set(0.5, 0.5); statusText.x = 1024; statusText.y = 600; game.addChild(statusText); var countdownText = new Text2('', { size: 100, fill: 0xFF0000 }); countdownText.anchor.set(0.5, 0.5); countdownText.x = 1024; countdownText.y = 800; game.addChild(countdownText); // Create buttons var betButton = game.addChild(new GameButton('bet')); betButton.x = 300; betButton.y = 2500; var betButtonText = new Text2('BET $100', { size: 40, fill: 0xFFFFFF }); betButtonText.anchor.set(0.5, 0.5); betButtonText.x = 300; betButtonText.y = 2500; game.addChild(betButtonText); var cashoutButton = game.addChild(new GameButton('cashout')); cashoutButton.x = 1500; cashoutButton.y = 2500; cashoutButton.setEnabled(false); var cashoutButtonText = new Text2('CASH OUT', { size: 40, fill: 0xFFFFFF }); cashoutButtonText.anchor.set(0.5, 0.5); cashoutButtonText.x = 1500; cashoutButtonText.y = 2500; game.addChild(cashoutButtonText); // Game functions function generateCrashMultiplier() { // Provably fair random crash point between 1.01 and 50.00 var random = Math.random(); if (random < 0.5) return 1.01 + Math.random() * 1.99; // 1.01-3.00 (50% chance) if (random < 0.8) return 3.00 + Math.random() * 7.00; // 3.00-10.00 (30% chance) return 10.00 + Math.random() * 40.00; // 10.00-50.00 (20% chance) } function placeBet() { if (gameState !== 'waiting' || playerBalance < 100) return; playerBet = 100; playerBalance -= playerBet; playerCashedOut = false; betText.setText('Bet: $' + playerBet); balanceText.setText('Balance: $' + playerBalance); statusText.setText('Good luck!'); betButton.setEnabled(false); // Start game if not already started if (gameState === 'waiting') { startNewRound(); } } function cashOut() { if (gameState !== 'flying' || playerBet === 0 || playerCashedOut) return; var winnings = Math.floor(playerBet * currentMultiplier); playerBalance += winnings; playerCashedOut = true; balanceText.setText('Balance: $' + playerBalance); statusText.setText('Cashed out at x' + currentMultiplier.toFixed(2) + '! Won $' + winnings); cashoutButton.setEnabled(false); LK.getSound('cashout').play(); // Flash green LK.effects.flashObject(multiplierText, 0x00ff00, 500); } function startNewRound() { gameState = 'flying'; gameStartTick = LK.ticks; currentMultiplier = 1.00; crashMultiplier = generateCrashMultiplier(); airplane.startFlight(); if (playerBet > 0 && !playerCashedOut) { cashoutButton.setEnabled(true); } statusText.setText('Flying...'); LK.getSound('takeoff').play(); } function crashPlane() { gameState = 'crashed'; airplane.crash(); if (playerBet > 0 && !playerCashedOut) { statusText.setText('CRASHED! Lost $' + playerBet); // Flash red LK.effects.flashObject(multiplierText, 0xff0000, 1000); } else { statusText.setText('CRASHED at x' + crashMultiplier.toFixed(2)); } multiplierText.tint = 0xff0000; cashoutButton.setEnabled(false); LK.getSound('crash').play(); // Start countdown countdownTimer = 5; LK.setTimeout(function () { startCountdown(); }, 1000); } function startCountdown() { gameState = 'countdown'; var countdownInterval = LK.setInterval(function () { countdownText.setText('Next round in: ' + countdownTimer); countdownTimer--; if (countdownTimer < 0) { LK.clearInterval(countdownInterval); countdownText.setText(''); resetForNextRound(); } }, 1000); } function resetForNextRound() { gameState = 'waiting'; playerBet = 0; playerCashedOut = false; currentMultiplier = 1.00; multiplierText.setText('x1.00'); multiplierText.tint = 0x00ff00; betText.setText('Bet: $0'); statusText.setText('Place your bet!'); betButton.setEnabled(true); cashoutButton.setEnabled(false); airplane.x = 200; airplane.y = 2400; airplane.rotation = -0.3; airplane.scaleX = 1; airplane.scaleY = 1; } // Initialize first round resetForNextRound(); game.update = function () { if (gameState === 'flying') { // Calculate current multiplier using exponential growth (5x slower) var secondsFlying = (LK.ticks - gameStartTick) / 300; // 60 * 5 = 300 currentMultiplier = Math.pow(1.03, secondsFlying * 60); multiplierText.setText('x' + currentMultiplier.toFixed(2)); // Check if we should crash if (currentMultiplier >= crashMultiplier) { crashPlane(); } // Update cashout button text if (playerBet > 0 && !playerCashedOut) { var potentialWin = Math.floor(playerBet * currentMultiplier); cashoutButtonText.setText('CASH OUT $' + potentialWin); } } };
===================================================================
--- original.js
+++ change.js
@@ -35,12 +35,12 @@
});
};
self.update = function () {
if (self.isFlying && !self.crashed) {
- // Move airplane up and right along exponential curve
- var progress = (LK.ticks - gameStartTick) / 60; // seconds
- self.x = 200 + progress * 80;
- self.y = 2400 - Math.pow(progress, 1.2) * 300;
+ // Move airplane up and right along exponential curve (5x slower)
+ var progress = (LK.ticks - gameStartTick) / 300; // seconds (60 * 5 = 300)
+ self.x = 200 + progress * 16; // 80 / 5 = 16
+ self.y = 2400 - Math.pow(progress, 1.2) * 60; // 300 / 5 = 60
}
};
return self;
});
@@ -293,10 +293,10 @@
// Initialize first round
resetForNextRound();
game.update = function () {
if (gameState === 'flying') {
- // Calculate current multiplier using exponential growth
- var secondsFlying = (LK.ticks - gameStartTick) / 60;
+ // Calculate current multiplier using exponential growth (5x slower)
+ var secondsFlying = (LK.ticks - gameStartTick) / 300; // 60 * 5 = 300
currentMultiplier = Math.pow(1.03, secondsFlying * 60);
multiplierText.setText('x' + currentMultiplier.toFixed(2));
// Check if we should crash
if (currentMultiplier >= crashMultiplier) {
Create mars 3d views. In-Game asset. 2d. High contrast. No shadows
Create si-fi realistic planet 3D views. In-Game asset. 2d. High contrast. No shadows. In-Game asset. 2d. High contrast. No shadows
Create si-fi realistic starz with lightning 3D views. In-Game asset. 2d. High contrast. No shadows. In-Game asset. 2d. High contrast. No shadows. In-Game asset. 2d. High contrast. No shadows
Create si-fi realistic Green Rectangle BUTTON with 3D views. In-Game asset. 2d. High contrast. With shadows.
Create si-fi realistic Orange Rectangle BUTTON with 3D views. In-Game asset. 2d. High contrast. With shadows.. In-Game asset. 2d. High contrast. No shadows