mirror of
				https://github.com/tobspr/shapez.io.git
				synced 2025-06-13 13:04:03 +00:00 
			
		
		
		
	Reduce chunk size
This commit is contained in:
		
							parent
							
								
									14edac0f93
								
							
						
					
					
						commit
						2968fe3788
					
				@ -27,7 +27,7 @@ export const globalConfig = {
 | 
				
			|||||||
    maximumTickRate: 500,
 | 
					    maximumTickRate: 500,
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    // Map
 | 
					    // Map
 | 
				
			||||||
    mapChunkSize: 32,
 | 
					    mapChunkSize: 16,
 | 
				
			||||||
    mapChunkPrerenderMinZoom: 1.3,
 | 
					    mapChunkPrerenderMinZoom: 1.3,
 | 
				
			||||||
    mapChunkOverviewMinZoom: 0.7,
 | 
					    mapChunkOverviewMinZoom: 0.7,
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
@ -244,14 +244,14 @@ export class MapChunk {
 | 
				
			|||||||
        // Determine how likely it is that there is a color patch
 | 
					        // Determine how likely it is that there is a color patch
 | 
				
			||||||
        const colorPatchChance = 0.9 - clamp(distanceToOriginInChunks / 25, 0, 1) * 0.5;
 | 
					        const colorPatchChance = 0.9 - clamp(distanceToOriginInChunks / 25, 0, 1) * 0.5;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        if (rng.next() < colorPatchChance) {
 | 
					        if (rng.next() < colorPatchChance / 4) {
 | 
				
			||||||
            const colorPatchSize = Math_max(2, Math_round(1 + clamp(distanceToOriginInChunks / 8, 0, 4)));
 | 
					            const colorPatchSize = Math_max(2, Math_round(1 + clamp(distanceToOriginInChunks / 8, 0, 4)));
 | 
				
			||||||
            this.internalGenerateColorPatch(rng, colorPatchSize, distanceToOriginInChunks);
 | 
					            this.internalGenerateColorPatch(rng, colorPatchSize, distanceToOriginInChunks);
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        // Determine how likely it is that there is a shape patch
 | 
					        // Determine how likely it is that there is a shape patch
 | 
				
			||||||
        const shapePatchChance = 0.9 - clamp(distanceToOriginInChunks / 25, 0, 1) * 0.5;
 | 
					        const shapePatchChance = 0.9 - clamp(distanceToOriginInChunks / 25, 0, 1) * 0.5;
 | 
				
			||||||
        if (rng.next() < shapePatchChance) {
 | 
					        if (rng.next() < shapePatchChance / 4) {
 | 
				
			||||||
            const shapePatchSize = Math_max(2, Math_round(1 + clamp(distanceToOriginInChunks / 8, 0, 4)));
 | 
					            const shapePatchSize = Math_max(2, Math_round(1 + clamp(distanceToOriginInChunks / 8, 0, 4)));
 | 
				
			||||||
            this.internalGenerateShapePatch(rng, shapePatchSize, distanceToOriginInChunks);
 | 
					            this.internalGenerateShapePatch(rng, shapePatchSize, distanceToOriginInChunks);
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
		Reference in New Issue
	
	Block a user