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

Rewrite walker without saving/restoring encounters #331

Closed
SimonN opened this issue May 10, 2018 · 2 comments
Closed

Rewrite walker without saving/restoring encounters #331

SimonN opened this issue May 10, 2018 · 2 comments
Labels

Comments

@SimonN
Copy link
Owner

SimonN commented May 10, 2018

Lix 0.9.*: The walker moves ahead (into walls possibly even), checks things at current location, then moves back when we don't like what we have checked and restores the old encounters.

Idea: That is bad, you shouldn't move back. Instead, you should check things ahead, and only move a single time. Don't reset encounters manually in the code. Such a change needs good unittests. One such test could be the replay in my next post in this issue here, and I'm not sure if I want to allow that behavior or not in the first place.

The tumbler has the same problem, but the tumbler should be rewritten anyway because its code is slow, expensive and spaghetti-like. When we have rewritten both the tumbler and the walker, we can purge forceBodyAndFootEncounters from class Lixxie for good.

@SimonN SimonN added the Physics label May 10, 2018
@SimonN
Copy link
Owner Author

SimonN commented May 10, 2018

$FILENAME single/lemforum/Lovely/anyway.txt
! 68 0 ASSIGN=BLOCKER 0
! 122 0 ASSIGN=BLOCKER 1
! 134 0 ASSIGN=WALKER 1
! 136 0 ASSIGN=WALKER 0
! 239 0 ASSIGN=CLIMBER 0
! 268 0 ASSIGN=CUBER 1

This climber begins climbing within solid ground. It's probably okay, but we should decide on this behavior. It looks natural enough to me. Still, this behavior might be a symptom of (walker moves first, checks stuff, then moves back or climbs) instead of (walker checks first before moving at all).

@SimonN
Copy link
Owner Author

SimonN commented Dec 27, 2023

I've refactored the walker for 0.10.13 to use no encounters. That introduced a physics regression and I've fixed that regression for 0.10.16.

Above replay (from May 10, 2018) plays the same in 0.9.48 and in 0.10.17. Therefore, I change my mind from that post: It's not a symptom of moving first, then moving back and resetting encounters. I deem those physics reasonably natural, even though they can surprise. If those physics ever start bothering somebody, we should file them as a new bug.

@SimonN SimonN closed this as completed Dec 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant