User prompt
Fix Bug: 'TypeError: self.particlePool.createParticle is not a function' in this line: 'var particle = self.particlePool.createParticle(self.x, self.y);' Line Number: 567
User prompt
Fix Bug: 'Error: The supplied DisplayObject must be a child of the caller' in this line: 'game.addChildAt(particle, game.getChildIndex(self.asset) - 1);' Line Number: 503
User prompt
Fix Bug: 'Error: The supplied DisplayObject must be a child of the caller' in this line: 'game.addChildAt(particle, game.getChildIndex(self.asset) - 1);' Line Number: 502
User prompt
Fix Bug: 'ReferenceError: particle is not defined' in this line: 'game.addChildAt(particle, game.getChildIndex(self.asset) - 1);' Line Number: 499
User prompt
The particle layer of the coffee bean needs to be 1 below the layer of the coffeebean asset
User prompt
set spawnrate of coffee bean to 50%
User prompt
Fix Bug: 'ReferenceError: sourceObject is not defined' in this line: 'if (particle && sourceObject && game.children.includes(sourceObject)) {' Line Number: 424
User prompt
The coffee bean needs to be a layer above the particle it produces
User prompt
The coffee bean needs to be above the particle it produces
User prompt
Further the development of the game while using all sources and assets.
User prompt
Fix Bug: 'TypeError: self.getChildByName is not a function' in this line: 'var coffeeBeanGraphics = self.getChildByName('CoffeeBeanGraphics');' Line Number: 510
User prompt
Set coffeebean spawnrate to 50%
User prompt
Organize the code for easier usability.
User prompt
Fix Bug: 'TypeError: LK.getAsset(...) is not a constructor' in this line: 'var objectGraphics = new (LK.getAsset(assetId, assetDescription, 0.5, 0.5))();' Line Number: 19
User prompt
Fix Bug: 'TypeError: LK.getAsset(...) is not a constructor' in this line: 'var objectGraphics = new (LK.getAsset(assetId, assetDescription, 0.5, 0.5))();' Line Number: 19
User prompt
The pause feature is broken
User prompt
Fix Bug: 'ReferenceError: moveFallingObjects is not defined' in this line: 'moveFallingObjects();' Line Number: 828
User prompt
Fix Bug: 'Uncaught TypeError: FallingObject.extend is not a function' in this line: 'var CoffeeBean = FallingObject.extend(function () {' Line Number: 673
User prompt
Further the development of the game while using all sources and assets.
User prompt
Further the development of the game while using all sources.
User prompt
Further the development of the game while using all sources.
User prompt
The ball and coffee beans will always add just 1 second to the 60 second countdown.
User prompt
Further development of the game.
User prompt
The color of the difficulty buttons should correlate the difficulty that is on. The color red means the difficulty is not on. The color green means the difficulty is on. The difficulty that is on when you start the game is "Normal"
User prompt
Set the spawnrate of the timer to 50%
===================================================================
--- original.js
+++ change.js
@@ -492,9 +492,9 @@
shadowGraphics.y = coffeeBeanGraphics.height * 0.1;
shadowGraphics.alpha = 0.5;
self.addChild(shadowGraphics);
self.addChild(coffeeBeanGraphics);
- self.speed = (Math.random() * 3 + 2) * 8; // Coffee beans will have speeds between 16 and 40
+ self.speed = (Math.random() * 3 + 2) * (gameSettings.difficulty === 'hard' ? 16 : gameSettings.difficulty === 'insane' ? 40 : gameSettings.difficulty === 'easy' ? 4 : 8); // Coffee beans will have speeds between 16 and 40
self.scoreValue = 5; // Default score value for each coffee bean
self.move = function () {
self.y += self.speed;
self.createParticle();
@@ -534,9 +534,9 @@
shadowGraphics.y = ballGraphics.height * 0.1;
shadowGraphics.alpha = 0.5;
self.addChild(shadowGraphics);
self.addChild(ballGraphics);
- self.speed = (Math.random() * 3 + 2) * 2; // Balls will have speeds between 4 and 10
+ self.speed = (Math.random() * 3 + 2) * (gameSettings.difficulty === 'hard' ? 4 : gameSettings.difficulty === 'insane' ? 10 : gameSettings.difficulty === 'easy' ? 1 : 2); // Balls will have speeds between 4 and 10
self.scoreValue = 1; // Default score value for each ball
self.move = function () {
self.y += self.speed;
self.createParticle();
@@ -599,15 +599,13 @@
var bounds = self.getBounds();
var ballBounds = ball.getBounds();
if (bounds.x < ballBounds.x + ballBounds.width && bounds.x + bounds.width > ballBounds.x && bounds.y < ballBounds.y + ballBounds.height && bounds.y + bounds.height > ballBounds.y) {
LK.setScore(LK.getScore() + ball.scoreValue);
- timerSeconds += 1; // Add 1 second to the timer
+ timerSeconds += gameSettings.difficulty === 'hard' ? 5 : gameSettings.difficulty === 'insane' ? 5 : gameSettings.difficulty === 'easy' ? 20 : 1; // Add 1 second to the timer
updateScoreDisplay();
timerTxt.setText(timerSeconds.toString()); // Update the timer display instantly
LK.effects.flashObject(ball, 0xffff00, 300); // Add a yellow glow effect to the ball for 300ms when caught
self.animate(); // Trigger cup animation when a ball is collected
- LK.effects.flashObject(ball, 0xffff00, 300); // Add a yellow glow effect to the ball for 300ms when caught
- self.animate(); // Trigger cup animation when a ball is collected
return true;
}
return false;
};
@@ -663,13 +661,13 @@
/****
* Game Code
****/
+// Initialize game settings
+// Create and set the new background
// Function to create a splash effect
// Replace basic splash graphics with enhanced SplashGraphics
// Function to create a splash effect
-// Create and set the new background
-// Initialize game settings
var gameSettings = new GameSettings();
game.showSettingsGUI = function () {
var settingsGUI = new SettingsGUI();
settingsGUI.x = 2048 / 2;
@@ -717,31 +715,31 @@
scoreTxt.setText(score.toString());
}
// Create a function to add a new ball or coffee bean
-CoffeeBean.create = function () {
+function addCoffeeBean() {
var coffeeBean = new CoffeeBean();
balls.push(coffeeBean);
game.addChildAt(coffeeBean, game.getChildIndex(settingsButton) - 1);
-};
-TimerItem.create = function () {
+}
+function addTimerItem() {
var timerItem = new TimerItem();
balls.push(timerItem);
game.addChildAt(timerItem, game.getChildIndex(settingsButton) - 1);
-};
-Ball.create = function () {
+}
+function addBall() {
var ball = new Ball();
balls.push(ball);
game.addChildAt(ball, game.getChildIndex(settingsButton) - 1);
-};
-function decideFallingObject() {
+}
+function spawnFallingObjects() {
var randomChance = Math.random();
if (randomChance < 0.05) {
- CoffeeBean.create();
+ addCoffeeBean();
} else if (randomChance >= 0.05 && randomChance < 0.06) {
- TimerItem.create();
+ addTimerItem();
} else {
- Ball.create();
+ addBall();
}
}
// Create a function to end the game
@@ -818,10 +816,9 @@
// Handle collisions
handleCollisions();
- // Add new ball
+ // Spawn falling objects
if (!isPaused && LK.ticks % 60 == 0) {
- // Every second
- decideFallingObject();
+ spawnFallingObjects();
}
});
\ No newline at end of file
Coffee droplet.. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. Shadows at the bottom.
Have the coffee cup open at the top
High end Coffee Shop. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. Shadows at the bottom.
Coffee trail going vertical. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. Shadows at the bottom.
Coffee splashing effect. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No Shadows.
Black circle with a bit of transparency.
Coffee Bean With Nothing Else. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
Clock, Nothing else in the image.. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
A white particle trail, vertical. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
Remove the plus from this image
Red X. Nothing else.. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
White rectangle, curved corners. Small black border. Simple, modern. Aspect ratio 1550 * 2500.. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
Include only the spike.
Remove the bottom part that is not coming from the center explosion
Rectangular coffee themed start button. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
Remove the random stuff below the question mark
Coffee themed button which has the text "gamemode". Make the aspect ratio of this button 5:1. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.