{"id":37,"date":"2021-11-18T22:13:51","date_gmt":"2021-11-18T22:13:51","guid":{"rendered":"https:\/\/blogs.oregonstate.edu\/jaymeshamilton\/?p=37"},"modified":"2021-11-18T22:13:51","modified_gmt":"2021-11-18T22:13:51","slug":"version-0-02","status":"publish","type":"post","link":"https:\/\/blogs.oregonstate.edu\/jaymeshamilton\/2021\/11\/18\/version-0-02\/","title":{"rendered":"Version 0.02"},"content":{"rendered":"\n<h2 class=\"wp-block-heading\">Introduction<\/h2>\n\n\n\n<p>Version 0.02 of our project is now live. Our aim for this version was to work on implementing the most important use case of the project. For our project, the use case is what system the user will have the most interaction with. <\/p>\n\n\n\n<p>Naturally, this use case would be the pedometer. The entire concept and execution of the game revolves around exercise, after all. Implementing the pedometer was not easy.<\/p>\n\n\n\n<div style=\"height:100px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h2 class=\"wp-block-heading\">The Pedometer<\/h2>\n\n\n\n<p>You would think that you can just find code for a pedometer on the internet. You would be right, but it is not that simple. Despite finding many examples of pedometers and how to build one, no one had every implementing a pedometer in SpriteKit (or at least, documented the use of one). So, we had to do a lot of adaption. <\/p>\n\n\n\n<p>The way it works, after lots of hard work, is simple. The code imports &#8220;CoreMotion&#8221;. CoreMotion represents the sensors inside the phone that track vibrations and other movement. When the phone senses movement, our pedometer will increase the number of steps taken. It is not instant, as transmitting data never is, but it is accurate and updates quick enough for our use.<\/p>\n\n\n\n<p>After resetting the app, the amount of steps taken reset, to show how many have been done this session. I would show the pedometer in action, but this is not something that can be represented on a computer, as it is recorded on a phone. I can&#8217;t post recordings here, unfortunately. If I can, I do not know how.<\/p>\n\n\n\n<div style=\"height:100px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h2 class=\"wp-block-heading\">What Next?<\/h2>\n\n\n\n<p>The pedometer is extremely important represents a big leap in our project creation. However, there is still a lot more to go. Most notably, the pedometer is tied to the amount of gold the player has. <\/p>\n\n\n\n<p>Is there a way for the gold of the player to increase at the same time as the pedometer, but make sure to actually keep track of the gold? <\/p>\n\n\n\n<p>I.E. I take 50 steps, and my gold increases from 400 to 450. Closing the game should still remember how much gold I have, despite the number of steps being recorded resetting. There is much left to do, despite our big leap forward.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Introduction Version 0.02 of our project is now live. Our aim for this version was to work on implementing the most important use case of the project. For our project, the use case is what system the user will have the most interaction with. Naturally, this use case would be the pedometer. The entire concept&hellip; <a class=\"more-link\" href=\"https:\/\/blogs.oregonstate.edu\/jaymeshamilton\/2021\/11\/18\/version-0-02\/\">Continue reading <span class=\"screen-reader-text\">Version 0.02<\/span><\/a><\/p>\n","protected":false},"author":11578,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-37","post","type-post","status-publish","format-standard","hentry","category-uncategorized","entry"],"_links":{"self":[{"href":"https:\/\/blogs.oregonstate.edu\/jaymeshamilton\/wp-json\/wp\/v2\/posts\/37","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blogs.oregonstate.edu\/jaymeshamilton\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blogs.oregonstate.edu\/jaymeshamilton\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blogs.oregonstate.edu\/jaymeshamilton\/wp-json\/wp\/v2\/users\/11578"}],"replies":[{"embeddable":true,"href":"https:\/\/blogs.oregonstate.edu\/jaymeshamilton\/wp-json\/wp\/v2\/comments?post=37"}],"version-history":[{"count":1,"href":"https:\/\/blogs.oregonstate.edu\/jaymeshamilton\/wp-json\/wp\/v2\/posts\/37\/revisions"}],"predecessor-version":[{"id":38,"href":"https:\/\/blogs.oregonstate.edu\/jaymeshamilton\/wp-json\/wp\/v2\/posts\/37\/revisions\/38"}],"wp:attachment":[{"href":"https:\/\/blogs.oregonstate.edu\/jaymeshamilton\/wp-json\/wp\/v2\/media?parent=37"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blogs.oregonstate.edu\/jaymeshamilton\/wp-json\/wp\/v2\/categories?post=37"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blogs.oregonstate.edu\/jaymeshamilton\/wp-json\/wp\/v2\/tags?post=37"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}