{"id":285,"date":"2012-05-08T00:48:22","date_gmt":"2012-05-08T04:48:22","guid":{"rendered":"http:\/\/www.joshho.com\/blog\/?p=285"},"modified":"2012-08-01T16:05:42","modified_gmt":"2012-08-01T20:05:42","slug":"html5-canvas-pong","status":"publish","type":"post","link":"https:\/\/www.joshho.com\/blog\/2012\/05\/08\/html5-canvas-pong\/","title":{"rendered":"HTML5 Canvas &#8211; Pong"},"content":{"rendered":"<p>Hi again,<\/p>\n<p>It&#8217;s been said that the classic game of Pong is the &#8216;hello world&#8217; of game creation, and thus I wanted to try my hand at it. In line with my previous attempt at HTML5, this is also built on the canvas element in HTML5.<\/p>\n<p>The AI is a bit shoddy, but hey, it&#8217;s a functional game. Interestingly enough, while I was on my lunch break at work, I couldn&#8217;t help but test out this game on my phone, which brought me to adding some touch-screen mobile support to it. I have tested it on a touchscreen IPhone and I&#8217;m delighted to say it works as expected.<\/p>\n<p>&nbsp;<\/p>\n<p><a href=\"http:\/\/www.joshho.com\/apps\/HTML5\/Pong\/\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-thumbnail wp-image-284\" title=\"Pong\" src=\"http:\/\/www.joshho.com\/blog\/wp-content\/uploads\/2012\/05\/Pong.png\" alt=\"\" width=\"400\" height=\"301\" srcset=\"https:\/\/www.joshho.com\/blog\/wp-content\/uploads\/2012\/05\/Pong.png 812w, https:\/\/www.joshho.com\/blog\/wp-content\/uploads\/2012\/05\/Pong-300x226.png 300w\" sizes=\"auto, (max-width: 400px) 100vw, 400px\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n<p>You can click\u00a0<a href=\"http:\/\/www.joshho.com\/apps\/HTML5\/Pong\/\">here<\/a> to try the game out.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Hi again,<\/p>\n<p>It&#8217;s been said that the classic game of Pong is the &#8216;hello world&#8217; of game creation, and thus I wanted to try my hand at it. In line with my previous attempt at HTML5, this is also built on the canvas element in HTML5.<\/p>\n<p>The AI is a bit shoddy, but hey, it&#8217;s a functional game. Interestingly enough, while I was on my lunch break at work, I couldn&#8217;t help but test out this game on my phone, which brought me to adding some touch-screen mobile support to it. I have tested it on a touchscreen IPhone and I&#8217;m delighted to say it works as expected.<\/p>\n<p>&nbsp;<\/p>\n<p><a href=\"http:\/\/www.joshho.com\/apps\/HTML5\/Pong\/\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-thumbnail wp-image-284\" title=\"Pong\" src=\"http:\/\/www.joshho.com\/blog\/wp-content\/uploads\/2012\/05\/Pong.png\" alt=\"\" width=\"400\" height=\"301\" srcset=\"https:\/\/www.joshho.com\/blog\/wp-content\/uploads\/2012\/05\/Pong.png 812w, https:\/\/www.joshho.com\/blog\/wp-content\/uploads\/2012\/05\/Pong-300x226.png 300w\" sizes=\"auto, (max-width: 400px) 100vw, 400px\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n<p>You can click\u00a0<a href=\"http:\/\/www.joshho.com\/apps\/HTML5\/Pong\/\">here<\/a> to try the game out.<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[48,25],"tags":[51,30,52,50,49],"class_list":["post-285","post","type-post","status-publish","format-standard","hentry","category-hobby","category-websiteinformation","tag-canvas","tag-example","tag-game","tag-html5","tag-program"],"_links":{"self":[{"href":"https:\/\/www.joshho.com\/blog\/wp-json\/wp\/v2\/posts\/285","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.joshho.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.joshho.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.joshho.com\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.joshho.com\/blog\/wp-json\/wp\/v2\/comments?post=285"}],"version-history":[{"count":33,"href":"https:\/\/www.joshho.com\/blog\/wp-json\/wp\/v2\/posts\/285\/revisions"}],"predecessor-version":[{"id":499,"href":"https:\/\/www.joshho.com\/blog\/wp-json\/wp\/v2\/posts\/285\/revisions\/499"}],"wp:attachment":[{"href":"https:\/\/www.joshho.com\/blog\/wp-json\/wp\/v2\/media?parent=285"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.joshho.com\/blog\/wp-json\/wp\/v2\/categories?post=285"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.joshho.com\/blog\/wp-json\/wp\/v2\/tags?post=285"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}