{"id":338,"date":"2015-11-04T20:10:31","date_gmt":"2015-11-05T02:10:31","guid":{"rendered":"http:\/\/blogs.discovery.wisc.edu\/vr2015\/?p=338"},"modified":"2015-11-12T11:44:17","modified_gmt":"2015-11-12T17:44:17","slug":"team-object-update-week-2","status":"publish","type":"post","link":"https:\/\/blogs.discovery.wisc.edu\/vr2015\/2015\/11\/04\/team-object-update-week-2\/","title":{"rendered":"Team Object &#8211; Update Week 2"},"content":{"rendered":"<p><strong>Individual Efforts\u00a0<\/strong><\/p>\n<p><em>Andrew<\/em><\/p>\n<p>&#8220;I managed to figure out multiplayer implementation in Unity, in terms of setting up a server (as host) with 3 clients. \u00a0The implementation is not finished, as I still have some scripts to write in order to properly update player information to all players. \u00a0However, I have been able to spawn 4 players within a game space, and can individually control each player. \u00a0I have also looked into IP configuration, and how we can connect multiple clients over LAN with multiple PCs. \u00a0I also further configured Oculus Rift integration, and fixed the jittery frame rate I was having. \u00a0Lastly, I wrote some player controller and motor scripts to make network integration easier (disabling components so only one player can control one at a time, etc).&#8221;<\/p>\n<p>&nbsp;<\/p>\n<div id=\"attachment_339\" style=\"width: 1034px\" class=\"wp-caption alignnone\"><a href=\"http:\/\/blogs.discovery.wisc.edu\/vr2015\/files\/2015\/11\/Week2Screenshot.png\"><img aria-describedby=\"caption-attachment-339\" loading=\"lazy\" class=\"size-large wp-image-339\" src=\"http:\/\/blogs.discovery.wisc.edu\/vr2015\/files\/2015\/11\/Week2Screenshot-1024x575.png\" alt=\"Host with clients running on the same PC\" width=\"1024\" height=\"575\" srcset=\"https:\/\/blogs.discovery.wisc.edu\/vr2015\/files\/2015\/11\/Week2Screenshot-1024x575.png 1024w, https:\/\/blogs.discovery.wisc.edu\/vr2015\/files\/2015\/11\/Week2Screenshot-300x169.png 300w, https:\/\/blogs.discovery.wisc.edu\/vr2015\/files\/2015\/11\/Week2Screenshot.png 1436w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/a><p id=\"caption-attachment-339\" class=\"wp-caption-text\">Host with clients running on the same PC (players are spheres)<\/p><\/div>\n<p>&nbsp;<\/p>\n<p><i>Sizhuo<\/i><\/p>\n<p>&#8220;This week I implemented the mechanism to pick an object and turn into it. Object picking is implemented by ray casting.\u00a0I drew a simple\u00a0cursor so the player understands this is the place where the player is aiming at.\u00a0When the player hits the fire button, an object is picked and then\u00a0the mesh and collider of the player is replaced by those of the picked object. I also imported the two SketchUp models into Unity.&#8221;<\/p>\n<p>&nbsp;<\/p>\n<div id=\"attachment_343\" style=\"width: 1034px\" class=\"wp-caption alignnone\"><a href=\"http:\/\/blogs.discovery.wisc.edu\/vr2015\/files\/2015\/11\/11_4.png\"><img aria-describedby=\"caption-attachment-343\" loading=\"lazy\" class=\"size-large wp-image-343\" src=\"http:\/\/blogs.discovery.wisc.edu\/vr2015\/files\/2015\/11\/11_4-1024x548.png\" alt=\"Game functionality with some UI\" width=\"1024\" height=\"548\" srcset=\"https:\/\/blogs.discovery.wisc.edu\/vr2015\/files\/2015\/11\/11_4-1024x548.png 1024w, https:\/\/blogs.discovery.wisc.edu\/vr2015\/files\/2015\/11\/11_4-300x161.png 300w, https:\/\/blogs.discovery.wisc.edu\/vr2015\/files\/2015\/11\/11_4.png 1920w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/a><p id=\"caption-attachment-343\" class=\"wp-caption-text\">Game functionality with some UI<\/p><\/div>\n<p>&nbsp;<\/p>\n<p><em>Grayson<\/em><\/p>\n<p>&#8220;I have been working on improving the overall layout of the house, as well as adding textures and working with colliders on the walls, stairs, and ceilings in order to make an\u00a0explorable\u00a0environment. As the house is coming together, I am beginning to think about possible additions to the house, as well as weak points (where a player may get stuck in a corner\u00a0or starts floating in the air &#8212;\u00a0\u00a0due to collider bugs). On top of this, I am looking in to ways to make the\u00a0environment\u00a0run smoother with certain tricks to using unity. While this may require an entire rebuild of the house, It will certainly be worth it in the long run when it comes down to performance issues (this can be adjusted towards the end once the main layout is determined).&#8221;<\/p>\n<p>&nbsp;<\/p>\n<div id=\"attachment_342\" style=\"width: 1034px\" class=\"wp-caption alignnone\"><a href=\"http:\/\/blogs.discovery.wisc.edu\/vr2015\/files\/2015\/11\/Screen-Shot-2015-11-04-at-3.48.35-PM.png\"><img aria-describedby=\"caption-attachment-342\" loading=\"lazy\" class=\"size-large wp-image-342\" src=\"http:\/\/blogs.discovery.wisc.edu\/vr2015\/files\/2015\/11\/Screen-Shot-2015-11-04-at-3.48.35-PM-1024x640.png\" alt=\"Interior look\" width=\"1024\" height=\"640\" srcset=\"https:\/\/blogs.discovery.wisc.edu\/vr2015\/files\/2015\/11\/Screen-Shot-2015-11-04-at-3.48.35-PM-1024x640.png 1024w, https:\/\/blogs.discovery.wisc.edu\/vr2015\/files\/2015\/11\/Screen-Shot-2015-11-04-at-3.48.35-PM-300x188.png 300w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/a><p id=\"caption-attachment-342\" class=\"wp-caption-text\">Interior look<\/p><\/div>\n<p>&nbsp;<\/p>\n<div id=\"attachment_341\" style=\"width: 1034px\" class=\"wp-caption alignnone\"><a href=\"http:\/\/blogs.discovery.wisc.edu\/vr2015\/files\/2015\/11\/Screen-Shot-2015-11-04-at-3.48.18-PM.png\"><img aria-describedby=\"caption-attachment-341\" loading=\"lazy\" class=\"size-large wp-image-341\" src=\"http:\/\/blogs.discovery.wisc.edu\/vr2015\/files\/2015\/11\/Screen-Shot-2015-11-04-at-3.48.18-PM-1024x640.png\" alt=\"Modifications\" width=\"1024\" height=\"640\" srcset=\"https:\/\/blogs.discovery.wisc.edu\/vr2015\/files\/2015\/11\/Screen-Shot-2015-11-04-at-3.48.18-PM-1024x640.png 1024w, https:\/\/blogs.discovery.wisc.edu\/vr2015\/files\/2015\/11\/Screen-Shot-2015-11-04-at-3.48.18-PM-300x188.png 300w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/a><p id=\"caption-attachment-341\" class=\"wp-caption-text\">Modifications<\/p><\/div>\n<p>&nbsp;<\/p>\n<div id=\"attachment_340\" style=\"width: 1034px\" class=\"wp-caption alignnone\"><a href=\"http:\/\/blogs.discovery.wisc.edu\/vr2015\/files\/2015\/11\/Screen-Shot-2015-11-04-at-3.48.00-PM.png\"><img aria-describedby=\"caption-attachment-340\" loading=\"lazy\" class=\"size-large wp-image-340\" src=\"http:\/\/blogs.discovery.wisc.edu\/vr2015\/files\/2015\/11\/Screen-Shot-2015-11-04-at-3.48.00-PM-1024x640.png\" alt=\"Prototype Structure\" width=\"1024\" height=\"640\" srcset=\"https:\/\/blogs.discovery.wisc.edu\/vr2015\/files\/2015\/11\/Screen-Shot-2015-11-04-at-3.48.00-PM-1024x640.png 1024w, https:\/\/blogs.discovery.wisc.edu\/vr2015\/files\/2015\/11\/Screen-Shot-2015-11-04-at-3.48.00-PM-300x188.png 300w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/a><p id=\"caption-attachment-340\" class=\"wp-caption-text\">Prototype Structure<\/p><\/div>\n<p>&nbsp;<\/p>\n<p><strong>Accomplishments Made by Team<\/strong><\/p>\n<p>We now have a solid framework, and a strong idea on how this game will function &#8220;behind the scenes.&#8221; \u00a0Although not all scripts are written, we know of different ways we can implement them. \u00a0Also, we now have enough assets to perform functional tests, and incrementally build up the project to help find serious issues before it&#8217;s too late. Within a week or two, we estimate we will have a functioning\u00a0<em>multiplayer\u00a0<\/em>game that will be aesthetically pleasing and have decent functionality. \u00a0That is, we feel confident we will have a game of some sort to present during the final presentation.<\/p>\n<p>&nbsp;<\/p>\n<p><strong>Problems<\/strong><\/p>\n<p>One problem we might have is in integrating our scripts\/prefabs. \u00a0We each are working on different aspects of the project, so we must make sure that not only do our parts individually work, but that they work in a single project. \u00a0For example, Andrew created a player prefab that will work nicely with a Network Manager and with the Oculus Rift. \u00a0Sizhuo is now\u00a0has to base\u00a0his game functionality off of this prefab template, and Grayson will use Sizhuo&#8217;s collision implementation built from this to ensure the environment functions properly with player interaction.<\/p>\n<p>&nbsp;<\/p>\n<p>Andrew ran into a serious problem with RPC&#8217;s, which is Unity&#8217;s old answer to multiplayer functionality. \u00a0They&#8217;re obsolete in Unity 5 (which means they don&#8217;t work anymore) and Andrew found this out 4 hours after starting to write scripts for this implementation&#8230;&#8230;<\/p>\n<p>Also, Andrew found out that basic UI elements don&#8217;t appear on the Oculus Rift (not even on the monitor when the Oculus is being used), and so a new Oculus UI might need to be implemented, which can be troublesome.<\/p>\n<p>&nbsp;<\/p>\n<p>Grayson ran into an issue with coloring walls, and their colliders. \u00a0Since the house is made up of cubes, it is difficult to color only one side of the cube (coloring walls, for example), so Grayson is now trying to use two cubes for each wall. \u00a0This solves the coloring issue, but then we may have\u00a0different collider issues with the player getting stuck, spawning incorrectly, etc.<\/p>\n<p>&nbsp;<\/p>\n<p>One problem Sizhuo met this week is that the camera is fixed at the origin of the player&#8217;s coordinate system, which means that it is always at the center of the player model. This can cause problems. As shown in the picture, when the player turns into a shelf, the camera is in the shelf model so the view is partially occluded by the layer. \u00a0Another problem is that sometimes the colliders don&#8217;t work correctly. \u00a0If the user turns into a mug, it may pass through the shelf.<\/p>\n<p>&nbsp;<\/p>\n<p><strong>Plans for the next week<\/strong><\/p>\n<p>For next week, Andrew will try to finish up the multiplayer implementation, and test out multiple different setups with more than one computer, to see if an active gaming session can be created without bugs or crashes. \u00a0If this is accomplished, he will begin looking into the Oculus Rift UI issue, to ensure that the game can be implemented successfully.<\/p>\n<p>Sizhuo&#8217;s plan for next week is to deal with the camera clipping issues. \u00a0He is thinking about assigning\u00a0a camera position to\u00a0every object. \u00a0He will also look\u00a0into how Unity deals with physics to make the objects interact correctly, and if possible,\u00a0start implementing the game mechanism for the hunter gameplay.<\/p>\n<p>Grayson will try to finish the house and add surrounding environment (trees, other buildings, landscape, etc) and begin adding props to the house (with the help of Sizhuo). \u00a0If necessary, prop spawning will be looked at, to prevent items being spawned within other objects.<\/p>\n<p>&nbsp;<\/p>\n<p>Overall, we are making great progress, and expect to have most of the difficult work figured out in the next couple weeks. \u00a0No serious issues have arisen yet, but nonetheless we are still preparing for them.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Individual Efforts\u00a0 Andrew &#8220;I managed to figure out multiplayer implementation in Unity, in terms of setting up a server (as host) with 3 clients. \u00a0The implementation is not finished, as I still have some scripts to write in order to properly update player information to all players. \u00a0However, I have been able to spawn 4 [&hellip;]<\/p>\n","protected":false},"author":115,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[5,9],"tags":[],"_links":{"self":[{"href":"https:\/\/blogs.discovery.wisc.edu\/vr2015\/wp-json\/wp\/v2\/posts\/338"}],"collection":[{"href":"https:\/\/blogs.discovery.wisc.edu\/vr2015\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blogs.discovery.wisc.edu\/vr2015\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blogs.discovery.wisc.edu\/vr2015\/wp-json\/wp\/v2\/users\/115"}],"replies":[{"embeddable":true,"href":"https:\/\/blogs.discovery.wisc.edu\/vr2015\/wp-json\/wp\/v2\/comments?post=338"}],"version-history":[{"count":2,"href":"https:\/\/blogs.discovery.wisc.edu\/vr2015\/wp-json\/wp\/v2\/posts\/338\/revisions"}],"predecessor-version":[{"id":345,"href":"https:\/\/blogs.discovery.wisc.edu\/vr2015\/wp-json\/wp\/v2\/posts\/338\/revisions\/345"}],"wp:attachment":[{"href":"https:\/\/blogs.discovery.wisc.edu\/vr2015\/wp-json\/wp\/v2\/media?parent=338"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blogs.discovery.wisc.edu\/vr2015\/wp-json\/wp\/v2\/categories?post=338"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blogs.discovery.wisc.edu\/vr2015\/wp-json\/wp\/v2\/tags?post=338"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}