{"id":2367,"date":"2016-02-21T22:03:25","date_gmt":"2016-02-21T22:03:25","guid":{"rendered":"http:\/\/phoenixgamedevelopment.com\/blog\/?p=2367"},"modified":"2016-02-21T22:03:25","modified_gmt":"2016-02-21T22:03:25","slug":"p-152-virtual-world-concept-update-94-fractal-terrain-generation","status":"publish","type":"post","link":"https:\/\/phoenixgamedevelopment.com\/blog\/p-152-virtual-world-concept-update-94-fractal-terrain-generation\/","title":{"rendered":"P-152: Virtual World Concept Update 94: Fractal Terrain Generation"},"content":{"rendered":"<p>I am not quite ready to return to this project, but I think I have an idea as to what I&#8217;d like to try next.<\/p>\n<p>I was generating the terrain before the level loaded, and storing the large number of points generated. I was then trying to create an optimal way of parsing and rendering these points.<\/p>\n<p>A\u00a0much smarter way would be to generate the terrain on-the-fly, using a fractal algorithm. I could then solve the problem of how to generate planet-sized terrains, since generating enough points to create an entire planet at once would be impossible.<\/p>\n<p>Fractal terrain would also be fairly easy to optimise, since only the polygons that are going to be rendered would need to be generated. I may not need to use a quad tree at all.<\/p>\n<p>From what I have read, using a fractal algorithm to generate terrain is not actually that difficult. It would not be entirely dissimilar to the work I have already done on P152. The hard part,or one of the hard parts, would be making the terrain reproducible. Ie, if a user returned to the same position again, the terrain should look the same. With purely dynamic fractal terrain, this would not occur, since the terrain information would not be stored.<\/p>\n<p>However, by using a seed value, it is possible to generate the same set of points again. I would need to come up with some method of generating random terrain on the fly using only the seed values. This is essentially what the game <a href=\"http:\/\/www.no-mans-sky.com\/\">No Man&#8217;s Sky<\/a> does. According to wikipedia, No Man&#8217;s Sky&#8217;s planet terrain generation code is only 1,400 lines long! My current code is well over 10,000 lines, so obviously there is a simpler way to approach this problem.<\/p>\n<p>No Mans Sky also contains many other interesting procedural technologies, such as superformula equations to general shapes, L-systems, \u00a0and a vast, shared, universe to explore. The wikipedia article also mentions complex behaviour emerging from simple AI rules, this is similiar to the type of work I am doing with this project.<\/p>\n<p>Fractal Terrain Generation, even without quad-tree&#8217;s, should be able to solve the problem of realistic planet sized terrains, even in a multiplayer environment.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I am not quite ready to return to this project, but I think I have an idea as to what I&#8217;d like to try next. I was generating the terrain before the level loaded, and storing the large number of points generated. I was then trying to create an optimal way of parsing and rendering [&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-2367","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\/2367"}],"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=2367"}],"version-history":[{"count":1,"href":"https:\/\/phoenixgamedevelopment.com\/blog\/wp-json\/wp\/v2\/posts\/2367\/revisions"}],"predecessor-version":[{"id":2369,"href":"https:\/\/phoenixgamedevelopment.com\/blog\/wp-json\/wp\/v2\/posts\/2367\/revisions\/2369"}],"wp:attachment":[{"href":"https:\/\/phoenixgamedevelopment.com\/blog\/wp-json\/wp\/v2\/media?parent=2367"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/phoenixgamedevelopment.com\/blog\/wp-json\/wp\/v2\/categories?post=2367"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/phoenixgamedevelopment.com\/blog\/wp-json\/wp\/v2\/tags?post=2367"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}