incremental-game

incremental-game (Chronostasis)

Incremental game made in HTML, JavaScript, and CSS.
2022-01-13: Updates will be in lesser quantity, but more content in each update.
2022-04-20: I am working on a different game, which uses Vue instead of React. This however, will remain up, and the content from this game will be ported into the new game. I am not great at finishing projects, but this for sure, I will finish. In addition to this, I will produce full tracks for music, instead of just loops, etc. Hope you enjoy!

Link: https://migearu.github.io/incremental-game/main.html

Credits where they’re due

Hector Polanco, Simple-Music-Player
Anton Gustafsson, Fixed responsiveness on mobile.

Things I don’t know how to fix

Buy Amount text field not excluding special characters. Fixed with regex, taken from the OmegaNum.js library (41)

Ideas and Calculations

Some things to note

The formula used for price calculation is image, where b is the base cost, x is the price ratio, and y is the # of item bought (does not include items generated from higher tiers).

Cheating

First of all, I do not care if people cheat, since there is no competition, unless you make one yourself.
To cheat, open the developer console. You should be greeted with this menu.
image
Afterwards, click the two arrows going right at the top
image
From the selection, click the application tab.
image
Then on the sidebar, click “Local Storage”, then “https://migearu.github.io”.
image
You should see a key named “chronostasis-save”, copy the value from there.
image
Open it up in an LZString Base64 compressor/decompressor.
image
Paste, then decode it, and copy into a text editor of your choice.
image
Edit the values based on this.
e.g. {“array”:[10],”sign”:1} = 10, {“array”:[15, 1],”sign”:1} = 1e15, {“array”:[15, 1],”sign”:1} = 1e15, {“array”:[4, 6, 1],”sign”:1} = F4.00000F6
Paste back edited values, encode, then copy.
Paste re-encoded string into the “chronostasis-save” key, and press load game before it autosaves.
The game should reflect these changes afterwards.

Update 1

For the current moment, to save and load, call WriteToStorage(gameData, “chronostasis-save”), and ReadFromStorage(“chronostasis-save”).
Why? Because I am too lazy to fix that right now, however it will be fixed in the next update.

Update 2

In-Game

Included a tab switcher from the “Time” menu to the “Menu” menu, where you can find saving and loading, as well as import/export.
Made good use of that multiplier, current formula is image, where x is equal to the number of tier bought.

Extra

Organized into folders.
Elements now grouped and rendered in separate scripts, to add code readability.

Bugs

Multiplier caps at 1.79e308 (Infinity) because of operator errors, already fixed but change not rolled out yet

Update 3

In-Game

Autobuyers implemented, up to tier 10
Formula for Autobuyer interval is image, where x = the amount of upgrades.
Added a hover effect.
(note: I eventually plan to add a prestige layer, maybe in the next update or two)

Extra

N/A

Bugs

Intervals stuck at 1000 ms.

Update 3.1

In-Game

Properly added Autobuyers, added an on/off switch, as well as properly implementing intervals.

Update 4

In-Game

Prestige

Time Crystal Gain: image, where x is equal to Time Particles
General Multiplier from Time Crystals: image, where x is equal to Time Crystals, and a is an upgradeable value that decreases.

Songs

A new songs tab is available.
As of now, only one song is available, but I do plan on adding more into the future.
Songs are paused by default as well.

Extra

Credit for the song player goes to Hector Polanco.
Added assets folder.

Bugs

None as of yet, although I will try to look through to find any.

Update 4.1

In-Game

Added 2 more tracks. Fixed hardcoded background path.

Update 4.2

In-Game

Fixed a lot of bugs that were pointed out by this thread.

Fixed:
Time Crystals showing up as Time Particles.
Prestige not resetting generators.
Dark mode not working properly; I switched it to dark mode for now, but light mode will be added eventually.

Added:
Autosaving, every 30 secs.
Autoload, on startup.
Buy Max button, sets Buy Amount to 0 automatically.