Simplified movement logic in the GSP #145
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This implements the changes to movement logic suggested in #135. Instead of doing path finding in the GSP, waypoints set in moves must be in one of the six hex principal directions of each other, and then the GSP just moves along that straight line.
Related to this, the character gamestate JSON object no longer holds the
steps
, as they are not needed anymore. Thefindpath
RPC method has nowpdist
argument anymore, and instead outputs waypoints such that they are in principal directions rather than with a certain spacing.This change should have only a minor impact on gameplay, but it shifts path finding entirely to the client (one of the effects is that paths will not be planned around other characters, while they previously were to some extend; only when the blocking characters were stationary, though). It improves movement performance by about 4x according to the benchmarks, which should greatly help wtih syncing performance (the new bottleneck of movement code is now the database update for moved characters).