{"id":620,"date":"2013-11-16T18:58:18","date_gmt":"2013-11-16T17:58:18","guid":{"rendered":"http:\/\/labalec.fr\/erwan\/?p=620"},"modified":"2013-11-18T07:55:14","modified_gmt":"2013-11-18T06:55:14","slug":"vb-net-and-xna-article-9-a-pong-game","status":"publish","type":"post","link":"https:\/\/labalec.fr\/erwan\/?p=620","title":{"rendered":"VB.Net and XNA : Article 9 &#8211; A Pong Game"},"content":{"rendered":"<p>This time lets see how, without any external texture, we will animate forms and use collision detection.<\/p>\n<p>To illustrate this, lets make a Pong game.<\/p>\n<p>We will need to draw 3 rectangles : 2 bars and one ball.<br \/>\nThe update method will manage check the keyboard, move the positions of each rectangle and check collision thru the intersect rectangle method.<\/p>\n<p>The code : <a href=\"https:\/\/labalec.fr\/erwan\/wp-content\/uploads\/2013\/11\/XNA_DEMO_17.zip\">XNA_DEMO_17<\/a><br \/>\nup\/down for player2, z\/s for player1 : as simple as that.<\/p>\n<p>See below a short video.<\/p>\n<div style=\"width: 640px;\" class=\"wp-video\"><video class=\"wp-video-shortcode\" id=\"video-620-1\" width=\"640\" height=\"480\" preload=\"metadata\" controls=\"controls\"><source type=\"video\/mp4\" src=\"https:\/\/labalec.fr\/erwan\/wp-content\/uploads\/2013\/11\/xna09.mp4?_=1\" \/><a href=\"https:\/\/labalec.fr\/erwan\/wp-content\/uploads\/2013\/11\/xna09.mp4\">https:\/\/labalec.fr\/erwan\/wp-content\/uploads\/2013\/11\/xna09.mp4<\/a><\/video><\/div>\n<p>Enjoy<\/p>\n","protected":false},"excerpt":{"rendered":"<p>This time lets see how, without any external texture, we will animate forms and use collision detection. To illustrate this, lets make a Pong game. We will need to draw 3 rectangles : 2 bars and one ball. The update method will manage check the keyboard, move the positions of each rectangle and check collision <a href='https:\/\/labalec.fr\/erwan\/?p=620' class='excerpt-more'>[&#8230;]<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[34,35],"tags":[],"class_list":["post-620","post","type-post","status-publish","format-standard","hentry","category-dotnet","category-xna","category-34-id","category-35-id","post-seq-1","post-parity-odd","meta-position-corners","fix"],"_links":{"self":[{"href":"https:\/\/labalec.fr\/erwan\/index.php?rest_route=\/wp\/v2\/posts\/620","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/labalec.fr\/erwan\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/labalec.fr\/erwan\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/labalec.fr\/erwan\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/labalec.fr\/erwan\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=620"}],"version-history":[{"count":2,"href":"https:\/\/labalec.fr\/erwan\/index.php?rest_route=\/wp\/v2\/posts\/620\/revisions"}],"predecessor-version":[{"id":643,"href":"https:\/\/labalec.fr\/erwan\/index.php?rest_route=\/wp\/v2\/posts\/620\/revisions\/643"}],"wp:attachment":[{"href":"https:\/\/labalec.fr\/erwan\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=620"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/labalec.fr\/erwan\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=620"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/labalec.fr\/erwan\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=620"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}