Skip to content

gsroot/cosmos-simulation

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Cosmos Simulation

A realistic space travel and orbital mechanics simulator built with HTML5 Canvas and JavaScript.

Features

  • Realistic Orbital Mechanics: Based on Kepler's laws with accurate gravitational physics
  • Auto-Pilot System: Automatically navigate to target planets
  • Stable Orbit Mode: Engage in stable circular orbits around celestial bodies using relative coordinate systems
  • Solar System Exploration: Navigate through our solar system including:
    • Inner planets: Mercury, Venus, Earth (with Moon), Mars
    • Outer planets: Jupiter (with Io), Saturn, Uranus, Neptune, Pluto

Controls

  • Arrow Keys / WASD: Rotate and thrust
  • Space: Main thruster
  • Shift: Cruise mode (high-speed travel)
  • X: Emergency stop / Parking brake
  • Click on planet: Engage auto-pilot or orbit

Minimap Controls

  • Mouse Wheel / -/=: Zoom in/out
  • 0: Reset zoom
  • Click on planet: Navigate to target

How to Play

  1. Open index.html in a modern web browser
  2. Use controls to navigate your spacecraft
  3. Click on planets to automatically travel to them
  4. Engage orbit mode when you arrive at your destination

Physics

The game uses realistic orbital mechanics:

  • Gravitational force: F = GM/r²
  • Orbital velocity: v = √(GM/r)
  • Angular velocity: ω = √(GM/r³)

Technologies Used

  • HTML5 Canvas
  • Vanilla JavaScript
  • CSS3

License

MIT

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published