Skip to content

perf(gamelogic): Bound terrain deformation scans - #3258

Draft
bobtista wants to merge 1 commit into
TheSuperHackers:mainfrom
bobtista:bobtista/perf/terrain-deformation-row-bounds
Draft

perf(gamelogic): Bound terrain deformation scans#3258
bobtista wants to merge 1 commit into
TheSuperHackers:mainfrom
bobtista:bobtista/perf/terrain-deformation-row-bounds

Conversation

@bobtista

@bobtista bobtista commented Sep 4, 2026

Copy link
Copy Markdown

createCraterInTerrain and flattenTerrain calculate iMin.y, but their inner loops start at row 0. The shape checks reject rows outside the affected area, so this wastes more work as the Y position increases.

Now starts the loops at MAX(0, iMin.y), skipping rows below the affected area while preserving the existing map-edge behavior.

Todo:

  • Testing

@bobtista bobtista self-assigned this Sep 4, 2026
@bobtista bobtista added Minor Severity: Minor < Major < Critical < Blocker Performance Is a performance concern labels Sep 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Minor Severity: Minor < Major < Critical < Blocker Performance Is a performance concern

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Terrain deformation loops scan from row 0 wastefully

1 participant