Page 42 of 60

Re: [MOD] Distant Terrain

Posted: Mon Feb 04, 2019 9:58 pm
by Hazelnut
pango wrote: Mon Feb 04, 2019 9:33 pm PS From what I'm reading it is asynchronous though, so it shouldn't block the game during its whole execution. mmh.
Assuming it's anything like later Java GCs, a parallel collector still needs to block other threads during 2 phases of the overall process. Unfortunately while I'm a moderate expert on Java GCs (prior to java 8) I know nothing about C# GCs. :oops:

Re: [MOD] Distant Terrain

Posted: Tue Feb 05, 2019 3:42 am
by pango
Hazelnut wrote: Mon Feb 04, 2019 9:58 pm
pango wrote: Mon Feb 04, 2019 9:33 pm PS From what I'm reading it is asynchronous though, so it shouldn't block the game during its whole execution. mmh.
Assuming it's anything like later Java GCs, a parallel collector still needs to block other threads during 2 phases of the overall process.[...]
Right, hence my careful choice of words... walking stacks is not something you want to do on live processes, for example.
Anyway, that means that the timings logged by UnloadUnusedAssets() may be a poor indicator of how much your program is impacted by assets gc.
Also, what happens if one calls gc in rapid fire like I did for this benchmark? That could very well be meaningless, even if the timings above look similar to what I've seen in normal game logs...
So, sorry for the noise :oops:

Re: [MOD] Distant Terrain

Posted: Tue Feb 05, 2019 7:12 am
by Nystul
these are interesting and valuable findings.
Regarding DT mod I am not sure if it is a good idea to remove the UnloadUnusedAssets() call. People were reporting in the past that they get crashes if it isn't called after walking around for some time

Re: [MOD] Distant Terrain

Posted: Tue Feb 05, 2019 7:15 am
by Narf the Mouse
Nystul wrote: Tue Feb 05, 2019 7:12 am these are interesting and valuable findings.
Regarding DT mod I am not sure if it is a good idea to remove the UnloadUnusedAssets() call. People were reporting in the past that they get crashes if it isn't called after walking around for some time
It sounds like you're calling it once per terrain gen? Maybe call it once every four? Or let people use a setting?

Re: [MOD] Distant Terrain

Posted: Tue Feb 05, 2019 8:00 am
by Nystul
not sure how often core calls it but dt mod only calls it when player moves to new map pixel

does anyone know if this call must happen in the unity main thread? I fear so but if not we could try to do it in a separate thread

Re: [MOD] Distant Terrain

Posted: Tue Feb 05, 2019 8:38 am
by Hazelnut
I'll take a look with the profiler and report back what it shows. (or my interpretation of what it shows at least)

Re: [MOD] Distant Terrain

Posted: Sun Apr 28, 2019 11:36 am
by pango
Hi guys,
I was just testing the southern border of the map, and strange things happen with Distant Terrain...
Screenshot.jpg
Screenshot.jpg (163.93 KiB) Viewed 4486 times
Both unmodded DFU and Mountains and Hills behave correctly (or at least, as before: you arrive at a clean-cut end of the world)
I haven't checked the other borders.

Re: [MOD] Distant Terrain

Posted: Fri May 03, 2019 5:55 am
by Midknightprince
This is still working for me in the current live build Windows 10

Re: [MOD] Distant Terrain

Posted: Sun May 05, 2019 12:47 pm
by King of Worms
Its working but with this mod, I cant exit the game. It freezes and I need to exit it using the CTRL+ALT+DEL
Windows 7 x64
Anyone has the same issue?

Re: [MOD] Distant Terrain

Posted: Sun May 05, 2019 6:06 pm
by jayhova
I've had that issue for a while