anegostudios / VintageStory-Issues

Vintage Story's public issue tracker for reporting bugs, crashes and the like
46 stars 16 forks source link

Half redwood tree on chunk boundary #1047

Closed Saricane closed 3 years ago

Saricane commented 3 years ago

Game Version: 1.15.0-pre6 Platform: Windows Modded: No

Description

Found a line of splited redwood trees, on a chunk boundary. The chunk wireframe is visible on the screenshot.

How to reproduce

You can try with world seed 1533846596 starting climate "warm" and tp to -255 110 254, but there is no guarantee that the tree placement will be the same.

Screenshots

2021-06-22_10-50-44

Craluminum2413 commented 3 years ago

Trees aren't seed-deterministic

Saricane commented 3 years ago

That's why it's a little more difficult to reproduce the bug.

radfast commented 3 years ago

Thanks for reporting. I cannot reproduce this in various testing with your seed. (Thanks for the seed though and the 'warm' suggestion, it's great for testing our forests.)

Some thoughts:

  1. Is it possible you used the /wgen regen command at all? That will create half-trees easily, because it only updates chunks in (e.g. ) a 5x5 radius, and it makes new trees with a different RNG in the new chunks, therefore any tree in either an old or new chunk which is half across the chunk boundary, would have this issue. And actually it's not just redwoods, it would be half of any tree, for example the leafy canopy could be cut off in a straight line. (Easier to see on redwoods though, because of the look of a trunk cut in half).

  2. It cannot be the treegen code itself, that would not be capable of producing an exactly straight edge like this on the chunk boundary. (Trees always generate across chunk boundaries OK, otherwise you would see problems with every tree species in the game....)

  3. I think it could be an issue if there was a crash while the game was partly saved, so the information approximately summarised as "worldgen needs to finish making a tree once it gets to fully generating this new map edge chunk" did not get saved properly. In other words, any server-side crash while there is unsaved game data can produce anomalies - IMHO this is also a probably cause of the rare "dark / unlit chunk" issue. There will inevitably be crashes with the pre versions of the game, the only real solution is to make the game less crashy, hopefully 1.15-rc1 will be very stable.

  4. Final possibility: if the world - parts of this region - was originally generated in pre.1 then there were known redwood bugs in that, but those were fixed from pre.2 onwards... But those wouldn't look like this, they would be random half or 3/4 trees, not a straight line cut-off along a chunk edge.


Final comment: we intentionally do not make treegen seed deterministic. The reason is that that determinism would still be broken by any small change to the worldgen parameters, for example if the vanilla game or a mod added a new tree type or even changing the number of branches or quantity of vines on an existing tree - after that change the RNG would produce different numbers for every subsequent treegen call in the region even if it started out the same.

Instead we rely on a system where at map edges, information about any "half-generated" tree is stored in the save game, so that when the chunk next to the edge is fully generated in future it will have the other halves of the same trees as were already half-generated in the neighbour chunk. See (3) above.

copygirl commented 3 years ago

Will close as not reproducible for now. More information is welcome if this still occurs.