Skip to content

Conversation

@jflann
Copy link
Member

@jflann jflann commented Mar 14, 2025

This pull request replaces the manually written RUL2 of the road roundabouts with a metarules implementation. It was motivated by coming changes to the street network, draggable diagonal streets were not compatible with the existing roundabout implementation.

The metarules code achieves a 90% reduction in RUL2 code by eliminating all adjacencies by way of a surrogate tile. The surrogate tile cannot be drawn in the game, but rather is used to trigger automatic adjacencies with the NAM.dll. Every roundabout tile overrides ortho avenue into the surrogate, and non-INRUL tiles are also overridden by the surrogate tile. In doing so, each roundabout tile is able to reliably override any other roundabout tile.

image

Copy link
Collaborator

@memo33 memo33 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All in all, this looks good to me. The code is very clear and easy to follow, giving us confidence that it works as intended. (I haven't tested it in the game, but as long as all tile IDs defined on this branch can be constructed in the game, it should be fine.)

@jflann
Copy link
Member Author

jflann commented Mar 18, 2025

All in all, this looks good to me. The code is very clear and easy to follow, giving us confidence that it works as intended. (I haven't tested it in the game, but as long as all tile IDs defined on this branch can be constructed in the game, it should be fine.)

Thank you for your review.

@jflann jflann merged commit d9f17e9 into meta-sam Mar 20, 2025
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.

3 participants