Code edit (8 edits merged)
Please save this source code
User prompt
about the main BigHeart : when score decrease the system with the 6 frames per heart type based on alpha is broken. This requires a deep analysis to find a way that doesn't break current gameplay
Code edit (1 edits merged)
Please save this source code
User prompt
Please fix the bug: 'BigInt is not a function' in or related to this line: 'var tapCount = BigInt(MAX_DISPLAY_NUMBER) - BigInt(1);' Line Number: 1019
User prompt
Please fix the bug: 'BigInt is not a function' in or related to this line: 'var tapCount = BigInt(MAX_DISPLAY_NUMBER) - BigInt(1n);' Line Number: 1019
User prompt
Please fix the bug: 'BigInt is not a function' in or related to this line: 'var tapCount = BigInt(MAX_DISPLAY_NUMBER) - BigInt(1);' Line Number: 1019
User prompt
Please fix the bug: 'BigInt is not a function' in or related to this line: 'var tapCount = BigInt(MAX_DISPLAY_NUMBER) - BigInt(1n);' Line Number: 1019
User prompt
Please fix the bug: 'BigInt is not a function' in or related to this line: 'var tapCount = BigInt(MAX_DISPLAY_NUMBER) - BigInt(1);' Line Number: 1019
User prompt
Please fix the bug: 'Cannot mix BigInt and other types, use explicit conversions' in or related to this line: 'var tapCount = BigInt(MAX_DISPLAY_NUMBER - 1n);' Line Number: 1019
User prompt
Please fix the bug: 'BigInt is not a function' in or related to this line: 'var tapCount = BigInt(MAX_DISPLAY_NUMBER - 1);' Line Number: 1019
User prompt
use BigInt for tapCount and money
Code edit (1 edits merged)
Please save this source code
User prompt
10000000000 => 10 Q : still wrong it shoud be 10000000000 => 10 B Analyze deeply and fix
Code edit (7 edits merged)
Please save this source code
User prompt
when taps is 10000000000 formatTapCount returns 10000000 B" : it's wrong, it should be 10 B
User prompt
currently format function gives : 10000000 => 10000000.000 B it should display non significative zeros
Code edit (1 edits merged)
Please save this source code
Code edit (1 edits merged)
Please save this source code
User prompt
when spawning a gift, set a random rotation winthin a range of -PI/4 +PI/4
Code edit (10 edits merged)
Please save this source code
User prompt
in GiftRain, when a gift moves out of bounds move it back to gift.x = Math.random() * (1948 - 100) + 100; gift.y = -300; // Start above the screen in order to make a countious anim
Code edit (1 edits merged)
Please save this source code
Code edit (1 edits merged)
Please save this source code
User prompt
I don't see gifts falling; I thing activesGifts are not atteched to the GiftRain instance in the GiftRain class
Code edit (1 edits merged)
Please save this source code
===================================================================
--- original.js
+++ change.js
@@ -929,10 +929,11 @@
var SWIPE_THRESHOLD = 10; // Threshold in pixels to distinguish between taps and swipes
var TAP_DETECT_DELAY = 600;
// Declare maxGenerators as a global variable
var maxGenerators = 2;
+var MAX_DISPLAY_NUMBER = 9999999999999999; //9 999 999 999 999 999
// Declare tapCount as a global variable
-var tapCount = 9999999999;
+var tapCount = BigInt(MAX_DISPLAY_NUMBER - 1);
var nbHearts = 10;
var backgroundContainer = new Container();
var middlegroundContainer = new Container();
middlegroundContainer.x = 0;
@@ -968,24 +969,23 @@
// Add a RightBoard instance to the foreground container
var rightBoard = new RightBoard();
foregroundContainer.addChild(rightBoard);
function formatTapCount(taps) {
- //return taps;
+ if (taps <= BigInt(MAX_DISPLAY_NUMBER)) {
+ return taps.toString();
+ }
var suffixes = ['', 'K', 'M', 'B', 'T', 'Q', 'QT', 'S'];
var tier = 0;
var tempTaps = taps;
- // Find the appropriate suffix tier
- while (tempTaps >= 1000 && tier < suffixes.length - 1) {
- tempTaps /= 1000;
+ while (tempTaps >= BigInt(1000) && tier < suffixes.length - 1) {
+ tempTaps /= BigInt(1000);
tier++;
}
- // If less than 10B, return the number with commas
if (tier === 0) {
return tempTaps.toLocaleString();
}
- // Format with up to 3 decimal places and the appropriate suffix, removing non-significant zeros
- log(taps + " => " + (Math.floor(tempTaps * 1000) / 1000).toFixed(3) + ' ' + suffixes[tier]);
- return (Math.floor(tempTaps * 1000) / 1000).toFixed(3) + ' ' + suffixes[tier];
+ log(taps + " => " + (Number(tempTaps) / 1000).toFixed(3) + ' ' + suffixes[tier]);
+ return (Number(tempTaps) / 1000).toFixed(3) + ' ' + suffixes[tier];
}
// Update the tapCountText whenever tapCount changes
function updateTapCountText() {
tapCountText.setText('LOVE\r\n' + formatTapCount(tapCount));
@@ -1038,9 +1038,9 @@
function ProgressManager() {
var self = this;
self.maxHeartBeatsPerSecond = 8; // Add maxHeartBeatsPerSecond property
self.priceIncreaseRate = 1.33; // Extracted price increase rate
- self.money = tapCount; // // TEMP DEBUG !!!// TEMP DEBUG !!!
+ self.money = BigInt(tapCount); // // TEMP DEBUG !!!// TEMP DEBUG !!!
self.generators = {};
self.generatorCounts = {}; // Add a counter for each generator
self.upgrades = {};
self.currentTime = Date.now();
@@ -1085,9 +1085,9 @@
});
// Calculate beats based on generation rate
var beatsToGenerate = Math.floor(tempGenerated / 2); // One beat every 10 taps generated
beatsToGenerate = Math.min(beatsToGenerate, self.maxHeartBeatsPerSecond); // Cap at 5 beats per update to avoid overwhelming
- self.money += tempGenerated;
+ self.money = self.money + BigInt(tempGenerated);
self.updateGeneratorsUi();
// Trigger multiple beats based on generation rate
if (tempGenerated > 0) {
for (var i = 0; i < beatsToGenerate; i++) {
@@ -1102,10 +1102,10 @@
self.checkProgress(); // Check the progress
self.lastUpdateTime = now;
};
self.manualGeneration = function () {
- tapCount++;
- self.money++;
+ tapCount = tapCount + BigInt(1);
+ self.money = self.money + BigInt(1);
log("manualGeneration Tap count: ", tapCount); // Log the tap count
updateTapCountText(); // Update the text display
self.updateGeneratorsUi();
self.checkProgress(); // Check for level up immediately
a big lovely heart
a big stone heart
a big used copper heart
face view of a big bronze heart
face view of a big silver heart
Big shining gold heart verly slightly ornate. face view.
Big precious shiny porcelain heart slightly ornate. face view.
Large precious heart in mother-of-pearl, lightly ornate. Front view.
Large heart in precious ruby, very lightly decorated. Front view.
The most precious large heart in diamond, Front view.
clean pink enamel board witha very thin border
beautifull red gift box.
black plastic 3d triangle. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows
reset button. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows