{"id":35768,"date":"2018-01-29T03:01:26","date_gmt":"2018-01-28T17:01:26","guid":{"rendered":"http:\/\/www.rjmprogramming.com.au\/ITblog\/?p=35768"},"modified":"2018-01-29T12:52:46","modified_gmt":"2018-01-29T02:52:46","slug":"rainbow-games-double-transformation-tutorial","status":"publish","type":"post","link":"https:\/\/www.rjmprogramming.com.au\/ITblog\/rainbow-games-double-transformation-tutorial\/","title":{"rendered":"Rainbow Games Double Transformation Tutorial"},"content":{"rendered":"<div style=\"width: 230px\" class=\"wp-caption alignnone\"><a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/emoji_walk_animation.html\"><img decoding=\"async\" style=\"border: 15px solid pink;\" alt=\"Rainbow Games Double Transformation Tutorial\" src=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/emoji_walk_animation_dt.jpg\" title=\"Rainbow Games Double Transformation Tutorial\"  style=\"float:left;\" \/><\/a><p class=\"wp-caption-text\">Rainbow Games Double Transformation Tutorial<\/p><\/div>\n<p>We were on the &#8220;road to personalization&#8221; for the web application game we started with yesterday&#8217;s <a title='Rainbow Games Primer Tutorial' href='#rgpt'>Rainbow Games Primer Tutorial<\/a> when &#8220;an old chestnut&#8221; came up again.  It&#8217;s happened before, the desire to &#8220;double transform&#8221; in CSS came about from our emoji &#8230; <\/p>\n<table>\n<tr>\n<td style='font-size:36px;'>&#127939;&#127998;&#8205;&#9792;&#65039;<\/td>\n<\/tr>\n<\/table>\n<p> &#8230; table cell <i>mirroring<\/i> styling as per &#8230;<\/p>\n<p><code><br \/>\n&lt;style&gt;<br \/>\n* { overflow-x: visible; }<br \/>\n<br \/>\nselect { font-size: 36px; }<br \/>\n<br \/>\ntd.runner { width: 50px; word-wrap: break-word; font-size: 36px;<br \/>\n     <i>transform: scale(-1, 1); -o-transform: scale(-1, 1); -moz-transform: scale(-1, 1); -ms-transform: scale(-1, 1); -webkit-transform:  scale(-1, 1);<\/i><br \/>\n        }   \/\/ <\/p>\n<table>\n<tr>\n<td style='font-size:36px;transform: scale(-1, 1); -o-transform: scale(-1, 1); -moz-transform: scale(-1, 1); -ms-transform: scale(-1, 1); -webkit-transform:  scale(-1, 1);'>&#127939;&#127998;&#8205;&#9792;&#65039;<\/td>\n<\/tr>\n<\/table>\n<p>tr { max-height: 40px; }<br \/>\n&lt;\/style&gt;<br \/>\n<\/code><\/p>\n<p> &#8230; necessary to make our running emojis run from left to right (that, alas, also transformed any accompanying &#8230; <\/p>\n<table>\n<tr>\n<td style='font-size:36px;transform: scale(-1, 1); -o-transform: scale(-1, 1); -moz-transform: scale(-1, 1); -ms-transform: scale(-1, 1); -webkit-transform:  scale(-1, 1);'>&#127939;&#127998;&#8205;&#9792;&#65039; <\/p>\n<p style=\"display: block; font-size: 12px;-\">Florence<\/p>\n<\/td>\n<\/tr>\n<\/table>\n<p> &#8230; name), was added to in <b>this double transformational clause<\/b> to prove what this <a target=_blank title='Great link, thanks' href='https:\/\/stackoverflow.com\/questions\/5406368\/can-you-use-css-to-mirror-flip-text'>wonderful web page<\/a> advice had to say.  In other words, a &#8220;double transform&#8221; CSS styling scenario like the one below &#8230;<\/p>\n<p><code><br \/>\n&lt;style&gt;<br \/>\n* { overflow-x: visible; }<br \/>\n<br \/>\nselect { font-size: 36px; }<br \/>\n<br \/>\ntd.runner { width: 50px; word-wrap: break-word; font-size: 36px;<br \/>\n     <i>transform: scale(-1, 1); -o-transform: scale(-1, 1); -moz-transform: scale(-1, 1); -ms-transform: scale(-1, 1); -webkit-transform:  scale(-1, 1);<\/i><br \/>\n        }<br \/>\ntr { max-height: 40px; }<br \/>\n<br \/>\n<b>p {<br \/>\n    display: block;<br \/>\n    font-size: 12px;<br \/>\n    -webkit-transform: matrix(-1, 0, 0, 1, 0, 0);<br \/>\n    -moz-transform: matrix(-1, 0, 0, 1, 0, 0);<br \/>\n    -o-transform: matrix(-1, 0, 0, 1, 0, 0);<br \/>\n    transform: matrix(-1, 0, 0, 1, 0, 0);<br \/>\n}  <\/b>  \/\/ <\/p>\n<table style='width:50px;'>\n<tr style='width:50px;'>\n<td style='width:50px;font-size:36px;transform: scale(-1, 1); -o-transform: scale(-1, 1); -moz-transform: scale(-1, 1); -ms-transform: scale(-1, 1); -webkit-transform:  scale(-1, 1);'>&#127939;&#127998;&#8205;&#9792;&#65039; <\/p>\n<p style=\"display: block; font-size: 12px;-webkit-transform: matrix(-1, 0, 0, 1, 0, 0);-moz-transform: matrix(-1, 0, 0, 1, 0, 0);-o-transform: matrix(-1, 0, 0, 1, 0, 0);transform: matrix(-1, 0, 0, 1, 0, 0);\">Florence<\/p>\n<\/td>\n<\/tr>\n<\/table>\n<p>&lt;\/style&gt;<br \/>\n<\/code><\/p>\n<p> &#8230; works as a &#8220;double transform&#8221; to first &#8230;<\/p>\n<ul>\n<li>mirror (image) flip the table cell (td) emoji data &#8230; but us appending some &#8220;Runner Name&#8221; textual data underneath also, annoyingly, got flipped  until &#8230;<\/li>\n<li>within that (same) table cell (td) element and after the emoji data we append an HTML <a target=_blank title='HTML p tag information from w3schools' href='https:\/\/www.w3schools.com\/tags\/tag_p.asp'>p<\/a>(aragraph) element to both &#8230;\n<ol>\n<li>introduce a new HTML element type into the (CSS styling) mix &#8230; and to &#8230;<\/li>\n<li>introduce a new CSS transformation type, the matrix &#8230; perhaps either or both new parts to the problem critical to its success when, believe me, lots of other approaches don&#8217;t work<\/li>\n<\/ol>\n<\/ul>\n<p> &#8230; to personalize the &#8220;runners&#8221; and &#8220;users&#8221;, optionally, &#8220;into the game&#8221;, by allowing the &#8220;user&#8221; to name their &#8220;runners&#8221; and allow for a &#8220;runner energy&#8221; setting be a bit randomized, to add for some other interest &#8220;variety&#8221; to the game&#8217;s workings.  So, still a work in progress that you can try out at our <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/emoji_walk_animation.html\" title=\"Click picture\">live run<\/a> link that has underlying HTML and Javascript and CSS <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/emoji_walk_animation.html-GETME\" title=\"emoji_walk_animation.html\">emoji_walk_animation.html<\/a>, and which changed in <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/Geographicals\/diff.php?one=http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/emoji_walk_animation.html-GETME\" title=\"emoji_walk_animation.html\">this way<\/a> regarding today&#8217;s work.<\/p>\n<hr>\n<p id='rgpt'>Previous relevant <a target=_blank title='Rainbow Games Primer Tutorial' href='https:\/\/www.rjmprogramming.com.au\/ITblog\/rainbow-games-primer-tutorial\/'>Rainbow Games 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\/emoji_walk_animation.html\"><img decoding=\"async\" style=\"border: 15px solid pink;\" alt=\"Interesting Places Primer Tutorial\" src=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/emoji_walk_animation.jpg\" title=\"Rainbow Games Primer Tutorial\"  style=\"float:left;\" \/><\/a><p class=\"wp-caption-text\">Rainbow Games Primer Tutorial<\/p><\/div>\n<p>It&#8217;s been a while since we&#8217;ve written any conventional HTML and Javascript and CSS game.  Today&#8217;s game uses the &#8220;emoticon&#8221; section of the Emoji character set, defaulting so far, to the &#8220;running woman&#8221; emoji featuring in <a target=_blank title='Compound Emoji WordPress Usage Tutorial' href='https:\/\/www.rjmprogramming.com.au\/ITblog\/compound-emoji-wordpress-usage-tutorial\/'>Compound Emoji WordPress Usage Tutorial<\/a>.<\/p>\n<p>It&#8217;s the early days of our &#8220;Rainbow Games&#8221; web application, and we&#8217;re starting with the animation featuring horizontal hashtag navigation techniques for a running race start to our game.  Where it finishes?  Hard to say! Today, we&#8217;ve looked at &#8220;splits&#8221; and a finish line.<\/p>\n<p>You can try out our burgeoning <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/emoji_walk_animation.html\" title=\"Click picture\">live run game concept<\/a> link that has underlying HTML and Javascript and CSS <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/emoji_walk_animation.html_GETME\" title=\"emoji_walk_animation.html\">emoji_walk_animation.html<\/a>.<\/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='#d35745' onclick='var dv=document.getElementById(\"d35745\"); 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='d35745' 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='#d35768' onclick='var dv=document.getElementById(\"d35768\"); dv.innerHTML = \"&lt;iframe width=670 height=600 src=\" + \"https:\/\/www.rjmprogramming.com.au\/ITblog\/tag\/transformation\" + \"&gt;&lt;\/iframe&gt;\"; dv.style.display = \"block\";'>this<\/a> too.<\/p>\n<div id='d35768' style='display: none; border-left: 2px solid green; border-top: 2px solid green;'><\/div>\n","protected":false},"excerpt":{"rendered":"<p>We were on the &#8220;road to personalization&#8221; for the web application game we started with yesterday&#8217;s Rainbow Games Primer Tutorial when &#8220;an old chestnut&#8221; came up again. It&#8217;s happened before, the desire to &#8220;double transform&#8221; in CSS came about from &hellip; <a href=\"https:\/\/www.rjmprogramming.com.au\/ITblog\/rainbow-games-double-transformation-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":[4,12,14,15,37],"tags":[84,281,385,476,477,576,652,997,1299,1319],"class_list":["post-35768","post","type-post","status-publish","format-standard","hentry","category-animation","category-elearning","category-event-driven-programming","category-games","category-tutorials","tag-animation-2","tag-css","tag-emoji","tag-game","tag-games-2","tag-html","tag-javascript","tag-programming","tag-transformation","tag-tutorial"],"_links":{"self":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts\/35768"}],"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=35768"}],"version-history":[{"count":6,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts\/35768\/revisions"}],"predecessor-version":[{"id":35793,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts\/35768\/revisions\/35793"}],"wp:attachment":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/media?parent=35768"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/categories?post=35768"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/tags?post=35768"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}