User prompt
Que haiga segundo nivel y si pierde empieza en el nivel 1 otra vez
User prompt
Que el laberinto sea de sillas pero una que otra elimina ese laberinto
User prompt
Que el profesor se mueva
User prompt
Que haiga una especie de laberinto pero echo discretamente
User prompt
Entonces unos controles
User prompt
Que haiga unas letras que se resalten arriba que digan cuarto 1
User prompt
Que la respuesta correcta no se diferencie
User prompt
Pero que la respuesta buena no este en verde
User prompt
Que la pregunta este con letras grandes que quepan en la pantalla sin ese fondo morado con un color que se diferencie y que sea de toda la pantalla
User prompt
Que cuando toque la puerta el profesor secquede inmovil
User prompt
Que con el minimo contacto con la puerta la prwgunta aparesca
User prompt
Que la pregunta aparesca en la mitad del fondo
User prompt
Que la pregunta aparesca en el 6 cuadro del fondo
User prompt
Que aparesca en el 7 cuadro del fondo
User prompt
Que la pregunta aparesca donde esta el primer cuadro del fondo
User prompt
Que la pregunta aparesca en la mitas de todo el cuarto
User prompt
Que aparesca donde aparecio el profesor
User prompt
En la mitad de la pantalla no abajo
User prompt
Que aparesca una pregunta al llegar ala puerta y si la responde bien pasa la pregunta es 7×2 obcion1 12 obcion 2 14 correcta la respuesta 2 y se abra la puerta
User prompt
Que aparesca la pregunta y las obsiones donde spaowneo el jugador
User prompt
Que la pagina aparesca al tocar la puerta y que sea la pregunta y que la pregunta este en la mitad donde aparece el jugador
User prompt
Cuanto el jugador llege ala puerta se aparesca una pagina con una pregunta que sea 7×2 1 respuesta 12 2 respuesta 14 que pase si el jugador responde la b
User prompt
Que abra una pagina con la pregunta que se vea en la mitad de la pantalla
User prompt
Please fix the bug: 'TypeError: LK.openUrl is not a function' in or related to this line: 'LK.openUrl("https://www.google.com/search?q=cuanto+es+7x2");' Line Number: 189
User prompt
Que cuando se llege ala puerta se abra una pagina con la pregunta
/**** * Classes ****/ // ProfesorMonster class: AI-driven monster that chases the student var ProfesorMonster = Container.expand(function () { var self = Container.call(this); // Attach profesor asset var profesorSprite = self.attachAsset('profesor', { anchorX: 0.5, anchorY: 0.5 }); // Track last position for event logic self.lastX = self.x; self.lastY = self.y; self.lastWasIntersecting = false; // Update method: chase the student self.update = function () { // Store last position self.lastX = self.x; self.lastY = self.y; // Use global student variable if (typeof student === "undefined" || !student) return; // Simple AI: move towards the student var dx = student.x - self.x; var dy = student.y - self.y; var dist = Math.sqrt(dx * dx + dy * dy); var speed = 6; // profesor speed, now much slower than student if (dist > speed) { self.x += dx / dist * speed; self.y += dy / dist * speed; } else { self.x = student.x; self.y = student.y; } }; return self; }); // Student class: controllable player character var Student = Container.expand(function () { var self = Container.call(this); // Attach student asset var studentSprite = self.attachAsset('student', { anchorX: 0.5, anchorY: 0.5 }); // Initial target position is current position self.targetX = 300; self.targetY = 2732 / 2; // Track last position for event logic self.lastX = self.x; self.lastY = self.y; // Update method: move towards target position self.update = function () { // Store last position self.lastX = self.x; self.lastY = self.y; // Move towards targetX, targetY var dx = self.targetX - self.x; var dy = self.targetY - self.y; var dist = Math.sqrt(dx * dx + dy * dy); var speed = 18; // pixels per frame if (dist > speed) { self.x += dx / dist * speed; self.y += dy / dist * speed; } else { self.x = self.targetX; self.y = self.targetY; } }; return self; }); /**** * Initialize Game ****/ var game = new LK.Game({ backgroundColor: 0x000000 }); /**** * Game Code ****/ // Expand the map: create a large school with multiple areas // Main floor (covers the whole map) var floor = LK.getAsset('floor', { anchorX: 0, anchorY: 0, x: 0, y: 0 }); game.addChild(floor); // Top and bottom walls (main corridor) var wallTop = LK.getAsset('wall', { x: 0, y: 0, anchorX: 0, anchorY: 0 }); var wallBottom = LK.getAsset('wall', { x: 0, y: 2732 - 40, anchorX: 0, anchorY: 0 }); game.addChild(wallTop); game.addChild(wallBottom); // Left and right walls (vertical boundaries) var wallLeft = LK.getAsset('wall', { width: 40, height: 2732, x: 0, y: 0, anchorX: 0, anchorY: 0 }); var wallRight = LK.getAsset('wall', { width: 40, height: 2732, x: 2048 - 40, y: 0, anchorX: 0, anchorY: 0 }); game.addChild(wallLeft); game.addChild(wallRight); // All furniture and classroom blocks removed as requested // Add door (exit) at far right, near the sports field var door = LK.getAsset('door', { x: 2048 - 200, y: 2200, anchorX: 0, anchorY: 0 }); game.addChild(door); // Add student (player) and center camera on them var student = new Student(); student.x = 300; student.y = 2732 / 2; game.addChild(student); // Add profesor (monster) as an AI-driven monster var profesor = new ProfesorMonster(); profesor.x = 1600; profesor.y = 2732 / 2; game.addChild(profesor); // Camera offset for 3rd person (centered on student) var cameraOffsetX = 1024; // half width var cameraOffsetY = 1366; // half height // Camera follow logic game.update = function () { // Update student if (student.update) student.update(); // Update profesor monster AI if (profesor.update) profesor.update(); // Check for kill: profesor touches student (collision) var isIntersecting = profesor.intersects(student); if (!profesor.lastWasIntersecting && isIntersecting) { // Profesor kills student: show game over LK.effects.flashScreen(0xff0000, 1000); LK.showGameOver(); } profesor.lastWasIntersecting = isIntersecting; // Check if student reaches the door (first time) if ((typeof showMathQuestion === "undefined" || !showMathQuestion) && // Only trigger once student.lastX + 60 < door.x && // 60 is half student width, so center student.x + 60 >= door.x && // Crossed the door's X Math.abs(student.y - (door.y + 100)) < 120 // Y is close to door center (door height is 200) ) { showMathQuestion = true; // Open a web page with the question LK.openUrl("https://www.google.com/search?q=cuanto+es+7x2"); // Optionally, you can pause the game here if needed } // Track lastX for student for event logic student.lastX = student.x; student.lastY = student.y; // Camera follows student from behind (3rd person, offset behind student direction) var dx = student.targetX - student.x; var dy = student.targetY - student.y; var dist = Math.sqrt(dx * dx + dy * dy); var camBehindDist = 350; // Distance behind the student var camX, camY; if (dist > 10) { // Camera is offset behind the student, in the opposite direction of movement camX = student.x - dx / dist * camBehindDist; camY = student.y - dy / dist * camBehindDist; } else { // If not moving, camera stays slightly above/behind camX = student.x - camBehindDist; camY = student.y; } // Clamp camera to map bounds camX = Math.max(0, Math.min(camX, 2048 - 2048)); camY = Math.max(0, Math.min(camY, 2732 - 2732)); game.x = -camX; game.y = -camY; }; // Drag-to-move logic (touch/mouse) game.down = function (x, y, obj) { // Move student to touch position (convert to game coordinates) student.targetX = x; student.targetY = y; }; game.move = function (x, y, obj) { student.targetX = x; student.targetY = y; }; game.up = function (x, y, obj) { // No-op for now };
/****
* Classes
****/
// ProfesorMonster class: AI-driven monster that chases the student
var ProfesorMonster = Container.expand(function () {
var self = Container.call(this);
// Attach profesor asset
var profesorSprite = self.attachAsset('profesor', {
anchorX: 0.5,
anchorY: 0.5
});
// Track last position for event logic
self.lastX = self.x;
self.lastY = self.y;
self.lastWasIntersecting = false;
// Update method: chase the student
self.update = function () {
// Store last position
self.lastX = self.x;
self.lastY = self.y;
// Use global student variable
if (typeof student === "undefined" || !student) return;
// Simple AI: move towards the student
var dx = student.x - self.x;
var dy = student.y - self.y;
var dist = Math.sqrt(dx * dx + dy * dy);
var speed = 6; // profesor speed, now much slower than student
if (dist > speed) {
self.x += dx / dist * speed;
self.y += dy / dist * speed;
} else {
self.x = student.x;
self.y = student.y;
}
};
return self;
});
// Student class: controllable player character
var Student = Container.expand(function () {
var self = Container.call(this);
// Attach student asset
var studentSprite = self.attachAsset('student', {
anchorX: 0.5,
anchorY: 0.5
});
// Initial target position is current position
self.targetX = 300;
self.targetY = 2732 / 2;
// Track last position for event logic
self.lastX = self.x;
self.lastY = self.y;
// Update method: move towards target position
self.update = function () {
// Store last position
self.lastX = self.x;
self.lastY = self.y;
// Move towards targetX, targetY
var dx = self.targetX - self.x;
var dy = self.targetY - self.y;
var dist = Math.sqrt(dx * dx + dy * dy);
var speed = 18; // pixels per frame
if (dist > speed) {
self.x += dx / dist * speed;
self.y += dy / dist * speed;
} else {
self.x = self.targetX;
self.y = self.targetY;
}
};
return self;
});
/****
* Initialize Game
****/
var game = new LK.Game({
backgroundColor: 0x000000
});
/****
* Game Code
****/
// Expand the map: create a large school with multiple areas
// Main floor (covers the whole map)
var floor = LK.getAsset('floor', {
anchorX: 0,
anchorY: 0,
x: 0,
y: 0
});
game.addChild(floor);
// Top and bottom walls (main corridor)
var wallTop = LK.getAsset('wall', {
x: 0,
y: 0,
anchorX: 0,
anchorY: 0
});
var wallBottom = LK.getAsset('wall', {
x: 0,
y: 2732 - 40,
anchorX: 0,
anchorY: 0
});
game.addChild(wallTop);
game.addChild(wallBottom);
// Left and right walls (vertical boundaries)
var wallLeft = LK.getAsset('wall', {
width: 40,
height: 2732,
x: 0,
y: 0,
anchorX: 0,
anchorY: 0
});
var wallRight = LK.getAsset('wall', {
width: 40,
height: 2732,
x: 2048 - 40,
y: 0,
anchorX: 0,
anchorY: 0
});
game.addChild(wallLeft);
game.addChild(wallRight);
// All furniture and classroom blocks removed as requested
// Add door (exit) at far right, near the sports field
var door = LK.getAsset('door', {
x: 2048 - 200,
y: 2200,
anchorX: 0,
anchorY: 0
});
game.addChild(door);
// Add student (player) and center camera on them
var student = new Student();
student.x = 300;
student.y = 2732 / 2;
game.addChild(student);
// Add profesor (monster) as an AI-driven monster
var profesor = new ProfesorMonster();
profesor.x = 1600;
profesor.y = 2732 / 2;
game.addChild(profesor);
// Camera offset for 3rd person (centered on student)
var cameraOffsetX = 1024; // half width
var cameraOffsetY = 1366; // half height
// Camera follow logic
game.update = function () {
// Update student
if (student.update) student.update();
// Update profesor monster AI
if (profesor.update) profesor.update();
// Check for kill: profesor touches student (collision)
var isIntersecting = profesor.intersects(student);
if (!profesor.lastWasIntersecting && isIntersecting) {
// Profesor kills student: show game over
LK.effects.flashScreen(0xff0000, 1000);
LK.showGameOver();
}
profesor.lastWasIntersecting = isIntersecting;
// Check if student reaches the door (first time)
if ((typeof showMathQuestion === "undefined" || !showMathQuestion) &&
// Only trigger once
student.lastX + 60 < door.x &&
// 60 is half student width, so center
student.x + 60 >= door.x &&
// Crossed the door's X
Math.abs(student.y - (door.y + 100)) < 120 // Y is close to door center (door height is 200)
) {
showMathQuestion = true;
// Open a web page with the question
LK.openUrl("https://www.google.com/search?q=cuanto+es+7x2");
// Optionally, you can pause the game here if needed
}
// Track lastX for student for event logic
student.lastX = student.x;
student.lastY = student.y;
// Camera follows student from behind (3rd person, offset behind student direction)
var dx = student.targetX - student.x;
var dy = student.targetY - student.y;
var dist = Math.sqrt(dx * dx + dy * dy);
var camBehindDist = 350; // Distance behind the student
var camX, camY;
if (dist > 10) {
// Camera is offset behind the student, in the opposite direction of movement
camX = student.x - dx / dist * camBehindDist;
camY = student.y - dy / dist * camBehindDist;
} else {
// If not moving, camera stays slightly above/behind
camX = student.x - camBehindDist;
camY = student.y;
}
// Clamp camera to map bounds
camX = Math.max(0, Math.min(camX, 2048 - 2048));
camY = Math.max(0, Math.min(camY, 2732 - 2732));
game.x = -camX;
game.y = -camY;
};
// Drag-to-move logic (touch/mouse)
game.down = function (x, y, obj) {
// Move student to touch position (convert to game coordinates)
student.targetX = x;
student.targetY = y;
};
game.move = function (x, y, obj) {
student.targetX = x;
student.targetY = y;
};
game.up = function (x, y, obj) {
// No-op for now
};
Modern App Store icon, high definition, square with rounded corners, for a game titled "San Luis: El Monstruo del Colegio" and with the description "Juego de escondite en el colegio San Luis de Yarumal, donde debes evitar a un profesor monstruoso y escapar del colegio.". No text on icon!
Puerta. In-Game asset. 2d. High contrast. No shadows
Piso liso. In-Game asset. 2d. High contrast. No shadows
Un solo pupitre. In-Game asset. 2d. High contrast. No shadows
Niño pequeño con uniforme blanco y sudadera azul. In-Game asset. 2d. High contrast. No shadows
Suelo de concreto. In-Game asset. 2d. High contrast. No shadows