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

Tile Direction Deltas #11

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

crhallberg
Copy link

This is the culmination of what we were discussing over in issue #10.

I've been seeing a position problem related to turning, where the calculated vectors in the program don't match up with what actually happens with the game. After combing through the OpenRCT2 code, I found this tasty bit that adjusts the arrow when the orientation changes. This solves the issue, as illustrated below.

rct_diff

The green arrows is the width of the element, the cyan is the tile direction adjustment.

The tests that were skipped that you pointed out were testing the deprecated Advance function, so I adjusted the turn test for the values I'm seeing in the game and then made them pass.

Look forward to talking this over!

Resolves #10.

@crhallberg
Copy link
Author

Any ideas why the genetic algorithm test would be failing? Hacktoberfest is coming!

@crhallberg
Copy link
Author

Update: Discovered that this broke the track completing code.

PS: Happy Hacktoberfest!

@crhallberg
Copy link
Author

So, I was uneasy editing the trackTests data in rct2_test.go, since they no longer worked with the new tile deltas. I didn't want to edit the tests to match broken code, so I did a little building in RCT2.

image

For example, this is the setup for the test that wants the completer to make two sharp left turns into home. To my relief, the cursor is at {-1, 3} (the new value), not {0, 3} (the old value).

This, on top of the fact that all tests not involving turns still passed made me feel I was doing the correct edits.

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

1 participant