{"id":13846,"date":"2015-04-01T05:06:10","date_gmt":"2015-03-31T18:06:10","guid":{"rendered":"http:\/\/www.rjmprogramming.com.au\/wordpress\/?p=13846"},"modified":"2020-04-18T09:57:53","modified_gmt":"2020-04-17T23:57:53","slug":"html-canvas-pros-and-cons-game-primer-tutorial","status":"publish","type":"post","link":"https:\/\/www.rjmprogramming.com.au\/ITblog\/html-canvas-pros-and-cons-game-primer-tutorial\/","title":{"rendered":"HTML Canvas Pros and Cons Game Primer Tutorial"},"content":{"rendered":"<div style=\"width: 230px\" class=\"wp-caption alignnone\"><a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/ProsAndCons\/\"><img decoding=\"async\" style=\"float:left; border: 15px solid pink;\" alt=\"HTML Canvas Pros and Cons Game Primer Tutorial\" src=\"http:\/\/www.rjmprogramming.com.au\/PHP\/ProsAndCons\/ProsAndConsZ.jpg\" title=\"HTML Canvas Pros and Cons Game Primer Tutorial\"    \/><\/a><p class=\"wp-caption-text\">HTML Canvas Pros and Cons Game Primer Tutorial<\/p><\/div>\n<p>The HTML <a target=_blank title='HTML Canvas element information from w3schools' href='http:\/\/www.w3schools.com\/tags\/ref_canvas.asp'>Canvas<\/a> element is great for many types of games especially where you draw your own graphics based on interaction from the user.<\/p>\n<p>Today you may consider our Pros and Cons &#8220;game&#8221; to be more of a &#8220;decision making tool&#8221; perhaps.  Perhaps it may suit you as a way to be more objective about your decision making.<\/p>\n<p>So the thoughts behind this first version came from a topic of interest I&#8217;ve been looking into recently &#8230; the benefits and otherwise of <a target=_blank href='http:\/\/www.wordpress.com' title='WordPress.com'>WordPress.com<\/a> blog websites versus <a target=_blank href='http:\/\/www.wordpress.org' title='WordPress.org'>WordPress.org<\/a> blog websites, as this blog is, by the way.  One inspirational website for the research was <a target=_blank title='WordPress.com versus WordPress.org' href='http:\/\/diythemes.com\/thesis\/rtfm\/differences-wordpress-com-org\/'>here<\/a> &#8230; thanks.<\/p>\n<p>It occurred to me that there was enough complexity here to think about how to design a tool to help.  Have always thought the concept of an &#8220;issue&#8221;, or a set of &#8220;issues&#8221; to do with a &#8220;topic&#8221; sounds the go.  However, it occurs to me that this is not a great model without some mechanism for a user-defined &#8220;weighting&#8221; of the importance of any one &#8220;issue&#8221; to their thought patterns.<\/p>\n<p>So that&#8217;s what we have today &#8230; a &#8220;topic&#8221; with a set of &#8220;issues&#8221; that the user supplies with a &#8220;rating&#8221; that is positive for a Pro and negative for a Con, and finally that &#8220;issue&#8221; is given a user-defined &#8220;weight&#8221;, to add that personal touch possibility to the decision making process, but objective enough, in that the user will keep thinking of &#8220;issues&#8221;, methinks &#8230; &#8220;me hopes&#8221;.<\/p>\n<p>Here is the HTML programming source code for today&#8217;s tutorial you could call <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/prosandcons.html_GETME\" title=\"prosandcons.html\">prosandcons.html<\/a><\/p>\n<p>There is functionality in this game to email a snapshot of the game and the PHP programming source code that helps facilitate this functionality for today&#8217;s tutorial you could call <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/prosandcons.php_GETME\" title=\"prosandcons.php\">prosandcons.php<\/a><\/p>\n<p>Our &#8220;WordPress.com versus WordPress.org&#8221; topic personalized thinking came up with the email linking you to this <a target=_blank title='WordPress.com versus WordPress.org' href='http:\/\/www.rjmprogramming.com.au\/PHP\/prosandcons_2015_3_20_9_0.png'>Pros and Cons<\/a> report.<\/p>\n<p>Try a pros versus cons issue yourself, and email your opinions forward, as you wish with our live run <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/prosandcons.html?nofloat=nofloat\" title='Pros and Cons game'>here<\/a>.  Hope to &#8230; see &#8216;ya later Alli Gator.<\/p>\n<p><b>Did you know?<\/b><\/p>\n<p>The fact that we felt like putting things so much in double quotes above is pretty much a <a target=_blank title='Lay down misere information from Wikipedia ... thanks' href='http:\/\/en.wikipedia.org\/wiki\/Mis\u00e8re'>&#8220;lay down misere&#8221;<\/a> indicator that this web application could well suit an (alternative) <a target=_blank title='OOP information from Wikipedia ... thanks' href='http:\/\/en.wikipedia.org\/wiki\/Object-oriented_programming'>Object Oriented<\/a> (ie. OOP) solution also, where the double quoted words could well be classes in your software design.  Even though the basis of this web application only needs the HTML (the PHP usage is a bit optional, but useful (because the server-side is needed to create the snapshot image file, on the server, later used as a link in the email)) you may wonder how OOP ideas relate to HTML, but OOP can very much play a part in the way you code your <a target=_blank title='Object Oriented JavaScript information' href='https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/JavaScript\/Introduction_to_Object-Oriented_JavaScript'>JavaScript<\/a>, and in seeking out solutions here, you may even end up exploring <a target=_blank title='Ajax OOP information from Wikipedia ... thanks' href='http:\/\/en.wikipedia.org\/wiki\/AJAX.OOP'>Ajax<\/a> techniques.  The combination of JavaScript and Ajax can make your web application be, or at least feel, as if it is totally client-based.<\/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='#d13846' onclick='var dv=document.getElementById(\"d13846\"); dv.innerHTML = \"&lt;iframe width=670 height=600 src=\" + \"http:\/\/www.rjmprogramming.com.au\/wordpress\/?tag=canvas\" + \"&gt;&lt;\/iframe&gt;\"; dv.style.display = \"block\";'>this<\/a> too.<\/p>\n<div id='d13846' style='display: none; border-left: 2px solid green; border-top: 2px solid green;'><\/div>\n","protected":false},"excerpt":{"rendered":"<p>The HTML Canvas element is great for many types of games especially where you draw your own graphics based on interaction from the user. Today you may consider our Pros and Cons &#8220;game&#8221; to be more of a &#8220;decision making &hellip; <a href=\"https:\/\/www.rjmprogramming.com.au\/ITblog\/html-canvas-pros-and-cons-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":[2,12,15,28,33,37],"tags":[69,151,184,213,297,309,327,476,477,576,578,590,652,849,932,997,1001,1161,1166,1167,1319,1411,1456,1457,1458],"class_list":["post-13846","post","type-post","status-publish","format-standard","hentry","category-ajax","category-elearning","category-games","category-oop","category-software","category-tutorials","tag-ajax","tag-blog","tag-canvas","tag-clientserver","tag-data-url","tag-decision-making","tag-did-you-know","tag-game","tag-games-2","tag-html","tag-html5","tag-image","tag-javascript","tag-object","tag-php","tag-programming","tag-pros-and-cons","tag-snapshot","tag-software-2","tag-software-design","tag-tutorial","tag-web-server","tag-wordpress","tag-wordpress-com","tag-wordpress-org"],"_links":{"self":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts\/13846"}],"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=13846"}],"version-history":[{"count":2,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts\/13846\/revisions"}],"predecessor-version":[{"id":47366,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts\/13846\/revisions\/47366"}],"wp:attachment":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/media?parent=13846"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/categories?post=13846"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/tags?post=13846"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}