{"id":592,"date":"2009-09-30T12:09:55","date_gmt":"2009-09-30T17:09:55","guid":{"rendered":"http:\/\/www.tigoe.net\/pcomp\/code\/?p=592"},"modified":"2010-01-23T03:11:27","modified_gmt":"2010-01-23T08:11:27","slug":"ball-drop-game","status":"publish","type":"post","link":"https:\/\/www.tigoe.com\/pcomp\/code\/Processing\/592\/","title":{"rendered":"Ball Drop Game"},"content":{"rendered":"<p>Here&#8217;s a variation on the networked <a href=\"http:\/\/www.makingthingstalk.com\/chapter5\/35\/\">pong server<\/a> from <a href=\"http:\/\/makingthingstalk.com\/\"><em>Making Things Talk<\/em><\/a>..\u00a0 This version is cooperative rather than competitive.\u00a0 Multiple clients have to keep the ball from hitting the ground.\u00a0 There are five balls dropped each game.<\/p>\n<p><!--more--><\/p>\n<p>There are two files to this sketch, the main code, and a separate class for each player.  The main code looks like this:<\/p>\n<pre class=\"brush:Processing; light:true\">[include file=\"..\/..\/code\/Processing\/ballDrop_server\/ballDrop_server.pde\" clean=\"true\"]<\/pre>\n<p>Here&#8217;s the Player class. I separated this out to a second tab in my Processing sketch.<\/p>\n<pre class=\"brush:Processing; light:true\">[include file=\"..\/..\/code\/Processing\/ballDrop_server\/Player.pde\" clean=\"true\"]<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Here&#8217;s a variation on the networked pong server from Making Things Talk..\u00a0 This version is cooperative rather than competitive.\u00a0 Multiple clients have to keep the ball from hitting the ground.\u00a0 There are five balls dropped each game.<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[7],"tags":[77,75,76],"class_list":["post-592","post","type-post","status-publish","format-standard","hentry","category-Processing","tag-chat-server","tag-networks","tag-tcp"],"_links":{"self":[{"href":"https:\/\/www.tigoe.com\/pcomp\/code\/wp-json\/wp\/v2\/posts\/592","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.tigoe.com\/pcomp\/code\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.tigoe.com\/pcomp\/code\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.tigoe.com\/pcomp\/code\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.tigoe.com\/pcomp\/code\/wp-json\/wp\/v2\/comments?post=592"}],"version-history":[{"count":6,"href":"https:\/\/www.tigoe.com\/pcomp\/code\/wp-json\/wp\/v2\/posts\/592\/revisions"}],"predecessor-version":[{"id":833,"href":"https:\/\/www.tigoe.com\/pcomp\/code\/wp-json\/wp\/v2\/posts\/592\/revisions\/833"}],"wp:attachment":[{"href":"https:\/\/www.tigoe.com\/pcomp\/code\/wp-json\/wp\/v2\/media?parent=592"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.tigoe.com\/pcomp\/code\/wp-json\/wp\/v2\/categories?post=592"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.tigoe.com\/pcomp\/code\/wp-json\/wp\/v2\/tags?post=592"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}