{"id":8204,"date":"2020-03-29T13:44:02","date_gmt":"2020-03-29T12:44:02","guid":{"rendered":"http:\/\/phoenixgamedevelopment.com\/blog\/?p=8204"},"modified":"2020-03-29T13:44:32","modified_gmt":"2020-03-29T12:44:32","slug":"p0-a6-part-714-optimisation-procedural-generation","status":"publish","type":"post","link":"https:\/\/phoenixgamedevelopment.com\/blog\/p0-a6-part-714-optimisation-procedural-generation\/","title":{"rendered":"P0-A6: Part 714: Optimisation, Procedural Generation"},"content":{"rendered":"\n<p>I have been looking into optimising my project. The framerate is very low, at least when running it in the editor.<br><br>The main issue that I can see is the large number of &#8220;instantiate&#8221; calls when I generate trees and ground cover objects. I am using a coroutine to break this up, but even so, it causes significant performance hits.<br><br>I could try to implement an object pooling system, but I have such a large number of different types of trees, vegetation, etc, an object pooling system would be less effective that it would otherwise be.<br><br>I could  also try creating, or using, a procedural tree generation system, where I could create trees in real time without instantiating them. Depending on how this was done, it could be a lot faster than using instantiate\/destroy, and also allow for far greater randomisation, etc.<br><br>For a project focused on procedural generation, this is really the &#8220;correct&#8221; option, but it would need to be an advanced system in order for it to replace my current art assets. A lot of procedural tree systems look bland and boring compared to manually created assets.<br><br>This is something that I will be looking into in the future.<\/p>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>I have been looking into optimising my project. The framerate is very low, at least when running it in the editor. The main issue that I can see is the large number of &#8220;instantiate&#8221; calls when I generate trees and ground cover objects. I am using a coroutine to break this up, but even so, [&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,21,10,11],"tags":[],"class_list":["post-8204","post","type-post","status-publish","format-standard","hentry","category-astral-realms","category-p-0","category-p0_a6","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\/8204"}],"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=8204"}],"version-history":[{"count":1,"href":"https:\/\/phoenixgamedevelopment.com\/blog\/wp-json\/wp\/v2\/posts\/8204\/revisions"}],"predecessor-version":[{"id":8205,"href":"https:\/\/phoenixgamedevelopment.com\/blog\/wp-json\/wp\/v2\/posts\/8204\/revisions\/8205"}],"wp:attachment":[{"href":"https:\/\/phoenixgamedevelopment.com\/blog\/wp-json\/wp\/v2\/media?parent=8204"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/phoenixgamedevelopment.com\/blog\/wp-json\/wp\/v2\/categories?post=8204"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/phoenixgamedevelopment.com\/blog\/wp-json\/wp\/v2\/tags?post=8204"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}