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

Introduce ActionQueue.on_invalid_action to handle invalid Actions #22

Open
stIncMale opened this issue Feb 24, 2022 · 0 comments
Open
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@stIncMale
Copy link
Collaborator

When actions are produced by AI and UI, encountering invalid actions in Logic.advance is a bug, i.e., assertions are the right way to deal with that. However, when actions come over the network, we cannot consider invalid actions to be a bug in the application that receives them. Therefore, invalid actions must be dealt with differently in such a situation. Logic.advance may pass all invalid actions to ActionQueue.on_invalid_action of the action queue from which the action was received, and then that action queue may either throw an assertion error if it "knows" that it is connected to a local actor, or log or at the very least ignore the action if the queue is connected to a remote actor.

@stIncMale stIncMale added the enhancement New feature or request label Feb 24, 2022
@stIncMale stIncMale added this to the multiplayer milestone Feb 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants