User prompt
«El nameBoxWallpaper debería estar en una posición más centrada respecto a nameBox, de modo que dé la impresión de que nameBox está contenido dentro de `nameBoxWallpaper».
User prompt
El sprite o ilustración denominado nameBoxWallpaper se sitúa detrás de nameBox y de characterSprite, pero se alinea y se centra únicamente con respecto a nameBox. nameBoxWallpaper aparece al mismo tiempo que nameBox y desaparece junto con él, ya que cumple la función de fondo decorativo (wallpaper) exclusivo para nameBox. ↪💡 Consider importing and using the following plugins: @upit/tween.v1
User prompt
El sprite o ilustración denominado "nameBoxWallpaper" va detrás de nameBox y de "characterSprite", pero sólo se alinea al centro de nameBox.
User prompt
El sprite o ilustración denominado dialogBoxWallpaper debe renderizarse por debajo de los fondos del juego y detrás del dialogBox, con el objetivo de cubrir el área restante de la pantalla que no es ocupada por estos elementos.
User prompt
Petición de animación para botón “Siguiente”: Reemplazar la animación actual del botón “Siguiente” por la siguiente secuencia detallada: --- 1. Animación de entrada (al aparecer): Escalado progresivo desde 0.0x hasta 1.0x de su tamaño original. Duración: 300 ms. Tipo de interpolación: ease-out (para una entrada suave y natural). --- 2. Animación direccional intermitente (modo espera): Después de aparecer, el botón permanece estático durante unos segundos y luego muestra una animación tipo “flecha” para guiar al jugador: Movimiento de dos pequeños rebotes horizontales hacia la derecha, como si algo empujara el botón ligeramente: Primer rebote: +8 px Segundo rebote: +16 px Regresar a posición original tras cada impulso. Ambos rebotes se ejecutan de forma rápida y secuencial, en menos de 300 ms en total. Repetición automática cada 4 segundos, solo si el jugador no ha presionado el botón. Curva de animación: ease-in-out. --- 3. Animación al presionar (salida): Al pulsar el botón, iniciar una escala descendente continua desde 1.0x hasta 0.0x. Duración: 200 ms. Tipo de interpolación: ease-in (para un cierre fluido pero rápido). El botón debe desactivarse y desaparecer al terminar esta animación. --- Consideraciones técnicas: La animación direccional (rebote) debe implementarse como una animación paralela no bloqueante, para no interferir con la lógica del botón. Esta secuencia busca simular el estilo intuitivo y responsivo utilizado en interfaces de novelas visuales modernas y juegos interactivos de alta calidad. Asegúrate de que la animación sea fluida a 60 FPS y no interfiera con otros elementos de la interfaz. ↪💡 Consider importing and using the following plugins: @upit/tween.v1
User prompt
Instrucciones para implementar la animación del botón “Siguiente” en el juego: 1. Animación de entrada (al aparecer en pantalla): Aplicar una animación de escala ascendente continua desde 0.8x hasta 1.0x del tamaño original. Duración recomendada: 300 ms. Curva de interpolación: ease-out para una sensación de suavidad. 2. Animación de señal de acción (loop intermitente): Una vez el botón ha aparecido y está en estado inactivo, debe mostrar una animación periódica para invitar al jugador a presionar: Desplazamiento horizontal de tipo "rebote" (simulando una pequeña flecha o impulso hacia la derecha). Realizar dos pequeños rebotes hacia la derecha (por ejemplo, +6 px, luego +12 px con retorno al punto original). Esta animación debe reproducirse cada 3 a 5 segundos si no se ha pulsado el botón. Duración de cada rebote: 150 ms por impulso (total: 300 ms por ciclo). Curva: ease-in-out para dar naturalidad al movimiento. 3. Animación de salida (al ser presionado): Al pulsar el botón, se ejecuta una escala descendente continua desde 1.0x hasta 0x. Duración: 200 ms, curva ease-in. El botón desaparece completamente al finalizar la animación. Notas adicionales: Estas animaciones deben implementarse en capas separadas si es posible, para que la animación de rebote no interfiera con la lógica de aparición/desaparición. La transición debe sentirse fluida y responsiva, compatible con estilos de interfaces de novelas visuales modernas. ↪💡 Consider importing and using the following plugins: @upit/tween.v1
User prompt
Especificación de animaciones para el botón "Siguiente" 1. Animación de aparición (una sola vez): fade-in + scale de 1.1 → 1.0 (duración: 300 ms). Luego, rebote suave: scale a 0.97 → 1.0 (200 ms, easing tipo ease-out). 2. Animación direccional (después de aparecer): Dos rebotes hacia la derecha (tipo “flecha”): Desplazamiento: +10px X → 0px, repetir 2 veces. Duración por rebote: 150 ms, con retroceso elástico (spring o easeOutBack). 3. Pulsación continua (bucle hasta presionar): opacity oscila entre 0.5 ↔ 1.0. Duración total del ciclo: 2 s (1 s por dirección). Easing: easeInOut. Comienza después del punto 2. 4. Animación al presionar (una vez): Escala descendente continua: scale 1.0 → 0, duración indefinida o hasta que desaparezca. Puede incluir fade-out simultáneo. Easing acelerado (easeIn o logarítmico). ↪💡 Consider importing and using the following plugins: @upit/tween.v1
User prompt
Después del fondo 'AikoKiss', los fondos siguientes deberán contar con las mismas animaciones que los anteriores. ↪💡 Consider importing and using the following plugins: @upit/tween.v1
User prompt
Después del fondo "AikoKiss", no hay animaciones, corrige eso. ↪💡 Consider importing and using the following plugins: @upit/tween.v1
User prompt
Después del fondo AikoKiss, no hay animaciones, corrige eso. ↪💡 Consider importing and using the following plugins: @upit/tween.v1
User prompt
El botón no me está cumpliendo esa función, por favor arréglalo.
User prompt
En esa escena no debe aparecer el fondo 'schoolcorridor', ni en ese momento ni más adelante. El fondo 'AikoPoseOjou' debe cambiarse por 'theLocker' en lugar de 'schoolcorridor' ↪💡 Consider importing and using the following plugins: @upit/tween.v1
User prompt
El fondo "theLocker" no está apareciendo, corrige eso. ↪💡 Consider importing and using the following plugins: @upit/tween.v1
User prompt
El fondo "AikoKiss" no está apareciendo, corrige eso. ↪💡 Consider importing and using the following plugins: @upit/tween.v1
User prompt
El fondo "AikoKiss" no está apareciendo, corrige eso. ↪💡 Consider importing and using the following plugins: @upit/tween.v1
User prompt
El fondo "schoolcorridor" no está apareciendo, corrige eso. ↪💡 Consider importing and using the following plugins: @upit/tween.v1
User prompt
Los fondos del juego se cambian con una animación fade in y fade out que sigue la siguiente norma: las imágenes deben estar lo suficientemente próximas como para generar una transición fluida, similar a la superposición de videos en Sony Vegas, donde ambos clips se mezclan visualmente durante el cambio. ↪💡 Consider importing and using the following plugins: @upit/tween.v1
User prompt
Please fix the bug: 'Uncaught Error: The supplied DisplayObject must be a child of the caller' in or related to this line: 'game.setChildIndex(currentBackground, 1);' Line Number: 1582
User prompt
Los fondos del juego se cambian con una animación fade in y fade out que sigue la siguiente norma: las imágenes deben estar lo suficientemente próximas como para generar una transición fluida, similar a la superposición de videos en Sony Vegas, donde ambos clips se mezclan visualmente durante el cambio. ↪💡 Consider importing and using the following plugins: @upit/tween.v1
User prompt
Ese fondo debe usarse una sola vez, pero si lo eliminas no se usa en ningún momento, corrige eso.
User prompt
El fondo "schoolcorridor" se muestra únicamente cuando Aiko dice: "¿Sabés algo? No esperaba sentirme así después de enseñarle a alguien como vos." Después de esa línea ya no se usa, por lo tanto, no puede seguir en pantalla al tocar "Siguiente".
User prompt
Quiero que la animación fade in y fade out siga la siguiente norma: las imágenes deben estar lo suficientemente próximas como para generar una transición fluida, similar a la superposición de videos en Sony Vegas, donde ambos clips se mezclan visualmente durante el cambio. ↪💡 Consider importing and using the following plugins: @upit/tween.v1
User prompt
Siguiendo el estilo clásico de las novelas visuales, todos los fondos del juego se cambian mediante animaciones fade in y fade out. ↪💡 Consider importing and using the following plugins: @upit/tween.v1
User prompt
Siguiendo el estilo clásico de las novelas visuales, todos los fondos del juego se cambian mediante animaciones fade in y fade out. ↪💡 Consider importing and using the following plugins: @upit/tween.v1
User prompt
Analiza en profundidad el juego de novela visual romántica, incluyendo los diálogos, las imágenes, la música y demás elementos, con el objetivo de determinar qué animaciones y filtros son los más adecuados para cada parte del juego. En el caso de los fondos, solo se permite el uso de animaciones de tipo fade in y fade out, y únicamente cuando se produce un cambio de fondo. Bajo ninguna circunstancia estas animaciones deben provocar que los fondos desaparezcan permanentemente o dejen de visualizarse. ↪💡 Consider importing and using the following plugins: @upit/tween.v1
/**** * Plugins ****/ var tween = LK.import("@upit/tween.v1"); var storage = LK.import("@upit/storage.v1"); /**** * Classes ****/ var Character = Container.expand(function () { var self = Container.call(this); var sprite = self.attachAsset('characterSprite', { anchorX: 0.5, anchorY: 1, x: 280, y: 2732 - 700 }); var sprite2 = self.attachAsset('characterSprite2', { anchorX: 0.5, anchorY: 1, x: 280, y: 2732 - 700 }); sprite2.visible = false; var sprite3 = self.attachAsset('characterSprite3', { anchorX: 0.5, anchorY: 1, x: 280, y: 2732 - 700 }); sprite3.visible = false; self.show = function (isDecisionMoment, isMotivated) { sprite.tint = 0xffffff; // Always use white/no tint if (isMotivated) { sprite.visible = false; sprite2.visible = false; sprite3.visible = true; // Add confident breathing animation for motivated state tween(sprite3, { scaleY: 1.02 }, { duration: 2000, easing: tween.easeInOut, onFinish: function onFinish() { tween(sprite3, { scaleY: 1.0 }, { duration: 2000, easing: tween.easeInOut, onFinish: arguments.callee // Loop the animation }); } }); } else if (isDecisionMoment) { sprite.visible = false; sprite2.visible = true; sprite3.visible = false; // Add nervous breathing animation for decision moments tween(sprite2, { scaleY: 1.01 }, { duration: 1500, easing: tween.easeInOut, onFinish: function onFinish() { tween(sprite2, { scaleY: 1.0 }, { duration: 1500, easing: tween.easeInOut, onFinish: arguments.callee // Loop the animation }); } }); } else { sprite.visible = true; sprite2.visible = false; sprite3.visible = false; // Add gentle breathing animation for normal state tween(sprite, { scaleY: 1.005 }, { duration: 3000, easing: tween.easeInOut, onFinish: function onFinish() { tween(sprite, { scaleY: 1.0 }, { duration: 3000, easing: tween.easeInOut, onFinish: arguments.callee // Loop the animation }); } }); } self.visible = true; }; self.hide = function () { self.visible = false; }; return self; }); var ChoiceSystem = Container.expand(function () { var self = Container.call(this); var choices = []; self.showChoices = function (choiceOptions) { self.clearChoices(); // Check if this is the first scene with crossroads choices if (currentScene === 0 && choiceOptions.length === 2 && choiceOptions[0].text === 'Contarle todo a mamá' && choiceOptions[1].text === 'Mantenerlo en secreto') { // Play crossroads song for this specific choice moment LK.stopMusic(); LK.playMusic('theCrossroadsSong'); } // Check if this is the school scene with three route choices if (currentScene === 2 && choiceOptions.length === 3 && choiceOptions[0].text === 'Acercarme a Aiko' && choiceOptions[1].text === 'Hablar con Yui' && choiceOptions[2].text === 'Seguir a Hikari') { // Play crossroads song for this specific choice moment LK.stopMusic(); LK.playMusic('theCrossroadsSong'); } // Check if this is Aiko route tutoring choice moment if (currentScene === 3 && choiceOptions.length === 2 && choiceOptions[0].text === 'Pedirle que sea mi tutora' && choiceOptions[1].text === 'Sugerir estudiar juntos como amigos') { // Play crossroads song for this specific choice moment LK.stopMusic(); LK.playMusic('theCrossroadsSong'); } // Update character sprite for decision moment if Satoshi is visible if (selectedRoute && character.visible) { character.show(true); } for (var i = 0; i < choiceOptions.length; i++) { var choice = choiceOptions[i]; var choiceBtn = self.attachAsset('choiceButton', { anchorX: 0.5, anchorY: 0.5, x: 1024, y: 1200 + i * 300 }); var choiceText = new Text2(choice.text, { size: 85, fill: 0x000000, wordWrap: true, wordWrapWidth: 750 }); choiceText.anchor.set(0.5, 0.5); choiceText.x = choiceBtn.x; choiceText.y = choiceBtn.y; self.addChild(choiceText); choiceBtn.choiceData = choice; choiceBtn.down = function () { game.makeChoice(this.choiceData); }; choices.push({ btn: choiceBtn, text: choiceText }); } self.visible = true; }; self.clearChoices = function () { for (var i = 0; i < choices.length; i++) { choices[i].btn.destroy(); choices[i].text.destroy(); } choices = []; self.visible = false; }; return self; }); var DialogSystem = Container.expand(function () { var self = Container.call(this); // Dialog box var dialogBox = self.attachAsset('dialogBox', { anchorX: 0.5, anchorY: 1, x: 1024, y: 2732 - 200 }); // Variables for text acceleration var isDialogPressed = false; var normalTypewriterDelay = 50; var fastTypewriterDelay = 10; // Name box var nameBox = self.attachAsset('nameBox', { anchorX: 0, anchorY: 1, x: 50, y: 2732 - 600 }); // Texts var nameText = new Text2('', { size: 80, fill: 0x000000 }); nameText.anchor.set(0.5, 0.5); nameText.x = nameBox.x + 200; nameText.y = nameBox.y - 40; self.addChild(nameText); var dialogText = new Text2('', { size: 90, fill: 0x000000, wordWrap: true, wordWrapWidth: 1400 }); dialogText.anchor.set(0, 0); dialogText.x = dialogBox.x - 900; dialogText.y = dialogBox.y - 280; self.addChild(dialogText); // Next button var nextBtn = self.attachAsset('nextButton', { anchorX: 0.5, anchorY: 0.5, x: 1750, y: 2732 - 350 }); var nextText = new Text2('', { size: 85, fill: 0x000000 }); nextText.anchor.set(0.5, 0.5); nextText.x = nextBtn.x; nextText.y = nextBtn.y; self.addChild(nextText); self.showDialog = function (speaker, text) { nameText.setText(speaker); // Clear previous text and hide next button during typing dialogText.setText(''); nextBtn.visible = false; nextText.visible = false; nextBtn.alpha = 0; nextText.alpha = 0; nextBtn.interactive = false; self.visible = true; // Add emotional emphasis animations based on content if (text.includes('¡') || text.includes('?') || text.includes('...')) { // Add subtle text pulsing for emotional dialog var _emotionalPulse = function emotionalPulse() { tween(dialogText, { scaleX: 1.01, scaleY: 1.01 }, { duration: 1000, easing: tween.easeInOut, onFinish: function onFinish() { tween(dialogText, { scaleX: 1.0, scaleY: 1.0 }, { duration: 1000, easing: tween.easeInOut, onFinish: _emotionalPulse }); } }); }; // Start emotional pulse after text appears LK.setTimeout(_emotionalPulse, 500); } // Reset acceleration state isDialogPressed = false; // Typewriter effect variables var currentCharIndex = 0; var typewriterDelay = normalTypewriterDelay; // Function to add next character function addNextCharacter() { if (currentCharIndex < text.length) { dialogText.setText(text.substring(0, currentCharIndex + 1)); currentCharIndex++; // Use current delay based on press state typewriterDelay = isDialogPressed ? fastTypewriterDelay : normalTypewriterDelay; // Schedule next character LK.setTimeout(addNextCharacter, typewriterDelay); } else { // Typing complete - show next button unless GAME OVER if (speaker === 'GAME OVER') { nextBtn.visible = false; nextText.visible = false; } else { nextBtn.visible = true; nextText.visible = true; // Fade in the button with tween tween(nextBtn, { alpha: 1 }, { duration: 500, easing: tween.easeOut, onFinish: function onFinish() { nextBtn.interactive = true; } }); tween(nextText, { alpha: 1 }, { duration: 500, easing: tween.easeOut }); } } } // Start typewriter effect addNextCharacter(); }; self.hide = function () { self.visible = false; }; // Dialog box press handlers for text acceleration dialogBox.down = function () { isDialogPressed = true; }; dialogBox.up = function () { isDialogPressed = false; }; nextBtn.down = function () { if (game.currentChoices.length > 0) { game.showChoices(); } else { game.nextDialog(); } }; return self; }); var MathEvaluation = Container.expand(function () { var self = Container.call(this); var currentInputIndex = 0; var answers = ['', '', '', '']; var problems = [{ question: '8 + 5 = ', answer: '13' }, { question: '12 - 4 = ', answer: '8' }, { question: '3 × 6 = ', answer: '18' }, { question: '16 ÷ 4 = ', answer: '4' }]; var inputFields = []; var questionTexts = []; // Background var mathBackground = self.attachAsset('mathEvaluationBackground', { x: 0, y: 0 }); // Grid lines for notebook effect for (var i = 0; i < 50; i++) { var gridLine = self.attachAsset('gridLine', { x: 0, y: i * 50, scaleX: 40 }); } // Aiko character var aikoSprite = self.attachAsset('aikoEvaluation', { anchorX: 0.5, anchorY: 1, x: 1700, y: 1200, scaleX: 0.8, scaleY: 0.8 }); // Title var titleText = new Text2('Evaluación Matemática', { size: 120, fill: 0x000000 }); titleText.anchor.set(0.5, 0); titleText.x = 1024; titleText.y = 200; self.addChild(titleText); // Create problems and input fields for (var i = 0; i < problems.length; i++) { var questionText = new Text2(i + 1 + '. ' + problems[i].question, { size: 100, fill: 0x000000 }); questionText.anchor.set(0, 0.5); questionText.x = 300; questionText.y = 500 + i * 200; self.addChild(questionText); questionTexts.push(questionText); var inputField = self.attachAsset('mathEvaluationInput', { anchorX: 0.5, anchorY: 0.5, x: 900, y: 500 + i * 200 }); var inputText = new Text2('', { size: 80, fill: 0x000000 }); inputText.anchor.set(0.5, 0.5); inputText.x = inputField.x; inputText.y = inputField.y; self.addChild(inputText); inputField.inputText = inputText; inputField.problemIndex = i; inputField.down = function () { currentInputIndex = this.problemIndex; }; inputFields.push({ field: inputField, text: inputText }); } // Number buttons var numberButtons = []; for (var i = 0; i <= 9; i++) { var numBtn = self.attachAsset('mathEvaluationButton', { anchorX: 0.5, anchorY: 0.5, x: 200 + i % 5 * 120, y: 1600 + Math.floor(i / 5) * 100 }); var numText = new Text2(i.toString(), { size: 60, fill: 0xffffff }); numText.anchor.set(0.5, 0.5); numText.x = numBtn.x; numText.y = numBtn.y; self.addChild(numText); numBtn.number = i; numBtn.down = function () { if (answers[currentInputIndex].length < 3) { answers[currentInputIndex] += this.number.toString(); inputFields[currentInputIndex].text.setText(answers[currentInputIndex]); } }; numberButtons.push(numBtn); } // Clear button var clearBtn = self.attachAsset('mathEvaluationButton', { anchorX: 0.5, anchorY: 0.5, x: 800, y: 1600 }); var clearText = new Text2('Borrar', { size: 50, fill: 0xffffff }); clearText.anchor.set(0.5, 0.5); clearText.x = clearBtn.x; clearText.y = clearBtn.y; self.addChild(clearText); clearBtn.down = function () { answers[currentInputIndex] = ''; inputFields[currentInputIndex].text.setText(''); }; // Submit button var submitBtn = self.attachAsset('mathEvaluationButton', { anchorX: 0.5, anchorY: 0.5, x: 1000, y: 1600, scaleX: 1.5 }); var submitText = new Text2('Listo', { size: 60, fill: 0xffffff }); submitText.anchor.set(0.5, 0.5); submitText.x = submitBtn.x; submitText.y = submitBtn.y; self.addChild(submitText); submitBtn.down = function () { var allCorrect = true; for (var i = 0; i < problems.length; i++) { if (answers[i] !== problems[i].answer) { allCorrect = false; break; } } if (allCorrect) { game.startRomanticScene(); } else { // Handle incorrect answers - show failure scene game.startMathEvaluationFailure(); } }; return self; }); var RomanticScene = Container.expand(function () { var self = Container.call(this); var currentRomanticDialog = 0; var romanticDialogs = [{ speaker: 'Aiko', text: '...¿Todas correctas? Hmm... No está mal, para alguien como vos.' }, { speaker: 'Aiko', text: 'Vamos.', action: 'transition' }, { speaker: 'Aiko', text: '¿Sabés algo? No esperaba sentirme así después de enseñarle a alguien como vos.' }, { speaker: 'Aiko', text: 'Pero... hay algo que me gusta de tu esfuerzo. ...Y de tus ojos tontos también.' }, { speaker: 'Aiko', text: 'Eso fue por aprobar mi prueba.', action: 'kiss' }]; // Classroom at sunset background var sunsetBackground = self.attachAsset('aulaAtardecer', { x: 0, y: 0 }); // Aiko character - hidden by default since this is not math evaluation var aikoSprite = self.attachAsset('aikoEvaluation', { anchorX: 0.5, anchorY: 1, x: 1400, y: 2200, visible: false }); self.showRomanticDialog = function () { if (currentRomanticDialog >= romanticDialogs.length) { self.showFinalChoices(); return; } var dialog = romanticDialogs[currentRomanticDialog]; dialogSystem.showDialog(dialog.speaker, dialog.text); // Play aikoAudioLine5 when Aiko says the specific dialog about all correct answers if (dialog.speaker === 'Aiko' && dialog.text === '...¿Todas correctas? Hmm... No está mal, para alguien como vos.') { LK.getSound('aikoAudioLine5').play(); } // Play aikoAudioLine6 when Aiko says "Vamos." if (dialog.speaker === 'Aiko' && dialog.text === 'Vamos.') { LK.getSound('audioAikoLine6').play(); } // Play aikoAudioLine7 when Aiko says the specific dialog about unexpected feelings if (dialog.speaker === 'Aiko' && dialog.text === '¿Sabés algo? No esperaba sentirme así después de enseñarle a alguien como vos.') { LK.getSound('aikoAudioLine7').play(); } // Play aikoAudioLine8 when Aiko says dialog about effort and silly eyes if (dialog.speaker === 'Aiko' && dialog.text === 'Pero... hay algo que me gusta de tu esfuerzo. ...Y de tus ojos tontos también.') { LK.getSound('aikoAudioLine8').play(); } // Play kiss sound effect followed by aikoAudioLine9 when Aiko says kiss dialog if (dialog.speaker === 'Aiko' && dialog.text === 'Eso fue por aprobar mi prueba.') { var kissSound = LK.getSound('Kissonthecheek'); kissSound.play(); // Wait for kiss sound to finish completely before playing voice LK.setTimeout(function () { LK.getSound('aikoAudioLine9').play(); }, 3000); // Further increased timing to create clear separation between sounds } if (dialog.action === 'transition') { // Change to cleaning room background with fade transition var cleaningBackground = self.attachAsset('cuartoLimpiezaBackground', { x: 0, y: 0, alpha: 0 // Start invisible }); // Fade out sunset background and fade in cleaning background tween(sunsetBackground, { alpha: 0 }, { duration: 600, easing: tween.easeInOut, onFinish: function onFinish() { sunsetBackground.destroy(); } }); tween(cleaningBackground, { alpha: 1 }, { duration: 800, easing: tween.easeInOut }); // Keep aikoEvaluation hidden during romantic scene self.setChildIndex(aikoSprite, self.children.length - 1); // Ensure dialog system and choice system are visible and in front if (dialogSystem) { game.setChildIndex(dialogSystem, game.children.length - 1); dialogSystem.visible = true; } if (choiceSystem) { game.setChildIndex(choiceSystem, game.children.length - 1); choiceSystem.visible = true; } currentRomanticDialog++; } else if (dialog.text === '¿Sabés algo? No esperaba sentirme así después de enseñarle a alguien como vos.') { // Change background to school corridor for this specific dialog with fade var corridorBackground = self.attachAsset('schoolcorridor', { x: 0, y: 0, alpha: 0 // Start invisible }); // Send background to back self.setChildIndex(corridorBackground, 0); // Fade out old background if (self.children.length > 1 && self.children[0].destroy) { var oldBackground = self.children[0]; tween(oldBackground, { alpha: 0 }, { duration: 600, easing: tween.easeInOut, onFinish: function onFinish() { oldBackground.destroy(); } }); } // Fade in corridor background tween(corridorBackground, { alpha: 1 }, { duration: 800, easing: tween.easeInOut }); // Keep aikoEvaluation hidden during romantic scene self.setChildIndex(aikoSprite, self.children.length - 1); // Ensure dialog system and choice system are visible and in front if (dialogSystem) { game.setChildIndex(dialogSystem, game.children.length - 1); dialogSystem.visible = true; } if (choiceSystem) { game.setChildIndex(choiceSystem, game.children.length - 1); choiceSystem.visible = true; } currentRomanticDialog++; } else if (dialog.text === 'Eso fue por aprobar mi prueba.') { // Change background to AikoKiss for this specific dialog with romantic fade var kissBackground = self.attachAsset('AikoKiss', { x: 0, y: 0, alpha: 0 // Start invisible for dramatic reveal }); // Send background to back self.setChildIndex(kissBackground, 0); // Fade out old background if (self.children.length > 1 && self.children[0].destroy) { var oldBackground = self.children[0]; tween(oldBackground, { alpha: 0 }, { duration: 500, easing: tween.easeInOut, onFinish: function onFinish() { oldBackground.destroy(); } }); } // Fade in kiss background with romantic timing tween(kissBackground, { alpha: 1 }, { duration: 1000, easing: tween.easeInOut }); // Show kiss effect LK.effects.flashScreen(0xff69b4, 500); var kissText = new Text2('Satoshi ha sido besado por primera vez.', { size: 80, fill: 0xff1493 }); kissText.anchor.set(0.5, 0.5); kissText.x = 1024; kissText.y = 1366; self.addChild(kissText); currentRomanticDialog++; } else if (dialog.action === 'kiss') { // Show kiss effect LK.effects.flashScreen(0xff69b4, 500); var kissText = new Text2('Satoshi ha sido besado por primera vez.', { size: 80, fill: 0xff1493 }); kissText.anchor.set(0.5, 0.5); kissText.x = 1024; kissText.y = 1366; self.addChild(kissText); currentRomanticDialog++; } else { currentRomanticDialog++; } }; self.showFinalChoices = function () { dialogSystem.hide(); // Play crossroads music for the final romantic choice moment LK.stopMusic(); LK.playMusic('theCrossroadsSong'); var finalChoices = [{ text: 'Aiko... quiero más que un beso.', type: 'romantic' }, { text: 'No... no puedo hacer esto contigo.', type: 'reject' }]; choiceSystem.showChoices(finalChoices); }; return self; }); var TitleScreen = Container.expand(function () { var self = Container.call(this); // Background var spaceBackground = self.attachAsset('titleSpaceBackground', { x: 0, y: 0 }); // Stars array for twinkling effect var stars = []; for (var i = 0; i < 50; i++) { var star = self.attachAsset('titleStar', { anchorX: 0.5, anchorY: 0.5, x: Math.random() * 2048, y: Math.random() * 2732 }); stars.push(star); } // Hyperstar setup var hyperStar = self.attachAsset('titleHyperStar', { anchorX: 0.5, anchorY: 0.5, x: Math.random() * 2048, y: Math.random() * 2732, alpha: 0 }); // Logo setup (starts tiny) var logo = self.attachAsset('titleScreenLogo', { anchorX: 0.5, anchorY: 0.5, x: 1024, y: 800, scaleX: 0.1, scaleY: 0.1 }); // Start button (starts off screen) var startButton = self.attachAsset('titleStartButton', { anchorX: 0.5, anchorY: 0.5, x: 1024, y: -500 }); // Earth for transition var earth = self.attachAsset('titleEarth', { anchorX: 0.5, anchorY: 0.5, x: 1024, y: 2000, scaleX: 0.3, scaleY: 0.3 }); // Cat setup var catSprites = ['titleCatFloat', 'titleCatJump', 'titleCatMeow', 'titleCatPlay', 'titleCatSleep', 'titleCatEat']; var currentCatSprite = 0; var catTouchCount = 0; var catAngry = false; var catRemoved = false; var cat = self.attachAsset('titleCatFloat', { anchorX: 0.5, anchorY: 0.5, x: 300, y: 1200, scaleX: 1.5, scaleY: 1.5 }); var catVelocityX = 1; var catVelocityY = 0.5; // Cat spaceship (hidden initially) var catSpaceship = self.attachAsset('titleCatSpaceship', { anchorX: 0.5, anchorY: 0.5, x: -300, y: cat.y, scaleX: 1.2, scaleY: 1.2, visible: false }); // Timers var starTwinkleTimer = 0; var hyperStarTimer = 0; var catAnimationTimer = 0; var hyperStarActive = false; // Initialize animations self.initAnimations = function () { // Logo grow animation tween(logo, { scaleX: 1.0, scaleY: 1.0 }, { duration: 2000, easing: tween.elasticOut }); // Start button bounce in tween(startButton, { y: 1800 }, { duration: 1500, easing: tween.bounceOut }); }; self.update = function () { if (catRemoved) return; // Star twinkling starTwinkleTimer++; if (starTwinkleTimer % 60 === 0) { var randomStar = stars[Math.floor(Math.random() * stars.length)]; tween(randomStar, { alpha: 0.3 }, { duration: 300, onFinish: function onFinish() { tween(randomStar, { alpha: 1 }, { duration: 300 }); } }); } // Additional star twinkling for more frequent blinking if (starTwinkleTimer % 30 === 0) { var randomStar2 = stars[Math.floor(Math.random() * stars.length)]; tween(randomStar2, { alpha: 0.1 }, { duration: 200, onFinish: function onFinish() { tween(randomStar2, { alpha: 1 }, { duration: 400 }); } }); } // Continuous gentle twinkling for all stars if (starTwinkleTimer % 15 === 0) { for (var i = 0; i < stars.length; i++) { if (Math.random() < 0.3) { // 30% chance for each star var star = stars[i]; tween(star, { alpha: 0.5 + Math.random() * 0.5 }, { duration: 500 + Math.random() * 1000 }); } } } // Hyperstar movement hyperStarTimer++; if (hyperStarTimer % 900 === 0) { // Every 15 seconds if (!hyperStarActive) { hyperStarActive = true; hyperStar.x = Math.random() * 2048; hyperStar.y = Math.random() * 2732; tween(hyperStar, { alpha: 1 }, { duration: 500, onFinish: function onFinish() { var targetX = Math.random() * 2048; var targetY = Math.random() * 2732; tween(hyperStar, { x: targetX, y: targetY }, { duration: 2000, easing: tween.linear, onFinish: function onFinish() { tween(hyperStar, { alpha: 0 }, { duration: 500, onFinish: function onFinish() { hyperStarActive = false; } }); } }); } }); } } // Cat floating movement if (!catAngry) { cat.x += catVelocityX; cat.y += catVelocityY; // Bounce off edges if (cat.x <= 100 || cat.x >= 1948) { catVelocityX *= -1; } if (cat.y <= 100 || cat.y >= 2632) { catVelocityY *= -1; } // Random sprite change catAnimationTimer++; if (catAnimationTimer % 180 === 0) { currentCatSprite = (currentCatSprite + 1) % catSprites.length; cat.destroy(); cat = self.attachAsset(catSprites[currentCatSprite], { anchorX: 0.5, anchorY: 0.5, x: cat.x, y: cat.y, scaleX: 1.5, scaleY: 1.5 }); // Re-add touch handler cat.down = function () { if (catRemoved) return; catTouchCount++; if (catTouchCount >= 10 && !catAngry) { self.makeCatAngry(); } }; } } }; self.makeCatAngry = function () { catAngry = true; cat.destroy(); cat = self.attachAsset('titleCatAngry', { anchorX: 0.5, anchorY: 0.5, x: cat.x, y: cat.y, scaleX: 1.5, scaleY: 1.5 }); // After 1 second, show spaceship LK.setTimeout(function () { catSpaceship.visible = true; catSpaceship.y = cat.y; // Move spaceship to cat tween(catSpaceship, { x: cat.x - 100 }, { duration: 2000, easing: tween.linear, onFinish: function onFinish() { // Move cat and spaceship to Earth tween(cat, { x: earth.x, y: earth.y, scaleX: 0.3, scaleY: 0.3 }, { duration: 3000, easing: tween.easeInOut }); tween(catSpaceship, { x: earth.x, y: earth.y, scaleX: 0.3, scaleY: 0.3 }, { duration: 3000, easing: tween.easeInOut, onFinish: function onFinish() { cat.visible = false; catSpaceship.visible = false; catRemoved = true; } }); } }); }, 1000); }; // Start button handler startButton.down = function () { // Zoom to Earth transition tween(earth, { scaleX: 50, scaleY: 50 }, { duration: 2000, easing: tween.easeInOut, onFinish: function onFinish() { game.startMainGame(); } }); // Zoom cat and move it in random direction if not removed if (!catRemoved) { // Random direction: 0-7 (8 directions: edges and corners) var direction = Math.floor(Math.random() * 8); var targetX, targetY; // Calculate target position based on direction switch (direction) { case 0: // Left edge targetX = -300; targetY = cat.y; break; case 1: // Right edge targetX = 2348; targetY = cat.y; break; case 2: // Top edge targetX = cat.x; targetY = -300; break; case 3: // Bottom edge targetX = cat.x; targetY = 3032; break; case 4: // Top-left corner targetX = -300; targetY = -300; break; case 5: // Top-right corner targetX = 2348; targetY = -300; break; case 6: // Bottom-left corner targetX = -300; targetY = 3032; break; case 7: // Bottom-right corner targetX = 2348; targetY = 3032; break; } // Apply much faster zoom and movement to cat tween(cat, { scaleX: 100, scaleY: 100, x: targetX, y: targetY }, { duration: 500, easing: tween.easeInOut, onFinish: function onFinish() { cat.visible = false; } }); } }; // Cat touch handler cat.down = function () { if (catRemoved) return; catTouchCount++; if (catTouchCount >= 10 && !catAngry) { self.makeCatAngry(); } }; return self; }); var WelcomeScreen = Container.expand(function () { var self = Container.call(this); var playerName = ''; var isCapitalized = false; var keyboardMode = 'letters'; // 'letters', 'symbols1', 'symbols2' // Background var background = self.attachAsset('titleSpaceBackground', { x: 0, y: 0 }); // Welcome text var welcomeText = new Text2('¡BIENVENIDO!', { size: 140, fill: 0xffffff }); welcomeText.anchor.set(0.5, 0.5); welcomeText.x = 1024; welcomeText.y = 500; self.addChild(welcomeText); // Question text var questionText = new Text2('¿Cuál es tu nombre?', { size: 100, fill: 0xffffff }); questionText.anchor.set(0.5, 0.5); questionText.x = 1024; questionText.y = 650; self.addChild(questionText); // Name display box var nameBox = self.attachAsset('inputField', { anchorX: 0.5, anchorY: 0.5, x: 1024, y: 800 }); var nameDisplayText = new Text2('', { size: 80, fill: 0x000000 }); nameDisplayText.anchor.set(0.5, 0.5); nameDisplayText.x = nameBox.x; nameDisplayText.y = nameBox.y; self.addChild(nameDisplayText); // Keyboard container var keyboard = new Container(); self.addChild(keyboard); var keys = []; // Letter layouts var letterLayout = [['!#1', 'Q', 'W', 'E', 'R', 'T', 'Y', 'U', 'I', 'O', 'P'], ['A', 'S', 'D', 'F', 'G', 'H', 'J', 'K', 'L', 'Ñ'], ['SHIFT', 'Z', 'X', 'C', 'V', 'B', 'N', 'M', '←'], ['1', '2', '3', '4', '5', '6', '7', '8', '9', '0'], [',', 'SPACE', '.', 'ENTER']]; var symbols1Layout = [['ABC', '1', '2', '3', '4', '5', '6', '7', '8', '9', '0'], ['@', '#', '$', '%', '&', '*', '-', '+', '(', ')'], ['!', '"', "'", ':', ';', '/', '¿', '?', '¡', '=', '←'], ['SPACE', '.', '1/2', 'ENTER']]; var symbols2Layout = [['ABC', '[', ']', '{', '}', '<', '>', '^', '_', '`', '~'], ['|', '\\', '°', '¬', '·', '•', '¶', '§', '×', '÷'], ['€', '£', '¥', '¢', '©', '®', '™', '♡', '♥', '←'], ['SPACE', ',', '2/2', 'ENTER']]; function createKeyboard() { // Clear existing keys for (var i = 0; i < keys.length; i++) { keys[i].btn.destroy(); keys[i].text.destroy(); } keys = []; var layout = keyboardMode === 'letters' ? letterLayout : keyboardMode === 'symbols1' ? symbols1Layout : symbols2Layout; var startY = 1200; var keyWidth = 160; var keyHeight = 120; var keySpacing = 10; for (var row = 0; row < layout.length; row++) { var rowKeys = layout[row]; var totalRowWidth = rowKeys.length * keyWidth + (rowKeys.length - 1) * keySpacing; var startX = (2048 - totalRowWidth) / 2; for (var col = 0; col < rowKeys.length; col++) { var keyText = rowKeys[col]; var keyBtn = keyboard.attachAsset('mathEvaluationButton', { anchorX: 0.5, anchorY: 0.5, x: startX + col * (keyWidth + keySpacing) + keyWidth / 2, y: startY + row * (keyHeight + keySpacing) }); // Adjust special key widths if (keyText === 'SPACE') { keyBtn.scaleX = 3; } else if (keyText === 'SHIFT' || keyText === 'ENTER' || keyText === 'ABC' || keyText === '!#1' || keyText.includes('/') || keyText === '←') { keyBtn.scaleX = 1.2; } var displayText = keyText; if (keyText === 'SPACE') displayText = ' '; if (keyText === '←') displayText = '←'; if (keyText === 'SHIFT') displayText = '↑'; // Show lowercase letters when not in uppercase mode (letters only) if (keyboardMode === 'letters' && keyText.length === 1 && keyText.match(/[A-ZÑ]/)) { if (!isCapitalized && playerName.length > 0) { displayText = keyText.toLowerCase(); } else { displayText = keyText; } } var keyLabel = new Text2(displayText, { size: keyText === 'SPACE' ? 40 : 45, fill: 0xffffff }); keyLabel.anchor.set(0.5, 0.5); keyLabel.x = keyBtn.x; keyLabel.y = keyBtn.y; keyboard.addChild(keyLabel); keyBtn.keyValue = keyText; keyBtn.down = function () { handleKeyPress(this.keyValue); }; keys.push({ btn: keyBtn, text: keyLabel }); } } } function handleKeyPress(key) { if (key === 'ENTER') { if (playerName.length > 0) { storage.playerName = playerName; self.startTitleScreen(); } } else if (key === '←') { if (playerName.length > 0) { playerName = playerName.substring(0, playerName.length - 1); nameDisplayText.setText(playerName); // Reset to uppercase if name becomes empty if (playerName.length === 0) { isCapitalized = false; if (keyboardMode === 'letters') { createKeyboard(); } } } } else if (key === 'SHIFT') { isCapitalized = !isCapitalized; createKeyboard(); } else if (key === 'ABC' || key === '!#1') { if (keyboardMode === 'letters') { keyboardMode = 'symbols1'; } else { keyboardMode = 'letters'; } createKeyboard(); } else if (key === '1/2') { console.log('Switching to symbols2 mode'); keyboardMode = 'symbols2'; createKeyboard(); } else if (key === '2/2') { console.log('Switching back to symbols1 mode'); keyboardMode = 'symbols1'; createKeyboard(); } else if (key === 'SPACE') { if (playerName.length < 20) { playerName += ' '; nameDisplayText.setText(playerName); } } else { // Regular character input if (playerName.length < 20) { var charToAdd = key; if (keyboardMode === 'letters' && key.length === 1 && key.match(/[A-ZÑ]/)) { if (playerName.length === 0 || isCapitalized) { charToAdd = key.toUpperCase(); // Auto-switch to lowercase after first character if (playerName.length === 0) { isCapitalized = false; LK.setTimeout(function () { createKeyboard(); }, 100); } } else { charToAdd = key.toLowerCase(); } } playerName += charToAdd; nameDisplayText.setText(playerName); } } } self.startTitleScreen = function () { // Transition to title screen self.visible = false; game.showTitleScreen(); }; // Initialize with entrance animation self.initAnimations = function () { // Start everything very large (too close to see) welcomeText.scaleX = 20; welcomeText.scaleY = 20; welcomeText.alpha = 0; questionText.scaleX = 15; questionText.scaleY = 15; questionText.alpha = 0; nameBox.scaleX = 10; nameBox.scaleY = 10; nameBox.alpha = 0; nameDisplayText.scaleX = 10; nameDisplayText.scaleY = 10; nameDisplayText.alpha = 0; keyboard.scaleX = 8; keyboard.scaleY = 8; keyboard.alpha = 0; // Animate elements into view with depth effect tween(welcomeText, { scaleX: 1, scaleY: 1, alpha: 1 }, { duration: 1000, easing: tween.easeOut }); LK.setTimeout(function () { tween(questionText, { scaleX: 1, scaleY: 1, alpha: 1 }, { duration: 800, easing: tween.easeOut }); }, 300); LK.setTimeout(function () { tween(nameBox, { scaleX: 1, scaleY: 1, alpha: 1 }, { duration: 600, easing: tween.easeOut }); tween(nameDisplayText, { scaleX: 1, scaleY: 1, alpha: 1 }, { duration: 600, easing: tween.easeOut }); }, 600); LK.setTimeout(function () { // Position keyboard initially below screen keyboard.y = 2732 + 600; // Start below screen keyboard.scaleX = 1; keyboard.scaleY = 1; keyboard.alpha = 1; // Create keyboard before animation starts createKeyboard(); // Animate keyboard sliding up from bottom tween(keyboard, { y: 0 }, { duration: 800, easing: tween.easeOut }); }, 600); // Start at same time as inputField }; return self; }); /**** * Initialize Game ****/ var game = new LK.Game({ backgroundColor: 0xffffff }); /**** * Game Code ****/ // Game state // Fondos var currentScene = 0; var currentDialog = 0; var currentChoices = []; var relationshipPoints = { aiko: 0, yui: 0, hikari: 0, respect: 0, peace: 0, academic: 0 }; var selectedRoute = null; var currentBackground = null; var mathEvaluation = null; var romanticScene = null; var isInMathEvaluation = false; var isInRomanticScene = false; var gameStarted = false; // Welcome screen (shown first) var welcomeScreen = game.addChild(new WelcomeScreen()); welcomeScreen.initAnimations(); // Title screen (initially hidden) var titleScreen = game.addChild(new TitleScreen()); titleScreen.visible = false; // Do not play title screen music during welcome screen // UI Systems (initially hidden) var dialogSystem = game.addChild(new DialogSystem()); var choiceSystem = game.addChild(new ChoiceSystem()); var character = game.addChild(new Character()); // Hide game elements initially dialogSystem.visible = false; choiceSystem.visible = false; character.visible = false; // Story data var storyScenes = [{ background: 'habitacion', dialogs: [{ speaker: 'Satoshi', text: '¡Ya es mi último año de secundaria! Necesito encontrar novia antes de graduarme.' }, { speaker: 'Satoshi', text: 'Pero primero... mejor hablo con mamá sobre mis planes.' }], choices: [{ text: 'Contarle todo a mamá', effects: { respect: 2, peace: -1 } }, { text: 'Mantenerlo en secreto', effects: { peace: 2, respect: -1 } }] }, { background: 'calle', dialogs: [{ speaker: 'Satoshi', text: 'Camino a la escuela... Hoy conoceré a las chicas que podrían cambiar mi vida.' }] }, { background: 'escuela', dialogs: [{ speaker: 'Satoshi', text: 'Aquí está la escuela. Veo tres chicas que me llaman la atención...' }, { speaker: 'Satoshi', text: 'Aiko, la delegada seria... Yui, mi amiga de la infancia... y Hikari, la misteriosa.' }], choices: [{ text: 'Acercarme a Aiko', route: 'aiko' }, { text: 'Hablar con Yui', route: 'yui' }, { text: 'Seguir a Hikari', route: 'hikari' }] }]; // Route-specific scenes var routeScenes = { aiko: [{ background: 'aula', dialogs: [{ speaker: 'Aiko', text: 'Satoshi-kun, necesitas ser más responsable con tus estudios.' }, { speaker: 'Satoshi', text: 'Tienes razón, Aiko. ¿Me ayudarías a estudiar?' }], choices: [{ text: 'Pedirle que sea mi tutora', effects: { aiko: 3 } }, { text: 'Sugerir estudiar juntos como amigos', effects: { aiko: 1 } }] }, { background: 'Aikosurprised', dialogs: [{ speaker: 'Aiko', text: '...¿Yo? ¿tu tutora?' }, { speaker: 'Aiko', text: 'Está bien. Pero no quiero distracciones. Si no cumplís, se acaba el trato.', backgroundChange: 'aula' }, { speaker: 'Satoshi', text: '¡Lo prometo! Seré el alumno más aplicado que hayas visto.' }] }, { background: 'aula', dialogs: [{ speaker: 'Aiko', text: 'Antes de seguir con estas sesiones, quiero comprobar cuánto sabés.', action: 'startMathEval', backgroundChange: 'Aikosmiling' }, { speaker: 'Aiko', text: 'Nada complicado. Empecemos.' }] }], yui: [{ background: 'patio', dialogs: [{ speaker: 'Yui', text: '¡Satoshi! Como en los viejos tiempos, ¿verdad?' }, { speaker: 'Satoshi', text: 'Sí, Yui... pero ahora te veo diferente.' }], choices: [{ text: 'Confesarle mis sentimientos', effects: { yui: 3 } }, { text: 'Mantener la amistad por ahora', effects: { yui: 1 } }] }], hikari: [{ background: 'aula2', dialogs: [{ speaker: 'Hikari', text: 'Te has dado cuenta de mí... interesante.' }, { speaker: 'Satoshi', text: 'Hay algo especial en ti, Hikari.' }], choices: [{ text: 'Preguntarle sobre su misterio', effects: { hikari: 3 } }, { text: 'Invitarla a caminar', effects: { hikari: 2 } }] }] }; function changeBackground(backgroundType) { // Create new background with fade in effect var newBackground = game.addChild(LK.getAsset(backgroundType, { x: 0, y: 0, alpha: 0 // Start invisible for fade in })); // Send background to back game.setChildIndex(newBackground, 0); // Fade in new background tween(newBackground, { alpha: 1 }, { duration: 800, easing: tween.easeInOut, onFinish: function onFinish() { // Destroy old background after fade in completes if (currentBackground) { currentBackground.destroy(); } currentBackground = newBackground; } }); // If there's an old background, fade it out while new one fades in if (currentBackground) { tween(currentBackground, { alpha: 0 }, { duration: 600, easing: tween.easeInOut }); } else { // If no old background, just assign the new one currentBackground = newBackground; } } function showCurrentDialog() { var scene = getCurrentScene(); if (!scene || !scene.dialogs || currentDialog >= scene.dialogs.length) { if (scene && scene.choices) { currentChoices = scene.choices; choiceSystem.showChoices(scene.choices); dialogSystem.hide(); } else { nextScene(); } return; } var dialog = scene.dialogs[currentDialog]; dialogSystem.showDialog(dialog.speaker, dialog.text); // Play aikoAudioLine1 when Aiko says the specific dialog about being responsible if (dialog.speaker === 'Aiko' && dialog.text === 'Satoshi-kun, necesitas ser más responsable con tus estudios.') { LK.getSound('aikoAudioLine1').play(); } // Play aikoAudioLine2 when Aiko says the tutoring dialog if (dialog.speaker === 'Aiko' && dialog.text === '...¿Yo? ¿tu tutora?') { LK.getSound('aikoAudioLine2').play(); } // Play aikoAudioLine3 when Aiko says the deal dialog if (dialog.speaker === 'Aiko' && dialog.text === 'Está bien. Pero no quiero distracciones. Si no cumplís, se acaba el trato.') { LK.getSound('aikoAudioLine3').play(); } // Play aikoAudioLine4 when Aiko says the evaluation dialog if (dialog.speaker === 'Aiko' && dialog.text === 'Antes de seguir con estas sesiones, quiero comprobar cuánto sabés.') { LK.getSound('aikoAudioLine4').play(); } // Play aikoAudioLine5 when Aiko says the specific dialog about all correct answers if (dialog.speaker === 'Aiko' && dialog.text === '...¿Todas correctas? Hmm... No está mal, para alguien como vos.') { LK.getSound('aikoAudioLine5').play(); } // Handle background changes within dialog if (dialog.backgroundChange) { changeBackground(dialog.backgroundChange); } // Before route selection: hide characterSprite, show full Satoshi // After route selection: show characterSprite for Satoshi, hide for others if (!selectedRoute) { // Before route selection - always hide characterSprite character.hide(); } else { // After route selection - show characterSprite for Satoshi, hide for others if (dialog.speaker === 'Satoshi') { // Check if this is the specific promise dialog in Aiko route var isMotivatedMoment = selectedRoute === 'aiko' && currentScene === 4 && currentDialog === 2 && dialog.text === '¡Lo prometo! Seré el alumno más aplicado que hayas visto.'; character.show(false, isMotivatedMoment); } else { character.hide(); } } choiceSystem.clearChoices(); } function getCurrentScene() { if (selectedRoute && routeScenes[selectedRoute]) { var routeIndex = currentScene - storyScenes.length; if (routeIndex >= 0 && routeIndex < routeScenes[selectedRoute].length) { return routeScenes[selectedRoute][routeIndex]; } } if (currentScene < storyScenes.length) { return storyScenes[currentScene]; } return null; } function nextScene() { currentScene++; currentDialog = 0; currentChoices = []; // No auto-save - game resets on refresh var scene = getCurrentScene(); if (scene) { if (scene.background) { changeBackground(scene.background); } showCurrentDialog(); } else { showEnding(); } } function showEnding() { var maxPoints = 0; var winner = null; if (selectedRoute) { maxPoints = relationshipPoints[selectedRoute]; winner = selectedRoute; } var endingText = ''; if (maxPoints >= 3) { endingText = '¡Felicidades! Has encontrado el amor verdadero con ' + (winner === 'aiko' ? 'Aiko' : winner === 'yui' ? 'Yui' : 'Hikari') + '!'; LK.showYouWin(); } else { endingText = 'Aunque no encontraste el amor esta vez, aprendiste mucho sobre ti mismo.'; dialogSystem.showDialog('Narrador', endingText); } } game.nextDialog = function () { // If we're in romantic scene, continue with romantic dialog if (isInRomanticScene && romanticScene) { romanticScene.showRomanticDialog(); return; } var scene = getCurrentScene(); var dialog = scene && scene.dialogs ? scene.dialogs[currentDialog] : null; if (dialog && dialog.action === 'startMathEval' && !isInMathEvaluation) { game.startMathEvaluation(); return; } currentDialog++; // No auto-save for dialog progress showCurrentDialog(); }; game.startMathEvaluation = function () { isInMathEvaluation = true; dialogSystem.hide(); character.hide(); if (currentBackground) { currentBackground.destroy(); } // Play evaluation song during math test LK.playMusic('evaluationSong'); mathEvaluation = game.addChild(new MathEvaluation()); }; game.startMathEvaluationFailure = function () { isInMathEvaluation = false; if (mathEvaluation) { mathEvaluation.destroy(); mathEvaluation = null; } if (currentBackground) { currentBackground.destroy(); } // Stop music when player fails evaluation LK.stopMusic(); // Change to cold, grey classroom changeBackground('aula'); character.hide(); // Show Aiko's disappointed reaction with specific dialogs var failureDialogs = [{ speaker: 'Aiko', text: '...¿En serio?' }, { speaker: 'Aiko', text: 'Pensé que podrías con algo tan simple. Pero está claro que puse expectativas demasiado altas en vos.' }, { speaker: 'Aiko', text: 'Mejor andá a pedirle ayuda a tu mamá. Quizás con dibujos entiendas.' }, { speaker: 'GAME OVER', text: '¡Por eso eres virgen!' }]; var failureDialogIndex = 0; function showFailureDialog() { if (failureDialogIndex < failureDialogs.length) { var dialog = failureDialogs[failureDialogIndex]; dialogSystem.showDialog(dialog.speaker, dialog.text); failureDialogIndex++; if (dialog.speaker === 'GAME OVER') { LK.effects.flashScreen(0xff0000, 1000); // Play game over sound effect when narrator says the virgin line LK.getSound('gameOverEffect').play(); } } } // Override nextDialog temporarily for failure sequence var originalNextDialog = game.nextDialog; game.nextDialog = function () { showFailureDialog(); if (failureDialogIndex >= failureDialogs.length) { // Restore original nextDialog game.nextDialog = originalNextDialog; } }; showFailureDialog(); }; game.startRomanticScene = function () { isInMathEvaluation = false; isInRomanticScene = true; if (mathEvaluation) { mathEvaluation.destroy(); mathEvaluation = null; } if (currentBackground) { currentBackground.destroy(); } // Stop evaluation music and play romantic song when player passes evaluation LK.stopMusic(); LK.playMusic('romanticSong'); romanticScene = game.addChild(new RomanticScene()); romanticScene.showRomanticDialog(); }; game.makeChoice = function (choice) { // Handle romantic scene choices if (isInRomanticScene && choice.type) { choiceSystem.clearChoices(); if (choice.type === 'romantic') { // Resume romantic music for positive choice LK.stopMusic(); LK.playMusic('romanticSong'); // Show positive romantic outcome if (romanticScene) { romanticScene.destroy(); } // Change background to AikoPoseOjou for this specific dialog with fade var newBackground = game.addChild(LK.getAsset('AikoPoseOjou', { x: 0, y: 0, alpha: 0 // Start invisible })); // Send background to back game.setChildIndex(newBackground, 0); // Fade out old background if (currentBackground) { tween(currentBackground, { alpha: 0 }, { duration: 600, easing: tween.easeInOut, onFinish: function onFinish() { currentBackground.destroy(); currentBackground = newBackground; } }); } // Fade in new background tween(newBackground, { alpha: 1 }, { duration: 800, easing: tween.easeInOut, onFinish: function onFinish() { if (!currentBackground) { currentBackground = newBackground; } } }); relationshipPoints.aiko += 2; dialogSystem.showDialog('Aiko', '¿Más...? Sos más valiente de lo que pensaba. Pero antes de seguir... prométeme que vas a seguir estudiando conmigo.'); // Play aikoAudioLine10 when Aiko says the romantic choice dialog LK.getSound('aikoAudioLine10').play(); // Override nextDialog to handle Yui's route transition var originalNextDialog = game.nextDialog; game.nextDialog = function () { // Restore original nextDialog game.nextDialog = originalNextDialog; // Start Yui's hidden route game.startYuiHiddenRoute(); }; } else if (choice.type === 'reject') { // Stop music completely for rejection to emphasize gameOverEffect LK.stopMusic(); // Show game over if (romanticScene) { romanticScene.destroy(); } LK.effects.flashScreen(0xff0000, 1000); dialogSystem.showDialog('GAME OVER', '¡Por eso eres virgen!'); // Play game over sound effect with clear musical space LK.getSound('gameOverEffect').play(); } return; } // Check if this is the first scene crossroads choice and restore music if (currentScene === 0 && (choice.text === 'Contarle todo a mamá' || choice.text === 'Mantenerlo en secreto')) { // Resume the beginning song after making the crossroads choice LK.stopMusic(); LK.playMusic('theBeginningSong'); } // Check if this is the school scene route choice and play school song if (currentScene === 2 && (choice.text === 'Acercarme a Aiko' || choice.text === 'Hablar con Yui' || choice.text === 'Seguir a Hikari')) { // Play school song after making route choice LK.stopMusic(); LK.playMusic('theSchoolSong'); } // Check if this is Aiko tutoring choice and resume school song if (currentScene === 3 && (choice.text === 'Pedirle que sea mi tutora' || choice.text === 'Sugerir estudiar juntos como amigos')) { // Resume the school song after making the tutoring choice LK.stopMusic(); LK.playMusic('theSchoolSong'); } // Reset character sprite to normal state if (selectedRoute && character.visible) { character.show(false); } if (choice.effects) { for (var key in choice.effects) { relationshipPoints[key] += choice.effects[key]; } } // Special handling for Aiko route choices if (selectedRoute === 'aiko' && currentScene === 3) { if (choice.text === 'Pedirle que sea mi tutora') { relationshipPoints.academic += 1; } else if (choice.text === 'Sugerir estudiar juntos como amigos') { // Trigger immediate game over dialogSystem.hide(); choiceSystem.clearChoices(); LK.effects.flashScreen(0xff0000, 1000); dialogSystem.showDialog('GAME OVER', '¡Por eso eres virgen!'); return; } } if (choice.route) { selectedRoute = choice.route; } choiceSystem.clearChoices(); currentChoices = []; nextScene(); }; game.showChoices = function () { if (currentChoices.length > 0) { choiceSystem.showChoices(currentChoices); dialogSystem.hide(); } }; game.showTitleScreen = function () { // Hide welcome screen welcomeScreen.visible = false; // Play title screen music without looping when showing title screen LK.playMusic('titleScreenSong', { loop: false }); // Show and initialize title screen titleScreen.visible = true; titleScreen.initAnimations(); }; game.startMainGame = function () { if (gameStarted) return; gameStarted = true; // Stop title screen music LK.stopMusic(); // Start the beginning song for Satoshi's room scene LK.playMusic('theBeginningSong'); // Hide title screen titleScreen.visible = false; // Show game elements dialogSystem.visible = true; choiceSystem.visible = true; character.visible = true; // Restart button text removed - no color changes needed // Initialize game changeBackground('habitacion'); showCurrentDialog(); }; // Don't auto-start the game - wait for title screen // Restart button in top-right corner var restartButton = LK.gui.topRight.addChild(LK.getAsset('restartButton', { anchorX: 1, anchorY: 0, x: -50, y: 20, scaleX: 0.6, scaleY: 0.6 })); // Restart button text removed - sprite is sufficient restartButton.down = function () { // Stop all music immediately for complete reset LK.stopMusic(); // Clear all saved data delete storage.currentScene; delete storage.currentDialog; delete storage.relationshipPoints; delete storage.selectedRoute; delete storage.playerName; // Reset game state variables currentScene = 0; currentDialog = 0; currentChoices = []; relationshipPoints = { aiko: 0, yui: 0, hikari: 0, respect: 0, peace: 0, academic: 0 }; selectedRoute = null; isInMathEvaluation = false; isInRomanticScene = false; gameStarted = false; // Reset the nextDialog function to original state game.nextDialog = function () { // If we're in romantic scene, continue with romantic dialog if (isInRomanticScene && romanticScene) { romanticScene.showRomanticDialog(); return; } var scene = getCurrentScene(); var dialog = scene && scene.dialogs ? scene.dialogs[currentDialog] : null; if (dialog && dialog.action === 'startMathEval' && !isInMathEvaluation) { game.startMathEvaluation(); return; } currentDialog++; // No auto-save for dialog progress showCurrentDialog(); }; // Destroy any active special scenes and all screen elements if (mathEvaluation) { mathEvaluation.destroy(); mathEvaluation = null; } if (romanticScene) { romanticScene.destroy(); romanticScene = null; } if (currentBackground) { currentBackground.destroy(); currentBackground = null; } if (currentYuiBackground) { currentYuiBackground.destroy(); currentYuiBackground = null; } // Clear all UI elements and systems choiceSystem.clearChoices(); choiceSystem.destroy(); character.destroy(); dialogSystem.destroy(); // Destroy and clear all screen elements titleScreen.destroy(); welcomeScreen.destroy(); // Hide any remaining elements dialogSystem.visible = false; choiceSystem.visible = false; character.visible = false; // Recreate all systems from scratch dialogSystem = game.addChild(new DialogSystem()); choiceSystem = game.addChild(new ChoiceSystem()); character = game.addChild(new Character()); titleScreen = game.addChild(new TitleScreen()); welcomeScreen = game.addChild(new WelcomeScreen()); // Hide all game elements - start fresh at title screen dialogSystem.visible = false; choiceSystem.visible = false; character.visible = false; welcomeScreen.visible = false; // Show title screen and initialize it titleScreen.visible = true; titleScreen.initAnimations(); // Play title screen music for fresh start LK.playMusic('titleScreenSong'); }; // Yui's hidden route scenes var yuiHiddenRoute = [{ background: 'schoolcorridor', dialogs: [{ speaker: 'Narrador', text: 'En un rincón del pasillo, entre casilleros, una figura permanece inmóvil. Sus labios no se mueven. Pero su mirada... lo dice todo.' }] }, { background: 'schoolcorridor', dialogs: [{ speaker: 'Yui', text: '¿Así que ahora sonríes así por ella...?', isThought: true }] }, { background: 'schoolcorridor', dialogs: [{ speaker: 'Yui', text: 'Intenta quitármelo... y sufrirás las graves consecuencias.', isThought: true }] }, { background: 'schoolcorridor', dialogs: [{ speaker: 'Yui', text: 'Si yo no puedo tenerlo...', isThought: true }] }, { background: 'schoolcorridor', dialogs: [{ speaker: 'Yui', text: '...nadie más lo tendrá.', isThought: true }] }, { background: 'schoolcorridor', dialogs: [{ speaker: 'Yui', text: 'Satoshi, te conocí cuando éramos niños...', isThought: true }] }, { background: 'schoolcorridor', dialogs: [{ speaker: 'Yui', text: 'Jugábamos a las carreras, a las escondidas... Y a los novios...', isThought: true }] }, { background: 'schoolcorridor', dialogs: [{ speaker: 'Yui', text: 'Pero jamás pensé... que lo olvidarías.', isThought: true }] }, { background: 'schoolcorridor', dialogs: [{ speaker: 'Narrador', text: 'El amor de la infancia... no siempre se desvanece. A veces... se pudre.' }] }]; var currentYuiBackground = null; var yuiBackgroundFilters = [{ brightness: 1.0, contrast: 1.0, saturation: 1.0, tint: 0xffffff }, // Warm afternoon light { brightness: 0.8, contrast: 1.2, saturation: 0.9, tint: 0xf0f0f0 }, // Longer shadows { brightness: 0.7, contrast: 1.4, saturation: 0.8, tint: 0xff9999 }, // Reddish tint { brightness: 0.6, contrast: 1.1, saturation: 0.4, tint: 0xcccccc }, // Desaturated { brightness: 0.4, contrast: 1.6, saturation: 0.2, tint: 0x999999 }, // Dark and cold { brightness: 0.5, contrast: 1.3, saturation: 0.6, tint: 0xddaa88 }, // Sepia tones { brightness: 0.3, contrast: 1.8, saturation: 0.3, tint: 0x888888 }, // Unstable lighting { brightness: 0.2, contrast: 2.0, saturation: 0.1, tint: 0x666666 } // Almost black and white ]; function changeYuiBackground(sceneIndex) { // Create new background with fade effect for Yui's route var newYuiBackground = game.addChild(LK.getAsset('schoolcorridor', { x: 0, y: 0, alpha: 0 // Start invisible for fade in })); // Send background to back game.setChildIndex(newYuiBackground, 0); // Apply psychological filter effects based on scene progression var filterSettings = yuiBackgroundFilters[Math.min(sceneIndex, yuiBackgroundFilters.length - 1)]; newYuiBackground.tint = filterSettings.tint; // Fade in new background tween(newYuiBackground, { alpha: filterSettings.brightness }, { duration: 1000, easing: tween.easeInOut, onFinish: function onFinish() { // Destroy old background after fade completes if (currentYuiBackground) { currentYuiBackground.destroy(); } currentYuiBackground = newYuiBackground; } }); // Fade out old background if it exists if (currentYuiBackground) { tween(currentYuiBackground, { alpha: 0 }, { duration: 700, easing: tween.easeInOut }); } else { currentYuiBackground = newYuiBackground; } } game.startYuiHiddenRoute = function () { // Stop romantic music LK.stopMusic(); // Clear any existing scene if (romanticScene) { romanticScene.destroy(); romanticScene = null; } if (currentBackground) { currentBackground.destroy(); currentBackground = null; } isInRomanticScene = false; character.hide(); // Start Yui's route var yuiSceneIndex = 0; function showYuiScene() { if (yuiSceneIndex >= yuiHiddenRoute.length) { // End of Yui's route - show final message dialogSystem.showDialog('Narrador', 'Inicio de la ruta de Yui desbloqueado'); return; } var scene = yuiHiddenRoute[yuiSceneIndex]; changeYuiBackground(yuiSceneIndex); var dialog = scene.dialogs[0]; dialogSystem.showDialog(dialog.speaker, dialog.text); // Play YandereSong when Narrator says the opening line for Yui's hidden route if (dialog.speaker === 'Narrador' && dialog.text === 'En un rincón del pasillo, entre casilleros, una figura permanece inmóvil. Sus labios no se mueven. Pero su mirada... lo dice todo.') { LK.playMusic('yandereSong'); // Change background to theLocker for this specific scene if (currentYuiBackground) { currentYuiBackground.destroy(); } currentYuiBackground = game.addChild(LK.getAsset('theLocker', { x: 0, y: 0 })); // Send background to back game.setChildIndex(currentYuiBackground, 0); } // Play yuiAudioLine1 when Yui says her first thought dialog if (dialog.speaker === 'Yui' && dialog.text === '¿Así que ahora sonríes así por ella...?') { LK.getSound('yuiAudioLine1').play(); // Change background to theLockerOfYui for this specific scene if (currentYuiBackground) { currentYuiBackground.destroy(); } currentYuiBackground = game.addChild(LK.getAsset('theLockerOfYui', { x: 0, y: 0 })); // Send background to back game.setChildIndex(currentYuiBackground, 0); } // Play yuiAudioLine2 when Yui says her threatening thought dialog if (dialog.speaker === 'Yui' && dialog.text === 'Intenta quitármelo... y sufrirás las graves consecuencias.') { LK.getSound('yuiAudioLine2').play(); // Change background to threatofYui for this specific scene if (currentYuiBackground) { currentYuiBackground.destroy(); } currentYuiBackground = game.addChild(LK.getAsset('threatofYui', { x: 0, y: 0 })); // Send background to back game.setChildIndex(currentYuiBackground, 0); } // Play yuiAudioLine3 when Yui says her fourth thought dialog if (dialog.speaker === 'Yui' && dialog.text === 'Si yo no puedo tenerlo...') { LK.getSound('yuiAudioLine3').play(); // Change background to threatofYui for this specific scene if (currentYuiBackground) { currentYuiBackground.destroy(); } currentYuiBackground = game.addChild(LK.getAsset('threatofYui', { x: 0, y: 0 })); // Send background to back game.setChildIndex(currentYuiBackground, 0); } // Play yuiAudioLine4 when Yui says her fifth thought dialog if (dialog.speaker === 'Yui' && dialog.text === '...nadie más lo tendrá.') { LK.getSound('yuiAudioLine4').play(); // Change background to crazyInTheLocker for this specific scene if (currentYuiBackground) { currentYuiBackground.destroy(); } currentYuiBackground = game.addChild(LK.getAsset('crazyInTheLocker', { x: 0, y: 0 })); // Send background to back game.setChildIndex(currentYuiBackground, 0); } // Play yuiAudioLine5 when Yui says her sixth thought dialog if (dialog.speaker === 'Yui' && dialog.text === 'Satoshi, te conocí cuando éramos niños...') { LK.getSound('yuiAudioLine5').play(); // Change background to theLoveOfChildren for this specific scene if (currentYuiBackground) { currentYuiBackground.destroy(); } currentYuiBackground = game.addChild(LK.getAsset('theLoveOfChildren', { x: 0, y: 0 })); // Send background to back game.setChildIndex(currentYuiBackground, 0); } // Play yuiAudioLine6 when Yui says her seventh thought dialog if (dialog.speaker === 'Yui' && dialog.text === 'Jugábamos a las carreras, a las escondidas... Y a los novios...') { LK.getSound('yuiAudioLine6').play(); // Change background to theLoveOfChildren for this specific scene if (currentYuiBackground) { currentYuiBackground.destroy(); } currentYuiBackground = game.addChild(LK.getAsset('theLoveOfChildren', { x: 0, y: 0 })); // Send background to back game.setChildIndex(currentYuiBackground, 0); } // Play yuiAudioLine7 when Yui says her eighth thought dialog if (dialog.speaker === 'Yui' && dialog.text === 'Pero jamás pensé... que lo olvidarías.') { LK.getSound('yuiAudioLine7').play(); // Change background to cryingInTheLocker for this specific scene if (currentYuiBackground) { currentYuiBackground.destroy(); } currentYuiBackground = game.addChild(LK.getAsset('cryingInTheLocker', { x: 0, y: 0 })); // Send background to back game.setChildIndex(currentYuiBackground, 0); } // Change background to cryingInTheLocker when Narrator says the final line about childhood love rotting if (dialog.speaker === 'Narrador' && dialog.text === 'El amor de la infancia... no siempre se desvanece. A veces... se pudre.') { if (currentYuiBackground) { currentYuiBackground.destroy(); } currentYuiBackground = game.addChild(LK.getAsset('cryingInTheLocker', { x: 0, y: 0 })); // Send background to back game.setChildIndex(currentYuiBackground, 0); } yuiSceneIndex++; } // Override nextDialog for Yui's route var originalNextDialog = game.nextDialog; game.nextDialog = function () { showYuiScene(); // Restore original nextDialog after Yui's route ends if (yuiSceneIndex >= yuiHiddenRoute.length) { game.nextDialog = originalNextDialog; } }; // Start Yui's route showYuiScene(); }; // Add game state to global for debugging game.currentChoices = currentChoices; // Admin skip button for instant stage bypass var adminSkipButton = LK.gui.topLeft.addChild(LK.getAsset('titleButton', { anchorX: 0, anchorY: 0, x: 120, // Avoid top-left 100x100 px reserved area y: 20, scaleX: 0.4, scaleY: 0.4, alpha: 0.3 // Semi-transparent to indicate admin function })); var skipText = new Text2('SKIP', { size: 60, fill: 0xffffff }); skipText.anchor.set(0.5, 0.5); skipText.x = adminSkipButton.x + adminSkipButton.width * 0.2; // Center on button skipText.y = adminSkipButton.y + adminSkipButton.height * 0.2; LK.gui.topLeft.addChild(skipText); adminSkipButton.down = function () { // Skip current stage based on game state if (!gameStarted) { // Skip title screen game.startMainGame(); } else if (isInMathEvaluation) { // Skip math evaluation with success game.startRomanticScene(); } else if (isInRomanticScene) { // Skip to Yui's hidden route game.startYuiHiddenRoute(); } else if (currentChoices.length > 0) { // Auto-select first choice to continue if (currentChoices[0]) { game.makeChoice(currentChoices[0]); } } else { // Skip current dialog/scene if (currentScene < storyScenes.length || selectedRoute && routeScenes[selectedRoute] && currentScene - storyScenes.length < routeScenes[selectedRoute].length) { // Skip to end of current scene var scene = getCurrentScene(); if (scene && scene.dialogs) { currentDialog = scene.dialogs.length - 1; } game.nextDialog(); } else { // Skip to ending showEnding(); } } };
/****
* Plugins
****/
var tween = LK.import("@upit/tween.v1");
var storage = LK.import("@upit/storage.v1");
/****
* Classes
****/
var Character = Container.expand(function () {
var self = Container.call(this);
var sprite = self.attachAsset('characterSprite', {
anchorX: 0.5,
anchorY: 1,
x: 280,
y: 2732 - 700
});
var sprite2 = self.attachAsset('characterSprite2', {
anchorX: 0.5,
anchorY: 1,
x: 280,
y: 2732 - 700
});
sprite2.visible = false;
var sprite3 = self.attachAsset('characterSprite3', {
anchorX: 0.5,
anchorY: 1,
x: 280,
y: 2732 - 700
});
sprite3.visible = false;
self.show = function (isDecisionMoment, isMotivated) {
sprite.tint = 0xffffff; // Always use white/no tint
if (isMotivated) {
sprite.visible = false;
sprite2.visible = false;
sprite3.visible = true;
// Add confident breathing animation for motivated state
tween(sprite3, {
scaleY: 1.02
}, {
duration: 2000,
easing: tween.easeInOut,
onFinish: function onFinish() {
tween(sprite3, {
scaleY: 1.0
}, {
duration: 2000,
easing: tween.easeInOut,
onFinish: arguments.callee // Loop the animation
});
}
});
} else if (isDecisionMoment) {
sprite.visible = false;
sprite2.visible = true;
sprite3.visible = false;
// Add nervous breathing animation for decision moments
tween(sprite2, {
scaleY: 1.01
}, {
duration: 1500,
easing: tween.easeInOut,
onFinish: function onFinish() {
tween(sprite2, {
scaleY: 1.0
}, {
duration: 1500,
easing: tween.easeInOut,
onFinish: arguments.callee // Loop the animation
});
}
});
} else {
sprite.visible = true;
sprite2.visible = false;
sprite3.visible = false;
// Add gentle breathing animation for normal state
tween(sprite, {
scaleY: 1.005
}, {
duration: 3000,
easing: tween.easeInOut,
onFinish: function onFinish() {
tween(sprite, {
scaleY: 1.0
}, {
duration: 3000,
easing: tween.easeInOut,
onFinish: arguments.callee // Loop the animation
});
}
});
}
self.visible = true;
};
self.hide = function () {
self.visible = false;
};
return self;
});
var ChoiceSystem = Container.expand(function () {
var self = Container.call(this);
var choices = [];
self.showChoices = function (choiceOptions) {
self.clearChoices();
// Check if this is the first scene with crossroads choices
if (currentScene === 0 && choiceOptions.length === 2 && choiceOptions[0].text === 'Contarle todo a mamá' && choiceOptions[1].text === 'Mantenerlo en secreto') {
// Play crossroads song for this specific choice moment
LK.stopMusic();
LK.playMusic('theCrossroadsSong');
}
// Check if this is the school scene with three route choices
if (currentScene === 2 && choiceOptions.length === 3 && choiceOptions[0].text === 'Acercarme a Aiko' && choiceOptions[1].text === 'Hablar con Yui' && choiceOptions[2].text === 'Seguir a Hikari') {
// Play crossroads song for this specific choice moment
LK.stopMusic();
LK.playMusic('theCrossroadsSong');
}
// Check if this is Aiko route tutoring choice moment
if (currentScene === 3 && choiceOptions.length === 2 && choiceOptions[0].text === 'Pedirle que sea mi tutora' && choiceOptions[1].text === 'Sugerir estudiar juntos como amigos') {
// Play crossroads song for this specific choice moment
LK.stopMusic();
LK.playMusic('theCrossroadsSong');
}
// Update character sprite for decision moment if Satoshi is visible
if (selectedRoute && character.visible) {
character.show(true);
}
for (var i = 0; i < choiceOptions.length; i++) {
var choice = choiceOptions[i];
var choiceBtn = self.attachAsset('choiceButton', {
anchorX: 0.5,
anchorY: 0.5,
x: 1024,
y: 1200 + i * 300
});
var choiceText = new Text2(choice.text, {
size: 85,
fill: 0x000000,
wordWrap: true,
wordWrapWidth: 750
});
choiceText.anchor.set(0.5, 0.5);
choiceText.x = choiceBtn.x;
choiceText.y = choiceBtn.y;
self.addChild(choiceText);
choiceBtn.choiceData = choice;
choiceBtn.down = function () {
game.makeChoice(this.choiceData);
};
choices.push({
btn: choiceBtn,
text: choiceText
});
}
self.visible = true;
};
self.clearChoices = function () {
for (var i = 0; i < choices.length; i++) {
choices[i].btn.destroy();
choices[i].text.destroy();
}
choices = [];
self.visible = false;
};
return self;
});
var DialogSystem = Container.expand(function () {
var self = Container.call(this);
// Dialog box
var dialogBox = self.attachAsset('dialogBox', {
anchorX: 0.5,
anchorY: 1,
x: 1024,
y: 2732 - 200
});
// Variables for text acceleration
var isDialogPressed = false;
var normalTypewriterDelay = 50;
var fastTypewriterDelay = 10;
// Name box
var nameBox = self.attachAsset('nameBox', {
anchorX: 0,
anchorY: 1,
x: 50,
y: 2732 - 600
});
// Texts
var nameText = new Text2('', {
size: 80,
fill: 0x000000
});
nameText.anchor.set(0.5, 0.5);
nameText.x = nameBox.x + 200;
nameText.y = nameBox.y - 40;
self.addChild(nameText);
var dialogText = new Text2('', {
size: 90,
fill: 0x000000,
wordWrap: true,
wordWrapWidth: 1400
});
dialogText.anchor.set(0, 0);
dialogText.x = dialogBox.x - 900;
dialogText.y = dialogBox.y - 280;
self.addChild(dialogText);
// Next button
var nextBtn = self.attachAsset('nextButton', {
anchorX: 0.5,
anchorY: 0.5,
x: 1750,
y: 2732 - 350
});
var nextText = new Text2('', {
size: 85,
fill: 0x000000
});
nextText.anchor.set(0.5, 0.5);
nextText.x = nextBtn.x;
nextText.y = nextBtn.y;
self.addChild(nextText);
self.showDialog = function (speaker, text) {
nameText.setText(speaker);
// Clear previous text and hide next button during typing
dialogText.setText('');
nextBtn.visible = false;
nextText.visible = false;
nextBtn.alpha = 0;
nextText.alpha = 0;
nextBtn.interactive = false;
self.visible = true;
// Add emotional emphasis animations based on content
if (text.includes('¡') || text.includes('?') || text.includes('...')) {
// Add subtle text pulsing for emotional dialog
var _emotionalPulse = function emotionalPulse() {
tween(dialogText, {
scaleX: 1.01,
scaleY: 1.01
}, {
duration: 1000,
easing: tween.easeInOut,
onFinish: function onFinish() {
tween(dialogText, {
scaleX: 1.0,
scaleY: 1.0
}, {
duration: 1000,
easing: tween.easeInOut,
onFinish: _emotionalPulse
});
}
});
};
// Start emotional pulse after text appears
LK.setTimeout(_emotionalPulse, 500);
}
// Reset acceleration state
isDialogPressed = false;
// Typewriter effect variables
var currentCharIndex = 0;
var typewriterDelay = normalTypewriterDelay;
// Function to add next character
function addNextCharacter() {
if (currentCharIndex < text.length) {
dialogText.setText(text.substring(0, currentCharIndex + 1));
currentCharIndex++;
// Use current delay based on press state
typewriterDelay = isDialogPressed ? fastTypewriterDelay : normalTypewriterDelay;
// Schedule next character
LK.setTimeout(addNextCharacter, typewriterDelay);
} else {
// Typing complete - show next button unless GAME OVER
if (speaker === 'GAME OVER') {
nextBtn.visible = false;
nextText.visible = false;
} else {
nextBtn.visible = true;
nextText.visible = true;
// Fade in the button with tween
tween(nextBtn, {
alpha: 1
}, {
duration: 500,
easing: tween.easeOut,
onFinish: function onFinish() {
nextBtn.interactive = true;
}
});
tween(nextText, {
alpha: 1
}, {
duration: 500,
easing: tween.easeOut
});
}
}
}
// Start typewriter effect
addNextCharacter();
};
self.hide = function () {
self.visible = false;
};
// Dialog box press handlers for text acceleration
dialogBox.down = function () {
isDialogPressed = true;
};
dialogBox.up = function () {
isDialogPressed = false;
};
nextBtn.down = function () {
if (game.currentChoices.length > 0) {
game.showChoices();
} else {
game.nextDialog();
}
};
return self;
});
var MathEvaluation = Container.expand(function () {
var self = Container.call(this);
var currentInputIndex = 0;
var answers = ['', '', '', ''];
var problems = [{
question: '8 + 5 = ',
answer: '13'
}, {
question: '12 - 4 = ',
answer: '8'
}, {
question: '3 × 6 = ',
answer: '18'
}, {
question: '16 ÷ 4 = ',
answer: '4'
}];
var inputFields = [];
var questionTexts = [];
// Background
var mathBackground = self.attachAsset('mathEvaluationBackground', {
x: 0,
y: 0
});
// Grid lines for notebook effect
for (var i = 0; i < 50; i++) {
var gridLine = self.attachAsset('gridLine', {
x: 0,
y: i * 50,
scaleX: 40
});
}
// Aiko character
var aikoSprite = self.attachAsset('aikoEvaluation', {
anchorX: 0.5,
anchorY: 1,
x: 1700,
y: 1200,
scaleX: 0.8,
scaleY: 0.8
});
// Title
var titleText = new Text2('Evaluación Matemática', {
size: 120,
fill: 0x000000
});
titleText.anchor.set(0.5, 0);
titleText.x = 1024;
titleText.y = 200;
self.addChild(titleText);
// Create problems and input fields
for (var i = 0; i < problems.length; i++) {
var questionText = new Text2(i + 1 + '. ' + problems[i].question, {
size: 100,
fill: 0x000000
});
questionText.anchor.set(0, 0.5);
questionText.x = 300;
questionText.y = 500 + i * 200;
self.addChild(questionText);
questionTexts.push(questionText);
var inputField = self.attachAsset('mathEvaluationInput', {
anchorX: 0.5,
anchorY: 0.5,
x: 900,
y: 500 + i * 200
});
var inputText = new Text2('', {
size: 80,
fill: 0x000000
});
inputText.anchor.set(0.5, 0.5);
inputText.x = inputField.x;
inputText.y = inputField.y;
self.addChild(inputText);
inputField.inputText = inputText;
inputField.problemIndex = i;
inputField.down = function () {
currentInputIndex = this.problemIndex;
};
inputFields.push({
field: inputField,
text: inputText
});
}
// Number buttons
var numberButtons = [];
for (var i = 0; i <= 9; i++) {
var numBtn = self.attachAsset('mathEvaluationButton', {
anchorX: 0.5,
anchorY: 0.5,
x: 200 + i % 5 * 120,
y: 1600 + Math.floor(i / 5) * 100
});
var numText = new Text2(i.toString(), {
size: 60,
fill: 0xffffff
});
numText.anchor.set(0.5, 0.5);
numText.x = numBtn.x;
numText.y = numBtn.y;
self.addChild(numText);
numBtn.number = i;
numBtn.down = function () {
if (answers[currentInputIndex].length < 3) {
answers[currentInputIndex] += this.number.toString();
inputFields[currentInputIndex].text.setText(answers[currentInputIndex]);
}
};
numberButtons.push(numBtn);
}
// Clear button
var clearBtn = self.attachAsset('mathEvaluationButton', {
anchorX: 0.5,
anchorY: 0.5,
x: 800,
y: 1600
});
var clearText = new Text2('Borrar', {
size: 50,
fill: 0xffffff
});
clearText.anchor.set(0.5, 0.5);
clearText.x = clearBtn.x;
clearText.y = clearBtn.y;
self.addChild(clearText);
clearBtn.down = function () {
answers[currentInputIndex] = '';
inputFields[currentInputIndex].text.setText('');
};
// Submit button
var submitBtn = self.attachAsset('mathEvaluationButton', {
anchorX: 0.5,
anchorY: 0.5,
x: 1000,
y: 1600,
scaleX: 1.5
});
var submitText = new Text2('Listo', {
size: 60,
fill: 0xffffff
});
submitText.anchor.set(0.5, 0.5);
submitText.x = submitBtn.x;
submitText.y = submitBtn.y;
self.addChild(submitText);
submitBtn.down = function () {
var allCorrect = true;
for (var i = 0; i < problems.length; i++) {
if (answers[i] !== problems[i].answer) {
allCorrect = false;
break;
}
}
if (allCorrect) {
game.startRomanticScene();
} else {
// Handle incorrect answers - show failure scene
game.startMathEvaluationFailure();
}
};
return self;
});
var RomanticScene = Container.expand(function () {
var self = Container.call(this);
var currentRomanticDialog = 0;
var romanticDialogs = [{
speaker: 'Aiko',
text: '...¿Todas correctas? Hmm... No está mal, para alguien como vos.'
}, {
speaker: 'Aiko',
text: 'Vamos.',
action: 'transition'
}, {
speaker: 'Aiko',
text: '¿Sabés algo? No esperaba sentirme así después de enseñarle a alguien como vos.'
}, {
speaker: 'Aiko',
text: 'Pero... hay algo que me gusta de tu esfuerzo. ...Y de tus ojos tontos también.'
}, {
speaker: 'Aiko',
text: 'Eso fue por aprobar mi prueba.',
action: 'kiss'
}];
// Classroom at sunset background
var sunsetBackground = self.attachAsset('aulaAtardecer', {
x: 0,
y: 0
});
// Aiko character - hidden by default since this is not math evaluation
var aikoSprite = self.attachAsset('aikoEvaluation', {
anchorX: 0.5,
anchorY: 1,
x: 1400,
y: 2200,
visible: false
});
self.showRomanticDialog = function () {
if (currentRomanticDialog >= romanticDialogs.length) {
self.showFinalChoices();
return;
}
var dialog = romanticDialogs[currentRomanticDialog];
dialogSystem.showDialog(dialog.speaker, dialog.text);
// Play aikoAudioLine5 when Aiko says the specific dialog about all correct answers
if (dialog.speaker === 'Aiko' && dialog.text === '...¿Todas correctas? Hmm... No está mal, para alguien como vos.') {
LK.getSound('aikoAudioLine5').play();
}
// Play aikoAudioLine6 when Aiko says "Vamos."
if (dialog.speaker === 'Aiko' && dialog.text === 'Vamos.') {
LK.getSound('audioAikoLine6').play();
}
// Play aikoAudioLine7 when Aiko says the specific dialog about unexpected feelings
if (dialog.speaker === 'Aiko' && dialog.text === '¿Sabés algo? No esperaba sentirme así después de enseñarle a alguien como vos.') {
LK.getSound('aikoAudioLine7').play();
}
// Play aikoAudioLine8 when Aiko says dialog about effort and silly eyes
if (dialog.speaker === 'Aiko' && dialog.text === 'Pero... hay algo que me gusta de tu esfuerzo. ...Y de tus ojos tontos también.') {
LK.getSound('aikoAudioLine8').play();
}
// Play kiss sound effect followed by aikoAudioLine9 when Aiko says kiss dialog
if (dialog.speaker === 'Aiko' && dialog.text === 'Eso fue por aprobar mi prueba.') {
var kissSound = LK.getSound('Kissonthecheek');
kissSound.play();
// Wait for kiss sound to finish completely before playing voice
LK.setTimeout(function () {
LK.getSound('aikoAudioLine9').play();
}, 3000); // Further increased timing to create clear separation between sounds
}
if (dialog.action === 'transition') {
// Change to cleaning room background with fade transition
var cleaningBackground = self.attachAsset('cuartoLimpiezaBackground', {
x: 0,
y: 0,
alpha: 0 // Start invisible
});
// Fade out sunset background and fade in cleaning background
tween(sunsetBackground, {
alpha: 0
}, {
duration: 600,
easing: tween.easeInOut,
onFinish: function onFinish() {
sunsetBackground.destroy();
}
});
tween(cleaningBackground, {
alpha: 1
}, {
duration: 800,
easing: tween.easeInOut
});
// Keep aikoEvaluation hidden during romantic scene
self.setChildIndex(aikoSprite, self.children.length - 1);
// Ensure dialog system and choice system are visible and in front
if (dialogSystem) {
game.setChildIndex(dialogSystem, game.children.length - 1);
dialogSystem.visible = true;
}
if (choiceSystem) {
game.setChildIndex(choiceSystem, game.children.length - 1);
choiceSystem.visible = true;
}
currentRomanticDialog++;
} else if (dialog.text === '¿Sabés algo? No esperaba sentirme así después de enseñarle a alguien como vos.') {
// Change background to school corridor for this specific dialog with fade
var corridorBackground = self.attachAsset('schoolcorridor', {
x: 0,
y: 0,
alpha: 0 // Start invisible
});
// Send background to back
self.setChildIndex(corridorBackground, 0);
// Fade out old background
if (self.children.length > 1 && self.children[0].destroy) {
var oldBackground = self.children[0];
tween(oldBackground, {
alpha: 0
}, {
duration: 600,
easing: tween.easeInOut,
onFinish: function onFinish() {
oldBackground.destroy();
}
});
}
// Fade in corridor background
tween(corridorBackground, {
alpha: 1
}, {
duration: 800,
easing: tween.easeInOut
});
// Keep aikoEvaluation hidden during romantic scene
self.setChildIndex(aikoSprite, self.children.length - 1);
// Ensure dialog system and choice system are visible and in front
if (dialogSystem) {
game.setChildIndex(dialogSystem, game.children.length - 1);
dialogSystem.visible = true;
}
if (choiceSystem) {
game.setChildIndex(choiceSystem, game.children.length - 1);
choiceSystem.visible = true;
}
currentRomanticDialog++;
} else if (dialog.text === 'Eso fue por aprobar mi prueba.') {
// Change background to AikoKiss for this specific dialog with romantic fade
var kissBackground = self.attachAsset('AikoKiss', {
x: 0,
y: 0,
alpha: 0 // Start invisible for dramatic reveal
});
// Send background to back
self.setChildIndex(kissBackground, 0);
// Fade out old background
if (self.children.length > 1 && self.children[0].destroy) {
var oldBackground = self.children[0];
tween(oldBackground, {
alpha: 0
}, {
duration: 500,
easing: tween.easeInOut,
onFinish: function onFinish() {
oldBackground.destroy();
}
});
}
// Fade in kiss background with romantic timing
tween(kissBackground, {
alpha: 1
}, {
duration: 1000,
easing: tween.easeInOut
});
// Show kiss effect
LK.effects.flashScreen(0xff69b4, 500);
var kissText = new Text2('Satoshi ha sido besado por primera vez.', {
size: 80,
fill: 0xff1493
});
kissText.anchor.set(0.5, 0.5);
kissText.x = 1024;
kissText.y = 1366;
self.addChild(kissText);
currentRomanticDialog++;
} else if (dialog.action === 'kiss') {
// Show kiss effect
LK.effects.flashScreen(0xff69b4, 500);
var kissText = new Text2('Satoshi ha sido besado por primera vez.', {
size: 80,
fill: 0xff1493
});
kissText.anchor.set(0.5, 0.5);
kissText.x = 1024;
kissText.y = 1366;
self.addChild(kissText);
currentRomanticDialog++;
} else {
currentRomanticDialog++;
}
};
self.showFinalChoices = function () {
dialogSystem.hide();
// Play crossroads music for the final romantic choice moment
LK.stopMusic();
LK.playMusic('theCrossroadsSong');
var finalChoices = [{
text: 'Aiko... quiero más que un beso.',
type: 'romantic'
}, {
text: 'No... no puedo hacer esto contigo.',
type: 'reject'
}];
choiceSystem.showChoices(finalChoices);
};
return self;
});
var TitleScreen = Container.expand(function () {
var self = Container.call(this);
// Background
var spaceBackground = self.attachAsset('titleSpaceBackground', {
x: 0,
y: 0
});
// Stars array for twinkling effect
var stars = [];
for (var i = 0; i < 50; i++) {
var star = self.attachAsset('titleStar', {
anchorX: 0.5,
anchorY: 0.5,
x: Math.random() * 2048,
y: Math.random() * 2732
});
stars.push(star);
}
// Hyperstar setup
var hyperStar = self.attachAsset('titleHyperStar', {
anchorX: 0.5,
anchorY: 0.5,
x: Math.random() * 2048,
y: Math.random() * 2732,
alpha: 0
});
// Logo setup (starts tiny)
var logo = self.attachAsset('titleScreenLogo', {
anchorX: 0.5,
anchorY: 0.5,
x: 1024,
y: 800,
scaleX: 0.1,
scaleY: 0.1
});
// Start button (starts off screen)
var startButton = self.attachAsset('titleStartButton', {
anchorX: 0.5,
anchorY: 0.5,
x: 1024,
y: -500
});
// Earth for transition
var earth = self.attachAsset('titleEarth', {
anchorX: 0.5,
anchorY: 0.5,
x: 1024,
y: 2000,
scaleX: 0.3,
scaleY: 0.3
});
// Cat setup
var catSprites = ['titleCatFloat', 'titleCatJump', 'titleCatMeow', 'titleCatPlay', 'titleCatSleep', 'titleCatEat'];
var currentCatSprite = 0;
var catTouchCount = 0;
var catAngry = false;
var catRemoved = false;
var cat = self.attachAsset('titleCatFloat', {
anchorX: 0.5,
anchorY: 0.5,
x: 300,
y: 1200,
scaleX: 1.5,
scaleY: 1.5
});
var catVelocityX = 1;
var catVelocityY = 0.5;
// Cat spaceship (hidden initially)
var catSpaceship = self.attachAsset('titleCatSpaceship', {
anchorX: 0.5,
anchorY: 0.5,
x: -300,
y: cat.y,
scaleX: 1.2,
scaleY: 1.2,
visible: false
});
// Timers
var starTwinkleTimer = 0;
var hyperStarTimer = 0;
var catAnimationTimer = 0;
var hyperStarActive = false;
// Initialize animations
self.initAnimations = function () {
// Logo grow animation
tween(logo, {
scaleX: 1.0,
scaleY: 1.0
}, {
duration: 2000,
easing: tween.elasticOut
});
// Start button bounce in
tween(startButton, {
y: 1800
}, {
duration: 1500,
easing: tween.bounceOut
});
};
self.update = function () {
if (catRemoved) return;
// Star twinkling
starTwinkleTimer++;
if (starTwinkleTimer % 60 === 0) {
var randomStar = stars[Math.floor(Math.random() * stars.length)];
tween(randomStar, {
alpha: 0.3
}, {
duration: 300,
onFinish: function onFinish() {
tween(randomStar, {
alpha: 1
}, {
duration: 300
});
}
});
}
// Additional star twinkling for more frequent blinking
if (starTwinkleTimer % 30 === 0) {
var randomStar2 = stars[Math.floor(Math.random() * stars.length)];
tween(randomStar2, {
alpha: 0.1
}, {
duration: 200,
onFinish: function onFinish() {
tween(randomStar2, {
alpha: 1
}, {
duration: 400
});
}
});
}
// Continuous gentle twinkling for all stars
if (starTwinkleTimer % 15 === 0) {
for (var i = 0; i < stars.length; i++) {
if (Math.random() < 0.3) {
// 30% chance for each star
var star = stars[i];
tween(star, {
alpha: 0.5 + Math.random() * 0.5
}, {
duration: 500 + Math.random() * 1000
});
}
}
}
// Hyperstar movement
hyperStarTimer++;
if (hyperStarTimer % 900 === 0) {
// Every 15 seconds
if (!hyperStarActive) {
hyperStarActive = true;
hyperStar.x = Math.random() * 2048;
hyperStar.y = Math.random() * 2732;
tween(hyperStar, {
alpha: 1
}, {
duration: 500,
onFinish: function onFinish() {
var targetX = Math.random() * 2048;
var targetY = Math.random() * 2732;
tween(hyperStar, {
x: targetX,
y: targetY
}, {
duration: 2000,
easing: tween.linear,
onFinish: function onFinish() {
tween(hyperStar, {
alpha: 0
}, {
duration: 500,
onFinish: function onFinish() {
hyperStarActive = false;
}
});
}
});
}
});
}
}
// Cat floating movement
if (!catAngry) {
cat.x += catVelocityX;
cat.y += catVelocityY;
// Bounce off edges
if (cat.x <= 100 || cat.x >= 1948) {
catVelocityX *= -1;
}
if (cat.y <= 100 || cat.y >= 2632) {
catVelocityY *= -1;
}
// Random sprite change
catAnimationTimer++;
if (catAnimationTimer % 180 === 0) {
currentCatSprite = (currentCatSprite + 1) % catSprites.length;
cat.destroy();
cat = self.attachAsset(catSprites[currentCatSprite], {
anchorX: 0.5,
anchorY: 0.5,
x: cat.x,
y: cat.y,
scaleX: 1.5,
scaleY: 1.5
});
// Re-add touch handler
cat.down = function () {
if (catRemoved) return;
catTouchCount++;
if (catTouchCount >= 10 && !catAngry) {
self.makeCatAngry();
}
};
}
}
};
self.makeCatAngry = function () {
catAngry = true;
cat.destroy();
cat = self.attachAsset('titleCatAngry', {
anchorX: 0.5,
anchorY: 0.5,
x: cat.x,
y: cat.y,
scaleX: 1.5,
scaleY: 1.5
});
// After 1 second, show spaceship
LK.setTimeout(function () {
catSpaceship.visible = true;
catSpaceship.y = cat.y;
// Move spaceship to cat
tween(catSpaceship, {
x: cat.x - 100
}, {
duration: 2000,
easing: tween.linear,
onFinish: function onFinish() {
// Move cat and spaceship to Earth
tween(cat, {
x: earth.x,
y: earth.y,
scaleX: 0.3,
scaleY: 0.3
}, {
duration: 3000,
easing: tween.easeInOut
});
tween(catSpaceship, {
x: earth.x,
y: earth.y,
scaleX: 0.3,
scaleY: 0.3
}, {
duration: 3000,
easing: tween.easeInOut,
onFinish: function onFinish() {
cat.visible = false;
catSpaceship.visible = false;
catRemoved = true;
}
});
}
});
}, 1000);
};
// Start button handler
startButton.down = function () {
// Zoom to Earth transition
tween(earth, {
scaleX: 50,
scaleY: 50
}, {
duration: 2000,
easing: tween.easeInOut,
onFinish: function onFinish() {
game.startMainGame();
}
});
// Zoom cat and move it in random direction if not removed
if (!catRemoved) {
// Random direction: 0-7 (8 directions: edges and corners)
var direction = Math.floor(Math.random() * 8);
var targetX, targetY;
// Calculate target position based on direction
switch (direction) {
case 0:
// Left edge
targetX = -300;
targetY = cat.y;
break;
case 1:
// Right edge
targetX = 2348;
targetY = cat.y;
break;
case 2:
// Top edge
targetX = cat.x;
targetY = -300;
break;
case 3:
// Bottom edge
targetX = cat.x;
targetY = 3032;
break;
case 4:
// Top-left corner
targetX = -300;
targetY = -300;
break;
case 5:
// Top-right corner
targetX = 2348;
targetY = -300;
break;
case 6:
// Bottom-left corner
targetX = -300;
targetY = 3032;
break;
case 7:
// Bottom-right corner
targetX = 2348;
targetY = 3032;
break;
}
// Apply much faster zoom and movement to cat
tween(cat, {
scaleX: 100,
scaleY: 100,
x: targetX,
y: targetY
}, {
duration: 500,
easing: tween.easeInOut,
onFinish: function onFinish() {
cat.visible = false;
}
});
}
};
// Cat touch handler
cat.down = function () {
if (catRemoved) return;
catTouchCount++;
if (catTouchCount >= 10 && !catAngry) {
self.makeCatAngry();
}
};
return self;
});
var WelcomeScreen = Container.expand(function () {
var self = Container.call(this);
var playerName = '';
var isCapitalized = false;
var keyboardMode = 'letters'; // 'letters', 'symbols1', 'symbols2'
// Background
var background = self.attachAsset('titleSpaceBackground', {
x: 0,
y: 0
});
// Welcome text
var welcomeText = new Text2('¡BIENVENIDO!', {
size: 140,
fill: 0xffffff
});
welcomeText.anchor.set(0.5, 0.5);
welcomeText.x = 1024;
welcomeText.y = 500;
self.addChild(welcomeText);
// Question text
var questionText = new Text2('¿Cuál es tu nombre?', {
size: 100,
fill: 0xffffff
});
questionText.anchor.set(0.5, 0.5);
questionText.x = 1024;
questionText.y = 650;
self.addChild(questionText);
// Name display box
var nameBox = self.attachAsset('inputField', {
anchorX: 0.5,
anchorY: 0.5,
x: 1024,
y: 800
});
var nameDisplayText = new Text2('', {
size: 80,
fill: 0x000000
});
nameDisplayText.anchor.set(0.5, 0.5);
nameDisplayText.x = nameBox.x;
nameDisplayText.y = nameBox.y;
self.addChild(nameDisplayText);
// Keyboard container
var keyboard = new Container();
self.addChild(keyboard);
var keys = [];
// Letter layouts
var letterLayout = [['!#1', 'Q', 'W', 'E', 'R', 'T', 'Y', 'U', 'I', 'O', 'P'], ['A', 'S', 'D', 'F', 'G', 'H', 'J', 'K', 'L', 'Ñ'], ['SHIFT', 'Z', 'X', 'C', 'V', 'B', 'N', 'M', '←'], ['1', '2', '3', '4', '5', '6', '7', '8', '9', '0'], [',', 'SPACE', '.', 'ENTER']];
var symbols1Layout = [['ABC', '1', '2', '3', '4', '5', '6', '7', '8', '9', '0'], ['@', '#', '$', '%', '&', '*', '-', '+', '(', ')'], ['!', '"', "'", ':', ';', '/', '¿', '?', '¡', '=', '←'], ['SPACE', '.', '1/2', 'ENTER']];
var symbols2Layout = [['ABC', '[', ']', '{', '}', '<', '>', '^', '_', '`', '~'], ['|', '\\', '°', '¬', '·', '•', '¶', '§', '×', '÷'], ['€', '£', '¥', '¢', '©', '®', '™', '♡', '♥', '←'], ['SPACE', ',', '2/2', 'ENTER']];
function createKeyboard() {
// Clear existing keys
for (var i = 0; i < keys.length; i++) {
keys[i].btn.destroy();
keys[i].text.destroy();
}
keys = [];
var layout = keyboardMode === 'letters' ? letterLayout : keyboardMode === 'symbols1' ? symbols1Layout : symbols2Layout;
var startY = 1200;
var keyWidth = 160;
var keyHeight = 120;
var keySpacing = 10;
for (var row = 0; row < layout.length; row++) {
var rowKeys = layout[row];
var totalRowWidth = rowKeys.length * keyWidth + (rowKeys.length - 1) * keySpacing;
var startX = (2048 - totalRowWidth) / 2;
for (var col = 0; col < rowKeys.length; col++) {
var keyText = rowKeys[col];
var keyBtn = keyboard.attachAsset('mathEvaluationButton', {
anchorX: 0.5,
anchorY: 0.5,
x: startX + col * (keyWidth + keySpacing) + keyWidth / 2,
y: startY + row * (keyHeight + keySpacing)
});
// Adjust special key widths
if (keyText === 'SPACE') {
keyBtn.scaleX = 3;
} else if (keyText === 'SHIFT' || keyText === 'ENTER' || keyText === 'ABC' || keyText === '!#1' || keyText.includes('/') || keyText === '←') {
keyBtn.scaleX = 1.2;
}
var displayText = keyText;
if (keyText === 'SPACE') displayText = ' ';
if (keyText === '←') displayText = '←';
if (keyText === 'SHIFT') displayText = '↑';
// Show lowercase letters when not in uppercase mode (letters only)
if (keyboardMode === 'letters' && keyText.length === 1 && keyText.match(/[A-ZÑ]/)) {
if (!isCapitalized && playerName.length > 0) {
displayText = keyText.toLowerCase();
} else {
displayText = keyText;
}
}
var keyLabel = new Text2(displayText, {
size: keyText === 'SPACE' ? 40 : 45,
fill: 0xffffff
});
keyLabel.anchor.set(0.5, 0.5);
keyLabel.x = keyBtn.x;
keyLabel.y = keyBtn.y;
keyboard.addChild(keyLabel);
keyBtn.keyValue = keyText;
keyBtn.down = function () {
handleKeyPress(this.keyValue);
};
keys.push({
btn: keyBtn,
text: keyLabel
});
}
}
}
function handleKeyPress(key) {
if (key === 'ENTER') {
if (playerName.length > 0) {
storage.playerName = playerName;
self.startTitleScreen();
}
} else if (key === '←') {
if (playerName.length > 0) {
playerName = playerName.substring(0, playerName.length - 1);
nameDisplayText.setText(playerName);
// Reset to uppercase if name becomes empty
if (playerName.length === 0) {
isCapitalized = false;
if (keyboardMode === 'letters') {
createKeyboard();
}
}
}
} else if (key === 'SHIFT') {
isCapitalized = !isCapitalized;
createKeyboard();
} else if (key === 'ABC' || key === '!#1') {
if (keyboardMode === 'letters') {
keyboardMode = 'symbols1';
} else {
keyboardMode = 'letters';
}
createKeyboard();
} else if (key === '1/2') {
console.log('Switching to symbols2 mode');
keyboardMode = 'symbols2';
createKeyboard();
} else if (key === '2/2') {
console.log('Switching back to symbols1 mode');
keyboardMode = 'symbols1';
createKeyboard();
} else if (key === 'SPACE') {
if (playerName.length < 20) {
playerName += ' ';
nameDisplayText.setText(playerName);
}
} else {
// Regular character input
if (playerName.length < 20) {
var charToAdd = key;
if (keyboardMode === 'letters' && key.length === 1 && key.match(/[A-ZÑ]/)) {
if (playerName.length === 0 || isCapitalized) {
charToAdd = key.toUpperCase();
// Auto-switch to lowercase after first character
if (playerName.length === 0) {
isCapitalized = false;
LK.setTimeout(function () {
createKeyboard();
}, 100);
}
} else {
charToAdd = key.toLowerCase();
}
}
playerName += charToAdd;
nameDisplayText.setText(playerName);
}
}
}
self.startTitleScreen = function () {
// Transition to title screen
self.visible = false;
game.showTitleScreen();
};
// Initialize with entrance animation
self.initAnimations = function () {
// Start everything very large (too close to see)
welcomeText.scaleX = 20;
welcomeText.scaleY = 20;
welcomeText.alpha = 0;
questionText.scaleX = 15;
questionText.scaleY = 15;
questionText.alpha = 0;
nameBox.scaleX = 10;
nameBox.scaleY = 10;
nameBox.alpha = 0;
nameDisplayText.scaleX = 10;
nameDisplayText.scaleY = 10;
nameDisplayText.alpha = 0;
keyboard.scaleX = 8;
keyboard.scaleY = 8;
keyboard.alpha = 0;
// Animate elements into view with depth effect
tween(welcomeText, {
scaleX: 1,
scaleY: 1,
alpha: 1
}, {
duration: 1000,
easing: tween.easeOut
});
LK.setTimeout(function () {
tween(questionText, {
scaleX: 1,
scaleY: 1,
alpha: 1
}, {
duration: 800,
easing: tween.easeOut
});
}, 300);
LK.setTimeout(function () {
tween(nameBox, {
scaleX: 1,
scaleY: 1,
alpha: 1
}, {
duration: 600,
easing: tween.easeOut
});
tween(nameDisplayText, {
scaleX: 1,
scaleY: 1,
alpha: 1
}, {
duration: 600,
easing: tween.easeOut
});
}, 600);
LK.setTimeout(function () {
// Position keyboard initially below screen
keyboard.y = 2732 + 600; // Start below screen
keyboard.scaleX = 1;
keyboard.scaleY = 1;
keyboard.alpha = 1;
// Create keyboard before animation starts
createKeyboard();
// Animate keyboard sliding up from bottom
tween(keyboard, {
y: 0
}, {
duration: 800,
easing: tween.easeOut
});
}, 600); // Start at same time as inputField
};
return self;
});
/****
* Initialize Game
****/
var game = new LK.Game({
backgroundColor: 0xffffff
});
/****
* Game Code
****/
// Game state
// Fondos
var currentScene = 0;
var currentDialog = 0;
var currentChoices = [];
var relationshipPoints = {
aiko: 0,
yui: 0,
hikari: 0,
respect: 0,
peace: 0,
academic: 0
};
var selectedRoute = null;
var currentBackground = null;
var mathEvaluation = null;
var romanticScene = null;
var isInMathEvaluation = false;
var isInRomanticScene = false;
var gameStarted = false;
// Welcome screen (shown first)
var welcomeScreen = game.addChild(new WelcomeScreen());
welcomeScreen.initAnimations();
// Title screen (initially hidden)
var titleScreen = game.addChild(new TitleScreen());
titleScreen.visible = false;
// Do not play title screen music during welcome screen
// UI Systems (initially hidden)
var dialogSystem = game.addChild(new DialogSystem());
var choiceSystem = game.addChild(new ChoiceSystem());
var character = game.addChild(new Character());
// Hide game elements initially
dialogSystem.visible = false;
choiceSystem.visible = false;
character.visible = false;
// Story data
var storyScenes = [{
background: 'habitacion',
dialogs: [{
speaker: 'Satoshi',
text: '¡Ya es mi último año de secundaria! Necesito encontrar novia antes de graduarme.'
}, {
speaker: 'Satoshi',
text: 'Pero primero... mejor hablo con mamá sobre mis planes.'
}],
choices: [{
text: 'Contarle todo a mamá',
effects: {
respect: 2,
peace: -1
}
}, {
text: 'Mantenerlo en secreto',
effects: {
peace: 2,
respect: -1
}
}]
}, {
background: 'calle',
dialogs: [{
speaker: 'Satoshi',
text: 'Camino a la escuela... Hoy conoceré a las chicas que podrían cambiar mi vida.'
}]
}, {
background: 'escuela',
dialogs: [{
speaker: 'Satoshi',
text: 'Aquí está la escuela. Veo tres chicas que me llaman la atención...'
}, {
speaker: 'Satoshi',
text: 'Aiko, la delegada seria... Yui, mi amiga de la infancia... y Hikari, la misteriosa.'
}],
choices: [{
text: 'Acercarme a Aiko',
route: 'aiko'
}, {
text: 'Hablar con Yui',
route: 'yui'
}, {
text: 'Seguir a Hikari',
route: 'hikari'
}]
}];
// Route-specific scenes
var routeScenes = {
aiko: [{
background: 'aula',
dialogs: [{
speaker: 'Aiko',
text: 'Satoshi-kun, necesitas ser más responsable con tus estudios.'
}, {
speaker: 'Satoshi',
text: 'Tienes razón, Aiko. ¿Me ayudarías a estudiar?'
}],
choices: [{
text: 'Pedirle que sea mi tutora',
effects: {
aiko: 3
}
}, {
text: 'Sugerir estudiar juntos como amigos',
effects: {
aiko: 1
}
}]
}, {
background: 'Aikosurprised',
dialogs: [{
speaker: 'Aiko',
text: '...¿Yo? ¿tu tutora?'
}, {
speaker: 'Aiko',
text: 'Está bien. Pero no quiero distracciones. Si no cumplís, se acaba el trato.',
backgroundChange: 'aula'
}, {
speaker: 'Satoshi',
text: '¡Lo prometo! Seré el alumno más aplicado que hayas visto.'
}]
}, {
background: 'aula',
dialogs: [{
speaker: 'Aiko',
text: 'Antes de seguir con estas sesiones, quiero comprobar cuánto sabés.',
action: 'startMathEval',
backgroundChange: 'Aikosmiling'
}, {
speaker: 'Aiko',
text: 'Nada complicado. Empecemos.'
}]
}],
yui: [{
background: 'patio',
dialogs: [{
speaker: 'Yui',
text: '¡Satoshi! Como en los viejos tiempos, ¿verdad?'
}, {
speaker: 'Satoshi',
text: 'Sí, Yui... pero ahora te veo diferente.'
}],
choices: [{
text: 'Confesarle mis sentimientos',
effects: {
yui: 3
}
}, {
text: 'Mantener la amistad por ahora',
effects: {
yui: 1
}
}]
}],
hikari: [{
background: 'aula2',
dialogs: [{
speaker: 'Hikari',
text: 'Te has dado cuenta de mí... interesante.'
}, {
speaker: 'Satoshi',
text: 'Hay algo especial en ti, Hikari.'
}],
choices: [{
text: 'Preguntarle sobre su misterio',
effects: {
hikari: 3
}
}, {
text: 'Invitarla a caminar',
effects: {
hikari: 2
}
}]
}]
};
function changeBackground(backgroundType) {
// Create new background with fade in effect
var newBackground = game.addChild(LK.getAsset(backgroundType, {
x: 0,
y: 0,
alpha: 0 // Start invisible for fade in
}));
// Send background to back
game.setChildIndex(newBackground, 0);
// Fade in new background
tween(newBackground, {
alpha: 1
}, {
duration: 800,
easing: tween.easeInOut,
onFinish: function onFinish() {
// Destroy old background after fade in completes
if (currentBackground) {
currentBackground.destroy();
}
currentBackground = newBackground;
}
});
// If there's an old background, fade it out while new one fades in
if (currentBackground) {
tween(currentBackground, {
alpha: 0
}, {
duration: 600,
easing: tween.easeInOut
});
} else {
// If no old background, just assign the new one
currentBackground = newBackground;
}
}
function showCurrentDialog() {
var scene = getCurrentScene();
if (!scene || !scene.dialogs || currentDialog >= scene.dialogs.length) {
if (scene && scene.choices) {
currentChoices = scene.choices;
choiceSystem.showChoices(scene.choices);
dialogSystem.hide();
} else {
nextScene();
}
return;
}
var dialog = scene.dialogs[currentDialog];
dialogSystem.showDialog(dialog.speaker, dialog.text);
// Play aikoAudioLine1 when Aiko says the specific dialog about being responsible
if (dialog.speaker === 'Aiko' && dialog.text === 'Satoshi-kun, necesitas ser más responsable con tus estudios.') {
LK.getSound('aikoAudioLine1').play();
}
// Play aikoAudioLine2 when Aiko says the tutoring dialog
if (dialog.speaker === 'Aiko' && dialog.text === '...¿Yo? ¿tu tutora?') {
LK.getSound('aikoAudioLine2').play();
}
// Play aikoAudioLine3 when Aiko says the deal dialog
if (dialog.speaker === 'Aiko' && dialog.text === 'Está bien. Pero no quiero distracciones. Si no cumplís, se acaba el trato.') {
LK.getSound('aikoAudioLine3').play();
}
// Play aikoAudioLine4 when Aiko says the evaluation dialog
if (dialog.speaker === 'Aiko' && dialog.text === 'Antes de seguir con estas sesiones, quiero comprobar cuánto sabés.') {
LK.getSound('aikoAudioLine4').play();
}
// Play aikoAudioLine5 when Aiko says the specific dialog about all correct answers
if (dialog.speaker === 'Aiko' && dialog.text === '...¿Todas correctas? Hmm... No está mal, para alguien como vos.') {
LK.getSound('aikoAudioLine5').play();
}
// Handle background changes within dialog
if (dialog.backgroundChange) {
changeBackground(dialog.backgroundChange);
}
// Before route selection: hide characterSprite, show full Satoshi
// After route selection: show characterSprite for Satoshi, hide for others
if (!selectedRoute) {
// Before route selection - always hide characterSprite
character.hide();
} else {
// After route selection - show characterSprite for Satoshi, hide for others
if (dialog.speaker === 'Satoshi') {
// Check if this is the specific promise dialog in Aiko route
var isMotivatedMoment = selectedRoute === 'aiko' && currentScene === 4 && currentDialog === 2 && dialog.text === '¡Lo prometo! Seré el alumno más aplicado que hayas visto.';
character.show(false, isMotivatedMoment);
} else {
character.hide();
}
}
choiceSystem.clearChoices();
}
function getCurrentScene() {
if (selectedRoute && routeScenes[selectedRoute]) {
var routeIndex = currentScene - storyScenes.length;
if (routeIndex >= 0 && routeIndex < routeScenes[selectedRoute].length) {
return routeScenes[selectedRoute][routeIndex];
}
}
if (currentScene < storyScenes.length) {
return storyScenes[currentScene];
}
return null;
}
function nextScene() {
currentScene++;
currentDialog = 0;
currentChoices = [];
// No auto-save - game resets on refresh
var scene = getCurrentScene();
if (scene) {
if (scene.background) {
changeBackground(scene.background);
}
showCurrentDialog();
} else {
showEnding();
}
}
function showEnding() {
var maxPoints = 0;
var winner = null;
if (selectedRoute) {
maxPoints = relationshipPoints[selectedRoute];
winner = selectedRoute;
}
var endingText = '';
if (maxPoints >= 3) {
endingText = '¡Felicidades! Has encontrado el amor verdadero con ' + (winner === 'aiko' ? 'Aiko' : winner === 'yui' ? 'Yui' : 'Hikari') + '!';
LK.showYouWin();
} else {
endingText = 'Aunque no encontraste el amor esta vez, aprendiste mucho sobre ti mismo.';
dialogSystem.showDialog('Narrador', endingText);
}
}
game.nextDialog = function () {
// If we're in romantic scene, continue with romantic dialog
if (isInRomanticScene && romanticScene) {
romanticScene.showRomanticDialog();
return;
}
var scene = getCurrentScene();
var dialog = scene && scene.dialogs ? scene.dialogs[currentDialog] : null;
if (dialog && dialog.action === 'startMathEval' && !isInMathEvaluation) {
game.startMathEvaluation();
return;
}
currentDialog++;
// No auto-save for dialog progress
showCurrentDialog();
};
game.startMathEvaluation = function () {
isInMathEvaluation = true;
dialogSystem.hide();
character.hide();
if (currentBackground) {
currentBackground.destroy();
}
// Play evaluation song during math test
LK.playMusic('evaluationSong');
mathEvaluation = game.addChild(new MathEvaluation());
};
game.startMathEvaluationFailure = function () {
isInMathEvaluation = false;
if (mathEvaluation) {
mathEvaluation.destroy();
mathEvaluation = null;
}
if (currentBackground) {
currentBackground.destroy();
}
// Stop music when player fails evaluation
LK.stopMusic();
// Change to cold, grey classroom
changeBackground('aula');
character.hide();
// Show Aiko's disappointed reaction with specific dialogs
var failureDialogs = [{
speaker: 'Aiko',
text: '...¿En serio?'
}, {
speaker: 'Aiko',
text: 'Pensé que podrías con algo tan simple. Pero está claro que puse expectativas demasiado altas en vos.'
}, {
speaker: 'Aiko',
text: 'Mejor andá a pedirle ayuda a tu mamá. Quizás con dibujos entiendas.'
}, {
speaker: 'GAME OVER',
text: '¡Por eso eres virgen!'
}];
var failureDialogIndex = 0;
function showFailureDialog() {
if (failureDialogIndex < failureDialogs.length) {
var dialog = failureDialogs[failureDialogIndex];
dialogSystem.showDialog(dialog.speaker, dialog.text);
failureDialogIndex++;
if (dialog.speaker === 'GAME OVER') {
LK.effects.flashScreen(0xff0000, 1000);
// Play game over sound effect when narrator says the virgin line
LK.getSound('gameOverEffect').play();
}
}
}
// Override nextDialog temporarily for failure sequence
var originalNextDialog = game.nextDialog;
game.nextDialog = function () {
showFailureDialog();
if (failureDialogIndex >= failureDialogs.length) {
// Restore original nextDialog
game.nextDialog = originalNextDialog;
}
};
showFailureDialog();
};
game.startRomanticScene = function () {
isInMathEvaluation = false;
isInRomanticScene = true;
if (mathEvaluation) {
mathEvaluation.destroy();
mathEvaluation = null;
}
if (currentBackground) {
currentBackground.destroy();
}
// Stop evaluation music and play romantic song when player passes evaluation
LK.stopMusic();
LK.playMusic('romanticSong');
romanticScene = game.addChild(new RomanticScene());
romanticScene.showRomanticDialog();
};
game.makeChoice = function (choice) {
// Handle romantic scene choices
if (isInRomanticScene && choice.type) {
choiceSystem.clearChoices();
if (choice.type === 'romantic') {
// Resume romantic music for positive choice
LK.stopMusic();
LK.playMusic('romanticSong');
// Show positive romantic outcome
if (romanticScene) {
romanticScene.destroy();
}
// Change background to AikoPoseOjou for this specific dialog with fade
var newBackground = game.addChild(LK.getAsset('AikoPoseOjou', {
x: 0,
y: 0,
alpha: 0 // Start invisible
}));
// Send background to back
game.setChildIndex(newBackground, 0);
// Fade out old background
if (currentBackground) {
tween(currentBackground, {
alpha: 0
}, {
duration: 600,
easing: tween.easeInOut,
onFinish: function onFinish() {
currentBackground.destroy();
currentBackground = newBackground;
}
});
}
// Fade in new background
tween(newBackground, {
alpha: 1
}, {
duration: 800,
easing: tween.easeInOut,
onFinish: function onFinish() {
if (!currentBackground) {
currentBackground = newBackground;
}
}
});
relationshipPoints.aiko += 2;
dialogSystem.showDialog('Aiko', '¿Más...? Sos más valiente de lo que pensaba. Pero antes de seguir... prométeme que vas a seguir estudiando conmigo.');
// Play aikoAudioLine10 when Aiko says the romantic choice dialog
LK.getSound('aikoAudioLine10').play();
// Override nextDialog to handle Yui's route transition
var originalNextDialog = game.nextDialog;
game.nextDialog = function () {
// Restore original nextDialog
game.nextDialog = originalNextDialog;
// Start Yui's hidden route
game.startYuiHiddenRoute();
};
} else if (choice.type === 'reject') {
// Stop music completely for rejection to emphasize gameOverEffect
LK.stopMusic();
// Show game over
if (romanticScene) {
romanticScene.destroy();
}
LK.effects.flashScreen(0xff0000, 1000);
dialogSystem.showDialog('GAME OVER', '¡Por eso eres virgen!');
// Play game over sound effect with clear musical space
LK.getSound('gameOverEffect').play();
}
return;
}
// Check if this is the first scene crossroads choice and restore music
if (currentScene === 0 && (choice.text === 'Contarle todo a mamá' || choice.text === 'Mantenerlo en secreto')) {
// Resume the beginning song after making the crossroads choice
LK.stopMusic();
LK.playMusic('theBeginningSong');
}
// Check if this is the school scene route choice and play school song
if (currentScene === 2 && (choice.text === 'Acercarme a Aiko' || choice.text === 'Hablar con Yui' || choice.text === 'Seguir a Hikari')) {
// Play school song after making route choice
LK.stopMusic();
LK.playMusic('theSchoolSong');
}
// Check if this is Aiko tutoring choice and resume school song
if (currentScene === 3 && (choice.text === 'Pedirle que sea mi tutora' || choice.text === 'Sugerir estudiar juntos como amigos')) {
// Resume the school song after making the tutoring choice
LK.stopMusic();
LK.playMusic('theSchoolSong');
}
// Reset character sprite to normal state
if (selectedRoute && character.visible) {
character.show(false);
}
if (choice.effects) {
for (var key in choice.effects) {
relationshipPoints[key] += choice.effects[key];
}
}
// Special handling for Aiko route choices
if (selectedRoute === 'aiko' && currentScene === 3) {
if (choice.text === 'Pedirle que sea mi tutora') {
relationshipPoints.academic += 1;
} else if (choice.text === 'Sugerir estudiar juntos como amigos') {
// Trigger immediate game over
dialogSystem.hide();
choiceSystem.clearChoices();
LK.effects.flashScreen(0xff0000, 1000);
dialogSystem.showDialog('GAME OVER', '¡Por eso eres virgen!');
return;
}
}
if (choice.route) {
selectedRoute = choice.route;
}
choiceSystem.clearChoices();
currentChoices = [];
nextScene();
};
game.showChoices = function () {
if (currentChoices.length > 0) {
choiceSystem.showChoices(currentChoices);
dialogSystem.hide();
}
};
game.showTitleScreen = function () {
// Hide welcome screen
welcomeScreen.visible = false;
// Play title screen music without looping when showing title screen
LK.playMusic('titleScreenSong', {
loop: false
});
// Show and initialize title screen
titleScreen.visible = true;
titleScreen.initAnimations();
};
game.startMainGame = function () {
if (gameStarted) return;
gameStarted = true;
// Stop title screen music
LK.stopMusic();
// Start the beginning song for Satoshi's room scene
LK.playMusic('theBeginningSong');
// Hide title screen
titleScreen.visible = false;
// Show game elements
dialogSystem.visible = true;
choiceSystem.visible = true;
character.visible = true;
// Restart button text removed - no color changes needed
// Initialize game
changeBackground('habitacion');
showCurrentDialog();
};
// Don't auto-start the game - wait for title screen
// Restart button in top-right corner
var restartButton = LK.gui.topRight.addChild(LK.getAsset('restartButton', {
anchorX: 1,
anchorY: 0,
x: -50,
y: 20,
scaleX: 0.6,
scaleY: 0.6
}));
// Restart button text removed - sprite is sufficient
restartButton.down = function () {
// Stop all music immediately for complete reset
LK.stopMusic();
// Clear all saved data
delete storage.currentScene;
delete storage.currentDialog;
delete storage.relationshipPoints;
delete storage.selectedRoute;
delete storage.playerName;
// Reset game state variables
currentScene = 0;
currentDialog = 0;
currentChoices = [];
relationshipPoints = {
aiko: 0,
yui: 0,
hikari: 0,
respect: 0,
peace: 0,
academic: 0
};
selectedRoute = null;
isInMathEvaluation = false;
isInRomanticScene = false;
gameStarted = false;
// Reset the nextDialog function to original state
game.nextDialog = function () {
// If we're in romantic scene, continue with romantic dialog
if (isInRomanticScene && romanticScene) {
romanticScene.showRomanticDialog();
return;
}
var scene = getCurrentScene();
var dialog = scene && scene.dialogs ? scene.dialogs[currentDialog] : null;
if (dialog && dialog.action === 'startMathEval' && !isInMathEvaluation) {
game.startMathEvaluation();
return;
}
currentDialog++;
// No auto-save for dialog progress
showCurrentDialog();
};
// Destroy any active special scenes and all screen elements
if (mathEvaluation) {
mathEvaluation.destroy();
mathEvaluation = null;
}
if (romanticScene) {
romanticScene.destroy();
romanticScene = null;
}
if (currentBackground) {
currentBackground.destroy();
currentBackground = null;
}
if (currentYuiBackground) {
currentYuiBackground.destroy();
currentYuiBackground = null;
}
// Clear all UI elements and systems
choiceSystem.clearChoices();
choiceSystem.destroy();
character.destroy();
dialogSystem.destroy();
// Destroy and clear all screen elements
titleScreen.destroy();
welcomeScreen.destroy();
// Hide any remaining elements
dialogSystem.visible = false;
choiceSystem.visible = false;
character.visible = false;
// Recreate all systems from scratch
dialogSystem = game.addChild(new DialogSystem());
choiceSystem = game.addChild(new ChoiceSystem());
character = game.addChild(new Character());
titleScreen = game.addChild(new TitleScreen());
welcomeScreen = game.addChild(new WelcomeScreen());
// Hide all game elements - start fresh at title screen
dialogSystem.visible = false;
choiceSystem.visible = false;
character.visible = false;
welcomeScreen.visible = false;
// Show title screen and initialize it
titleScreen.visible = true;
titleScreen.initAnimations();
// Play title screen music for fresh start
LK.playMusic('titleScreenSong');
};
// Yui's hidden route scenes
var yuiHiddenRoute = [{
background: 'schoolcorridor',
dialogs: [{
speaker: 'Narrador',
text: 'En un rincón del pasillo, entre casilleros, una figura permanece inmóvil. Sus labios no se mueven. Pero su mirada... lo dice todo.'
}]
}, {
background: 'schoolcorridor',
dialogs: [{
speaker: 'Yui',
text: '¿Así que ahora sonríes así por ella...?',
isThought: true
}]
}, {
background: 'schoolcorridor',
dialogs: [{
speaker: 'Yui',
text: 'Intenta quitármelo... y sufrirás las graves consecuencias.',
isThought: true
}]
}, {
background: 'schoolcorridor',
dialogs: [{
speaker: 'Yui',
text: 'Si yo no puedo tenerlo...',
isThought: true
}]
}, {
background: 'schoolcorridor',
dialogs: [{
speaker: 'Yui',
text: '...nadie más lo tendrá.',
isThought: true
}]
}, {
background: 'schoolcorridor',
dialogs: [{
speaker: 'Yui',
text: 'Satoshi, te conocí cuando éramos niños...',
isThought: true
}]
}, {
background: 'schoolcorridor',
dialogs: [{
speaker: 'Yui',
text: 'Jugábamos a las carreras, a las escondidas... Y a los novios...',
isThought: true
}]
}, {
background: 'schoolcorridor',
dialogs: [{
speaker: 'Yui',
text: 'Pero jamás pensé... que lo olvidarías.',
isThought: true
}]
}, {
background: 'schoolcorridor',
dialogs: [{
speaker: 'Narrador',
text: 'El amor de la infancia... no siempre se desvanece. A veces... se pudre.'
}]
}];
var currentYuiBackground = null;
var yuiBackgroundFilters = [{
brightness: 1.0,
contrast: 1.0,
saturation: 1.0,
tint: 0xffffff
},
// Warm afternoon light
{
brightness: 0.8,
contrast: 1.2,
saturation: 0.9,
tint: 0xf0f0f0
},
// Longer shadows
{
brightness: 0.7,
contrast: 1.4,
saturation: 0.8,
tint: 0xff9999
},
// Reddish tint
{
brightness: 0.6,
contrast: 1.1,
saturation: 0.4,
tint: 0xcccccc
},
// Desaturated
{
brightness: 0.4,
contrast: 1.6,
saturation: 0.2,
tint: 0x999999
},
// Dark and cold
{
brightness: 0.5,
contrast: 1.3,
saturation: 0.6,
tint: 0xddaa88
},
// Sepia tones
{
brightness: 0.3,
contrast: 1.8,
saturation: 0.3,
tint: 0x888888
},
// Unstable lighting
{
brightness: 0.2,
contrast: 2.0,
saturation: 0.1,
tint: 0x666666
} // Almost black and white
];
function changeYuiBackground(sceneIndex) {
// Create new background with fade effect for Yui's route
var newYuiBackground = game.addChild(LK.getAsset('schoolcorridor', {
x: 0,
y: 0,
alpha: 0 // Start invisible for fade in
}));
// Send background to back
game.setChildIndex(newYuiBackground, 0);
// Apply psychological filter effects based on scene progression
var filterSettings = yuiBackgroundFilters[Math.min(sceneIndex, yuiBackgroundFilters.length - 1)];
newYuiBackground.tint = filterSettings.tint;
// Fade in new background
tween(newYuiBackground, {
alpha: filterSettings.brightness
}, {
duration: 1000,
easing: tween.easeInOut,
onFinish: function onFinish() {
// Destroy old background after fade completes
if (currentYuiBackground) {
currentYuiBackground.destroy();
}
currentYuiBackground = newYuiBackground;
}
});
// Fade out old background if it exists
if (currentYuiBackground) {
tween(currentYuiBackground, {
alpha: 0
}, {
duration: 700,
easing: tween.easeInOut
});
} else {
currentYuiBackground = newYuiBackground;
}
}
game.startYuiHiddenRoute = function () {
// Stop romantic music
LK.stopMusic();
// Clear any existing scene
if (romanticScene) {
romanticScene.destroy();
romanticScene = null;
}
if (currentBackground) {
currentBackground.destroy();
currentBackground = null;
}
isInRomanticScene = false;
character.hide();
// Start Yui's route
var yuiSceneIndex = 0;
function showYuiScene() {
if (yuiSceneIndex >= yuiHiddenRoute.length) {
// End of Yui's route - show final message
dialogSystem.showDialog('Narrador', 'Inicio de la ruta de Yui desbloqueado');
return;
}
var scene = yuiHiddenRoute[yuiSceneIndex];
changeYuiBackground(yuiSceneIndex);
var dialog = scene.dialogs[0];
dialogSystem.showDialog(dialog.speaker, dialog.text);
// Play YandereSong when Narrator says the opening line for Yui's hidden route
if (dialog.speaker === 'Narrador' && dialog.text === 'En un rincón del pasillo, entre casilleros, una figura permanece inmóvil. Sus labios no se mueven. Pero su mirada... lo dice todo.') {
LK.playMusic('yandereSong');
// Change background to theLocker for this specific scene
if (currentYuiBackground) {
currentYuiBackground.destroy();
}
currentYuiBackground = game.addChild(LK.getAsset('theLocker', {
x: 0,
y: 0
}));
// Send background to back
game.setChildIndex(currentYuiBackground, 0);
}
// Play yuiAudioLine1 when Yui says her first thought dialog
if (dialog.speaker === 'Yui' && dialog.text === '¿Así que ahora sonríes así por ella...?') {
LK.getSound('yuiAudioLine1').play();
// Change background to theLockerOfYui for this specific scene
if (currentYuiBackground) {
currentYuiBackground.destroy();
}
currentYuiBackground = game.addChild(LK.getAsset('theLockerOfYui', {
x: 0,
y: 0
}));
// Send background to back
game.setChildIndex(currentYuiBackground, 0);
}
// Play yuiAudioLine2 when Yui says her threatening thought dialog
if (dialog.speaker === 'Yui' && dialog.text === 'Intenta quitármelo... y sufrirás las graves consecuencias.') {
LK.getSound('yuiAudioLine2').play();
// Change background to threatofYui for this specific scene
if (currentYuiBackground) {
currentYuiBackground.destroy();
}
currentYuiBackground = game.addChild(LK.getAsset('threatofYui', {
x: 0,
y: 0
}));
// Send background to back
game.setChildIndex(currentYuiBackground, 0);
}
// Play yuiAudioLine3 when Yui says her fourth thought dialog
if (dialog.speaker === 'Yui' && dialog.text === 'Si yo no puedo tenerlo...') {
LK.getSound('yuiAudioLine3').play();
// Change background to threatofYui for this specific scene
if (currentYuiBackground) {
currentYuiBackground.destroy();
}
currentYuiBackground = game.addChild(LK.getAsset('threatofYui', {
x: 0,
y: 0
}));
// Send background to back
game.setChildIndex(currentYuiBackground, 0);
}
// Play yuiAudioLine4 when Yui says her fifth thought dialog
if (dialog.speaker === 'Yui' && dialog.text === '...nadie más lo tendrá.') {
LK.getSound('yuiAudioLine4').play();
// Change background to crazyInTheLocker for this specific scene
if (currentYuiBackground) {
currentYuiBackground.destroy();
}
currentYuiBackground = game.addChild(LK.getAsset('crazyInTheLocker', {
x: 0,
y: 0
}));
// Send background to back
game.setChildIndex(currentYuiBackground, 0);
}
// Play yuiAudioLine5 when Yui says her sixth thought dialog
if (dialog.speaker === 'Yui' && dialog.text === 'Satoshi, te conocí cuando éramos niños...') {
LK.getSound('yuiAudioLine5').play();
// Change background to theLoveOfChildren for this specific scene
if (currentYuiBackground) {
currentYuiBackground.destroy();
}
currentYuiBackground = game.addChild(LK.getAsset('theLoveOfChildren', {
x: 0,
y: 0
}));
// Send background to back
game.setChildIndex(currentYuiBackground, 0);
}
// Play yuiAudioLine6 when Yui says her seventh thought dialog
if (dialog.speaker === 'Yui' && dialog.text === 'Jugábamos a las carreras, a las escondidas... Y a los novios...') {
LK.getSound('yuiAudioLine6').play();
// Change background to theLoveOfChildren for this specific scene
if (currentYuiBackground) {
currentYuiBackground.destroy();
}
currentYuiBackground = game.addChild(LK.getAsset('theLoveOfChildren', {
x: 0,
y: 0
}));
// Send background to back
game.setChildIndex(currentYuiBackground, 0);
}
// Play yuiAudioLine7 when Yui says her eighth thought dialog
if (dialog.speaker === 'Yui' && dialog.text === 'Pero jamás pensé... que lo olvidarías.') {
LK.getSound('yuiAudioLine7').play();
// Change background to cryingInTheLocker for this specific scene
if (currentYuiBackground) {
currentYuiBackground.destroy();
}
currentYuiBackground = game.addChild(LK.getAsset('cryingInTheLocker', {
x: 0,
y: 0
}));
// Send background to back
game.setChildIndex(currentYuiBackground, 0);
}
// Change background to cryingInTheLocker when Narrator says the final line about childhood love rotting
if (dialog.speaker === 'Narrador' && dialog.text === 'El amor de la infancia... no siempre se desvanece. A veces... se pudre.') {
if (currentYuiBackground) {
currentYuiBackground.destroy();
}
currentYuiBackground = game.addChild(LK.getAsset('cryingInTheLocker', {
x: 0,
y: 0
}));
// Send background to back
game.setChildIndex(currentYuiBackground, 0);
}
yuiSceneIndex++;
}
// Override nextDialog for Yui's route
var originalNextDialog = game.nextDialog;
game.nextDialog = function () {
showYuiScene();
// Restore original nextDialog after Yui's route ends
if (yuiSceneIndex >= yuiHiddenRoute.length) {
game.nextDialog = originalNextDialog;
}
};
// Start Yui's route
showYuiScene();
};
// Add game state to global for debugging
game.currentChoices = currentChoices;
// Admin skip button for instant stage bypass
var adminSkipButton = LK.gui.topLeft.addChild(LK.getAsset('titleButton', {
anchorX: 0,
anchorY: 0,
x: 120,
// Avoid top-left 100x100 px reserved area
y: 20,
scaleX: 0.4,
scaleY: 0.4,
alpha: 0.3 // Semi-transparent to indicate admin function
}));
var skipText = new Text2('SKIP', {
size: 60,
fill: 0xffffff
});
skipText.anchor.set(0.5, 0.5);
skipText.x = adminSkipButton.x + adminSkipButton.width * 0.2; // Center on button
skipText.y = adminSkipButton.y + adminSkipButton.height * 0.2;
LK.gui.topLeft.addChild(skipText);
adminSkipButton.down = function () {
// Skip current stage based on game state
if (!gameStarted) {
// Skip title screen
game.startMainGame();
} else if (isInMathEvaluation) {
// Skip math evaluation with success
game.startRomanticScene();
} else if (isInRomanticScene) {
// Skip to Yui's hidden route
game.startYuiHiddenRoute();
} else if (currentChoices.length > 0) {
// Auto-select first choice to continue
if (currentChoices[0]) {
game.makeChoice(currentChoices[0]);
}
} else {
// Skip current dialog/scene
if (currentScene < storyScenes.length || selectedRoute && routeScenes[selectedRoute] && currentScene - storyScenes.length < routeScenes[selectedRoute].length) {
// Skip to end of current scene
var scene = getCurrentScene();
if (scene && scene.dialogs) {
currentDialog = scene.dialogs.length - 1;
}
game.nextDialog();
} else {
// Skip to ending
showEnding();
}
}
};
A cute 15-year-old red-haired boy with intense red eyes, wearing a traditional Japanese school uniform (gakuran). He's running down the street with a serious and confident expression. Despite his determined look, his appearance remains sweet and endearing. His gaze is focused straight ahead, with the wind gently lifting his hair and school jacket. The scene is illustrated in Pixel Art style.. In-Game asset. 2d. High contrast. No shadows
A cute 15-year-old red-haired boy with red eyes, wearing a traditional Japanese school uniform (gakuran). He has a big closed-mouth smile, shining eyes, and clenched fists held forward, as if encouraging himself. Behind him, other Japanese students can be seen. The scene is illustrated in Pixel Art style.. In-Game asset. 2d. High contrast. No shadows
A cute anime-style girl in pixel art, with an emo aesthetic and striking purple eyes. She wears a classic Japanese school uniform (sailor fuku) and is often shown with a slightly grumpy expression, reflecting a bit of a tsundere personality. She stands confidently with her hands on her hips and a slight tilt to her posture. Behind her is a typical Japanese classroom, enhancing the school-themed atmosphere.. In-Game asset. 2d. High contrast. No shadows
She’s a cute anime girl with a free-spirited and rebellious vibe. Her hair is pink, and she’s wearing a traditional Japanese school uniform (sailor fuku). She sports dark sunglasses and holds a skateboard in one hand while pointing with the other. Her face lights up with a big smile and mischievous pink eyes that match her hair. In the background, there's a Japanese classroom, and the entire artwork is done in Pixel Art style.. In-Game asset. 2d. High contrast. No shadows
Stella is a sweet and very kawaii 15-year-old anime girl with short, soft blue-gray hair (HEX: #b0b9d8) and black eyes. She wears a traditional Japanese school uniform called a sailor fuku. Stella is extremely shy—she blushes easily, avoids eye contact, and often covers herself when she feels nervous. In this Pixel Art scene, she’s gently touching the tips of her index fingers together, a classic gesture of shyness seen in anime. Behind her is the courtyard of a Japanese middle school, completing the charming school setting.. In-Game asset. 2d. High contrast. No shadows
A kawaii anime boy with intense red eyes, each containing shining stars. He raises his fist forward with determination, wearing a wide, open smile full of enthusiasm. Sparkles and glimmers float around him, symbolizing hope. The entire scene is rendered in Pixel Art style.
A kawaii anime boy with red eyes and a serious expression stands with his eyes closed, resting a hand under his chin in a thoughtful pose. He’s wearing a traditional Japanese school uniform called a gakuran. Suddenly, a lightbulb appears above his head—the classic symbol of a brilliant idea. He opens his eyes with determination, a confident smile forming on his face. It's Pixel Art.
Remove the sparkles from the background.
Pure white. 2d
A cute anime-style girl in pixel art, with an emo aesthetic, striking purple eyes, and a classic Japanese school uniform (sailor fuku), is studying with furrowed brows and a confident smile. She sits next to a shy red-haired boy with red eyes, also in pixel art style. Their desks are pushed together, and on the boy’s desk lies an open notebook, which he nervously stares at while holding a graphite pencil. The girl looks at him with a mix of sternness and confidence, convinced he won’t pass the exam. The background depicts a typical Japanese classroom.
A cute anime-style girl rendered in pixel art, with an emo aesthetic and striking purple eyes, is wearing a high school cheerleader uniform and holding pom-poms in both hands. With her arms and legs extended in a dynamic pose, she winks playfully while cheering. The background is an American football field.
A cute anime-style girl depicted in pixel art, with an emo aesthetic and striking purple eyes. She's wearing a classic Japanese school uniform (sailor fuku). She has a shy expression, with blushing cheeks and an averted gaze. Her left hand is playing with her hair, while her right hand rests on her chest. In the background, there's a typical anime-style classroom.
In pixel art style, a cute anime-style girl with an emo aesthetic, striking purple eyes, and a Japanese school uniform (sailor fuku) suddenly pulls the hand of a shy red-haired boy with red eyes, who is wearing a gakuran and sitting in front of a rectangular desk. She smiles brightly with her eyes closed as she yanks him toward her, pulling him out of his seat. The boy looks confused and nervous, flustered by the sudden physical contact. In the background, a typical Japanese classroom can be seen.
The camera focuses only on their hands. The girl, wearing a traditional Japanese sailor fuku uniform, firmly grabs the hand of the boy, who is dressed in a classic gakuran. She pulls him forward with energy and excitement. His hand follows with slight tension, expressing surprise. Nothing else is shown—just the gesture: a meaningful connection captured in the simple act of their hands intertwined. Behind them stretches a Japanese school hallway, all rendered in a charming Pixel Art style.
A cute anime-style girl with an emo aesthetic, striking purple eyes, and dressed in a traditional Japanese school uniform (sailor fuku), suddenly gives an unexpected kiss on the lips to a sweet red-haired boy with deep crimson eyes, wearing a classic gakuran school uniform. As she kisses him, her cheeks are deeply flushed, while he, also blushing, wears a look of shock and disbelief — not only was the kiss completely unprompted, but it’s also the very first time anyone has ever kissed him. Behind them stretches a Japanese school hallway, all rendered in a charming Pixel Art style.
A charming anime-style girl rendered in delightful Pixel Art, featuring an emo aesthetic, striking purple eyes, and a classic Japanese school uniform (sailor fuku). She confidently strikes the iconic “Ojou-sama pose”: Her left hand is elegantly lifted near her face, fingers gracefully splayed like a fan, perfectly framing her smug expression. Her face bears a tilted, self-assured smile, the kind that practically echoes a soft, aristocratic “Ohoho~” laugh. One eyebrow arches subtly, radiating playful confidence and a touch of superiority. Her right hand rests casually near her waist, loosely clenched into a relaxed fist — an anchor for her graceful yet dominant posture. Behind her stretches the polished hallway of a Japanese school, complete with sliding doors and sunlit windows, completing the scene with a nostalgic, everyday charm — all captured in the cozy, detailed charm of Pixel Art.
A cute gray chibi-style anime kitten, dressed in an astronaut suit and drifting through the universe, rendered in Pixel Art.
A cute gray kitten, drawn in an adorable chibi anime style and wearing an astronaut suit, floats in outer space with its little paws outstretched as if reaching out for a hug. It meows sweetly, and the entire scene is illustrated in charming Pixel Art style.
A cute chibi-style anime kitten, dressed in an astronaut suit and drifting through the universe, rendered in Pixel Art.
White star of the universe in Pixel Art style
Planet Earth of the universe in Pixel Art style
Create a title screen logo with the following text: "Corazón de Estudiante - Novela Visual" Behind the text, the Andromeda Galaxy (M31) stretches across the background, creating a dreamy, cosmic atmosphere that evokes mystery and romance.
A cute kitten, illustrated in an adorable chibi anime style and wearing an astronaut suit, is playfully tangled in a ball of yarn, floating through space with overwhelming joy. Its eyes are shut tight in pure happiness, and its movements are full of energetic delight.
Three-quarter view pixel art jetpack
Transparent, colorless glass button that says "Empezar" (Spanish for "Start"), featuring an adventure video game font and Pixel Art style.
Advertencia que dice: "Sin usar"
A realistic yellow star from the universe, in pixel art style.
Pure white
A cute, red-haired anime boy, 15 years old, with red eyes. He's in pajamas, looking sleepy, rubbing one eye with his hand. He's in his otaku-style bedroom. The scene is illustrated in Pixel Art style.
Blue button with two yellow chevrons in a row, pixel art style.
A green circular button featuring a fuchsia-colored refresh icon, designed in Pixel Art style.
Stella is a 15-year-old anime girl—sweet and incredibly kawaii—with short, soft hair in a bluish-gray tone (HEX: #b0b9d8) and deep black eyes. She wears a traditional Japanese school uniform, the classic sailor-style fuku. In her right hand, she holds a butcher knife. Her expression is serious, and her eyes, now glowing with an intense yandere red, reflect jealousy and obsession. Dark under-eye circles emphasize her unsettling gaze. She is inside a high school locker in a Japanese school. Her right hand is slightly raised, gripping the knife, while her left hand gently touches the blade with her index finger, mimicking the motion of a clock hand—adding to the eerie atmosphere. To emphasize the feeling of being inside the locker, soft light shines through the ventilation slits, casting dramatic shadows across her face. The entire scene is rendered in detailed Pixel Art style, enhancing both the cuteness and the unsettling atmosphere of the character and setting.
Yui y un niño anime, ambos de 5 o 6 años, corren por un parque soleado en una carrera infantil. Yui tiene el cabello corto, suave, azul grisáceo (HEX: #b0b9d8) y ojos negros. Lleva un vestido lavanda claro con volantes blancos y zapatillas blancas con detalles rosa pastel. Sonríe tímidamente con mejillas sonrojadas mientras corre con pasos pequeños. El niño tiene cabello pelirrojo alborotado y ojos rojos intensos. Lleva una camiseta amarilla brillante con una estrella blanca, pantalones cortos azul claro y zapatillas rojas. Corre con energía, sonriendo ampliamente, mirando a Yui con entusiasmo. La escena está en Pixel Art, con césped verde, árboles y pétalos flotando. Ambos se ven felices, reflejando un momento puro de infancia.
Yui is a cute 15-year-old anime girl with big black eyes and short, soft blue-gray hair (HEX: #b0b9d8). She wears a traditional Japanese school uniform called a sailor fuku. In this Pixel Art scene, Yui looks clearly upset—she has very noticeable dark circles under her eyes, her eyebrows are tense, and her teeth are pressed together in frustration. Her arms are relaxed and down at her sides, showing no physical aggression, just quiet tension. She’s inside a school locker, looking out through a metal grate with a serious, focused expression. The entire scene is viewed from inside the locker, with soft light coming through the vents, casting gentle shadows across her face and creating a slightly tense but family-friendly atmosphere.
Pixel art. A red-haired 15-year-old anime-style boy with red eyes and a girl with purple eyes in Japanese school uniforms, both with large, expressive eyes and oversized irises to look super kawaii, are talking cheerfully while looking into each other’s eyes and gesturing with their hands. They are standing very close to a row of school lockers. In the center locker, a pair of glowing red eyes peer through the slats. The eyes belong to a hidden yandere—obsessed, crazy, and jealous—whose face and body remain completely obscured in the darkness inside the locker. The mood is lighthearted between the boy and girl, contrasting with the eerie presence watching them from the shadows.
Stella, a 15-year-old anime girl with short, soft hair in a bluish-gray tone (HEX: #b0b9d8), and large black eyes with oversized irises (super kawaii style), glowing with intense yandere red. She wears a traditional Japanese school uniform (classic sailor fuku). She is inside a Japanese school locker, with soft light coming through the ventilation slits, casting dramatic shadows on her face. Her eyebrows are furrowed in extreme anger, but she has a wide, creepy smile, like someone completely insane. Dark under-eye circles highlight her unhinged expression. Her right hand holds a butcher knife slightly raised, while her left hand gently touches the blade with her index finger, mimicking a clock hand motion. Visual style: highly detailed Pixel Art.
Yui is a cute 15-year-old anime girl with big black eyes and short, soft blue-gray hair (HEX: #b0b9d8). She wears a traditional Japanese school uniform called a sailor fuku. In this Pixel Art scene, Yui is clearly devastated—she’s hunched over in a slouched, defeated posture, crying intensely. Many visible tears stream down her cheeks, slipping past her fingers as she covers her face with both hands. Her entire body language screams sadness; it’s raw, heavy, and impossible to ignore. She’s inside a school locker, and although she’s looking outward through the metal grate, her face is mostly hidden behind her trembling hands. The entire scene is viewed from inside the locker, with soft light coming through the vents, casting delicate shadows across her curled-up figure and highlighting the depth of her heartbreak. The atmosphere is heavy, emotional, and quietly heartbreaking—yet still family-friendly in tone.
Diseña exclusivamente un cuadro de diálogo de color blanco de 2048 x 684 píxeles y esquinas en ángulo recto, evocando la estética romántica y juvenil de una novela ligera escolar, todo en estilo pixel art. No debe incluir ninguna otra funcionalidad. Detrás hay un fondo de color verde croma.
Ilustración en Pixel Art de un Name Box blanco, característico de una novela visual romántica, con detalles en colores pastel. El cuadro no contiene texto.
Ilustración en Pixel Art de un Name Box blanco, característico de una novela visual romántica, con detalles en colores pastel. El cuadro no contiene texto.
LoveTime
Music
Music1
Music
titleScreenSong
Music
theBeginningSong
Music
theCrossroadsSong
Music
theSchoolSong
Music
romanticSong
Music
youWinSong
Music
gameOverSong
Music
gameOverEffect
Sound effect
evaluationSong
Music
aikoAudioLine2
Sound effect
aikoAudioLine1
Sound effect
aikoAudioLine3
Sound effect
aikoAudioLine4
Sound effect
aikoAudioLine5
Sound effect
audioAikoLine6
Sound effect
aikoAudioLine7
Sound effect
aikoAudioLine8
Sound effect
Kissonthecheek
Sound effect
aikoAudioLine9
Sound effect
aikoAudioLine10
Sound effect
yuiAudioLine1
Sound effect
yuiAudioLine2
Sound effect
yuiAudioLine3
Sound effect
yuiAudioLine4
Sound effect
yuiAudioLine5
Sound effect
yuiAudioLine6
Sound effect
yuiAudioLine7
Sound effect
yandereSong
Music