-
Notifications
You must be signed in to change notification settings - Fork 20
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
Allow the player to place and break voxels #317
Conversation
a7776e8
to
8b059d8
Compare
This PR is probably still worth reviewing, but I'll update it to a draft because it doesn't properly handle the case of Player B modifying a chunk that Player A has not generated and then Player A visiting that chunk later. I plan to address this later, and I'll check off the below task once I've done so:
Another issue is that for new clients that receive full chunk data from the server, there is no logic to remove the margins of chunks adjacent to any edited blocks, so this can result in visual bugs. Ideally, the solution to this does not involve the server in any way, since the server shouldn't need to care about margins. The solution to this doesn't need to be too efficient, as margin handling is still a work in progress to begin with.
|
97420a9
to
c371bc4
Compare
8db382c
to
dc0f45c
Compare
dc0f45c
to
3fde115
Compare
I decided to remove the code that saves voxel edits in favor of putting that code in the PR that also loads voxel edits, since that way, the code will actually be tested. |
3fde115
to
d806c85
Compare
9ab5c48
to
2ac704f
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a few cosmetic issues; otherwise LGTM!
Also move tuv_to_xyz method to math.rs
Also simplify SphereCastError struct
Ensure that textures at the end of 1x1 tunnels are visible
2ac704f
to
47d6832
Compare
47d6832
to
6f3d094
Compare
6f3d094
to
c736c90
Compare
The main purpose of this PR is simple: allow the player to break blocks by left-clicking on them and allow them to place blocks by right-clicking on other blocks.
To enable this feature, there are several changes/additions (most important ones listed here):
[u8; 3]
without margins. Rendering code is unaffected by this change (margins were not removed entirely).DualGraph
to simplify common operations related to placing/breaking blocksThere is also a minor cosmetic change, reducing ambient occlusion to make textures at the ends of 1x1 tunnels visible instead of being pitch black.
Fixes #292