User prompt
Make it bigger with more walls
User prompt
more bigger
User prompt
Make it bigger
User prompt
Regenerate random maze with player and exit make it square in center of the screen
User prompt
Remove the game and all its assets and objects
User prompt
If click the color start draw without clicking
User prompt
Make the draw button on the lower screen
User prompt
Draw when player teleported
User prompt
Make player smaller
User prompt
Draw at the exact same time of click
User prompt
click player to move
User prompt
Don'tmake player follow currsor make corsor holdplayer to moving anywhere
User prompt
Make the draw line follow the player on the screen
User prompt
Make the line follow the player
User prompt
Don't draw by click draw only by moving the player on the background
User prompt
Make the player drawing by moving not by holding
User prompt
If the mouse button still holded keep drawing the line
User prompt
Make player draw by movment too
User prompt
Make a continiue line not point
User prompt
Please fix the bug: 'TypeError: Graphics is not a constructor' in or related to this line: 'var lineSegment = new Graphics();' Line Number: 26
User prompt
Make infinity draw line not just points
User prompt
when click mouse button dra line
User prompt
Add draw object to the game and set it as the line that the player draw it
User prompt
Add up and down for player
User prompt
Please fix the bug: 'ReferenceError: dragNode is not defined' in or related to this line: 'if (dragNode === self && (self.x !== oldX || self.y !== oldY)) {' Line Number: 41
/****
* Classes
****/
// Create a DrawLine class to represent the line drawn by the player
var DrawLine = Container.expand(function () {
var self = Container.call(this);
var drawLineGraphics = self.attachAsset('Draw', {
anchorX: 0.5,
anchorY: 0.5
});
// Store the previous position to draw a continuous line
self.previousX = null;
self.previousY = null;
// Update method to draw a line segment
self.update = function (currentX, currentY) {
if (self.previousX !== null && self.previousY !== null) {
// Draw a line segment from previous position to current position
var lineSegment = LK.getAsset('Draw', {
anchorX: 0.5,
anchorY: 0.5
});
lineSegment.x = (self.previousX + currentX) / 2;
lineSegment.y = (self.previousY + currentY) / 2;
lineSegment.width = Math.sqrt(Math.pow(currentX - self.previousX, 2) + Math.pow(currentY - self.previousY, 2));
lineSegment.rotation = Math.atan2(currentY - self.previousY, currentX - self.previousX);
game.addChild(lineSegment);
}
// Update previous position
self.previousX = currentX;
self.previousY = currentY;
};
});
// Create a Drawing class for the player
var Drawing = Container.expand(function () {
var self = Container.call(this);
var drawingGraphics = self.attachAsset('player', {
anchorX: 0.5,
anchorY: 0.5,
width: blockSize * 0.8,
// Make the drawing smaller than the player
height: blockSize * 0.8 // Make the drawing smaller than the player
});
});
// Create a Player class
var Player = Container.expand(function () {
var self = Container.call(this);
var playerGraphics = self.attachAsset('player', {
anchorX: 0.5,
anchorY: 0.5,
width: blockSize * 0.5,
height: blockSize * 0.5
});
self.speed = 8;
self.vx = 0;
self.vy = 0;
self.update = function () {
var oldX = self.x;
var oldY = self.y;
self.x += self.vx;
self.y += self.vy;
// Draw a line if the player has moved
if (self.x !== oldX || self.y !== oldY) {
if (!self.drawLine) {
self.drawLine = new DrawLine();
game.addChild(self.drawLine);
}
self.drawLine.update(self.x, self.y);
}
if (self.x < 0) {
self.x = 0;
}
if (self.y < 0) {
self.y = 0;
}
if (self.x > game.width) {
self.x = game.width;
}
if (self.y > game.height) {
self.y = 0;
statusText.timeLeft = 60; // Reset the time left
}
};
});
// Create a Wall class
var Wall = Container.expand(function () {
var self = Container.call(this);
var wallGraphics = self.attachAsset('Wall', {
anchorX: 0.5,
anchorY: 0.5,
width: blockSize,
height: blockSize
});
});
//<Assets used in the game will automatically appear here>
// Create a StatusText class
var StatusText = Text2.expand(function () {
var self = Text2.call(this, 'Time left: 60', {
size: 50,
fill: 0xFFFFFF
});
self.timeLeft = 60;
self.update = function () {
if (LK.ticks % 60 == 0) {
self.timeLeft--;
self.setText('Time left: ' + self.timeLeft);
}
};
});
/****
* Initialize Game
****/
// Check for collision with wall
// Function to generate a random maze
var game = new LK.Game({
width: 2048,
height: 2732,
backgroundColor: 0x000000
});
/****
* Game Code
****/
var background = game.attachAsset('Background1', {
anchorX: 0.5,
anchorY: 0.5,
width: game.width,
height: game.height
});
background.x = game.width / 2;
background.y = game.height / 2;
game.addChild(background);
// Add move event to the game
game.move = function (x, y, obj) {
// Move the player to the y position of the touch or mouse event
if (dragNode) {
player.y = y - player.height / 2;
// Move the player to the x position of the touch or mouse event
player.x = x - player.width / 2;
}
// Always update the line drawing based on player movement
if (!player.drawLine) {
player.drawLine = new DrawLine();
game.addChild(player.drawLine);
}
player.drawLine.update(player.x, player.y);
};
var dragNode = null; // Variable to track dragging
var blockSize = 100;
// Add player to the bottom middle of the screen
var player = game.addChild(new Player());
player.x = game.width / 2;
player.y = game.height - player.height / 2;
// Add status text to the top left of the screen
var statusText = game.addChild(new StatusText());
statusText.x = 20;
statusText.y = 20;
game.down = function (x, y, obj) {
// Move the player to the clicked position
player.x = x;
player.y = y;
};
game.up = function (x, y, obj) {
// Disable dragging when touch or mouse up
dragNode = null;
};
// Add an update function to the game
game.update = function () {};
game.down = function (x, y, obj) {
// Move the player to the clicked position
player.x = x;
player.y = y;
// Draw line immediately at the clicked position
if (!player.drawLine) {
player.drawLine = new DrawLine();
game.addChild(player.drawLine);
}
player.drawLine.update(player.x, player.y);
}; ===================================================================
--- original.js
+++ change.js
@@ -46,10 +46,10 @@
var self = Container.call(this);
var playerGraphics = self.attachAsset('player', {
anchorX: 0.5,
anchorY: 0.5,
- width: blockSize,
- height: blockSize
+ width: blockSize * 0.5,
+ height: blockSize * 0.5
});
self.speed = 8;
self.vx = 0;
self.vy = 0;
Playable maze with orange lines. at black background.. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
2d coin. Ninja face in the coin. red coin. 2 circles inside it. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
Fullscreen, high definition, light, blur, small time watch, colors, wood, for a game titled "Maze" and with the description "Navigate ever-changing mazes! Each level with different background, coins, time speed. Can you finish collecting coins before time is up? Challenge your skills in Maze!". with text on banner "MAZE"!