{"id":16148,"date":"2022-08-12T15:00:15","date_gmt":"2022-08-12T19:00:15","guid":{"rendered":"https:\/\/blogs.mathworks.com\/pick\/?p=16148"},"modified":"2022-10-18T19:22:17","modified_gmt":"2022-10-18T23:22:17","slug":"learning-programming-through-game-building","status":"publish","type":"post","link":"https:\/\/blogs.mathworks.com\/pick\/2022\/08\/12\/learning-programming-through-game-building\/","title":{"rendered":"Learning programming through game building"},"content":{"rendered":"<div class = rtcContent><div  style = 'margin: 2px 10px 9px 4px; padding: 0px; line-height: 21px; min-height: 0px; white-space: pre-wrap; color: rgb(33, 33, 33); font-family: Helvetica, Arial, sans-serif; font-style: normal; font-size: 14px; font-weight: 400; text-align: left; '><a href = \"https:\/\/www.mathworks.com\/matlabcentral\/profile\/authors\/869871\"><span>Jiro<\/span><\/a><span>'s Pick this week is <\/span><a href = \"https:\/\/www.mathworks.com\/matlabcentral\/fileexchange\/108414\"><span>AstroVolley Courseware<\/span><\/a><span> by <\/span><a href = \"https:\/\/www.mathworks.com\/matlabcentral\/profile\/authors\/10770857\"><span>Paul Huxel<\/span><\/a><span>.<\/span><\/div><div  style = 'margin: 2px 10px 9px 4px; padding: 0px; line-height: 21px; min-height: 0px; white-space: pre-wrap; color: rgb(33, 33, 33); font-family: Helvetica, Arial, sans-serif; font-style: normal; font-size: 14px; font-weight: 400; text-align: left; '><span>Back in my undergraduate studies (many, many years ago), I took a Pascal programming course, and it was the first official programming language I learned. <\/span><span style=' font-style: italic;'>I still claim MATLAB as my first programming language I learned, since I have never used Pascal beyond that one course.<\/span><span> What I really enjoyed about the Pascal course was that we learned the language as we built an <\/span><a href = \"https:\/\/en.wikipedia.org\/wiki\/Artillery_game\"><span>artillery game<\/span><\/a><span>. We learned about graphics, animation, loops, and other standard programming constructs.<\/span><\/div><div  style = 'margin: 2px 10px 9px 4px; padding: 0px; line-height: 21px; min-height: 0px; white-space: pre-wrap; color: rgb(33, 33, 33); font-family: Helvetica, Arial, sans-serif; font-style: normal; font-size: 14px; font-weight: 400; text-align: left; '><span>When I saw AstroVolley, it brought back good memories from my programming course. This courseware is perfect for teaching basic programming, plotting, and app building in MATLAB. It teaches the concepts necessary to build the game step by step.<\/span><\/div><div  style = 'margin: 2px 10px 9px 4px; padding: 0px; line-height: 21px; min-height: 0px; white-space: pre-wrap; color: rgb(33, 33, 33); font-family: Helvetica, Arial, sans-serif; font-style: normal; font-size: 14px; font-weight: 400; text-align: center; '><img class = \"imageNode\" src = \"https:\/\/blogs.mathworks.com\/pick\/files\/potw_programming_through_game_creation_1.gif\" width = \"900\" height = \"528\" alt = \"astrovolley_anim.gif\" style = \"vertical-align: baseline; width: 900px; height: 528px;\"><\/img><\/div><div  style = 'margin: 2px 10px 9px 4px; padding: 0px; line-height: 21px; min-height: 0px; white-space: pre-wrap; color: rgb(33, 33, 33); font-family: Helvetica, Arial, sans-serif; font-style: normal; font-size: 14px; font-weight: 400; text-align: left; '><span>Paul includes an <\/span><a href = \"https:\/\/github.com\/mathworks\/AstroVolley-Courseware\/blob\/master\/AstroVolley_InstructorGuide.pdf\"><span>instructor guide<\/span><\/a><span>, which can be used as lecture notes. Here is the complete lesson plan. <\/span><\/div><div  style = 'margin: 2px 10px 9px 4px; padding: 0px; line-height: 21px; min-height: 0px; white-space: pre-wrap; color: rgb(33, 33, 33); font-family: Helvetica, Arial, sans-serif; font-style: normal; font-size: 14px; font-weight: 400; text-align: center; '><img class = \"imageNode\" src = \"https:\/\/blogs.mathworks.com\/pick\/files\/potw_programming_through_game_creation_2.png\" width = \"901\" height = \"489\" alt = \"\" style = \"vertical-align: baseline; width: 901px; height: 489px;\"><\/img><\/div><div  style = 'margin: 2px 10px 9px 4px; padding: 0px; line-height: 21px; min-height: 0px; white-space: pre-wrap; color: rgb(33, 33, 33); font-family: Helvetica, Arial, sans-serif; font-style: normal; font-size: 14px; font-weight: 400; text-align: left; '><span>It starts from simple plotting for drawing the ships (triangles) and then celestial bodies (circles). Loops are introduced to plot multiple bodies in a more efficient way. Trajectories are visualized through animations. Finally, all of this is put together into an app with the App Designer. Paul also adds a nice touch by explaining the physics behind gravity and orbits.<\/span><\/div><div  style = 'margin: 2px 10px 9px 4px; padding: 0px; line-height: 21px; min-height: 0px; white-space: pre-wrap; color: rgb(33, 33, 33); font-family: Helvetica, Arial, sans-serif; font-style: normal; font-size: 14px; font-weight: 400; text-align: left; '><span>What I really like is that he includes live scripts and apps for each concept, with fill-in-the-blank tasks for students to work on. <\/span><\/div><div  style = 'margin: 2px 10px 9px 4px; padding: 0px; line-height: 21px; min-height: 0px; white-space: pre-wrap; color: rgb(33, 33, 33); font-family: Helvetica, Arial, sans-serif; font-style: normal; font-size: 14px; font-weight: 400; text-align: center; '><img class = \"imageNode\" src = \"https:\/\/blogs.mathworks.com\/pick\/files\/potw_programming_through_game_creation_3.gif\" width = \"900\" height = \"433\" alt = \"plotting_task.gif\" style = \"vertical-align: baseline; width: 900px; height: 433px;\"><\/img><\/div><h2  style = 'margin: 20px 10px 5px 4px; padding: 0px; line-height: 20px; min-height: 0px; white-space: pre-wrap; color: rgb(33, 33, 33); font-family: Helvetica, Arial, sans-serif; font-style: normal; font-size: 20px; font-weight: 700; text-align: left; '><span>Comments<\/span><\/h2><div  style = 'margin: 2px 10px 9px 4px; padding: 0px; line-height: 21px; min-height: 0px; white-space: pre-wrap; color: rgb(33, 33, 33); font-family: Helvetica, Arial, sans-serif; font-style: normal; font-size: 14px; font-weight: 400; text-align: left; '><span>Very well done, Paul! Give this a try and let us know what you think <\/span><a href = \"https:\/\/blogs.mathworks.com\/pick\/?p=16148#respond\"><span>here<\/span><\/a><span>.<\/span><\/div>\r\n<\/div><script type=\"text\/javascript\">var css = ''; var head = document.head || document.getElementsByTagName('head')[0], style = document.createElement('style'); head.appendChild(style); style.type = 'text\/css'; if (style.styleSheet){ style.styleSheet.cssText = css; } else { style.appendChild(document.createTextNode(css)); }<\/script>","protected":false},"excerpt":{"rendered":"<div class=\"overview-image\"><img src=\"https:\/\/blogs.mathworks.com\/pick\/files\/potw_programming_through_game_creation_1.gif\" class=\"img-responsive attachment-post-thumbnail size-post-thumbnail wp-post-image\" alt=\"\" decoding=\"async\" loading=\"lazy\" \/><\/div><p>Jiro's Pick this week is AstroVolley Courseware by Paul Huxel.Back in my undergraduate studies (many, many years ago), I took a Pascal programming course, and it was the first official programming... <a class=\"read-more\" href=\"https:\/\/blogs.mathworks.com\/pick\/2022\/08\/12\/learning-programming-through-game-building\/\">read more >><\/a><\/p>","protected":false},"author":35,"featured_media":16151,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[16],"tags":[],"_links":{"self":[{"href":"https:\/\/blogs.mathworks.com\/pick\/wp-json\/wp\/v2\/posts\/16148"}],"collection":[{"href":"https:\/\/blogs.mathworks.com\/pick\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blogs.mathworks.com\/pick\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blogs.mathworks.com\/pick\/wp-json\/wp\/v2\/users\/35"}],"replies":[{"embeddable":true,"href":"https:\/\/blogs.mathworks.com\/pick\/wp-json\/wp\/v2\/comments?post=16148"}],"version-history":[{"count":3,"href":"https:\/\/blogs.mathworks.com\/pick\/wp-json\/wp\/v2\/posts\/16148\/revisions"}],"predecessor-version":[{"id":16365,"href":"https:\/\/blogs.mathworks.com\/pick\/wp-json\/wp\/v2\/posts\/16148\/revisions\/16365"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/blogs.mathworks.com\/pick\/wp-json\/wp\/v2\/media\/16151"}],"wp:attachment":[{"href":"https:\/\/blogs.mathworks.com\/pick\/wp-json\/wp\/v2\/media?parent=16148"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blogs.mathworks.com\/pick\/wp-json\/wp\/v2\/categories?post=16148"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blogs.mathworks.com\/pick\/wp-json\/wp\/v2\/tags?post=16148"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}