Skip to content

Clemix37/chrono-cosmos

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

49 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

Version License Build Made with Contributions GitHub Repo stars Tests

ChronoCosmos

๐Ÿ•น๏ธ Idle Web game about traveling through space & time ๐Ÿš€ ChronoCosmos

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):
ChronoCosmos

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

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

  • First UI design
  • Create a GameStateManager
  • Create a ScreenManager
  • Create a DisplayManager
  • Add tests for formulas, data and config
  • Add tests for game state
  • Remake the UI of character selection
  • Change persistence data inside localstorage using string (like Cookie Clicker)
  • 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 โœ…

About

๐Ÿ•น๏ธ Idle Web game about traveling through space & time ๐Ÿš€

Topics

Resources

License

Stars

Watchers

Forks

Contributors 2

  •  
  •