https://github.com/clemix37/chrono-cosmos
đšī¸ Idle Web game about traveling through space & time đ
https://github.com/clemix37/chrono-cosmos
game-development javascript javascript-game typescript typescript-game
Last synced: about 1 month ago
JSON representation
đšī¸ Idle Web game about traveling through space & time đ
- Host: GitHub
- URL: https://github.com/clemix37/chrono-cosmos
- Owner: Clemix37
- License: mit
- Created: 2023-09-26T11:42:36.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-10-15T16:28:00.000Z (over 1 year ago)
- Last Synced: 2024-10-16T22:19:08.381Z (over 1 year ago)
- Topics: game-development, javascript, javascript-game, typescript, typescript-game
- Language: TypeScript
- Homepage: https://clemix37.github.io/chrono-cosmos/
- Size: 1.07 MB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README







# ChronoCosmos
đšī¸ Idle Web game about traveling through space & time đ

## History
You are Jack, a time-traveler and space explorer. Your main objective is to restore life on this planet, that once was destroyed because of Humans' space programs.
Take great care, you could die outside of your base ...
## Game loop
Collect energy => Buy / upgrade components => unlock resources => travel further => upgrade spaceship => repeat
## Design
This was the desirable design (Generated by ChatGPT v3):

## Development
Selection of the character is still in development.
You enter the game by selecting a player and its statistics.
## Tests
### Formulas
`toDecimal` should round a decimal to the number of decimals given in arguments, by default 2
Ex:
- `toDecimal(2.4156844)` => `2.42`
- `toDecimal(2.4136844)` => `2.41`
- `toDecimal(2.4156844, 3)` => `2.416`
- `toDecimal(2.4136844, 3)` => `2.414`
- `toDecimal(2.4156844, 4)` => `2.4157`
- `toDecimal(2.4136844, 4)` => `2.4137`
`formatEnergy` should format the energy based on the number itself
Ex:
- `formatEnergy(0)` => `0`
- `formatEnergy(1)` => `1`
- `formatEnergy(100)` => `100`
- `formatEnergy(999)` => `999`
- `formatEnergy(1e3)` => `1K`
- `formatEnergy(1e4)` => `10K`
- `formatEnergy(999999)` => `999.999K`
- `formatEnergy(1e7)` => `10M`
- `formatEnergy(1e10)` => `10B`
### Data
`getRandomFromArray` should return random defined element from array
`generateRandomId` should return a random id based on current date for uniqueness
### Config
`getDefaultConfig` should return the default config without player's name, level to 0 and the status "not started"
### Character
`Character` should be a class containing id, name, age, speed, intelligence, strength properties and should return a template with `getDisplayTemplate`
`generateRandomStat` should return random stats between max and minimum of each statistic
`generateThreeRandomCharacters` should create three different characters, return an array containing the three and each one having different values
`getCharacterGeneratedById` should get the character created with this id and return it
### Game Content
`upgrade` should add a level to the current one, and update the upgrade cost
## Installation
```bash
git clone https://github.com/Clemix37/chrono-cosmos.git
cd chrono-cosmos
npm install # install dependencies
npm run build # build typescript files
npm run dev # launch live-server on index.html file
```
## Roadmap
- [x] First UI design
- [x] Create a GameStateManager
- [x] Create a ScreenManager
- [x] Create a DisplayManager
- [x] Add tests for formulas, data and config
- [x] Add tests for game state
- [x] Remake the UI of character selection
- [ ] Change persistence data inside localstorage using string (like [Cookie Clicker](https://orteil.dashnet.org/cookieclicker/))
- [ ] Add more components / resources (maybe through AI for infinite ideas ?)
- [ ] Random events like meteorites or anomalies
- [ ] Add animations
## Contributing
PRs welcome !
If necessary, create issues for ideas, bugs etc.
## License
[MIT](https://choosealicense.com/licenses/mit/) â