User prompt
Change the "Press Ready when you are ready" text to: "Press 'I'm not monke' if you are not monkey". Also, change the text on the Ready button to: "I'm not monke".
User prompt
At the start of each level, randomly highlight exactly 6 boxes in red for the player to memorize.
User prompt
Set the text color of "Press Ready", "When you are ready", "Ready", and "Your IQ" to red. Make sure they are clearly visible against the background.
User prompt
Make the "Press Ready" button text a bold and highly visible color, such as bright yellow or orange, so it stands out clearly. Display the "Your IQ" text at the top-left corner of the screen at all times, in a readable and consistent font.
User prompt
Set the image named "arkaplan" from the images section as the background of the game. Make sure it fills the entire screen in portrait orientation. At the start of each level, randomly highlight exactly 5 boxes in red for the player to memorize.
User prompt
Play the music file named "loop" as background music, and make sure it loops continuously throughout the entire game.
User prompt
Use a grid of 9 columns and 8 rows for a total of 72 boxes. At the start of each level, randomly highlight exactly 9 boxes to memorize. After the player finishes or makes a mistake, display "monkey x)" instead of "Game Over". Show the player's IQ level instead of a final score at the end of the game. ↪💡 Consider importing and using the following plugins: @upit/tween.v1
User prompt
Generate a new random sequence of boxes to memorize at the start of each level, instead of using the same sequence every time.
User prompt
Arrange 27 boxes in a grid of 9 columns and 4 rows, ordered from top to bottom, left to right, with spacing so each box is clearly visible. At the start of the game, the boxes that must be memorized are highlighted in red and do not change each level (same boxes remain red). When the player presses the "Ready" button, all boxes turn white, allowing the player to select boxes in any order. If the player makes a mistake, display the text "monkey x)" on the screen. Do not replay the sequence automatically; the boxes stay red initially for memorization, then turn white for selection after ready.
User prompt
Use a fixed grid of 27 boxes arranged in 9 columns and 3 rows. Each level corresponds to an IQ score shown on the screen when the player loses. At the start of each level, highlight the boxes the player must remember by turning them red. After the player presses a "Ready" button, all boxes turn white. Then the player can tap the boxes in any order they remember, without automatic sequence playback. The game ends when the player makes a mistake or finishes the level. ↪💡 Consider importing and using the following plugins: @upit/tween.v1
User prompt
All boxes start with a white color. When showing the sequence, each box lights up by changing its color to red one by one in the correct order, then returns back to white. ↪💡 Consider importing and using the following plugins: @upit/tween.v1
Code edit (1 edits merged)
Please save this source code
User prompt
Memory Circle Challenge
Initial prompt
Create a 2D mobile game in portrait mode where the player tests their memory and reflexes. Display a fixed number (e.g. 6) of square boxes arranged evenly inside a visible circle or square outline at the center of the screen. At the start of each round, highlight a random sequence of these boxes one by one with a brief visual effect. After the sequence is shown, the player must tap the boxes in the same order. If the player taps the wrong box or in the wrong order, the game ends. If the player completes the sequence correctly, increase the length of the next sequence by one. Display the current level or score at the top of the screen. The boxes should have simple bright colors, and the circle or square outline around them should be visible but not block the background image. Make controls responsive for mobile touch. Endless gameplay with increasing difficulty.
/**** * Plugins ****/ var tween = LK.import("@upit/tween.v1"); /**** * Classes ****/ var MemoryBox = Container.expand(function (colorValue) { var self = Container.call(this); // Store the original color self.originalColor = 0xFFFFFF; // Always start with white self.isHighlighted = false; self.isClickable = false; // Create the box graphics var boxGraphics = self.attachAsset('memoryBox', { anchorX: 0.5, anchorY: 0.5 }); // Set the box color boxGraphics.tint = self.originalColor; // Highlight the box self.highlight = function () { if (!self.isHighlighted) { self.isHighlighted = true; // Tween to red color tween(boxGraphics, { tint: 0xFF0000 }, { duration: 200 }); // Play highlight sound LK.getSound('boxHighlight').play(); // Auto-unhighlight after 600ms LK.setTimeout(function () { self.unhighlight(); }, 600); } }; // Remove highlight self.unhighlight = function () { if (self.isHighlighted) { self.isHighlighted = false; // Tween back to original color tween(boxGraphics, { tint: self.originalColor }, { duration: 200 }); } }; // Handle touch/click self.down = function (x, y, obj) { if (self.isClickable) { // Visual feedback self.highlight(); // Notify game of click if (typeof onBoxClicked === 'function') { onBoxClicked(self); } } }; return self; }); /**** * Initialize Game ****/ var game = new LK.Game({ backgroundColor: 0x1a1a2e }); /**** * Game Code ****/ // Game state variables var gameState = 'waiting'; // 'waiting', 'showing', 'input', 'gameover' var currentLevel = 1; var sequence = []; var playerInput = []; var currentSequenceIndex = 0; var currentInputIndex = 0; var boxes = []; // Colors for the boxes var boxColors = [0xff6b6b, // Red 0x4ecdc4, // Teal 0x45b7d1, // Blue 0x96ceb4, // Green 0xfeca57, // Yellow 0xff9ff3 // Pink ]; // Create score display var scoreText = new Text2('Level: 1', { size: 80, fill: 0xFFFFFF }); scoreText.anchor.set(0.5, 0); LK.gui.top.addChild(scoreText); // Create instruction text var instructionText = new Text2('Watch the sequence!', { size: 60, fill: 0xFFFFFF }); instructionText.anchor.set(0.5, 0.5); instructionText.x = 2048 / 2; instructionText.y = 2732 - 300; game.addChild(instructionText); // Create Ready button var readyButton = new Text2('READY', { size: 80, fill: 0x00FF00 }); readyButton.anchor.set(0.5, 0.5); readyButton.x = 2048 / 2; readyButton.y = 2732 - 150; readyButton.visible = false; game.addChild(readyButton); // Create IQ score display var iqText = new Text2('', { size: 100, fill: 0xFF6B6B }); iqText.anchor.set(0.5, 0.5); iqText.x = 2048 / 2; iqText.y = 2732 / 2; iqText.visible = false; game.addChild(iqText); // Create the memory boxes in a 9x4 grid function createBoxes() { var boxWidth = 180; var boxHeight = 180; var spacingX = 220; var spacingY = 220; var startX = (2048 - (9 * spacingX - (spacingX - boxWidth))) / 2; var startY = (2732 - (4 * spacingY - (spacingY - boxHeight))) / 2; for (var row = 0; row < 4; row++) { for (var col = 0; col < 9; col++) { var box = new MemoryBox(); box.x = startX + col * spacingX + boxWidth / 2; box.y = startY + row * spacingY + boxHeight / 2; box.boxIndex = row * 9 + col; // Index from 0 to 35 boxes.push(box); game.addChild(box); } } } // Generate new sequence function generateSequence() { // Generate random sequence based on current level var sequenceLength = Math.min(3 + currentLevel, 15); // Start with 4 boxes, increase by 1 each level, max 15 sequence = []; var availableBoxes = []; // Create array of all box indices (0-35) for (var i = 0; i < 36; i++) { availableBoxes.push(i); } // Randomly select boxes for the sequence for (var i = 0; i < sequenceLength; i++) { var randomIndex = Math.floor(Math.random() * availableBoxes.length); sequence.push(availableBoxes[randomIndex]); availableBoxes.splice(randomIndex, 1); // Remove selected box to avoid duplicates } } // Show the sequence to player function showSequence() { gameState = 'showing'; instructionText.setText('Memorize the red boxes!'); // Disable all boxes during sequence for (var i = 0; i < boxes.length; i++) { boxes[i].isClickable = false; } // Highlight all sequence boxes in red simultaneously for (var i = 0; i < sequence.length; i++) { var boxIndex = sequence[i]; var box = boxes[boxIndex]; box.isHighlighted = true; var boxGraphics = box.children[0]; tween(boxGraphics, { tint: 0xFF0000 }, { duration: 200 }); } // Show Ready button after highlighting gameState = 'ready'; instructionText.setText('Press READY when you are ready to start!'); readyButton.visible = true; } // Start accepting player input function startPlayerInput() { gameState = 'input'; instructionText.setText('Tap the boxes you remember in any order!'); readyButton.visible = false; playerInput = []; currentInputIndex = 0; // Turn all boxes white first for (var i = 0; i < boxes.length; i++) { boxes[i].unhighlight(); } // Enable all boxes for clicking for (var i = 0; i < boxes.length; i++) { boxes[i].isClickable = true; } } // Handle Ready button click readyButton.down = function (x, y, obj) { if (gameState === 'ready') { startPlayerInput(); } }; // Handle box clicks function onBoxClicked(clickedBox) { if (gameState !== 'input') return; // Check if this box is in the sequence and hasn't been clicked yet var isCorrectBox = false; for (var i = 0; i < sequence.length; i++) { if (sequence[i] === clickedBox.boxIndex && playerInput.indexOf(clickedBox.boxIndex) === -1) { isCorrectBox = true; break; } } if (isCorrectBox) { // Correct box clicked playerInput.push(clickedBox.boxIndex); clickedBox.isClickable = false; // Disable this box if (playerInput.length >= sequence.length) { // All boxes clicked successfully LK.getSound('correct').play(); completeLevel(); } } else { // Wrong box clicked (either not in sequence or already clicked) LK.getSound('wrong').play(); gameOver(); } } // Complete current level function completeLevel() { gameState = 'waiting'; currentLevel++; LK.setScore(currentLevel - 1); scoreText.setText('Level: ' + currentLevel); instructionText.setText('Great! Next level in 2 seconds...'); // Disable all boxes for (var i = 0; i < boxes.length; i++) { boxes[i].isClickable = false; } // Start next level after delay LK.setTimeout(function () { generateSequence(); showSequence(); }, 2000); } // Handle game over function gameOver() { gameState = 'gameover'; instructionText.setText('monkey x)'); readyButton.visible = false; // Disable all boxes for (var i = 0; i < boxes.length; i++) { boxes[i].isClickable = false; } // Flash screen red LK.effects.flashScreen(0xff6b6b, 1000); // Show game over after delay LK.setTimeout(function () { LK.showGameOver(); }, 1500); } // Start the game function startGame() { generateSequence(); LK.setTimeout(function () { showSequence(); }, 1000); } // Initialize everything createBoxes(); startGame(); // Main game update loop game.update = function () { // Update score display scoreText.setText('Level: ' + currentLevel); };
===================================================================
--- original.js
+++ change.js
@@ -150,10 +150,22 @@
}
}
// Generate new sequence
function generateSequence() {
- // Fixed sequence - same boxes highlighted every level
- sequence = [0, 1, 5, 9, 13, 17, 22, 26, 31, 35];
+ // Generate random sequence based on current level
+ var sequenceLength = Math.min(3 + currentLevel, 15); // Start with 4 boxes, increase by 1 each level, max 15
+ sequence = [];
+ var availableBoxes = [];
+ // Create array of all box indices (0-35)
+ for (var i = 0; i < 36; i++) {
+ availableBoxes.push(i);
+ }
+ // Randomly select boxes for the sequence
+ for (var i = 0; i < sequenceLength; i++) {
+ var randomIndex = Math.floor(Math.random() * availableBoxes.length);
+ sequence.push(availableBoxes[randomIndex]);
+ availableBoxes.splice(randomIndex, 1); // Remove selected box to avoid duplicates
+ }
}
// Show the sequence to player
function showSequence() {
gameState = 'showing';
monkey in peace head. In-Game asset. 2d. High contrast. No shadows
Create a pixel art background image for a 2D mobile game in portrait orientation. The scene should feature a bright blue sky with some pixelated white clouds, and a grassy green field at the bottom. Use a colorful, retro pixel art style (16-bit style), keeping the image light and cheerful. The background should not include any characters or objects, only environment elements. Leave space in the middle of the screen for gameplay elements (like the grid of boxes). Make sure the image loops or tiles well if needed.. In-Game asset. 2d. High contrast. No shadows