Smoother world streaming?

Talk about the mods you'd like to see in Daggerfall Unity. Give mod creators some ideas!
Post Reply
User avatar
pango
Posts: 3358
Joined: Wed Jul 18, 2018 6:14 pm
Location: France
Contact:

Smoother world streaming?

Post by pango »

Currently, part of the world streamed as you move around is a square of 2t+1 x 2t+1 zones around the zone where the player is located. It has the advantage of simplicity, but 2 inconvenients that I can think of:
  • it loads more zones, on average, when you move along diagonals than along NS or EW directions (around 40% more);
  • when the player crosses a zone border, 2t+1 zones need to be loaded at once; even if this is done asynchronously, it's a huge load change.


I was wondering what would be the benefits of other schemes, like loading zones whose distance is lesser than t from current player position:

Image

It seems the number of zones loaded is not reduced as much as I'd expected (for t=4 in this example, around 17%, which is the best case), but zones loading/unloading is more evenly distributed over time, so I think it would still be interesting to experiment with...
Mastodon: @pango@fosstodon.org
When a measure becomes a target, it ceases to be a good measure.
-- Charles Goodhart

User avatar
Hazelnut
Posts: 3016
Joined: Sat Aug 26, 2017 2:46 pm
Contact:

Re: Smoother world streaming?

Post by Hazelnut »

Certainly possible, but would be added complexity in streaming world code when players can simply reduce view distance if they're having performance issues. I imagine the largest benefit would be reducing the number of locations being laid out at the same time as player crosses map pixel boundaries, which is unfortunately not conducive for parallel processing due to Unity gameobject calls having to run on main thread. This was sped up with some caching of world data, but the GO creation is still fairly heavy. I have a pretty fast CPU so it's not too bad on my PC.
See my mod code for examples of how to change various aspects of DFU: https://github.com/ajrb/dfunity-mods

User avatar
pango
Posts: 3358
Joined: Wed Jul 18, 2018 6:14 pm
Location: France
Contact:

Re: Smoother world streaming?

Post by pango »

I think it's still worth trying to even out, say for people that hope to add VR support...
Mastodon: @pango@fosstodon.org
When a measure becomes a target, it ceases to be a good measure.
-- Charles Goodhart

Post Reply