{"id":27860,"date":"2017-01-29T03:01:54","date_gmt":"2017-01-28T17:01:54","guid":{"rendered":"http:\/\/www.rjmprogramming.com.au\/ITblog\/?p=27860"},"modified":"2017-01-29T17:21:41","modified_gmt":"2017-01-29T07:21:41","slug":"golden-ratio-game-primer-tutorial","status":"publish","type":"post","link":"https:\/\/www.rjmprogramming.com.au\/ITblog\/golden-ratio-game-primer-tutorial\/","title":{"rendered":"Golden Ratio Game Primer Tutorial"},"content":{"rendered":"<div style=\"width: 230px\" class=\"wp-caption alignnone\"><a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/golden_ratio_game.html\"><img decoding=\"async\" style=\"border: 15px solid pink;\" alt=\"Golden Ratio Game Primer Tutorial\" src=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/golden_ratio_game.JPG\" title=\"Golden Ratio Game Primer Tutorial\"  style=\"float:left;\"  \/><\/a><p class=\"wp-caption-text\">Golden Ratio Game Primer Tutorial<\/p><\/div>\n<p>Today we have a Golden Ratio Game for you.  In mathematics and architectural design, ther is a ratio of rectangular dimensions that appeals to the human pysche, and this magical irrational number, close to &#8230;<\/p>\n<p><code>1.6180339887<\/code><\/p>\n<p> &#8230; we gleaned from Wikipedia&#8217;s <a target=_blank title='Golden Ratio information from Wikipedia ... thanks' href='https:\/\/en.m.wikipedia.org\/wiki\/Golden_ratio'>Golden Ratio<\/a> webpage, so, thanks.<\/p>\n<p>These Golden Ratio proportions are no mathematical accident, and you should read more at that Wikipedia link above, which, in summary, tells us that that irrational number above equates to &#8230;<\/p>\n<p><code>(1 + \u221a5) \/ 2<\/code><\/p>\n<p>The code today is HTML with some Javascript DOM workings could be called <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/golden_ratio_game.html_GETME\" title=\"golden_ratio_game.html\">golden_ratio_game.html<\/a> And you can try it out with today&#8217;s <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/golden_ratio_game.html\" title=\"Click picture\">live run<\/a> link, and see whether you can pick what appeals to so many others.  As with many games, it features lots of calls such as &#8230;<br \/>\n<code><br \/>\ncolis[0]=bcols[<a target=_blank title='Math.floor information from w3schools' href='http:\/\/www.w3schools.com\/jsref\/jsref_floor.asp'>Math.floor<\/a>(<a target=_blank title='Math.random information from w3schools' href='http:\/\/www.w3schools.com\/jsref\/jsref_random.asp'>Math.random<\/a>() * bcols.length)];<br \/>\n<\/code><\/p>\n<p> &#8230; to add that element of randomosity to your web application games.<\/p>\n<p>If this was interesting you may be interested in <a title='Click here to see topics in which you might be interested' href='#d27860' onclick='var dv=document.getElementById(\"d27860\"); dv.innerHTML = \"&lt;iframe width=670 height=600 src=\" + \"https:\/\/www.rjmprogramming.com.au\/ITblog\/tag\/game\/\" + \"&gt;&lt;\/iframe&gt;\"; dv.style.display = \"block\";'>this<\/a> too.<\/p>\n<div id='d27860' style='display: none; border-left: 2px solid green; border-top: 2px solid green;'><\/div>\n","protected":false},"excerpt":{"rendered":"<p>Today we have a Golden Ratio Game for you. In mathematics and architectural design, ther is a ratio of rectangular dimensions that appeals to the human pysche, and this magical irrational number, close to &#8230; 1.6180339887 &#8230; we gleaned from &hellip; <a href=\"https:\/\/www.rjmprogramming.com.au\/ITblog\/golden-ratio-game-primer-tutorial\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[12,15,37],"tags":[2129,476,477,2131,576,2130,652,752,997,2132,1319],"class_list":["post-27860","post","type-post","status-publish","format-standard","hentry","category-elearning","category-games","category-tutorials","tag-architecture","tag-game","tag-games-2","tag-golden-ratio","tag-html","tag-irrational-number","tag-javascript","tag-mathematics","tag-programming","tag-rectangle","tag-tutorial"],"_links":{"self":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts\/27860"}],"collection":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/comments?post=27860"}],"version-history":[{"count":13,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts\/27860\/revisions"}],"predecessor-version":[{"id":27906,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts\/27860\/revisions\/27906"}],"wp:attachment":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/media?parent=27860"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/categories?post=27860"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/tags?post=27860"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}