User prompt
eliminar el boton de reproduccion y en su lugar coloca el boton de play en medio de la pantalla arriba de el boton de play coloca la seleccion de personajes y añade una interfaz a la seleccion de personajes
User prompt
no se requiere eljir un personaje para empezar a jugar
User prompt
la musica suena despues de presionar al boton de play
User prompt
agrega un boton de play
User prompt
agrega nuevas instrucciones
User prompt
elimina las frases
User prompt
coloca un boton para empezar a jugar
User prompt
el sonido de muerte suena al haber perdido el sonido de victoria suena al ganar el juego la musica suena justo al empezar a jugar
User prompt
condicion de victoria sera de 10000
User prompt
el boton se mirara por encima de el suelo
User prompt
en la esquina inferior izquierda
User prompt
coloca un boton de disparo en la esquina inferior derecha de la pantalla
User prompt
el jugador va a tner el arma un poco mas arriba y recta mirando hacia enfrente
User prompt
el jugador va a tener el arma en la mano
User prompt
el arma el jugador la va a tener en todo momento
User prompt
un arma que tengan los jugadores
User prompt
agrega un objeto con el que el jugador pueda disparar a los enemigos y desaparecerlos agrega otro enemigo que este en el aire
User prompt
agrega otro personaje
User prompt
eliminar el bloque rompible
User prompt
la duracion de la invencibilidad de el bloque rompible sera de solo 5 segundos
User prompt
reduce la probabilidad de que aparezcan los potenciadores un poco mas
User prompt
puntuacion para la victoria 100,000
User prompt
un menos de posibilidad de que aparezcan los bloques rompibles
User prompt
los bloques rompibles estan en el aire y al romperlos te dan un potenciador de invencibilidad con una duracion de 5 segundos y mayor distancia entre obstaculos y enemigos ↪💡 Consider importing and using the following plugins: @upit/tween.v1
User prompt
mayor probabilidad de que aparezcan los bloques rompibles
/**** * Plugins ****/ var tween = LK.import("@upit/tween.v1"); var storage = LK.import("@upit/storage.v1"); /**** * Classes ****/ var BreakableBlock = Container.expand(function () { var self = Container.call(this); var blockGraphics = self.attachAsset('breakableBlock', { anchorX: 0.5, anchorY: 1.0 }); self.speed = -8; self.update = function () { self.x += self.speed; }; return self; }); var Enemy = Container.expand(function () { var self = Container.call(this); var enemyGraphics = self.attachAsset('enemy', { anchorX: 0.5, anchorY: 1.0 }); self.speed = -8; self.update = function () { self.x += self.speed; }; return self; }); var GroundSegment = Container.expand(function () { var self = Container.call(this); var groundGraphics = self.attachAsset('ground', { anchorX: 0, anchorY: 0 }); self.speed = -8; self.update = function () { self.x += self.speed; }; return self; }); var Hole = Container.expand(function () { var self = Container.call(this); var holeGraphics = self.attachAsset('hole', { anchorX: 0, anchorY: 0 }); self.speed = -8; self.update = function () { self.x += self.speed; }; return self; }); var Obstacle = Container.expand(function () { var self = Container.call(this); var obstacleGraphics = self.attachAsset('obstacle', { anchorX: 0.5, anchorY: 1.0 }); self.speed = -8; self.update = function () { self.x += self.speed; }; return self; }); var Player = Container.expand(function () { var self = Container.call(this); var playerGraphics = self.attachAsset('player', { anchorX: 0.5, anchorY: 1.0 }); self.isJumping = false; self.jumpSpeed = 0; self.gravity = 0.8; self.jumpPower = -25; self.groundY = 0; self.customColor = 0x4CAF50; self.jumpCount = 0; self.maxJumps = 2; self.characterType = 'player'; self.isInvincible = false; self.invincibilityTimer = 0; self.jump = function () { if (self.jumpCount < self.maxJumps) { if (!self.isJumping) { self.isJumping = true; } self.jumpSpeed = self.jumpPower; self.jumpCount++; LK.getSound('jump').play(); } }; self.setColor = function (color) { self.customColor = color; playerGraphics.tint = color; }; self.setCharacter = function (characterType) { self.characterType = characterType; playerGraphics.destroy(); playerGraphics = self.attachAsset(characterType, { anchorX: 0.5, anchorY: 1.0 }); }; self.activateInvincibility = function () { self.isInvincible = true; self.invincibilityTimer = 300; // 5 seconds at 60fps // Flash effect tween(playerGraphics, { alpha: 0.3 }, { duration: 200, easing: tween.easeInOut, onFinish: function onFinish() { if (self.isInvincible) { tween(playerGraphics, { alpha: 1 }, { duration: 200, easing: tween.easeInOut, onFinish: function onFinish() { if (self.isInvincible) { self.activateInvincibility(); } } }); } } }); }; self.update = function () { if (self.isJumping) { self.jumpSpeed += self.gravity; self.y += self.jumpSpeed; var landingY = self.groundY; if (self.y >= landingY) { self.y = landingY; self.isJumping = false; self.jumpSpeed = 0; self.jumpCount = 0; } } // Handle invincibility timer if (self.isInvincible) { self.invincibilityTimer--; if (self.invincibilityTimer <= 0) { self.isInvincible = false; tween.stop(playerGraphics); playerGraphics.alpha = 1; } } }; return self; }); /**** * Initialize Game ****/ var game = new LK.Game({ backgroundColor: 0x87CEEB }); /**** * Game Code ****/ var gameState = 'customization'; // 'customization', 'playing', 'gameOver' var player; var groundSegments = []; var holes = []; var enemies = []; var obstacles = []; var breakableBlocks = []; var gameSpeed = 8; var spawnTimer = 0; var distance = 0; var groundY = 2400; var invincibilitySpacing = 1; var lastInvincibilityTime = 0; // UI Elements var customizeText = new Text2('Choose Your Character', { size: 60, fill: 0xFFFFFF }); customizeText.anchor.set(0.5, 0.5); customizeText.x = 1024; customizeText.y = 800; var character1Button = LK.getAsset('player', { anchorX: 0.5, anchorY: 0.5 }); character1Button.x = 800; character1Button.y = 1200; character1Button.scaleX = 0.5; character1Button.scaleY = 0.5; var character2Button = LK.getAsset('player2', { anchorX: 0.5, anchorY: 0.5 }); character2Button.x = 1248; character2Button.y = 1200; character2Button.scaleX = 0.5; character2Button.scaleY = 0.5; var startText = new Text2('Tap a Character to Start!', { size: 50, fill: 0xFFFFFF }); startText.anchor.set(0.5, 0.5); startText.x = 1024; startText.y = 1600; var distanceText = new Text2('0m', { size: 60, fill: 0xFFFFFF }); distanceText.anchor.set(0.5, 0); LK.gui.top.addChild(distanceText); // Initialize player player = new Player(); player.x = 400; player.y = groundY; player.groundY = groundY; game.addChild(player); // Initialize ground segments for (var i = 0; i < 15; i++) { var ground = new GroundSegment(); ground.x = i * 200; ground.y = groundY; groundSegments.push(ground); game.addChild(ground); } function initializeGame() { gameState = 'playing'; distance = 0; gameSpeed = 8; spawnTimer = 0; // Hide customization UI customizeText.visible = false; startText.visible = false; character1Button.visible = false; character2Button.visible = false; // Clear existing obstacles clearAllObstacles(); // Reset player position player.x = 400; player.y = groundY; player.isJumping = false; player.jumpSpeed = 0; player.jumpCount = 0; player.isInvincible = false; player.invincibilityTimer = 0; invincibilitySpacing = 1; lastInvincibilityTime = 0; // Reset ground segments for (var i = 0; i < groundSegments.length; i++) { groundSegments[i].x = i * 200; groundSegments[i].speed = -gameSpeed; } } function clearAllObstacles() { for (var i = holes.length - 1; i >= 0; i--) { holes[i].destroy(); holes.splice(i, 1); } for (var i = enemies.length - 1; i >= 0; i--) { enemies[i].destroy(); enemies.splice(i, 1); } for (var i = obstacles.length - 1; i >= 0; i--) { obstacles[i].destroy(); obstacles.splice(i, 1); } for (var i = breakableBlocks.length - 1; i >= 0; i--) { breakableBlocks[i].destroy(); breakableBlocks.splice(i, 1); } } function spawnObstacle() { var rand = Math.random(); var spawnX = 2200; if (rand < 0.15) { // Spawn hole var hole = new Hole(); hole.x = spawnX; hole.y = groundY; hole.speed = -gameSpeed; holes.push(hole); game.addChild(hole); } else if (rand < 0.25) { // Spawn enemy var enemy = new Enemy(); enemy.x = spawnX; enemy.y = groundY; enemy.speed = -gameSpeed; enemies.push(enemy); game.addChild(enemy); } else if (rand < 0.35) { // Spawn obstacle var obstacle = new Obstacle(); obstacle.x = spawnX; obstacle.y = groundY; obstacle.speed = -gameSpeed; obstacles.push(obstacle); game.addChild(obstacle); } else if (rand < 0.5) { // Spawn breakable block (reduced probability) var breakableBlock = new BreakableBlock(); breakableBlock.x = spawnX; breakableBlock.y = groundY - 400; // Position in the air breakableBlock.speed = -gameSpeed; breakableBlocks.push(breakableBlock); game.addChild(breakableBlock); } } function checkCollisions() { // Skip damage collisions if invincible if (!player.isInvincible) { // Check hole collisions for (var i = 0; i < holes.length; i++) { var hole = holes[i]; if (player.x > hole.x && player.x < hole.x + 150 && !player.isJumping) { gameOver(); return; } } // Check enemy collisions for (var i = 0; i < enemies.length; i++) { var enemy = enemies[i]; if (player.intersects(enemy)) { gameOver(); return; } } // Check obstacle collisions for (var i = 0; i < obstacles.length; i++) { var obstacle = obstacles[i]; if (player.intersects(obstacle)) { gameOver(); return; } } } // Check breakable block collisions for (var i = breakableBlocks.length - 1; i >= 0; i--) { var block = breakableBlocks[i]; if (player.intersects(block)) { // Destroy the block and activate invincibility block.destroy(); breakableBlocks.splice(i, 1); LK.setScore(LK.getScore() + 10); // Activate invincibility powerup player.activateInvincibility(); lastInvincibilityTime = distance; invincibilitySpacing = 2; // Double spacing during invincibility } } } function gameOver() { gameState = 'gameOver'; LK.getSound('hit').play(); LK.showGameOver(); } function updateSpeed() { gameSpeed = 8 + distance / 100; for (var i = 0; i < groundSegments.length; i++) { groundSegments[i].speed = -gameSpeed; } for (var i = 0; i < holes.length; i++) { holes[i].speed = -gameSpeed; } for (var i = 0; i < enemies.length; i++) { enemies[i].speed = -gameSpeed; } for (var i = 0; i < obstacles.length; i++) { obstacles[i].speed = -gameSpeed; } for (var i = 0; i < breakableBlocks.length; i++) { breakableBlocks[i].speed = -gameSpeed; } } game.down = function (x, y, obj) { if (gameState === 'customization') { // Check character 1 button if (x > 650 && x < 950 && y > 1050 && y < 1350) { player.setCharacter('player'); initializeGame(); } // Check character 2 button else if (x > 1098 && x < 1398 && y > 1050 && y < 1350) { player.setCharacter('player2'); initializeGame(); } } else if (gameState === 'playing') { player.jump(); } }; game.update = function () { if (gameState === 'playing') { distance += gameSpeed / 10; distanceText.setText(Math.floor(distance) + 'm'); // Update speed based on distance updateSpeed(); // Spawn obstacles spawnTimer++; var spawnRate = (120 - Math.min(distance / 15, 50)) * invincibilitySpacing; if (spawnTimer >= spawnRate) { spawnObstacle(); spawnTimer = 0; } // Reset invincibility spacing after effect wears off if (distance - lastInvincibilityTime > 300 && invincibilitySpacing > 1) { invincibilitySpacing = 1; } // Update ground segments - make continuous for (var i = 0; i < groundSegments.length; i++) { var ground = groundSegments[i]; if (ground.x < -200) { // Find the rightmost ground segment var maxX = -1000; for (var j = 0; j < groundSegments.length; j++) { if (groundSegments[j].x > maxX) { maxX = groundSegments[j].x; } } ground.x = maxX + 200; } } // Update and clean up holes for (var i = holes.length - 1; i >= 0; i--) { var hole = holes[i]; if (hole.x < -200) { hole.destroy(); holes.splice(i, 1); } } // Update and clean up enemies for (var i = enemies.length - 1; i >= 0; i--) { var enemy = enemies[i]; if (enemy.x < -100) { enemy.destroy(); enemies.splice(i, 1); } } // Update and clean up obstacles for (var i = obstacles.length - 1; i >= 0; i--) { var obstacle = obstacles[i]; if (obstacle.x < -100) { obstacle.destroy(); obstacles.splice(i, 1); } } // Update and clean up breakable blocks for (var i = breakableBlocks.length - 1; i >= 0; i--) { var block = breakableBlocks[i]; if (block.x < -100) { block.destroy(); breakableBlocks.splice(i, 1); } } // Check collisions checkCollisions(); // Update score LK.setScore(Math.floor(distance)); // Check win condition if (distance >= 100000) { gameState = 'won'; LK.showYouWin(); return; } } }; // Show customization UI initially game.addChild(customizeText); game.addChild(startText); game.addChild(character1Button); game.addChild(character2Button); ;
===================================================================
--- original.js
+++ change.js
@@ -463,9 +463,9 @@
checkCollisions();
// Update score
LK.setScore(Math.floor(distance));
// Check win condition
- if (distance >= 10000) {
+ if (distance >= 100000) {
gameState = 'won';
LK.showYouWin();
return;
}
un agujero hecho con pixeles. In-Game asset. 2d. High contrast. No shadows
un mounstro grande hecho con pixeles con perspectiva de lado y mas aterrador In-Game asset. 2d. High contrast. No shadows
un suelo de pasto y tierra hecho con pixeles. In-Game asset. 2d. High contrast. No shadows
una pincho grande hecho con pixeles In-Game asset. 2d. High contrast. No shadows
una bala de pistola 9 milimetros hecha con pixeles con perspectiva lateral. In-Game asset. 2d. High contrast. No shadows
un mounstro con alas hecho con pixeles. In-Game asset. 2d. High contrast. No shadows
un puño agarrando un arma hecho con pixeles y de perspectiva lateral. In-Game asset. 2d. High contrast. No shadows
un boton rojo que en medio dice shot hecho con pixeles. In-Game asset. 2d. High contrast. No shadows
un boton cuadrado hecho con pixeles que dice play. In-Game asset. 2d. High contrast. No shadows
un hombre obrero hecho con pixeles de cuerpo completo sosteniendo un arma
un policia de cuerpo completo hecho con pixeles con persepectiva lateral apuntando con un arma I
un hombre de traje hecho con pixeles de cuerpo completo apuntando con un rifle de asalto m4
goku de dragon ball hecho con pixeles de cuepo completo con perspectiva lateral apuntando don un rifle de asalto m4 In-Game asset. 2d. High contrast. No shadows
homero simpson hecho con pixeles de cuerpo completo con perspectiva lateral apuntando con rifle de asalto m4 I
letras hechas con pixeles que dicen shot and jump las letras shot tendran un estilo medieval y tendran un color gris,las letras and color blanco con contorno negro y las letras jump de color amarillo con contorno naranja