This repository has been archived by the owner on Sep 25, 2023. It is now read-only.
Streamable / segmented level loading #262
Labels
client
affects the client
editor
affects the editor
improvement
refactors and the such
question
something that requires more information
server
affects the server
Description
Currently, it is required to download the entire level file before it can be processed. This is undesirable, because the client will not be able to display anything related to the level until it is completely done downloading and processing.
We should prioritize loading geometry over textures, and preferably load terrain before decorative assets such as trees and rocks. After all geometry is loaded, textures can start loading.
There are two solutions I can think of to achieve this:
First being making the level file streamable. This allows the client to parse parts of the file, before it is done downloading the entire file. All geometry has to be in the first half of the file, whilst textures are present in the second half. More info on streaming support can be found on MDN.
We could also make the server parse the file, and serve assets as separate files. This will require a main file, that points to other files that are required. The benefit of this is that with multiple levels, shared resources are possible. This can be beneficial in regards to caching. There will be more requests, but this slight overhead is insignificant to the amount of data sent anyway.
This could also increase memory requirements for the server, but this can also be mitigated by making the file streamable and writing separate assets to disk.
I would like to hear opinions on what you think would be the best approach, and why.
Minimum Acceptance Criteria
The text was updated successfully, but these errors were encountered: