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

Camera boundary support #2

Open
arthuro555 opened this issue Aug 3, 2022 · 1 comment
Open

Camera boundary support #2

arthuro555 opened this issue Aug 3, 2022 · 1 comment
Labels
✨ Feature New feature or request
Milestone

Comments

@arthuro555
Copy link
Owner

Cameras are client side for multiple reasons (they are client specific, they are rendering related, they need to be updated on each frame when interpolating and not on each server tick...), but that leaves room for cheating by seeing things one is not supposed to.
An example would be the game "Among us": If a cheater could see everything everywhere, they could see the imposter make their kill, and that would ruin the game.

The solution to this is adding camera boundaries. This would define a window of objects that the client is able to see, and only those objects would be synced with the client. That way, even if a hacker changes its camera to see everything, the other objects won't even be sent to the client and the hacker won't be able to see anything 😎

There should be multiple camera boundaries, to allow seeing two places but not what is in between. Taking again "Among Us" as an example, when watching through the cameras, the zone of those cameras should be synchronized & made visible to the player, but without making a giant camera boundary that covers both the field of sight of the player and of each cameras. Instead, each camera should add an additional camera boundary that allows the client to see what's at their position when they are active.

@arthuro555 arthuro555 modified the milestones: THNK Beta, THNK Release Aug 3, 2022
@arthuro555 arthuro555 added the ✨ Feature New feature or request label Aug 6, 2022
arthuro555 added a commit that referenced this issue Aug 8, 2022
There was a plan to synchronize cameras at first, but due to the complexity, issues and jankiness such a feature would cause, all plans for it have been cancelled for the moment. Instead, camera boundaries are planned as a replacement, see #2
@arthuro555
Copy link
Owner Author

Library to remember when implementing this: https://github.com/mourner/flatbush

Allows to get the objects that are within the camera boundaries in a very fast manner (without iterating on all objects), should be faster with bigger amount of objects within the boundaries (most games)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
✨ Feature New feature or request
Projects
Status: 🔙📋 Backlog
Development

No branches or pull requests

1 participant