{"id":107,"date":"2010-05-06T14:59:03","date_gmt":"2010-05-06T09:29:03","guid":{"rendered":"http:\/\/techtwaddle.net\/?p=107"},"modified":"2011-01-26T14:59:21","modified_gmt":"2011-01-26T09:29:21","slug":"applications-some-more-marble-fun","status":"publish","type":"post","link":"https:\/\/techtwaddle.co.in\/blog\/2010\/05\/06\/applications-some-more-marble-fun\/","title":{"rendered":"Applications: Some more marble fun!"},"content":{"rendered":"<p style=\"text-align: justify;\">Well, yesterday night I was watching a tutorial on XNA when I came across this neat little trick. It was a simple XNA&nbsp;application with a Windows Phone logo in it and whenever the user clicked on the device the logo would move towards the click point, and I couldn&#8217;t resist experimenting with the marble (;<\/p>\n<p style=\"text-align: justify;\">The code is written in C# using CF3.5. Here is a video of the demo,<\/p>\n<p><object width=\"425\" height=\"344\"><param name=\"movie\" value=\"http:\/\/www.youtube.com\/v\/K14C2kZGRVA&amp;hl=en_US&amp;fs=1&amp;color1=0x3a3a3a&amp;color2=0x999999\" \/><param name=\"allowFullScreen\" value=\"true\" \/><param name=\"allowscriptaccess\" value=\"always\" \/><\/object><\/p>\n<p style=\"text-align: justify;\">&nbsp;<\/p>\n<p style=\"text-align: justify;\">You probably noticed the motion of the marble towards the click point (destination). The marble starts off with a high velocity and slows down as it reaches its destination. This is achieved by making the speed of the marble a function of the distance between marble&#8217;s current position and the destination, so as the marble approaches the destination point, the distance between them reduces and so does the speed, until it becomes zero.<\/p>\n<p style=\"text-align: justify;\">More on the code and the logic behind it in the next post. What I&#8217;d like to do next is, instead of making the marble stop at the click point, it should continue to move beyond it, bounce around the screen a few times and eventually come to a stop after a while. Let&#8217;s see how that goes.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Well, yesterday night I was watching a tutorial on XNA when I came across this neat little trick. It was a simple XNA&nbsp;application with a Windows Phone logo in it and whenever the user clicked on the device the logo would move towards the click point, and I couldn&#8217;t resist experimenting with the marble (; &hellip; <a href=\"https:\/\/techtwaddle.co.in\/blog\/2010\/05\/06\/applications-some-more-marble-fun\/\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">Applications: Some more marble fun!<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"spay_email":"","jetpack_publicize_message":"","jetpack_is_tweetstorm":false},"categories":[1],"tags":[],"jetpack_featured_media_url":"","jetpack_publicize_connections":[],"jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p1ktFF-1J","_links":{"self":[{"href":"https:\/\/techtwaddle.co.in\/blog\/wp-json\/wp\/v2\/posts\/107"}],"collection":[{"href":"https:\/\/techtwaddle.co.in\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/techtwaddle.co.in\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/techtwaddle.co.in\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/techtwaddle.co.in\/blog\/wp-json\/wp\/v2\/comments?post=107"}],"version-history":[{"count":1,"href":"https:\/\/techtwaddle.co.in\/blog\/wp-json\/wp\/v2\/posts\/107\/revisions"}],"predecessor-version":[{"id":108,"href":"https:\/\/techtwaddle.co.in\/blog\/wp-json\/wp\/v2\/posts\/107\/revisions\/108"}],"wp:attachment":[{"href":"https:\/\/techtwaddle.co.in\/blog\/wp-json\/wp\/v2\/media?parent=107"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/techtwaddle.co.in\/blog\/wp-json\/wp\/v2\/categories?post=107"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/techtwaddle.co.in\/blog\/wp-json\/wp\/v2\/tags?post=107"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}