User prompt
Set the timer spawn rate to 50%
User prompt
Fix Bug: 'ReferenceError: timerSeconds is not defined' in this line: 'timerSeconds += 10; // Add 10 seconds to the timer' Line Number: 852
User prompt
Make it so every falling item only adds 1 second in every difficulty. Exclude the timeritem
User prompt
Fix Bug: 'ReferenceError: timerSeconds is not defined' in this line: 'timerSeconds += 10; // Add 10 seconds to the timer' Line Number: 850
User prompt
Fix Bug: 'ReferenceError: timerSeconds is not defined' in this line: 'timerSeconds += 1; // Add 1 second to the timer' Line Number: 850
User prompt
Make it so the ball and the coffee bean only add 1 second in every difficulty.
User prompt
Fix Bug: 'ReferenceError: timerSeconds is not defined' in this line: 'timerTxt.setText(timerSeconds.toString()); // Update the timer display instantly' Line Number: 674
User prompt
Fix Bug: 'ReferenceError: timerSeconds is not defined' in this line: 'timerSeconds += gameSettings.difficulty === 'hard' ? 5 : gameSettings.difficulty === 'insane' ? 5 : gameSettings.difficulty === 'easy' ? 20 : 1; // Add 1 second to the timer' Line Number: 672
User prompt
Further develop the 60 second countdown without breaking anything. Do not touch anything from the 3 second countdown.
User prompt
Further develop on the 60 second countdown without breaking anything.
User prompt
Start further development on features without breaking anything.
User prompt
Start further development on features without breaking anything.
User prompt
Fix Bug: 'TypeError: TimerItem.updateItems is not a function' in this line: 'TimerItem.updateItems();' Line Number: 776
User prompt
Fix Bug: 'TypeError: TimerItem.updateItems is not a function' in this line: 'TimerItem.updateItems();' Line Number: 776
User prompt
Fix Bug: 'TypeError: Cannot read properties of undefined (reading 'forEach')' in this line: 'CoffeeBean.beans.forEach(function (bean) {' Line Number: 771
User prompt
Fix Bug: 'TypeError: CoffeeBean.updateBeans is not a function' in this line: 'CoffeeBean.updateBeans();' Line Number: 771
User prompt
Fix Bug: 'ReferenceError: coffeeBeanInstance is not defined' in this line: 'if (coffeeBeanInstance) {' Line Number: 771
User prompt
Fix Bug: 'TypeError: CoffeeBean.updateBeans is not a function' in this line: 'CoffeeBean.updateBeans();' Line Number: 771
User prompt
Fix Bug: 'ReferenceError: coffeeBeanInstance is not defined' in this line: 'coffeeBeanInstance.updateBeans();' Line Number: 771
User prompt
Fix Bug: 'TypeError: CoffeeBean.updateBeans is not a function' in this line: 'CoffeeBean.updateBeans();' Line Number: 771
User prompt
Fix Bug: 'TypeError: CoffeeBean.updateBeans is not a function' in this line: 'CoffeeBean.updateBeans();' Line Number: 771
User prompt
Continue further development on features.
User prompt
Redo how the game saves the value for what difficulty buttons is clicked and what the last color of the difficulty buttons was when the settings gui was last opened.
User prompt
Make it so the coffee beans and balls for gamemodes other than normal increase the 60 second counter by only 1
User prompt
Redo the time increase calculation for the falling items ball and coffee bean for gamemodes other than normal.
===================================================================
--- original.js
+++ change.js
@@ -1,7 +1,35 @@
/****
* Classes
****/
+var DifficultyButton = Container.expand(function (difficulty, label, tint, yPos) {
+ var self = Container.call(this);
+ self.difficulty = difficulty;
+ self.button = self.createAsset(difficulty + 'Button', label + ' Difficulty', 0.5, 0.5);
+ self.button.tint = tint;
+ var buttonText = new Text2(label, {
+ size: 100,
+ fill: '#ffffff',
+ font: 'bold',
+ stroke: '#000000',
+ strokeThickness: 8
+ });
+ buttonText.anchor.set(0.5, 0.5);
+ self.button.addChild(buttonText);
+ self.addChild(self.button);
+ self.button.x = 0;
+ self.button.y = yPos;
+ self.lastClickTime = 0;
+ self.button.on('down', function () {
+ var currentTime = Date.now();
+ if (currentTime - self.lastClickTime >= 1000) {
+ gameSettings.setDifficulty(self.difficulty);
+ updateButtonColors(self.difficulty);
+ animateButtonZoom(self.button);
+ self.lastClickTime = currentTime;
+ }
+ });
+});
var RotateAndZoomAnimation = Container.expand(function (target, zoomFactor, animationFrames, rotations) {
var self = Container.call(this);
self.target = target;
self.zoomFactor = zoomFactor;
@@ -124,14 +152,8 @@
normal: 0x66ff00,
hard: 0xFF0000,
insane: 0xFF0000
};
- self.buttonTints = {
- easy: 0xFF0000,
- normal: 0xFF0000,
- hard: 0xFF0000,
- insane: 0xFF0000
- };
self.toggleSound = function () {
self.soundEnabled = !self.soundEnabled;
};
self.setDifficulty = function (difficulty) {
@@ -221,58 +243,16 @@
};
// Add difficulty selection buttons
var buttonPadding = 10;
- var easyButton = self.createAsset('easyButton', 'Easy Difficulty', 0.5, 0.5);
- easyButton.tint = 0xFF0000; // Set button color to bright red
- var easyButtonText = new Text2('Easy', {
- size: 100,
- fill: '#ffffff',
- font: 'bold',
- stroke: '#000000',
- strokeThickness: 8
- });
- easyButtonText.anchor.set(0.5, 0.5);
- easyButtonText.x = 0;
- easyButtonText.y = 0;
- easyButton.addChild(easyButtonText);
+ var easyButton = new DifficultyButton('easy', 'Easy', 0xFF0000, buttonPadding - 1250 + 350 + 30);
self.addChild(easyButton);
- easyButton.x = 0;
- easyButton.y = buttonPadding - 1250 + 350 + 30;
- var normalButton = self.createAsset('normalButton', 'Normal Difficulty', 0.5, 0.5);
- normalButton.tint = 0x66ff00; // Set button color to green
- var normalButtonText = new Text2('Normal', {
- size: 100,
- fill: '#ffffff',
- font: 'bold',
- stroke: '#000000',
- strokeThickness: 8
- });
- normalButtonText.anchor.set(0.5, 0.5);
- normalButtonText.x = 0;
- normalButtonText.y = 0;
- normalButton.addChild(normalButtonText);
+ var normalButton = new DifficultyButton('normal', 'Normal', 0x66ff00, easyButton.y + easyButton.height + buttonPadding);
self.addChild(normalButton);
- normalButton.x = 0;
- normalButton.y = easyButton.y + easyButton.height + buttonPadding;
- var hardButton = self.createAsset('hardButton', 'Hard Difficulty', 0.5, 0.5);
- hardButton.tint = 0xFF0000; // Set button color to bright red
- var hardButtonText = new Text2('Hard', {
- size: 100,
- fill: '#ffffff',
- font: 'bold',
- stroke: '#000000',
- strokeThickness: 8
- });
- hardButtonText.anchor.set(0.5, 0.5);
- hardButtonText.x = 0;
- hardButtonText.y = 0;
- hardButton.addChild(hardButtonText);
+ var hardButton = new DifficultyButton('hard', 'Hard', 0xFF0000, normalButton.y + normalButton.height + buttonPadding);
self.addChild(hardButton);
- hardButton.x = 0;
- hardButton.y = normalButton.y + normalButton.height + buttonPadding;
- var insaneButton = self.createAsset('insaneButton', 'Insane Difficulty', 0.5, 0.5);
- insaneButton.tint = 0xFF0000; // Override the default color to red
+ var insaneButton = new DifficultyButton('insane', 'Insane', 0xFF0000, hardButton.y + hardButton.height + buttonPadding);
+ self.addChild(insaneButton);
insaneButton.on('down', function () {
easyButton.tint = 0xFF0000; // Revert to red
normalButton.tint = 0xFF0000; // Revert to red
hardButton.tint = 0xFF0000; // Revert to red
@@ -335,12 +315,13 @@
insaneButton.lastClickTime = currentTime;
}
});
function updateButtonColors(currentDifficulty) {
- easyButton.tint = currentDifficulty === 'easy' ? 0x66ff00 : 0xFF0000;
- normalButton.tint = currentDifficulty === 'normal' ? 0x66ff00 : 0xFF0000;
- hardButton.tint = currentDifficulty === 'hard' ? 0x66ff00 : 0xFF0000;
- insaneButton.tint = currentDifficulty === 'insane' ? 0x66ff00 : 0xFF0000;
+ self.children.forEach(function (child) {
+ if (child instanceof DifficultyButton) {
+ child.button.tint = child.difficulty === currentDifficulty ? 0x66ff00 : 0xFF0000;
+ }
+ });
}
});
// Initialize game settings
var SettingsButton = Container.expand(function () {
@@ -543,11 +524,9 @@
shadowGraphics.alpha = 0.5;
self.addChild(shadowGraphics);
self.addChild(coffeeBeanGraphics);
self.speed = Math.random() * 3 + 2;
- // Score value for each coffee bean based on difficulty
- self.scoreValue = gameSettings.difficulty === 'hard' ? 10 : gameSettings.difficulty === 'insane' ? 15 : gameSettings.difficulty === 'easy' ? 3 : 5;
- self.timeIncrease = gameSettings.difficulty === 'normal' ? 1 : 1;
+ self.scoreValue = 5; // Default score value for each coffee bean
self.move = function () {
var speedMultiplier = gameSettings.difficulty === 'hard' ? 16 : gameSettings.difficulty === 'insane' ? 40 : gameSettings.difficulty === 'easy' ? 4 : 8;
self.y += self.speed * speedMultiplier;
self.createParticle();
@@ -588,11 +567,9 @@
shadowGraphics.alpha = 0.5;
self.addChild(shadowGraphics);
self.addChild(ballGraphics);
self.speed = Math.random() * 3 + 2;
- // Score value for each ball based on difficulty
- self.scoreValue = gameSettings.difficulty === 'hard' ? 2 : gameSettings.difficulty === 'insane' ? 3 : gameSettings.difficulty === 'easy' ? 1 : 1;
- self.timeIncrease = gameSettings.difficulty === 'normal' ? 1 : 1;
+ self.scoreValue = 1; // Default score value for each ball
self.move = function () {
var speedMultiplier = gameSettings.difficulty === 'hard' ? 4 : gameSettings.difficulty === 'insane' ? 10 : gameSettings.difficulty === 'easy' ? 1 : 2;
self.y += self.speed * speedMultiplier;
self.createParticle();
@@ -717,13 +694,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
function updateFallingObjects() {
// Move existing falling objects
balls.forEach(function (ball) {
ball.move();
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.