-
Notifications
You must be signed in to change notification settings - Fork 0
General implementation idea
Square Play'n edited this page Feb 9, 2021
·
3 revisions
- MapSheet: Big section of data as downloaded from the APIs
- Chunk: Smaller section of data, the exact size TBD
The render module is responsible for creating the actual window, user interaction and rendering the 3D data.
- Sends events periodically with which chunks it wants loaded, taking into account to not request chunks it already requested but has not yet received.
- This event can contain more data such as which chunks were unloaded since last event
- Receives events with chunk data, which it can then load into the 3D view (or not if not needed anymore)
- Note that this can also be an event for already loaded chunks, but with higher quality data. Then the renderer can change what it displayed to the higher quality data.
The preprocessing module is responsible from converting raw chunk data to data usable by the renderer module.
- Receives events from render module with which chunks should be loaded
- Upon receiving such request, it can first check its own cache if data is already present
- If cache is present, send the highest cached value (as an event to the renderer)
- If no cache of highest quality is present, requests the raw chunk data (as an event to the charter)
- Sends events to the charter module for raw chunk data
- Receives events from the charter module with raw chunk data, which it then starts processing and sends to the render module (below event)
- Sends events to the render module with processed data
The charting module is responsible from loading the map sheets from the APIs, caching some to disk and extracting raw chunk data from them.
- Receives events from preprocessing module with chunks that are to be loaded.
- Upon such request, prepares chunk data either from cache or from API and sends below response
- Receives events form the render module with chunks that are unloaded.
- With this, it can not send raw chunk data if the chunk was already unloaded
- Sends events with raw chunk data (to preprocessing module) for requested chunks
- First sends lowest quality data, then may later send quality data