{"id":374,"date":"2019-05-22T21:55:09","date_gmt":"2019-05-23T01:55:09","guid":{"rendered":"http:\/\/ninecrows.com\/pandamallet\/?p=374"},"modified":"2019-05-22T16:41:09","modified_gmt":"2019-05-22T20:41:09","slug":"looking-at-database-structure-for-cluster","status":"publish","type":"post","link":"https:\/\/ninecrows.com\/pandamallet\/2019\/05\/22\/looking-at-database-structure-for-cluster\/","title":{"rendered":"Looking at database structure for Cluster"},"content":{"rendered":"\n<p>We&#8217;ve framed out the &#8216;Cluster&#8217; game graphically (at least to a first approximation). Currently the cluster generation is handled in Unity and there are no game rules and no save games.<\/p>\n\n\n\n<p>I&#8217;m in the process of roughing out the MySQL database structure that will hold persistent game data and convey it between players and looking at coding up the php code needed to manage this data and implement game turn logic and playing field generation.<\/p>\n\n\n\n<p>Once the basics are sketched out, I expect to remove the generation logic from the Unity code-base and switch things over to use the layouts and turn management provided by the site based php code.<\/p>\n\n\n\n<p>I&#8217;m expecting to see the database side layout break out into:<\/p>\n\n\n\n<ul><li><strong fgid=\"25926\">System Data<\/strong>. Things that control game operation but do not change game to game or player to player.<\/li><li><strong fgid=\"25964\">Player Data<\/strong>. Information about the players that is not related to a particular game. Name, picture or icon, other particulars.<\/li><li><strong fgid=\"26385\">Game Data<\/strong>. Information that is a base part of a particular game run but does not change turn by turn.<\/li><li><strong fgid=\"26906\">Turn Data<\/strong>. Turn and move data for the game.<\/li><\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">System Data<\/h2>\n\n\n\n<ul><li>Star name list<\/li><li>Planet types list<\/li><li>Configuration such as number of stars per game and other similar items.<\/li><\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">Player Data<\/h2>\n\n\n\n<ul><li>Player ID<\/li><li>Player Name<\/li><li>Player picture or icon<\/li><li>Games played<\/li><li>Wins\/Losses<\/li><\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">Game Data<\/h2>\n\n\n\n<ul><li>Stars Information<br>Table with color, location<\/li><li>Planets Information<br>Table with type, properties, max pop, orbit<\/li><\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">Turn Data<\/h2>\n\n\n\n<ul><li>User Move<br>Fleets from -> to. Scouts from -> to.<\/li><li>Resource Production<br>Build Ship here, Build planetary resource here, Spend on research. Form and break fleets.<\/li><li>Combat Resolution<br>Combat results. Remove destroyed ships. Resolve ownership changes. <\/li><\/ul>\n","protected":false},"excerpt":{"rendered":"<p>We&#8217;ve framed out the &#8216;Cluster&#8217; game graphically (at least to a first approximation). Currently the cluster generation is handled in Unity and there are no game rules and no save games. I&#8217;m in the process of roughing out the MySQL database structure that will hold persistent game data and convey it between players and looking &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/ninecrows.com\/pandamallet\/2019\/05\/22\/looking-at-database-structure-for-cluster\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Looking at database structure for Cluster&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[15,19,9,16],"tags":[],"_links":{"self":[{"href":"https:\/\/ninecrows.com\/pandamallet\/wp-json\/wp\/v2\/posts\/374"}],"collection":[{"href":"https:\/\/ninecrows.com\/pandamallet\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ninecrows.com\/pandamallet\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ninecrows.com\/pandamallet\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/ninecrows.com\/pandamallet\/wp-json\/wp\/v2\/comments?post=374"}],"version-history":[{"count":4,"href":"https:\/\/ninecrows.com\/pandamallet\/wp-json\/wp\/v2\/posts\/374\/revisions"}],"predecessor-version":[{"id":378,"href":"https:\/\/ninecrows.com\/pandamallet\/wp-json\/wp\/v2\/posts\/374\/revisions\/378"}],"wp:attachment":[{"href":"https:\/\/ninecrows.com\/pandamallet\/wp-json\/wp\/v2\/media?parent=374"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ninecrows.com\/pandamallet\/wp-json\/wp\/v2\/categories?post=374"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ninecrows.com\/pandamallet\/wp-json\/wp\/v2\/tags?post=374"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}