User prompt
La cantidad de tarros que sea ilimitada, que bajen menos tarros ↪💡 Consider importing and using the following plugins: @upit/tween.v1
User prompt
Que los tarros no se generen de golpe. Se generan de 10 en 10, y bajan de poco a poco ↪💡 Consider importing and using the following plugins: @upit/tween.v1
User prompt
Que los tarros no bajen de golpe, que bajen de poco a poco ↪💡 Consider importing and using the following plugins: @upit/tween.v1
User prompt
Te dije que bajes la cantidad de tarros para entrar a la dimensión a solo cien
User prompt
Baja el número de tarros a solo cien para poder entrar a la otra dimensión
User prompt
Que cada tarro valga 100, al inicio volvere a tener 0 tarros
User prompt
Generame de una vez con mil tarros
User prompt
Quítale las coordenadas y agrégale un fondo
User prompt
Agrégale un dónde
User prompt
Quítale un 25% de tamaño al oso
User prompt
Que el lo se encuentre más arriba
User prompt
Los tarros a la mitad de su tamaño y el oso el doble de grande
User prompt
Tra vez el doble de grande
User prompt
Que el oso sea el doble de grande y que se encuentre un poco abajo del suelo
User prompt
El oso que sea 50% más grande
User prompt
Que los tarros sean un poco más continuos, y un 25% más grande
User prompt
Que el sueño se divida en tres partes, para que el pasto no se distorsiones
User prompt
El tarro si el oso no lo atrapa, al caer al suelo explotará
User prompt
Pon un suelo donde se encuentre el oso, solo se puede mover de izquierda a derecha
User prompt
Pon un sueño donde se encuentre el oso y que los tarros caigan
Code edit (1 edits merged)
Please save this source code
User prompt
Honey Bear's Dimensional Quest
Initial prompt
El juego se trata de un oso que nesecita comer miel, después de mil tarros de miel entrara a la dimensión de la miel, dónde terminara el juego
/**** * Plugins ****/ var tween = LK.import("@upit/tween.v1"); /**** * Classes ****/ var Bear = Container.expand(function () { var self = Container.call(this); var bearGraphics = self.attachAsset('bear', { anchorX: 0.5, anchorY: 0.5 }); return self; }); var HoneyJar = Container.expand(function () { var self = Container.call(this); var jarGraphics = self.attachAsset('honeyJar', { anchorX: 0.5, anchorY: 0.5 }); self.collected = false; self.fallSpeed = 3; self.floatOffset = Math.random() * Math.PI * 2; self.floatAmount = 1 + Math.random(); self.update = function () { if (self.collected) return; // Fall down with gentle floating motion self.y += self.fallSpeed; // Add gentle side-to-side floating like in a dream self.x += Math.sin(LK.ticks * 0.02 + self.floatOffset) * self.floatAmount; // Remove jar if it falls off screen if (self.y > 2800) { for (var i = honeyJars.length - 1; i >= 0; i--) { if (honeyJars[i] === self) { honeyJars.splice(i, 1); break; } } self.destroy(); } }; self.collect = function () { if (self.collected) return; self.collected = true; // Animate collection with scale and fade tween(self, { scaleX: 0, scaleY: 0, alpha: 0 }, { duration: 300, easing: tween.easeOut, onFinish: function onFinish() { self.destroy(); } }); // Play collect sound LK.getSound('collect').play(); // Update score honeyCount++; LK.setScore(honeyCount); scoreTxt.setText(honeyCount + ' / 1000'); // Check for victory if (honeyCount >= 1000) { triggerHoneyDimension(); } }; return self; }); /**** * Initialize Game ****/ var game = new LK.Game({ backgroundColor: 0xE6E6FA // Dreamy lavender sky color }); /**** * Game Code ****/ var bear; var honeyJars = []; var honeyCount = 0; var dragNode = null; var spawnTimer = 0; var gameWon = false; // Create UI var scoreTxt = new Text2('0 / 1000', { size: 80, fill: 0x8B4513 }); scoreTxt.anchor.set(0.5, 0); LK.gui.top.addChild(scoreTxt); // Create bear bear = game.addChild(new Bear()); bear.x = 1024; // Center horizontally bear.y = 1366; // Center vertically function spawnHoneyJar() { var jar = new HoneyJar(); // Spawn from top of screen at random X position jar.x = 60 + Math.random() * (2048 - 120); jar.y = -50; // Start above screen jar.fallSpeed = 3 + Math.random() * 4; // Random fall speed between 3-7 honeyJars.push(jar); game.addChild(jar); // Add gentle spawn animation jar.scaleX = 0.8; jar.scaleY = 0.8; tween(jar, { scaleX: 1, scaleY: 1 }, { duration: 300, easing: tween.easeOut }); } function triggerHoneyDimension() { if (gameWon) return; gameWon = true; // Play victory sound LK.getSound('victory').play(); // Create spectacular visual effects game.setBackgroundColor(0xFFD700); // Golden background // Flash effect LK.effects.flashScreen(0xFFFFFF, 1000); // Scale up bear for dramatic effect tween(bear, { scaleX: 2, scaleY: 2 }, { duration: 1500, easing: tween.easeInOut }); // Rotate bear tween(bear, { rotation: Math.PI * 4 }, { duration: 2000, easing: tween.easeInOut }); // Show victory after effects LK.setTimeout(function () { LK.showYouWin(); }, 2500); } function handleMove(x, y, obj) { if (dragNode && !gameWon) { dragNode.x = x; dragNode.y = y; // Keep bear within screen bounds dragNode.x = Math.max(60, Math.min(1988, dragNode.x)); dragNode.y = Math.max(60, Math.min(2672, dragNode.y)); } } // Event handlers game.move = handleMove; game.down = function (x, y, obj) { if (!gameWon) { dragNode = bear; handleMove(x, y, obj); } }; game.up = function (x, y, obj) { dragNode = null; }; // Main game loop game.update = function () { if (gameWon) return; // Spawn honey jars periodically - dream-like rain spawnTimer++; if (spawnTimer >= 45) { // Every 0.75 seconds at 60fps for dream-like rain spawnTimer = 0; if (honeyJars.length < 8) { // Keep max 8 jars on screen for dream effect spawnHoneyJar(); } } // Check collisions between bear and honey jars for (var i = honeyJars.length - 1; i >= 0; i--) { var jar = honeyJars[i]; if (!jar.collected && bear.intersects(jar)) { jar.collect(); honeyJars.splice(i, 1); } } }; // Spawn initial honey jars for (var i = 0; i < 3; i++) { LK.setTimeout(function () { spawnHoneyJar(); }, i * 500); }
===================================================================
--- original.js
+++ change.js
@@ -20,8 +20,28 @@
anchorX: 0.5,
anchorY: 0.5
});
self.collected = false;
+ self.fallSpeed = 3;
+ self.floatOffset = Math.random() * Math.PI * 2;
+ self.floatAmount = 1 + Math.random();
+ self.update = function () {
+ if (self.collected) return;
+ // Fall down with gentle floating motion
+ self.y += self.fallSpeed;
+ // Add gentle side-to-side floating like in a dream
+ self.x += Math.sin(LK.ticks * 0.02 + self.floatOffset) * self.floatAmount;
+ // Remove jar if it falls off screen
+ if (self.y > 2800) {
+ for (var i = honeyJars.length - 1; i >= 0; i--) {
+ if (honeyJars[i] === self) {
+ honeyJars.splice(i, 1);
+ break;
+ }
+ }
+ self.destroy();
+ }
+ };
self.collect = function () {
if (self.collected) return;
self.collected = true;
// Animate collection with scale and fade
@@ -53,9 +73,9 @@
/****
* Initialize Game
****/
var game = new LK.Game({
- backgroundColor: 0x87CEEB
+ backgroundColor: 0xE6E6FA // Dreamy lavender sky color
});
/****
* Game Code
@@ -78,29 +98,23 @@
bear.x = 1024; // Center horizontally
bear.y = 1366; // Center vertically
function spawnHoneyJar() {
var jar = new HoneyJar();
- // Random position with margins to keep jars on screen
+ // Spawn from top of screen at random X position
jar.x = 60 + Math.random() * (2048 - 120);
- jar.y = 60 + Math.random() * (2732 - 120);
- // Make sure jar doesn't spawn too close to bear
- var distanceToBear = Math.sqrt(Math.pow(jar.x - bear.x, 2) + Math.pow(jar.y - bear.y, 2));
- if (distanceToBear < 200) {
- // Respawn if too close
- spawnHoneyJar();
- return;
- }
+ jar.y = -50; // Start above screen
+ jar.fallSpeed = 3 + Math.random() * 4; // Random fall speed between 3-7
honeyJars.push(jar);
game.addChild(jar);
- // Add spawn animation
- jar.scaleX = 0;
- jar.scaleY = 0;
+ // Add gentle spawn animation
+ jar.scaleX = 0.8;
+ jar.scaleY = 0.8;
tween(jar, {
scaleX: 1,
scaleY: 1
}, {
- duration: 400,
- easing: tween.bounceOut
+ duration: 300,
+ easing: tween.easeOut
});
}
function triggerHoneyDimension() {
if (gameWon) return;
@@ -153,15 +167,15 @@
};
// Main game loop
game.update = function () {
if (gameWon) return;
- // Spawn honey jars periodically
+ // Spawn honey jars periodically - dream-like rain
spawnTimer++;
- if (spawnTimer >= 90) {
- // Every 1.5 seconds at 60fps
+ if (spawnTimer >= 45) {
+ // Every 0.75 seconds at 60fps for dream-like rain
spawnTimer = 0;
- if (honeyJars.length < 5) {
- // Keep max 5 jars on screen
+ if (honeyJars.length < 8) {
+ // Keep max 8 jars on screen for dream effect
spawnHoneyJar();
}
}
// Check collisions between bear and honey jars
Tarro de miel con un poco de ella desbordandose. In-Game asset. 2d. High contrast. No shadows
Oso naranja de pelaje con pecho y osico amarillo, al igual que un nariz azul, quiero que tenga un poco de miel en su boca y que mire hacia arriba. In-Game asset. 2d. High contrast. No shadows
Cielo azul con un sol con lentes de sol. In-Game asset. 2d. High contrast. No shadows