Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Spiral bugfix and improvement #994

Merged
merged 3 commits into from
Oct 8, 2020
Merged

Conversation

DaEgi01
Copy link
Contributor

@DaEgi01 DaEgi01 commented Aug 14, 2020

A crap .. forgot to squash.

  • Make the GenerateSpiralGridCoordsClockwise stream until int.MaxValue + 1 elements were returned.
  • Added caching, zero allocation implementation of spiral coords and tests.
  • Provided a default constructor so that it can be used as singleton.
  • Used a hybrid approach of proper DI and singleton to ensure that both Managers get the same Spiral instance.
  • Adjusted iteration inside Managers to use the non allocating Spiral method.

Provided a default constructor so that it can be used as singleton.
Improved the docs.
Used a hybrid approach of proper DI and singleton to ensure that both Managers get the same Spiral instance.
Adjusted iteration inside Managers to use the non allocating method.
Copy link
Member

@krzychu124 krzychu124 left a comment

Choose a reason for hiding this comment

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

Code looks ok, (ParkingAI still works in game 😅)
I need to figure out why PF cannot find path in specific circumstances and why it creates multiple parked vehicles on single spot - outside of scope of this PR...

Copy link
Contributor

@chameleon-tbn chameleon-tbn left a comment

Choose a reason for hiding this comment

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

Code looks good for me and ingame there is no negative impact with that - i would say this is good :) No error messages in logs, same speed and FPS too in a 300k vanilla city... no strange activities, no stuttering vehicles on my system.

@krzychu124 krzychu124 merged commit e11384d into master Oct 8, 2020
@DaEgi01 DaEgi01 deleted the SpiralBugfixAndImprovement branch October 20, 2020 16:47
@originalfoo originalfoo added this to the 11.6.0 milestone Jan 18, 2022
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.

None yet

4 participants