{"id":32536,"date":"2017-10-20T03:01:55","date_gmt":"2017-10-19T17:01:55","guid":{"rendered":"http:\/\/www.rjmprogramming.com.au\/ITblog\/?p=32536"},"modified":"2017-10-07T21:23:35","modified_gmt":"2017-10-07T11:23:35","slug":"very-versus-too-game-primer-tutorial","status":"publish","type":"post","link":"https:\/\/www.rjmprogramming.com.au\/ITblog\/very-versus-too-game-primer-tutorial\/","title":{"rendered":"Very Versus Too Game Primer Tutorial"},"content":{"rendered":"<div style=\"width: 230px\" class=\"wp-caption alignnone\"><a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/very_too.html\"><img decoding=\"async\" style=\"border: 15px solid pink;\" alt=\"Very Versus Too Game Primer Tutorial\" src=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/verytoo.jpg\" title=\"Very Versus Too Game Primer Tutorial\"  style=\"float:left;\" \/><\/a><p class=\"wp-caption-text\">Very Versus Too Game Primer Tutorial<\/p><\/div>\n<p>There are heaps of nuances to web application design, in our eyes, where we like to discuss it in terms of (an issue often involving) &#8230;<\/p>\n<ul>\n<li><b>overlay<\/b> &#8230; and\/or &#8230;<\/li>\n<li>reveal<\/li>\n<\/ul>\n<p> &#8230; and as you might guess above, our &#8220;nuance&#8221; of web application design difference today, involves some <b>overlay<\/b> thoughts.<\/p>\n<p>We proceed with today&#8217;s <a target=_blank title='ESL information from Wikipedia ... thanks' href='https:\/\/en.wikipedia.org\/wiki\/English_as_a_second_or_foreign_language'>ESL<\/a> &#8220;Very versus Too&#8221; game with a lot of methodologies very familiar to followers of this blog, namely &#8230;<\/p>\n<ul>\n<li>we involve the &#8220;ever useful to us&#8221; <a target=_blank title='mobilefish' href='http:\/\/www.mobilefish.com\/services\/image_map\/image_map.php'>mobilefish<\/a> HTML (image) <a target=_blank href='http:\/\/www.w3schools.com\/tags\/tag_map.asp' title='HTML map tag information from w3schools ... thanks'>map<\/a> element creator &#8230; which, as you will know if you follow this blog, calls on many of our usual <b>overlay<\/b> CSS suspects &#8230;<\/li>\n<li><a target=_blank title='CSS position:absolute information from w3schools' href='http:\/\/www.w3schools.com\/cssref\/pr_class_position.asp'>position:absolute<\/a> property<\/li>\n<li><a target=_blank title='CSS z-index information from w3schools' href='http:\/\/www.w3schools.com\/cssref\/pr_pos_z-index.asp'>z-index<\/a> property<\/li>\n<\/ul>\n<p> &#8230; that the recent <a title='Walkways Quiz Game Primer Tutorial' href='#wqgpt'>Walkways Quiz Game Primer Tutorial<\/a> also talks about.<\/p>\n<p>But here are some of the &#8220;nuanced&#8221; differences, even different to another &#8220;position:absolute&#8221; themed recent <a target=_blank title='Travel Collage Quiz Game Primer Tutorial' href='https:\/\/www.rjmprogramming.com.au\/ITblog\/travel-collage-quiz-game-primer-tutorial\/'>Travel Collage Quiz Game Primer Tutorial<\/a> exemplifies, we &#8230;<\/p>\n<ul>\n<li>do the image input side of the job not needing the &#8220;sharing&#8221; involvement of email, by only using the MacBook Pro&#8217;s webcam camera, in combination with its <a target=_blank title='Mac OS X apps out of the box' href='https:\/\/support.apple.com\/kb\/PH18738'>Photobooth<\/a> desktop application (not forgetting its very useful Edit -&gt; Autoflip New Items setting) to create the web application&#8217;s underlying single image media<\/li>\n<li>we follow through with <a target=_blank title='mobilefish' href='http:\/\/www.mobilefish.com\/services\/image_map\/image_map.php'>mobilefish<\/a>&#8216;s methodologies completely, only to manually use Javascript DOM (and bit of HTML) to pluck out the useful co-ordinate data with a view to using that to create a totally &#8220;position:absolute&#8221; <b>overlay<\/b> web application that allows for two modes of interaction &#8230;\n<ol>\n<li>user clicks an image part (corresponding to a map element <i>area<\/i> tag to match an HTML <a target=_blank title='HTML div tag information from w3schools' href='http:\/\/www.w3schools.com\/tags\/tag_div.asp'><i>div<\/i><\/a> element (loaded with <b>overlay<\/b> &#8220;usual suspect&#8221; inline styling) <a target=_blank title='Javascript event onload information from w3schools' href='http:\/\/www.w3schools.com\/tags\/ev_onclick.asp'><i>onclick<\/i><\/a> event to an HTML <a target=_blank title='HTML select tag information from w3schools' href='http:\/\/www.w3schools.com\/tags\/tag_select.asp'>select<\/a> &#8220;dropdown&#8221; element value &#8230; or &#8230;<\/li>\n<li>user chooses the corresponding HTML select element value to a <i>border<\/i> highlighted HTML <i>div<\/i> element<\/li>\n<\/ol>\n<p> &#8230; to score points in the game\n<\/li>\n<\/ul>\n<p>Other &#8220;familiars&#8221; (to our approaches) today involve &#8230;<\/p>\n<ul>\n<li>heavy use of Javascript global var<font size=1>iables<\/font> and an &#8220;answers&#8221; <a target=_blank title='Array information' href='https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/JavaScript\/Reference\/Global_Objects\/Array'>array<\/a> as per &#8230;<\/br><br \/>\n<code><br \/>\nvar picks=[\"very fast\",\"too fast\",\"too hot\",\"very hot\",\"too tall\",\"very tall\",\"too expensive\",\"very expensive\",\"very small\",\"too small\",\"very slow\",\"too slow\"];<br \/>\n<\/code>\n<\/li>\n<li>Javascript DOM game random feel via, for example &#8230; pickis=<a target=_blank title='Javascript Math.random() information from w3schools' href='http:\/\/www.w3schools.com\/jsref\/jsref_floor.asp'>Math.floor<\/a>(<a target=_blank title='Javascript Math.random() information from w3schools' href='http:\/\/www.w3schools.com\/jsref\/jsref_random.asp'>Math.random()<\/a> * picks.length);\n<li>Javascript DOM document.body <a target=_blank title='Javascript event onload information from w3schools' href='http:\/\/www.w3schools.com\/tags\/ev_onload.asp'>onload<\/a> event instigators of the &#8220;rearrangements, followed by the instigating of the &#8220;random clue, random mode questioning and processing user answer&#8221; cycle of the game&#8217;s logic<\/li>\n<\/ul>\n<p>Which brings us to more <font size=1>(and last)<\/font> familiars &#8230;<\/p>\n<ul>\n<li>thanks to today&#8217;s inspiration &#8230; <i>How English Works<\/i> A Grammar Practice Book With Answers by Michael Swan and Catherine Walter ISBN: 9780194314565<\/li>\n<li><a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/very_too.html\" title=\"Click picture\">live run<\/a><\/li>\n<li>HTML (with inline CSS) and Javascript <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/very_too.html_GETME\" title=\"very_too.html\">very_too.html<\/a> source code<\/li>\n<\/ul>\n<hr>\n<p id='wqgpt'>Previous relevant <a target=_blank title='Walkways Quiz Game Primer Tutorial' href='https:\/\/www.rjmprogramming.com.au\/ITblog\/walkways-quiz-game-primer-tutorial\/'>Walkways Quiz Game Primer Tutorial<\/a> is shown below.<\/p>\n<div style=\"width: 230px\" class=\"wp-caption alignnone\"><a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/walkways.html\"><img decoding=\"async\" style=\"border: 15px solid pink;\" alt=\"Walkways Quiz Game Primer Tutorial\" src=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/walkway.jpg\" title=\"Walkways Quiz Game Primer Tutorial\"  style=\"float:left;\" \/><\/a><p class=\"wp-caption-text\">Walkways Quiz Game Primer Tutorial<\/p><\/div>\n<p>Have you ever thought of a background image for a webpage, as a thing you could &#8220;regionally&#8221; click, as happens with the HTML map element?  What about if we filled the webpage background with an HTML map element and its associated HTML img element?  Then what about if we &#8220;overlayed&#8221; onto that the main webpage functionality intended.  That&#8217;s what we do today for our &#8220;Walkways Quiz&#8221; game web application.<\/p>\n<p>Let&#8217;s summarize the features of our &#8220;Walkways Quiz&#8221; game below &#8230;<\/p>\n<ul>\n<li>the webpage background consists of an HTML map element and its associated HTML img element (again created, as per our oft used approach, using the great <a target=_blank title='mobilefish' href='http:\/\/www.mobilefish.com\/services\/image_map\/image_map.php'>mobilefish<\/a> image map creator) that is defined as 100% width, and has &#8220;regional&#8221; click functionality<\/li>\n<li>HTML div elements &#8220;overlay&#8221; this background, relying for &#8220;overlay&#8221; on our &#8220;usual suspects&#8221; for overlaying, namely &#8230;\n<ol>\n<li><a target=_blank title='CSS position:absolute information from w3schools' href='http:\/\/www.w3schools.com\/cssref\/pr_class_position.asp'>position:absolute<\/a> property (all elements today have this inherited property)<\/li>\n<li><a target=_blank title='CSS z-index information from w3schools' href='http:\/\/www.w3schools.com\/cssref\/pr_pos_z-index.asp'>z-index<\/a><\/li>\n<li><a target=_blank title='CSS opacity property information from w3schools' href='http:\/\/www.w3schools.com\/cssref\/css3_pr_opacity.asp'>opacity<\/a><\/li>\n<\/ol>\n<p> &#8230; and a &#8220;work in progress&#8221; is to (try to) position the overlaying (via % type positioning, in this first draft) so as to hide background image &#8220;game giveaway&#8221; information\n<\/li>\n<li>the &#8220;overlaying&#8221; functionality is a &#8220;Walkways Quiz&#8221; presenting an HTML select &#8220;dropdown&#8221; of Walkway names, randomly selected, asking the user to choose from another HTML select &#8220;dropdown&#8221; element the Country of origin of that Walkway<\/li>\n<li>to keep the &#8220;overlaying&#8221; &#8220;Walkways Quiz&#8221; functionality &#8220;above the fold&#8221; we, at the document\/body <i>onload<\/i> event arrange to hashtag navigate to it via the Javascript DOM &#8230;<br \/>\n<code><br \/>\nlocation.href='#dmiddle';<br \/>\n<\/code>\n<\/li>\n<li><a target=_blank title='CSS3 border-radious information from w3schools' href='http:\/\/www.w3schools.com\/cssref\/css3_pr_border-radius.asp'><i>border-radius<\/i><\/a> is used with the &#8220;overlaying&#8221; HTML div elements to create rounded corners<\/li>\n<li><a target=_blank title='YouTube' href='http:\/\/youtube.com'>YouTube<\/a> <a target=_blank title='YouTube API for Iframe embedded videos' href='https:\/\/developers.google.com\/youtube\/iframe_api_reference'>API for Iframe embedded videos<\/a> functionality<\/li>\n<\/ul>\n<p>Before we go any further, we need to thank &#8230;<\/p>\n<ul>\n<li>Michael Gebricki&#8217;s &#8220;Scary Walkways and Footbridges&#8221; article in the Sun Herald (Sydney) 6\/8\/2017 edition<\/li>\n<li><a target=_blank title='Michael Gebicki' href='http:\/\/www.traveller.com.au\/the-worlds-most-spectacular-footbridges-gkii38'>Michael Gebicki<\/a>&#8216;s traveller.com.au online article<\/li>\n<li>Image map creation help via the <a target=_blank title='mobilefish' href='http:\/\/www.mobilefish.com\/services\/image_map\/image_map.php'>mobilefish<\/a> webpage<\/li>\n<\/ul>\n<p>Maybe walkways interest you?  If so, or if you want to see how the functionality talked about above, &#8220;fits together&#8221;, or if you want to see the rounded borders, or how embedded YouTube videos can work, or how an HTML map element, with its associated image, can act as a more hands on and interesting webpage background image, try today&#8217;s <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/walkways.html\" title='Click picture'>live run<\/a> and\/or peruse its HTML and Javascript and CSS <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/walkways.html_GETME\" title='walkways.html'>walkways.html<\/a> source code.<\/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='#d31998' onclick='var dv=document.getElementById(\"d31998\"); dv.innerHTML = \"&lt;iframe width=670 height=600 src=\" + \"https:\/\/www.rjmprogramming.com.au\/ITblog\/tag\/quiz\" + \"&gt;&lt;\/iframe&gt;\"; dv.style.display = \"block\";'>this<\/a> too.<\/p>\n<div id='d31998' style='display: none; border-left: 2px solid green; border-top: 2px solid green;'><\/div>\n<hr>\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='#d32536' onclick='var dv=document.getElementById(\"d32536\"); dv.innerHTML = \"&lt;iframe width=670 height=600 src=\" + \"https:\/\/www.rjmprogramming.com.au\/ITblog\/tag\/esl\" + \"&gt;&lt;\/iframe&gt;\"; dv.style.display = \"block\";'>this<\/a> too.<\/p>\n<div id='d32536' style='display: none; border-left: 2px solid green; border-top: 2px solid green;'><\/div>\n","protected":false},"excerpt":{"rendered":"<p>There are heaps of nuances to web application design, in our eyes, where we like to discuss it in terms of (an issue often involving) &#8230; overlay &#8230; and\/or &#8230; reveal &#8230; and as you might guess above, our &#8220;nuance&#8221; &hellip; <a href=\"https:\/\/www.rjmprogramming.com.au\/ITblog\/very-versus-too-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,37],"tags":[99,103,281,342,354,396,476,477,1664,576,652,734,745,800,861,870,894,927,1988,997,1866,1319,1413,1453],"class_list":["post-32536","post","type-post","status-publish","format-standard","hentry","category-elearning","category-event-driven-programming","category-games","category-tutorials","tag-area","tag-array","tag-css","tag-div","tag-dom","tag-esl","tag-game","tag-games-2","tag-global","tag-html","tag-javascript","tag-macbook-pro","tag-map","tag-mobilefish","tag-onclick","tag-onload","tag-overlay","tag-photobooth","tag-position","tag-programming","tag-select","tag-tutorial","tag-webcam","tag-word-game"],"_links":{"self":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts\/32536"}],"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=32536"}],"version-history":[{"count":12,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts\/32536\/revisions"}],"predecessor-version":[{"id":32548,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts\/32536\/revisions\/32548"}],"wp:attachment":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/media?parent=32536"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/categories?post=32536"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/tags?post=32536"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}