mirror of
https://github.com/tobspr-games/shapez.io.git
synced 2025-12-06 02:30:37 -08:00
Aggregate map chunks in overlay. (#1247)
Overlay rendering performance seemed bottlenecked by drawImage calls. To reduce both the number of calls and the number of different source buffers, cache overlay buffers for squares of chunks. This adds a very small extra cost for updates (one additional drawImage) and some cost for drawing chunks outside of view, but this is more than made up for by the savings. By default, the aggregate are 4x4 squares of chunks.
This commit is contained in:
parent
2b4eb6771f
commit
6f56d77535
6 changed files with 271 additions and 60 deletions
|
|
@ -55,6 +55,7 @@ export const globalConfig = {
|
|||
|
||||
// Map
|
||||
mapChunkSize: 16,
|
||||
chunkAggregateSize: 4,
|
||||
mapChunkOverviewMinZoom: 0.9,
|
||||
mapChunkWorldSize: null, // COMPUTED
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue