Just a quick heads up of a new feature I'm working on. Background preloading of cells.
My goal is to make flying around the island buttery smooth with no loading bars or frame drops whatsoever. I'm not quite at that point yet, mostly because terrain isn't preloaded yet, body parts are not preloaded yet and because I haven't profiled / optimized the code at all yet. Still, the loading times compared to the main branch should be much improved already.
Currently the preloader will activate if you go near a teleport door, or go near an exterior cell border. I'm thinking about preloading fast travel destinations as well, though of course the downside is we don't know the travel destination the player will pick, so would have to load all of them preemptively.
Feel free to try out the branch and let me know how it goes! I haven't come across any crashes or instabilities yet, which is a good sign that the new resource manager design is solid.
Cell preloading
Re: Cell preloading
I'll throw up a set of Windows builds for this tomorrow I think, I want to see this for myself.
-
- Posts: 59
- Joined: 10 Jan 2014, 22:08
Re: Cell preloading
That's awesome. This is way up my "Please-come-before-1.0-feature" list
- ElderTroll
- Posts: 499
- Joined: 25 Jan 2012, 07:01
Re: Cell preloading
Nice! My 6 year old netbook is totally incapable of taking advantage of that, but really exciting stuff, scrawl. Saw that the trello board had moved finished the resource management refactoring to done.
Re: Cell preloading
The mod Rise of the House Telvanni has a realm with many doors that act as portals to key destinations. The preloader might go crazy here. Maybe there should be some sort of upper bound for the amount of preloading.
Re: Cell preloading
Or maybe it'd be a perfect place to stress test the preloader. At least with vanilla Morrowind assets, I don't think there would be many issues; the rendering should be many times more impactful than the asset loading, especially since a certain number of assets will be recycled. The more preloading you do, the more assets will be recycled, at least in theory.nwah wrote:The mod Rise of the House Telvanni has a realm with many doors that act as portals to key destinations. The preloader might go crazy here. Maybe there should be some sort of upper bound for the amount of preloading.
Re: Cell preloading
Oh sure, having the game installed on an SSD definitely helps. Even on a fast drive though, the loading wasn't instantaneous, since we still need to convert assets, upload them to the GPU, etc. So the preloader should help SSD and HDD users alike.Might install it on my NVME drive just for shits and giggles
I normally have the game on my SSD, but right now I'm using the hard drive to test a "worst case" preloading scenario. When conducting these tests it's also a good idea to clear the OS's file cache first.
What SquireNed said, also, if the preloader does end up being overloaded, that shouldn't be much of an issue, because the main thread should continue running smoothly (i.e. we can load a cell in the main thread while the preloader still hasn't finished loading other cells in the background). The new resource system is mostly lock-free, we only need to lock when inserting a loaded item to the cache, not during the loading itself. I.e. the two threads can load at the same time without really interfering with each other.The mod Rise of the House Telvanni has a realm with many doors that act as portals to key destinations. The preloader might go crazy here. Maybe there should be some sort of upper bound for the amount of preloading.
Re: Cell preloading
Don't think you can get much closer to instantaneous than this:scrawl wrote:Even on a fast drive though, the loading wasn't instantaneous, since we still need to convert assets, upload them to the GPU, etc. So the preloader should help SSD and HDD users alike.
https://www.youtube.com/watch?v=vHB4wbl ... e=youtu.be
I take it the "ChangeCellGrid Took xx.xxx" messages are in milliseconds?
Edit: I think I'll move the files over to a hard drive and test the difference between 0.38 and this build, that NVME drive is like using a nuke to kill a fly.