{"id":1446,"date":"2019-03-29T21:48:25","date_gmt":"2019-03-29T21:48:25","guid":{"rendered":"http:\/\/blogs.discovery.wisc.edu\/projects\/?p=1446"},"modified":"2019-03-29T21:48:36","modified_gmt":"2019-03-29T21:48:36","slug":"visual-acuity-week-4","status":"publish","type":"post","link":"https:\/\/blogs.discovery.wisc.edu\/projects\/2019\/03\/29\/visual-acuity-week-4\/","title":{"rendered":"Visual Acuity, Post 4"},"content":{"rendered":"<p><strong><a href=\"http:\/\/blogs.discovery.wisc.edu\/projects\/files\/2019\/03\/file-11-e1553896056231.jpeg\"><img loading=\"lazy\" class=\"alignnone size-medium wp-image-1447\" src=\"http:\/\/blogs.discovery.wisc.edu\/projects\/files\/2019\/03\/file-11-e1553896056231-300x300.jpeg\" alt=\"\" width=\"300\" height=\"300\" srcset=\"https:\/\/blogs.discovery.wisc.edu\/projects\/files\/2019\/03\/file-11-e1553896056231-300x300.jpeg 300w, https:\/\/blogs.discovery.wisc.edu\/projects\/files\/2019\/03\/file-11-e1553896056231-150x150.jpeg 150w, https:\/\/blogs.discovery.wisc.edu\/projects\/files\/2019\/03\/file-11-e1553896056231-768x768.jpeg 768w, https:\/\/blogs.discovery.wisc.edu\/projects\/files\/2019\/03\/file-11-e1553896056231-1024x1024.jpeg 1024w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><\/strong><\/p>\n<p><strong>Progress<\/strong><\/p>\n<p>This week I started to build the workings of the Landolt C test. The test needs to run a specific number of trials, a certain number of times, at specific distances, with rest between the trial attempts. The test also should record a failure and move onto the next trial if 3 seconds pass without a guess. All of the code for that functionality has been written, however it requires multi threading, which ended up taking up most of my time this week.<\/p>\n<p><strong>Struggles<\/strong><\/p>\n<p>In building the timed component of the test, I ran into an issue with multi-threading. Typically in C# (my experience with it pertains mostly to web development) one would use the System.Timer library to create a timer. However, I need to pass around a bunch of information every time that timer goes off. As that library is geared more towards calling object methods (like service classes for an MVC web application), it&#8217;s really not meant for passing info around within the object. The event handler method must be declared as static, so that rout ended there.<\/p>\n<p>The next thing I tried, which took up most of my time, was trying to set up my own medieval multi-threading using Time.DeltaTime from unity itself. Needless to say trying to re-engineer multi-threading myself didn&#8217;t go well.<\/p>\n<p>I ended up coming to unity&#8217;s co-routine functionality towards the end of my time for the week. I&#8217;ll need to learn how that works, and see how I can pass information \/ call other functions from the event handler for the co-routine call.<\/p>\n<p><strong>Next Week<\/strong><\/p>\n<p>Once I figure that multi-threading issue, the functionality of the Landolt C test will be complete. Then I&#8217;ll be moving onto building a functional UI. Part of why the threading is an issue is because I&#8217;m trying to make things as modular \/ customize-able as possible so that the test can be changed to meet any criteria.<\/p>\n<ul>\n<li>Enabling choice of perspective<\/li>\n<li>Main menu and test result display UI<\/li>\n<li>Prompts for test customization<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>Progress This week I started to build the workings of the Landolt C test. The test needs to run a specific number of trials, a certain number of times, at specific distances, with rest between the trial attempts. The test &hellip; <a href=\"https:\/\/blogs.discovery.wisc.edu\/projects\/2019\/03\/29\/visual-acuity-week-4\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":199,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[3],"tags":[],"_links":{"self":[{"href":"https:\/\/blogs.discovery.wisc.edu\/projects\/wp-json\/wp\/v2\/posts\/1446"}],"collection":[{"href":"https:\/\/blogs.discovery.wisc.edu\/projects\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blogs.discovery.wisc.edu\/projects\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blogs.discovery.wisc.edu\/projects\/wp-json\/wp\/v2\/users\/199"}],"replies":[{"embeddable":true,"href":"https:\/\/blogs.discovery.wisc.edu\/projects\/wp-json\/wp\/v2\/comments?post=1446"}],"version-history":[{"count":2,"href":"https:\/\/blogs.discovery.wisc.edu\/projects\/wp-json\/wp\/v2\/posts\/1446\/revisions"}],"predecessor-version":[{"id":1449,"href":"https:\/\/blogs.discovery.wisc.edu\/projects\/wp-json\/wp\/v2\/posts\/1446\/revisions\/1449"}],"wp:attachment":[{"href":"https:\/\/blogs.discovery.wisc.edu\/projects\/wp-json\/wp\/v2\/media?parent=1446"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blogs.discovery.wisc.edu\/projects\/wp-json\/wp\/v2\/categories?post=1446"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blogs.discovery.wisc.edu\/projects\/wp-json\/wp\/v2\/tags?post=1446"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}