Skip to content

Conversation

@google-labs-jules
Copy link

This change fixes a crash during city generation and a rendering bug that prevented the map from being displayed. It also resolves dependency issues in the development environment.

This commit addresses two critical issues:
1. An intermittent 'Unable to build a street!' error that caused the application to crash during city generation. This was traced to a pathfinding failure when gate vertices were smoothed. The fix makes the pathfinding algorithm more robust by finding the closest node instead of requiring an exact match.
2. A rendering problem where the generated map would not appear on the screen. This was due to the lack of canvas transformations. The fix adds scaling and translation to the canvas context, ensuring the city is properly centered and visible.

Additionally, the development environment was fixed by adding missing dependencies to the `web/package.json` file.

Note: The project appears to be missing its test files, so the changes could not be verified with automated tests.
@vercel
Copy link

vercel bot commented Aug 4, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
town-generator-os ❌ Failed (Inspect) Aug 4, 2025 10:33pm

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants