{"id":4704,"date":"2017-02-05T23:54:52","date_gmt":"2017-02-05T23:54:52","guid":{"rendered":"http:\/\/phoenixgamedevelopment.com\/blog\/?p=4704"},"modified":"2017-02-05T23:54:52","modified_gmt":"2017-02-05T23:54:52","slug":"p0-p-172-part-103-object-generator","status":"publish","type":"post","link":"https:\/\/phoenixgamedevelopment.com\/blog\/p0-p-172-part-103-object-generator\/","title":{"rendered":"P0-P-172: Part 103: Object Generator"},"content":{"rendered":"<p>I have completed a very basic concept of the object generator (using rocks as the objects, instead of trees).<\/p>\n<p>I have not added the city generator yet, but it will basically function in the same way, except instead of placing objects at random, it will place them within a certain distance of the cities position, as stored on the server. The server will also send a send to the client for each city, ensuring that it looks exactly the same on all clients.<\/p>\n<p>I have uncovered several severe issues with the system though. I am using the existing terrain Quadtree system to create the objects, and I will need to replace this with a specially designed Quadtree\u00a0system for the object generator.<\/p>\n<p>I am also aligning the objects to the ground using raycasting. I am not sure how to solve this problem, since the height of the terrain will not be known. It changes slightly as the terrain subdivides at each LOD, so raycasting may be necessary.<\/p>\n<p>I was trying to avoid iterating through each object at regular intervals, and deciding whether it should be rendered or not, but I may have to do this. The new system will likely divide the world into relatively large chunks, and generate all of the objects within those chunks from the chunk seed. Then I will render these objects based on the players distance. I will also use occlusion culling, and various other culling strategies to improve performance.<\/p>\n<p>I will probably postpone further development of the procedural content and infinite universe features for a week or so, to allow me to do more research. These features are essential to the project, and therefore, need to be solid and working well.<\/p>\n<p>In addition to this research, my next major goal will be to add large starships to the game. I will need to implement a system where the world moves and rotates, and not the ship itself. This is necessary, since a ship will contain a large number of subobjects, and could not be moved by itself. I have also got some work to do with regards to VR integration, and fixing bugs, improving performance, etc.<\/p>\n<p>&nbsp;<\/p>\n<figure id=\"attachment_4701\" aria-describedby=\"caption-attachment-4701\" style=\"width: 300px\" class=\"wp-caption alignnone\"><a href=\"https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2017\/02\/PhoenixGameDevelopment-03_02_2017-11_01_24-PM.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"size-medium wp-image-4701\" src=\"https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2017\/02\/PhoenixGameDevelopment-03_02_2017-11_01_24-PM-300x163.jpg\" alt=\"Unity 03\/02\/2017 , 11:01:24 PM Unity Personal (64bit) - P0Main.unity - New Unity Project - PC, Mac &amp; Linux Standalone \" width=\"300\" height=\"163\" srcset=\"https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2017\/02\/PhoenixGameDevelopment-03_02_2017-11_01_24-PM-300x163.jpg 300w, https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2017\/02\/PhoenixGameDevelopment-03_02_2017-11_01_24-PM-768x416.jpg 768w, https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2017\/02\/PhoenixGameDevelopment-03_02_2017-11_01_24-PM-1024x555.jpg 1024w, https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2017\/02\/PhoenixGameDevelopment-03_02_2017-11_01_24-PM.jpg 1920w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><figcaption id=\"caption-attachment-4701\" class=\"wp-caption-text\">Unity<br \/>03\/02\/2017 , 11:01:24 PM<br \/>Unity Personal (64bit) &#8211; P0Main.unity &#8211; New Unity Project &#8211; PC, Mac &amp; Linux Standalone<\/figcaption><\/figure>\n<figure id=\"attachment_4700\" aria-describedby=\"caption-attachment-4700\" style=\"width: 300px\" class=\"wp-caption alignnone\"><a href=\"https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2017\/02\/PhoenixGameDevelopment-05_02_2017-02_44_22-AM.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"size-medium wp-image-4700\" src=\"https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2017\/02\/PhoenixGameDevelopment-05_02_2017-02_44_22-AM-300x164.jpg\" alt=\"Unity 05\/02\/2017 , 02:44:22 AM Unity Personal (64bit) - P0Main.unity - New Unity Project - PC, Mac &amp; Linux Standalone \" width=\"300\" height=\"164\" srcset=\"https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2017\/02\/PhoenixGameDevelopment-05_02_2017-02_44_22-AM-300x164.jpg 300w, https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2017\/02\/PhoenixGameDevelopment-05_02_2017-02_44_22-AM-768x419.jpg 768w, https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2017\/02\/PhoenixGameDevelopment-05_02_2017-02_44_22-AM-1024x559.jpg 1024w, https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2017\/02\/PhoenixGameDevelopment-05_02_2017-02_44_22-AM.jpg 1922w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><figcaption id=\"caption-attachment-4700\" class=\"wp-caption-text\">Unity<br \/>05\/02\/2017 , 02:44:22 AM<br \/>Unity Personal (64bit) &#8211; P0Main.unity &#8211; New Unity Project &#8211; PC, Mac &amp; Linux Standalone<\/figcaption><\/figure>\n<figure id=\"attachment_4699\" aria-describedby=\"caption-attachment-4699\" style=\"width: 300px\" class=\"wp-caption alignnone\"><a href=\"https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2017\/02\/PhoenixGameDevelopment-03_02_2017-04_14_41-AM.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"size-medium wp-image-4699\" src=\"https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2017\/02\/PhoenixGameDevelopment-03_02_2017-04_14_41-AM-300x163.jpg\" alt=\"Unity 03\/02\/2017 , 04:14:41 AM Unity Personal (64bit) - P0Main.unity - New Unity Project - PC, Mac &amp; Linux Standalone \" width=\"300\" height=\"163\" srcset=\"https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2017\/02\/PhoenixGameDevelopment-03_02_2017-04_14_41-AM-300x163.jpg 300w, https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2017\/02\/PhoenixGameDevelopment-03_02_2017-04_14_41-AM-768x416.jpg 768w, https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2017\/02\/PhoenixGameDevelopment-03_02_2017-04_14_41-AM-1024x555.jpg 1024w, https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2017\/02\/PhoenixGameDevelopment-03_02_2017-04_14_41-AM.jpg 1920w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><figcaption id=\"caption-attachment-4699\" class=\"wp-caption-text\">Unity<br \/>03\/02\/2017 , 04:14:41 AM<br \/>Unity Personal (64bit) &#8211; P0Main.unity &#8211; New Unity Project &#8211; PC, Mac &amp; Linux Standalone<\/figcaption><\/figure>\n<figure id=\"attachment_4697\" aria-describedby=\"caption-attachment-4697\" style=\"width: 300px\" class=\"wp-caption alignnone\"><a href=\"https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2017\/02\/PhoenixGameDevelopment-03_02_2017-04_14_34-AM.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"size-medium wp-image-4697\" src=\"https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2017\/02\/PhoenixGameDevelopment-03_02_2017-04_14_34-AM-300x163.jpg\" alt=\"Unity 03\/02\/2017 , 04:14:34 AM Unity Personal (64bit) - P0Main.unity - New Unity Project - PC, Mac &amp; Linux Standalone \" width=\"300\" height=\"163\" srcset=\"https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2017\/02\/PhoenixGameDevelopment-03_02_2017-04_14_34-AM-300x163.jpg 300w, https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2017\/02\/PhoenixGameDevelopment-03_02_2017-04_14_34-AM-768x416.jpg 768w, https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2017\/02\/PhoenixGameDevelopment-03_02_2017-04_14_34-AM-1024x555.jpg 1024w, https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2017\/02\/PhoenixGameDevelopment-03_02_2017-04_14_34-AM.jpg 1920w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><figcaption id=\"caption-attachment-4697\" class=\"wp-caption-text\">Unity<br \/>03\/02\/2017 , 04:14:34 AM<br \/>Unity Personal (64bit) &#8211; P0Main.unity &#8211; New Unity Project &#8211; PC, Mac &amp; Linux Standalone<\/figcaption><\/figure>\n<figure id=\"attachment_4696\" aria-describedby=\"caption-attachment-4696\" style=\"width: 300px\" class=\"wp-caption alignnone\"><a href=\"https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2017\/02\/PhoenixGameDevelopment-03_02_2017-04_14_26-AM.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"size-medium wp-image-4696\" src=\"https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2017\/02\/PhoenixGameDevelopment-03_02_2017-04_14_26-AM-300x163.jpg\" alt=\"Unity 03\/02\/2017 , 04:14:26 AM Unity Personal (64bit) - P0Main.unity - New Unity Project - PC, Mac &amp; Linux Standalone \" width=\"300\" height=\"163\" srcset=\"https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2017\/02\/PhoenixGameDevelopment-03_02_2017-04_14_26-AM-300x163.jpg 300w, https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2017\/02\/PhoenixGameDevelopment-03_02_2017-04_14_26-AM-768x416.jpg 768w, https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2017\/02\/PhoenixGameDevelopment-03_02_2017-04_14_26-AM-1024x555.jpg 1024w, https:\/\/phoenixgamedevelopment.com\/blog\/wp-content\/uploads\/2017\/02\/PhoenixGameDevelopment-03_02_2017-04_14_26-AM.jpg 1920w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><figcaption id=\"caption-attachment-4696\" class=\"wp-caption-text\">Unity<br \/>03\/02\/2017 , 04:14:26 AM<br \/>Unity Personal (64bit) &#8211; P0Main.unity &#8211; New Unity Project &#8211; PC, Mac &amp; Linux Standalone<\/figcaption><\/figure>\n","protected":false},"excerpt":{"rendered":"<p>I have completed a very basic concept of the object generator (using rocks as the objects, instead of trees). I have not added the city generator yet, but it will basically function in the same way, except instead of placing objects at random, it will place them within a certain distance of the cities position, [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3,17,10,11],"tags":[],"class_list":["post-4704","post","type-post","status-publish","format-standard","hentry","category-astral-realms","category-p-0","category-software-and-games","category-spiritus-astrum","has-post-title","has-post-date","has-post-category","has-post-tag","has-post-comment","has-post-author",""],"aioseo_notices":[],"builder_content":"","_links":{"self":[{"href":"https:\/\/phoenixgamedevelopment.com\/blog\/wp-json\/wp\/v2\/posts\/4704"}],"collection":[{"href":"https:\/\/phoenixgamedevelopment.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/phoenixgamedevelopment.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/phoenixgamedevelopment.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/phoenixgamedevelopment.com\/blog\/wp-json\/wp\/v2\/comments?post=4704"}],"version-history":[{"count":2,"href":"https:\/\/phoenixgamedevelopment.com\/blog\/wp-json\/wp\/v2\/posts\/4704\/revisions"}],"predecessor-version":[{"id":4706,"href":"https:\/\/phoenixgamedevelopment.com\/blog\/wp-json\/wp\/v2\/posts\/4704\/revisions\/4706"}],"wp:attachment":[{"href":"https:\/\/phoenixgamedevelopment.com\/blog\/wp-json\/wp\/v2\/media?parent=4704"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/phoenixgamedevelopment.com\/blog\/wp-json\/wp\/v2\/categories?post=4704"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/phoenixgamedevelopment.com\/blog\/wp-json\/wp\/v2\/tags?post=4704"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}