add autosave, add gradma pic after buying it#2
Conversation
| { name: 'Grandma', price: 100, cps: 1, count: 0}, | ||
| { name: 'Farm', price: 1000, cps: 10, count: 0}, | ||
| { name: 'Factory', price: 10_000, cps: 100, count: 0}, | ||
| { name: 'Factory', price: 100000, cps: 100, count: 0}, |
There was a problem hiding this comment.
Feel free to leave _ in between as this is used to make it easier to understand big numbers. _ itself does nothing but you can more easier understand wether it is 10k or 100k
| cps+=building.cps*building.count; | ||
| }); | ||
| return cps; | ||
| // Автосохранение |
There was a problem hiding this comment.
Me and most of worlds population does not understand this comment. All code is supposed to be in english since it is universally accepted language.
| { name: 'Farm', price: 1000, cps: 10, count: 0}, | ||
| { name: 'Factory', price: 10_000, cps: 100, count: 0}, | ||
| { name: 'Factory', price: 100000, cps: 100, count: 0}, | ||
| { name: 'Factory upgrade', price: 1000000, cps: 1000, count: 0} |
There was a problem hiding this comment.
Not really an upgrade is it if its under the buildings and does the same thing
| const saveGameState = () => { | ||
| const gameState = { | ||
| cookies: cookies.value, | ||
| buildings: buildings.value.map(b => ({ |
There was a problem hiding this comment.
why are you mapping this to exact same structure?
| if (savedData) { | ||
| const parsedData = JSON.parse(savedData); | ||
| cookies.value = parsedData.cookies || 0; | ||
| buildings.value = buildings.value.map(b => { |
There was a problem hiding this comment.
again if you saved it shouldn't it still be same?
|
|
||
| setInterval(() => { | ||
| cookies.value += cps.value; | ||
| cookies.value += cps.value / 10; |
There was a problem hiding this comment.
okay we do this 10 times more so give 10 times less cookies but why? we could also do this every 1 ms and give 1000 times less cookies? Can you come up with idea why it would be bad idea?
|
Yes i can. To force people play more and spend more time in the game, if
we’re talking about actual site, we will make more money from
advertisements and donations to upgrade:) i hope)))
Чт, 3 апр. 2025 г. в 17:23, Kaspar Martin Suursalu ***@***.***
…:
***@***.**** commented on this pull request.
------------------------------
In src/pages/CookieClicker.vue
<#2 (comment)>
:
> @@ -70,63 +70,65 @@ const cps = computed(() =>
);
setInterval(() => {
- cookies.value += cps.value;
+ cookies.value += cps.value / 10;
okay we do this 10 times more so give 10 times less cookies but why? we
could also do this every 1 ms and give 1000 times less cookies? Can you
come up with idea why it would be bad idea?
—
Reply to this email directly, view it on GitHub
<#2 (review)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/BIF4VHCNSHVL6NBKTSRS5DD2XU76DAVCNFSM6AAAAABZOOLXG2VHI2DSMVQWIX3LMV43YUDVNRWFEZLROVSXG5CSMV3GSZLXHMZDONBQGA3TOMZRGM>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
Added autosave only for Cookie
Added grandama pick (not nude) appearance only after buying
Automatic display of pictures
For each building: 1 + (number / 10) pictures (every +10 buildings = +1 picture).
Flexible layout
Pictures are moved to new lines when there is not enough space (is-flex-wrap-wrap).
Optimizations
Unique keys for v-for
Removed unnecessary calculations
Refresh cookies every 0.1 sec instead of 1 sec
Fixes
Check if cookies are sufficient before purchase
Formatting numbers (1_000 instead of 1000)
Visual
Added indents between elements (m-2, mb-3).
By help of AI)))))