I worked a bit tonight and I did get the initial save/load (binary) chunks to disk to work.
Did have some challenges from the fact that the world size is not artifically limited.
The maximum world size is Int64 chunks per axis.
Chunk size then is freely selectable, but with a limit of 2 642 243^3 (but in practice something like 16^3 to 32^3).
Code:Benchmarks Chunks cubed: 21 Chunk count: 9261 Chunk blocks cubed: 16 Blocks array(+2) size: 5832 Initialization etc: 190 ms Occupy ListLoad: 4 ms Per item: 0.000431918799265738 ms Creating chunks, please wait Create chunks one at a time: 10989 ms Chunks processed: 9261 Per item: 1.1865889212828 ms Chunks with solids created: 544 Per created: 20.2003676470588 ms Save chunks disk bulk: 10 ms Items: 544 Per item: 0.0183823529411765 ms Save chunks file locations: 11 ms Create vertices, Indices: 965 ms Items: 544 Per item: 1.77389705882353 ms Slowest item: 2 ms Render (all loaded): 49 ms Items: 544 Per item: 0.0900735294117647 ms Render (all loaded): 1 ms Items: 544 Per item: 0.00183823529411765 ms Updated frustrum: 0 ms Render (in frustrum): 1 ms Items: 185 Per item: 0.00540540540540541 ms
Is any sort of LOD planned?
I mean, those chunks missing their meshes: it would look nicer if instead of holes you rendered solid "plugs" as high as the highest block of the chunk missing its mesh yet. Then retract them into the ground smoothly after the mesh is generated.
Also, there could be other ways: (Planet Explorers had this implemented): LODs like, in the distance meshes are built by joining 8 adjacent blocks into one -- this way you can have a 4-chunk LOD mesh at the price of one.
Yeah this is one of the issues I will address next.
Wow nice to hear. Especially since I consider the code quite messy. I am learning as I go, so some of it is at 'unclean' state. But as I get more comfortable with these things, the codebase also gets cleaner.
I have been having busy times during holidays and now at work... but good sign is that I am looking forward to when I get to work on the engine.
I will next concentrate on world class, and with that it allows smarter order of creating the chunks. Recursive chunk creation following the earth surface, so we can skip all chunks in the sky and underground, and thus be much faster and avoid the 'holes' that Chebmaster pointed out, and create underground in the background.
Then perhaps few more terrain types to make it a bit less unpleasant to look at. After that I guess would be the fun part of adding a bit variation to the landscape creation.
Last edited by Thyandyr; 10-01-2018 at 11:15 PM.
Damn Rimworld. Had to uninstall it. Maybe progress ahad?
Bookmarks