Sun System

Submitted by Brutus5000 on Wed, 07/20/2016 - 01:27
Semantic
  • The GW universe consists of a large number of sun system.
  • Every sun system has x,y,z-coordinates in the universe.
  • Sun systems will be generated procedurally.
Table name
sun_systems
Table structure
  • id [INT, PRIMARY KEY, AUTO_INCREMENT]
  • name [VARCHAR/20]
  • x,y,z [INT]: 3d coordinates of the sun systems
Calculated Fields
  • Number of planets: SELECT COUNT(id) FROM planets WHERE fk_sun_system = sun_system.id
  • Number of planets for <Faction>: SELECT( SELECT winning_faction FROM battles WHERE fk_planet = planets.id  ORDER BY ended_at DESC LIMIT 1 ) FROM planets WHERE fk_sun_system = sun_systems.id

Add new comment

Restricted HTML

  • Allowed HTML tags: <a href hreflang> <em> <strong> <cite> <blockquote cite> <code> <ul type> <ol start type> <li> <dl> <dt> <dd> <h2 id> <h3 id> <h4 id> <h5 id> <h6 id>
  • Lines and paragraphs break automatically.
  • Web page addresses and email addresses turn into links automatically.