{"id":13308,"date":"2015-03-13T05:07:24","date_gmt":"2015-03-12T18:07:24","guid":{"rendered":"http:\/\/www.rjmprogramming.com.au\/wordpress\/?p=13308"},"modified":"2015-03-13T05:07:24","modified_gmt":"2015-03-12T18:07:24","slug":"html-canvas-golf-accuracy-game-primer-tutorial","status":"publish","type":"post","link":"https:\/\/www.rjmprogramming.com.au\/ITblog\/html-canvas-golf-accuracy-game-primer-tutorial\/","title":{"rendered":"HTML Canvas Golf Accuracy Game Primer Tutorial"},"content":{"rendered":"<div style=\"width: 230px\" class=\"wp-caption alignnone\"><a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/golfshotcanvas.html\"><img decoding=\"async\" style=\"float:left; border: 15px solid pink;\" alt=\"HTML Canvas Golf Accuracy Game Primer Tutorial\" src=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/golfshotcanvas.jpg\" title=\"HTML Canvas Golf Accuracy Game Primer Tutorial\"    \/><\/a><p class=\"wp-caption-text\">HTML Canvas Golf Accuracy 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 games where you draw your own graphics based on interaction from the user &#8230; a great tool to have in your GUI toolbox &#8230;<\/p>\n<blockquote class=\"rightbq\"><p>\nyou download an app and start playing.\n<\/p><\/blockquote>\n<p><\/p>\n<p>A lot of the logic of these games stem from when a user clicks on the <i>canvas<\/i> element &#8230; translation:<br \/>\n&nbsp;<\/p>\n<blockquote class=\"rightbq\"><p>\ndon&#8217;t read any rules of the game and just start clicking away <strike>man<\/strike> &#8230; person.\n<\/p><\/blockquote>\n<p><\/p>\n<p>Lots of these games are based on sport  &#8230; translation:<br \/>\n&nbsp;<br \/>\n&nbsp;<br \/>\n&nbsp;<br \/>\n&nbsp;<\/p>\n<blockquote class=\"rightbq\"><p>\ndoh!  show me the ball!  show me the ball!\n<\/p><\/blockquote>\n<p><\/p>\n<p>And quite often that sport is golf  &#8230; translation:<br \/>\n&nbsp;<br \/>\n&nbsp;<br \/>\n&nbsp;<\/p>\n<blockquote class=\"rightbq\"><p>\npass me the plus fours <strike>man<\/strike> &#8230; person &#8230; and forget the rules &#8230; show me the ball!  show me the ball!\n<\/p><\/blockquote>\n<p><\/p>\n<p>Today, if you&#8217;d like to <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/golfshotcanvas.html\">play<\/a>, we get the user to click twice to simulate the start and end position of their golf shot, the direction and size of which is predetermined, and shown to them &#8230; translation:<br \/>\n&nbsp;<\/p>\n<blockquote class=\"rightbq\"><p>\nwhat?!  no ball &#8230; well then, show me the wrestler.\n<\/p><\/blockquote>\n<p><\/p>\n<p>Today we don&#8217;t show a ball, as such &#8230; it&#8217;s too small &#8230; translation:<br \/>\n&nbsp;<br \/>\n&nbsp;<\/p>\n<blockquote class=\"rightbq\"><p>\nwe need this room for another meeting.<br \/>\n&nbsp;\n<\/p><\/blockquote>\n<p><\/p>\n<p>Hope you enjoy playing the game derived from <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/golfshotcanvas.html_GETME\" totle=\"golfshotcanvas.html\">golfshotcanvas.html<\/a> &#8230; you start with score of 3000 and excel by how many goes you survive with a score &#8230; translation:<\/p>\n<blockquote class=\"rightbq\"><p>\nbye.<br \/>\n&nbsp;<br \/>\nturn out the lights as you go.\n<\/p><\/blockquote>\n<p><\/p>\n<p>If you&#8217;re looking for <a target=_blank title='?' href='http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/faint_grass_pattern_204850.jpg'>grass<\/a> <strike>man<\/strike> &#8230; person &#8230; the free background image came from <a target=_blank href=\"http:\/\/all-free-download.com\/free-photos\/ ... thanks\" title=\"Grass courtesy of http:\/\/all-free-download.com\/free-photos\/ ... thanks\">http:\/\/all-free-download.com\/free-photos\/<\/a> and then was modified for use here via Gimp (good old Gimp &#8230; reduction in Opacity to 40%) &#8230; thanks &#8230; translation:\n<\/p>\n<p><\/p>\n<p>There are night golf ranges you know!!!!<\/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='#d13308' onclick='var dv=document.getElementById(\"d13308\"); 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='d13308' 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 games where you draw your own graphics based on interaction from the user &#8230; a great tool to have in your GUI toolbox &#8230; you download an app and start playing. A lot &hellip; <a href=\"https:\/\/www.rjmprogramming.com.au\/ITblog\/html-canvas-golf-accuracy-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,14,15,16,17,37],"tags":[184,281,400,476,477,491,511,576,652,861,997,1183,1319],"class_list":["post-13308","post","type-post","status-publish","format-standard","hentry","category-elearning","category-event-driven-programming","category-games","category-gimp","category-gui","category-tutorials","tag-canvas","tag-css","tag-event","tag-game","tag-games-2","tag-gimp","tag-golf","tag-html","tag-javascript","tag-onclick","tag-programming","tag-sport","tag-tutorial"],"_links":{"self":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts\/13308"}],"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=13308"}],"version-history":[{"count":0,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts\/13308\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/media?parent=13308"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/categories?post=13308"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/tags?post=13308"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}