{"id":74152,"date":"2026-08-02T03:01:00","date_gmt":"2026-08-01T17:01:00","guid":{"rendered":"https:\/\/www.rjmprogramming.com.au\/ITblog\/?p=74152"},"modified":"2026-08-01T19:29:22","modified_gmt":"2026-08-01T09:29:22","slug":"experimental-drag-and-drop-game-suite-tutorial","status":"publish","type":"post","link":"https:\/\/www.rjmprogramming.com.au\/ITblog\/experimental-drag-and-drop-game-suite-tutorial\/","title":{"rendered":"Experimental Drag and Drop Game Suite Tutorial"},"content":{"rendered":"<div style=\"width: 230px\" class=\"wp-caption alignnone\"><a target=\"_blank\" href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/experimental_peers_drag_and_drop.php\" rel=\"noopener\"><img decoding=\"async\" style=\"border: 15px solid pink;\" alt=\"Experimental Drag and Drop Game Suite Tutorial\" src=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/experimental_peers_drag_and_drop_suite.gif\" title=\"Experimental Drag and Drop Game Suite Tutorial\"  style=\"float:left;\"  \/><\/a><p class=\"wp-caption-text\">Experimental Drag and Drop Game Suite Tutorial<\/p><\/div>\n<p>We started on Drag and Drop games here with <a title='Experimental Drag and Drop Game Tutorial' href='#eddgt'>Experimental Drag and Drop Game Tutorial<\/a> and it came a long way with &#8220;variations on a theme&#8221; all with that Drag and Drop commonality (thanks to <a title='https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/API\/DataTransfer\/setData' target=\"_blank\" href='https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/API\/DataTransfer\/setData' rel=\"noopener\">https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/API\/DataTransfer\/setData<\/a> here).<\/p>\n<p>We even wrote a <a target=\"_blank\" href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/experimental_peers_drag_and_drop.php\" rel=\"noopener\">PHP web application<\/a> to look for these Drag and Drop web application variations and place them in a dropdown to reach other suite peers.  But we never made that obvious back at each peer in the suite, and that is today&#8217;s (primarily) PHP work to do.<\/p>\n<p>All we are after is for a link near the top of the webpage be able to show that PHP menu web application in an iframe revealed and navigated to (and navigatable back from) at the bottom of the webpage.  There were little quirks here and there doing this but basically the <font color=blue>change was<\/font> &#8230;<\/p>\n<p><code><br \/>\n    echo <font color=blue>str_replace(\"&lt;h1&gt;\", \"&lt;h1 id=toph1&gt;\",str_replace(\"1&gt;Experimental Drag and Drop\", \"1&gt;Experimental Drag &lt;span title=\\\"More Drag and Drop web applications\\\" style=cursor:pointer;text-decoration:underline; onclick=\\\"document.getElementById('preifmenu').style.display='block'; document.getElementById('ifmenu').style.display='block'; location.href='#preifmenu';\\\"&gt;and&lt;\/span&gt; Drop\", str_replace('&lt;\/body&gt;', '&lt;br&gt;&lt;a id=preifmenu style=cursor:pointer;text-decoration:underline; href=#toph1 onclick=window.scrollTo(0,0);&gt;Back to top ...&lt;\/a&gt;&lt;br&gt;&lt;iframe src=\".\/experimental_peers_drag_and_drop.php\" style=display:none;width:98%;height:800px; id=ifmenu&gt;&lt;\/iframe&gt;&lt;\/body&gt;',<\/font> $templategame<font color=blue>)))<\/font>;<br \/>\n<\/code><\/p>\n<p> &#8230; to make this happen in each peer &#8230;<\/p>\n<ul>\n<li><a target=\"_blank\" href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/Geographicals\/diff.php?one=http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/chess_game.php---------------GETME\" rel=\"noopener\">the changed<\/a> <a target=\"_blank\" href=\"\/HTMLCSS\/chess_game.php---------------GETME\" rel=\"noopener\">latest draft<\/a> <a target=\"_blank\" href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/chess_game.php\" rel=\"noopener\">Chess game<\/a> web application<\/li>\n<li><a target=\"_blank\" href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/Geographicals\/diff.php?one=http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/gradual_reveal_country_game.html-------------GETME\" rel=\"noopener\">the changed<\/a> <a target=\"_blank\" href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/gradual_reveal_country_game.html-------------GETME\" rel=\"noopener\">latest draft<\/a> <a target=\"_blank\" href=\"\/HTMLCSS\/gradual_reveal_country_game.htm\" rel=\"noopener\">Reveal country game<\/a> web application<\/li>\n<li><a target=\"_blank\" href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/Geographicals\/diff.php?one=http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/colouring_in_was_numbers_guessing_game.php-----------------------GETME\" rel=\"noopener\">the changed<\/a> <a target=\"_blank\" href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/colouring_in_was_numbers_guessing_game.php-----------------------GETME\" rel=\"noopener\">latest draft<\/a> <a target=\"_blank\" href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/colouring_in_was_numbers_guessing_game.php\" rel=\"noopener\">Colouring in was numbers guessing game<\/a> web application<\/li>\n<li><a target=\"_blank\" href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/Geographicals\/diff.php?one=http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/emoji_clothing_game.php---GETME\" rel=\"noopener\">the changed<\/a> <a target=\"_blank\" href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/emoji_clothing_game.php---GETME\" rel=\"noopener\">latest draft<\/a> <a target=\"_blank\" href=\"\/HTMLCSS\/emoji_clothing_game.php\" rel=\"noopener\">Emoji clothing game<\/a> web application<\/li>\n<li><a target=\"_blank\" href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/Geographicals\/diff.php?one=http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/emoji_object_game.php--GETME\" rel=\"noopener\">the changed<\/a> <a target=\"_blank\" href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/emoji_object_game.php--GETME\" rel=\"noopener\">latest draft<\/a> <a target=\"_blank\" href=\"\/HTMLCSS\/emoji_object_game.php\" rel=\"noopener\">Emoji object game<\/a> web application<\/li>\n<li><a target=\"_blank\" href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/Geographicals\/diff.php?one=http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/enneagram_type_game.php---GETME\" rel=\"noopener\">the changed<\/a> <a target=\"_blank\" href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/enneagram_type_game.php---GETME\" rel=\"noopener\">latest draft<\/a> <a target=\"_blank\" href=\"\/HTMLCSS\/enneagram_type_game.php\" rel=\"noopener\">Enneagram type game<\/a> web application<\/li>\n<li><a target=\"_blank\" href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/Geographicals\/diff.php?one=http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/inhouse_blog_game.php-----GETME\" rel=\"noopener\">the changed<\/a> <a target=\"_blank\" href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/inhouse_blog_game.php-----GETME\" rel=\"noopener\">latest draft<\/a> <a target=\"_blank\" href=\"\/HTMLCSS\/inhouse_blog_game.php\" rel=\"noopener\">Inhouse blog game<\/a> web application<\/li>\n<li><a target=\"_blank\" href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/Geographicals\/diff.php?one=http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/numbers_guessing_game.php---GETME\" rel=\"noopener\">the changed<\/a> <a target=\"_blank\" href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/numbers_guessing_game.php---GETME\" rel=\"noopener\">latest draft<\/a> <a target=\"_blank\" href=\"\/HTMLCSS\/numbers_guessing_game.php\" rel=\"noopener\">Numbers guessing game<\/a> web application<\/li>\n<li><a target=\"_blank\" href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/Geographicals\/diff.php?one=http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/planet_moon_game.php---GETME\" rel=\"noopener\">the changed<\/a> <a target=\"_blank\" href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/planet_moon_game.php---GETME\" rel=\"noopener\">latest draft<\/a> <a target=\"_blank\" href=\"\/HTMLCSS\/planet_moon_game.php\" rel=\"noopener\">Planet moon game<\/a> web application<\/li>\n<li><a target=\"_blank\" href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/Geographicals\/diff.php?one=http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/street_type_game.php-GETME\" rel=\"noopener\">the changed<\/a> <a target=\"_blank\" href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/street_type_game.php-GETME\" rel=\"noopener\">latest draft<\/a> <a target=\"_blank\" href=\"\/HTMLCSS\/street_type_game.php\" rel=\"noopener\">Street type game<\/a> web application<\/li>\n<\/ul>\n<p><!--p>You can also see this play out at WordPress 4.1.1's <a target=\"_blank\" href='\/\/www.rjmprogramming.com.au\/ITblog\/experimental-drag-and-drop-game-suite-tutorial\/' rel=\"noopener\">Experimental Drag and Drop Game Suite Tutorial<\/a>.<\/p-->\n<hr>\n<p id='eddgt'>Previous relevant <a target=\"_blank\" title='Experimental Drag and Drop Game Tutorial' href='\/\/www.rjmprogramming.com.au\/ITblog\/experimental-drag-and-drop-game-tutorial\/' rel=\"noopener\">Experimental Drag and Drop Game 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\/experimental_drag_and_drop.htm\" rel=\"noopener\"><img decoding=\"async\" style=\"border: 15px solid pink;\" alt=\"Experimental Drag and Drop Game Tutorial\" src=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/experimental_drag_and_drop_game.jpg\" title=\"Experimental Drag and Drop Game Tutorial\"  style=\"float:left;\"  \/><\/a><p class=\"wp-caption-text\">Experimental Drag and Drop Game Tutorial<\/p><\/div>\n<p>It can be interesting turning a &#8220;concept&#8221; (or even a &#8220;proof of concept&#8221; web application) into an, on the side, &#8220;game&#8221; web application, and that way, learn what&#8217;s possible via user action.  This is how we felt about yesterday&#8217;s <a title='Experimental Drag and Drop Primer Tutorial' href='#eddpt'>Experimental Drag and Drop Primer Tutorial<\/a> and that teamed with the wonder about how we could add some useful complexity to our &#8220;Experimental Drag and Drop&#8221; web application&#8217;s &#8230;<\/p>\n<blockquote><p>\nDrop Zone\n<\/p><\/blockquote>\n<p>Can &#8220;inheritance&#8221; be harnessed to make it work for some complexity of nested HTML elements inside that &#8220;Drop Zone&#8221; element when the document.body&#8217;s onload event happens?  We wondered whether a Brady Bunch style 3&#215;3 table could be the go?   And whether the nine cells could have a &#8220;score&#8221; associated with them, and that set of scores be changing over time to make the game more challenging and interesting?  Well &#8230;<\/p>\n<blockquote><p>\nYes\n<\/p><\/blockquote>\n<p> &#8230; is the answer <a target=\"_blank\" href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/Geographicals\/diff.php?one=http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/experimental_drag_and_drop.html--GETME\" rel=\"noopener\">regarding making a game out of a proof of concept<\/a> with our <a target=\"_blank\" href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/experimental_drag_and_drop.html--GETME\" rel=\"noopener\">experimental_drag_and_drop.html<\/a> HTML and Javascript and CSS <a target=\"_blank\" href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/experimental_drag_and_drop.htm\" title=\"Click picture\" rel=\"noopener\">game web application<\/a> (also shown below) using these techniques, about which we think some of you readers will be interested?!<\/p>\n<p><iframe style=width:100%;height:600px; src='http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/experimental_drag_and_drop.htm'><\/iframe><\/p>\n<p><!--p>You can also see this play out at WordPress 4.1.1's <a target=\"_blank\" href='\/\/www.rjmprogramming.com.au\/ITblog\/experimental-drag-and-drop-game-tutorial\/' rel=\"noopener\">Experimental Drag and Drop Game Tutorial<\/a>.<\/p-->\n<hr>\n<p id='eddpt'>Previous relevant <a target=\"_blank\" title='Experimental Drag and Drop Primer Tutorial' href='\/\/www.rjmprogramming.com.au\/ITblog\/experimental-drag-and-drop-primer-tutorial\/' rel=\"noopener\">Experimental Drag and Drop 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\/experimental_drag_and_drop.html\" rel=\"noopener\"><img decoding=\"async\" style=\"border: 15px solid pink;\" alt=\"Experimental Drag and Drop Primer Tutorial\" src=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/experimental_drag_and_drop.jpg\" title=\"Experimental Drag and Drop Primer Tutorial\"  style=\"float:left;\"  \/><\/a><p class=\"wp-caption-text\">Experimental Drag and Drop Primer Tutorial<\/p><\/div>\n<p>We&#8217;ve added the word <i>experimental<\/i> into today&#8217;s blog posting title, mainly because our <a target=\"_blank\" title='DataTransfer object information' href='https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/API\/DataTransfer' rel=\"noopener\">first of two inspirational webpage sources<\/a> (last modified on 23\/02\/2023) regarding <font size=1>somewhat<\/font> alternative <a target=\"_blank\" title='Drag and Drop information from Wikipedia ... thanks' href='https:\/\/en.wikipedia.org\/wiki\/Drag_and_drop' rel=\"noopener\">&#8220;Drag and Drop&#8221;<\/a> functionalities told us, regarding the <i>DataTransfer<\/i> object informational &#8220;DataTransfer&#8221; webpage &#8230;<\/p>\n<blockquote cite='https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/API\/DataTransfer'><p>\nExperimental: This is an experimental technology<br \/>\nCheck the Browser compatibility table carefully before using this in production.\n<\/p><\/blockquote>\n<p> &#8230; but our testing of the methodologies on various platforms hasn&#8217;t totally failed yet on any of the several desktop and mobile platform scenarios we&#8217;ve tried.  On mobile, we just held on for a sustained touch (down) to make it possible.  So maybe the industry has caught up with the ideas?  We&#8217;re hoping so, because &#8220;drag and drop&#8221; is a kind of natural thing online users think of to do, and people associate it with &#8220;getting things done&#8221; we reckon.<\/p>\n<p>Anyway, we relied on the great source code of the second of two inspirational webpages <a target=\"_blank\" title='DataTransfer: setData() method' href='https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/API\/DataTransfer\/setData' rel=\"noopener\">DataTransfer: setData() method<\/a>, thanks &#8230;<\/p>\n<blockquote cite='https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/API\/DataTransfer\/setData'><p>\nThe DataTransfer.setData() method sets the drag operation&#8217;s drag data to the specified data and type. If data for the given type does not exist, it is added at the end of the drag data store, such that the last item in the types list will be the new type. If data for the given type already exists, the existing data is replaced in the same position. That is, the order of the types list is not changed when replacing data of the same type.\n<\/p><\/blockquote>\n<p> &#8230; to <a target=\"_blank\" href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/Geographicals\/diff.php?one=http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/experimental_drag_and_drop.html-GETME\" rel=\"noopener\">get us going<\/a> with our <a target=\"_blank\" href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/experimental_drag_and_drop.html-GETME\" rel=\"noopener\">&#8220;proof of concept&#8221;<\/a> <a target=\"_blank\" href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/experimental_drag_and_drop.html\" title=\"Click picture\" rel=\"noopener\">web application<\/a> (also shown below) using these techniques, about which we think some of you readers will be interested?!<\/p>\n<p><iframe style=width:100%;height:500px; src='http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/experimental_drag_and_drop.html'><\/iframe><\/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='#d60044' onclick='var dv=document.getElementById(\"d60044\"); dv.innerHTML = \"&lt;iframe width=670 height=600 src=\" + \"https:\/\/www.rjmprogramming.com.au\/ITblog\/tag\/drag-and-drop\" + \"&gt;&lt;\/iframe&gt;\"; dv.style.display = \"block\";'>this<\/a> too.<\/p>\n<div id='d60044' 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='#d60054' onclick='var dv=document.getElementById(\"d60054\"); 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='d60054' 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='#d74152' onclick='var dv=document.getElementById(\"d74152\"); dv.innerHTML = \"&lt;iframe width=670 height=600 src=\" + \"https:\/\/www.rjmprogramming.com.au\/ITblog\/tag\/suite\" + \"&gt;&lt;\/iframe&gt;\"; dv.style.display = \"block\";'>this<\/a> too.<\/p>\n<div id='d74152' style='display: none; border-left: 2px solid green; border-top: 2px solid green;'><\/div>\n","protected":false},"excerpt":{"rendered":"<p>We started on Drag and Drop games here with Experimental Drag and Drop Game Tutorial and it came a long way with &#8220;variations on a theme&#8221; all with that Drag and Drop commonality (thanks to https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/API\/DataTransfer\/setData here). We even wrote &hellip; <a href=\"https:\/\/www.rjmprogramming.com.au\/ITblog\/experimental-drag-and-drop-game-suite-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":[1],"tags":[],"class_list":["post-74152","post","type-post","status-publish","format-standard","hentry","category-uncategorised"],"_links":{"self":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts\/74152"}],"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=74152"}],"version-history":[{"count":6,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts\/74152\/revisions"}],"predecessor-version":[{"id":74160,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts\/74152\/revisions\/74160"}],"wp:attachment":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/media?parent=74152"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/categories?post=74152"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/tags?post=74152"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}